From 5cf40eea349ed93c68757c0bcf08595193f50517 Mon Sep 17 00:00:00 2001 From: Basil James Whitehouse III Date: Wed, 26 Oct 2011 18:06:35 -0300 Subject: [PATCH 0001/2844] Add issue tracker url to readme since the one in the github description doesn't click through properly. --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index bbbc751361..5761034fc3 100644 --- a/README +++ b/README @@ -3,6 +3,7 @@ Copyright 2010 Ning Inc DESCRIPTION ----------- +Issue tracker: https://issues.sonatype.org/browse/AHC Javadoc: http://sonatype.github.com/async-http-client/apidocs/index.html Getting started: http://is.gd/kexrN (PDF) http://is.gd/ja6My (HTML) From a70bd89dcf9fca4bc4801c099d34367bd4f5a89e Mon Sep 17 00:00:00 2001 From: Jenny Williamson Date: Wed, 26 Oct 2011 17:44:56 -0700 Subject: [PATCH 0002/2844] fix NTLM NPE --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index b2a0531030..4df17cea7a 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1411,12 +1411,15 @@ private Realm ntlmChallenge(List wwwAuth, } Realm.RealmBuilder realmBuilder; + Realm.AuthScheme authScheme; if (realm != null) { realmBuilder = new Realm.RealmBuilder().clone(realm); + authScheme = realm.getAuthScheme(); } else { realmBuilder = new Realm.RealmBuilder(); + authScheme = Realm.AuthScheme.NTLM; } - newRealm = realmBuilder.setScheme(realm.getAuthScheme()) + newRealm = realmBuilder.setScheme(authScheme) .setUri(URI.create(request.getUrl()).getPath()) .setMethodName(request.getMethod()) .build(); From 41830d4b9c000eea55b343cf33b795a96557cf74 Mon Sep 17 00:00:00 2001 From: Jenny Williamson Date: Fri, 4 Nov 2011 10:26:03 -0700 Subject: [PATCH 0003/2844] cap wait time on NettyResponseFuture the javadoc says this get will wait for at most the given timeout before returning, but as is this keeps waiting so long as content was received more recently than now-timeout. --- .../ning/http/client/providers/netty/NettyResponseFuture.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index 44965a44e3..71bccb6f8a 100755 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -202,9 +202,6 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, latch.await(); } else { expired = !latch.await(l, tu); - if (!contentProcessed.get() && expired && ((System.currentTimeMillis() - touch.get()) <= l)) { - return get(l, tu); - } } if (expired) { From 384a3f0008d948dc7e97df6ad7195cce78ca3615 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 4 Nov 2011 14:31:56 -0400 Subject: [PATCH 0004/2844] Initial design of the WebSocket Protocol support in AHC --- .../com/ning/http/client/AsyncHandler.java | 6 +- .../com/ning/http/client/UpgradeHandler.java | 37 ++++++++++ .../ning/http/client/websocket/WebSocket.java | 34 ++++++++++ .../websocket/WebSocketUpgradeHandler.java | 67 +++++++++++++++++++ 4 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/ning/http/client/UpgradeHandler.java create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocket.java create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java diff --git a/src/main/java/com/ning/http/client/AsyncHandler.java b/src/main/java/com/ning/http/client/AsyncHandler.java index 4498056f82..ec9bc77022 100644 --- a/src/main/java/com/ning/http/client/AsyncHandler.java +++ b/src/main/java/com/ning/http/client/AsyncHandler.java @@ -53,7 +53,11 @@ public static enum STATE { /** * Continue the processing */ - CONTINUE + CONTINUE, + /** + * Upgrade the protocol. When specified, the AsyncHttpProvider will try to invoke the {@link UpgradeHandler#onReady} + */ + UPGRADE } /** diff --git a/src/main/java/com/ning/http/client/UpgradeHandler.java b/src/main/java/com/ning/http/client/UpgradeHandler.java new file mode 100644 index 0000000000..0ca0cc53a2 --- /dev/null +++ b/src/main/java/com/ning/http/client/UpgradeHandler.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client; + +/** + * Invoked when an {@link AsyncHandler.STATE#UPGRADE} is returned. Currently the library only support {@link WebSocket} + * as type. + * + * @param + */ +public interface UpgradeHandler { + + /** + * If the HTTP Upgrade succeed (response's status code equals 101), the {@link AsyncHttpProvider} will invoke that + * method + * + * @param t an Upgradable entity + */ + void onSuccess(T t); + + /** + * If the upgrade fail. + * @param t a {@link Throwable} + */ + void onFailure(Throwable t); + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java new file mode 100644 index 0000000000..ca45254061 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +/** + * A Websocket client + */ +public interface WebSocket { + + WebSocket sendMessage(byte[] message); + + WebSocket addMessageListener(WebSocketMessageListener l); + + public static interface WebSocketMessageListener{ + + void onMessage(byte[] message); + + void onClose(); + + void onError(Throwable t); + + } + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java new file mode 100644 index 0000000000..c0b15962fd --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +import com.ning.http.client.AsyncHandler; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.UpgradeHandler; + +/** + * An {@link AsyncHandler} which is able to execute WebSocket upgrade. + */ +public class WebSocketUpgradeHandler implements UpgradeHandler, AsyncHandler { + + private WebSocket webSocket; + + @Override + public void onThrowable(Throwable t) { + onFailure(t); + } + + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + throw new IllegalStateException(); + } + + @Override + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + if (responseStatus.getStatusCode() == 101) { + return STATE.UPGRADE; + } else { + throw new IllegalStateException("Invalid Upgrade protocol"); + } + } + + @Override + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + throw new IllegalStateException(); + } + + @Override + public WebSocket onCompleted() throws Exception { + return webSocket; + } + + @Override + public void onSuccess(WebSocket webSocket) { + this.webSocket = webSocket; + } + + @Override + public void onFailure(Throwable t) { + } + + +} From c8601e6ab5d8b3ad984fa621dd4e8791769579b5 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 4 Nov 2011 14:39:15 -0400 Subject: [PATCH 0005/2844] Improve API --- src/main/java/com/ning/http/client/websocket/WebSocket.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index ca45254061..3e7ab622cb 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -19,9 +19,9 @@ public interface WebSocket { WebSocket sendMessage(byte[] message); - WebSocket addMessageListener(WebSocketMessageListener l); + WebSocket addMessageListener(WebSocketListener l); - public static interface WebSocketMessageListener{ + public static interface WebSocketListener { void onMessage(byte[] message); @@ -31,4 +31,5 @@ public static interface WebSocketMessageListener{ } + WebSocket close(); } From a6caf681adbadd6626712f3a117dfd33c0ee6959 Mon Sep 17 00:00:00 2001 From: Jenny Williamson Date: Fri, 4 Nov 2011 11:40:52 -0700 Subject: [PATCH 0006/2844] add idleConnectionTimeout --- .../com/ning/http/client/AsyncHttpClientConfig.java | 12 ++++++++---- .../ning/http/client/AsyncHttpClientConfigBean.java | 6 ++++++ .../providers/netty/NettyAsyncHttpProvider.java | 2 +- .../client/providers/netty/NettyResponseFuture.java | 8 +++++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 156c947363..aca9e69fa4 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -57,6 +57,7 @@ public class AsyncHttpClientConfig { protected int maxConnectionPerHost; protected int connectionTimeOutInMs; protected int idleConnectionInPoolTimeoutInMs; + protected int idleConnectionTimeoutInMs; protected int requestTimeoutInMs; protected boolean redirectEnabled; protected int maxDefaultRedirects; @@ -89,6 +90,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, int maxConnectionPerHost, int connectionTimeOutInMs, int idleConnectionInPoolTimeoutInMs, + int idleConnectionTimeoutInMs, int requestTimeoutInMs, boolean redirectEnabled, int maxDefaultRedirects, @@ -117,6 +119,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.maxConnectionPerHost = maxConnectionPerHost; this.connectionTimeOutInMs = connectionTimeOutInMs; this.idleConnectionInPoolTimeoutInMs = idleConnectionInPoolTimeoutInMs; + this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; this.requestTimeoutInMs = requestTimeoutInMs; this.redirectEnabled = redirectEnabled; this.maxDefaultRedirects = maxDefaultRedirects; @@ -188,10 +191,9 @@ public int getConnectionTimeoutInMs() { * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. * * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. - * @deprecated Please use {@link com.ning.http.client.AsyncHttpClientConfig#getIdleConnectionInPoolTimeoutInMs()} */ public int getIdleConnectionTimeoutInMs() { - return idleConnectionInPoolTimeoutInMs; + return idleConnectionTimeoutInMs; } /** @@ -451,6 +453,7 @@ public static class Builder { private int defaultMaxConnectionPerHost = Integer.getInteger(ASYNC_CLIENT + "defaultMaxConnectionsPerHost", -1); private int defaultConnectionTimeOutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultConnectionTimeoutInMS", 60 * 1000); private int defaultIdleConnectionInPoolTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionInPoolTimeoutInMS", 60 * 1000); + private int defaultIdleConnectionTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionTimeoutInMS", 60 * 1000); private int defaultRequestTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultRequestTimeoutInMS", 60 * 1000); private boolean redirectEnabled = Boolean.getBoolean(ASYNC_CLIENT + "defaultRedirectsEnabled"); private int maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); @@ -531,10 +534,9 @@ public Builder setConnectionTimeoutInMs(int defaultConnectionTimeOutInMs) { * @param defaultIdleConnectionTimeoutInMs * the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. * @return a {@link Builder} - * @deprecated Please use {@link Builder#setIdleConnectionInPoolTimeoutInMs(int)} */ public Builder setIdleConnectionTimeoutInMs(int defaultIdleConnectionTimeoutInMs) { - this.defaultIdleConnectionInPoolTimeoutInMs = defaultIdleConnectionTimeoutInMs; + this.defaultIdleConnectionTimeoutInMs = defaultIdleConnectionTimeoutInMs; return this; } @@ -905,6 +907,7 @@ public Builder(AsyncHttpClientConfig prototype) { connectionsPool = prototype.getConnectionsPool(); defaultConnectionTimeOutInMs = prototype.getConnectionTimeoutInMs(); defaultIdleConnectionInPoolTimeoutInMs = prototype.getIdleConnectionInPoolTimeoutInMs(); + defaultIdleConnectionTimeoutInMs = prototype.getIdleConnectionTimeoutInMs(); defaultMaxConnectionPerHost = prototype.getMaxConnectionPerHost(); maxDefaultRedirects = prototype.getMaxRedirects(); defaultMaxTotalConnections = prototype.getMaxTotalConnections(); @@ -955,6 +958,7 @@ public AsyncHttpClientConfig build() { defaultMaxConnectionPerHost, defaultConnectionTimeOutInMs, defaultIdleConnectionInPoolTimeoutInMs, + defaultIdleConnectionTimeoutInMs, defaultRequestTimeoutInMs, redirectEnabled, maxDefaultRedirects, diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java index 447ebfb483..71557fb82f 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java @@ -48,6 +48,7 @@ void configureDefaults() { maxConnectionPerHost = Integer.getInteger(ASYNC_CLIENT + "defaultMaxConnectionsPerHost", -1); connectionTimeOutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultConnectionTimeoutInMS", 60 * 1000); idleConnectionInPoolTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionInPoolTimeoutInMS", 60 * 1000); + idleConnectionTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionTimeoutInMS", 60 * 1000); requestTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultRequestTimeoutInMS", 60 * 1000); redirectEnabled = Boolean.getBoolean(ASYNC_CLIENT + "defaultRedirectsEnabled"); maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); @@ -110,6 +111,11 @@ public AsyncHttpClientConfigBean setIdleConnectionInPoolTimeoutInMs(int idleConn return this; } + public AsyncHttpClientConfigBean setIdleConnectionTimeoutInMs(int idleConnectionTimeoutInMs) { + this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; + return this; + } + public AsyncHttpClientConfigBean setRequestTimeoutInMs(int requestTimeoutInMs) { this.requestTimeoutInMs = requestTimeoutInMs; return this; diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4df17cea7a..61c0a9fd77 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1844,7 +1844,7 @@ public static NettyResponseFuture newFuture(URI uri, NettyAsyncHttpProvider provider) { NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, - requestTimeout(config, request.getPerRequestConfig()), provider); + requestTimeout(config, request.getPerRequestConfig()), config.getIdleConnectionTimeoutInMs(), provider); if (request.getHeaders().getFirstValue("Expect") != null && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index 71bccb6f8a..bb58421dcb 100755 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -60,6 +60,7 @@ enum STATE { private final AtomicBoolean isCancelled = new AtomicBoolean(false); private AsyncHandler asyncHandler; private final int responseTimeoutInMs; + private final int idleConnectionTimeoutInMs; private Request request; private HttpRequest nettyRequest; private final AtomicReference content = new AtomicReference(); @@ -72,6 +73,7 @@ enum STATE { private final AtomicBoolean inAuth = new AtomicBoolean(false); private final AtomicBoolean statusReceived = new AtomicBoolean(false); private final AtomicLong touch = new AtomicLong(System.currentTimeMillis()); + private final long start = System.currentTimeMillis(); private final NettyAsyncHttpProvider asyncHttpProvider; private final AtomicReference state = new AtomicReference(STATE.NEW); private final AtomicBoolean contentProcessed = new AtomicBoolean(false); @@ -89,10 +91,12 @@ public NettyResponseFuture(URI uri, AsyncHandler asyncHandler, HttpRequest nettyRequest, int responseTimeoutInMs, + int idleConnectionTimeoutInMs, NettyAsyncHttpProvider asyncHttpProvider) { this.asyncHandler = asyncHandler; this.responseTimeoutInMs = responseTimeoutInMs; + this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; this.request = request; this.nettyRequest = nettyRequest; this.uri = uri; @@ -169,7 +173,9 @@ public boolean cancel(boolean force) { * @return true if response has expired and should be terminated. */ public boolean hasExpired() { - return responseTimeoutInMs != -1 && ((System.currentTimeMillis() - touch.get()) >= responseTimeoutInMs); + long now = System.currentTimeMillis(); + return idleConnectionTimeoutInMs != -1 && ((now - touch.get()) >= idleConnectionTimeoutInMs) + || responseTimeoutInMs != -1 && ((now - start) >= responseTimeoutInMs); } /** From eb5eb2c3d193916572011efd42f02c4f103c5eb8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 9 Nov 2011 13:17:48 -0800 Subject: [PATCH 0007/2844] Update Charsets reference. --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 +- .../com/ning/http/client/providers/grizzly/GrizzlyResponse.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 27bc10050a..6455e26177 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -66,7 +66,7 @@ import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.Protocol; -import org.glassfish.grizzly.http.util.Charsets; +import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.http.util.CookieSerializerUtils; import org.glassfish.grizzly.http.util.DataChunk; import org.glassfish.grizzly.http.util.Header; diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 1bbdb2e8e4..564a6d7e51 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -23,7 +23,7 @@ import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.http.CookiesBuilder; -import org.glassfish.grizzly.http.util.Charsets; +import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.memory.Buffers; import org.glassfish.grizzly.memory.MemoryManager; import org.glassfish.grizzly.utils.BufferInputStream; From 0963b7d8650e29b0b6f2d545f6a09ab930b92736 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 24 Nov 2011 09:30:24 -0500 Subject: [PATCH 0008/2844] Fix broken build --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index c840531c05..d37e0da7b1 100644 --- a/pom.xml +++ b/pom.xml @@ -410,6 +410,8 @@ **/Request$EntityWriter **/RequestBuilderBase **/Response + **/Response$ + **/NettyResponseFuture **/**ResponseBodyPart From e5be9b6aac84102d15fa65778cd693866726ae16 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 25 Nov 2011 11:14:28 -0800 Subject: [PATCH 0009/2844] Use daemon thread for Timer --- .../ning/http/client/providers/netty/NettyConnectionsPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index 4aac86fb28..1db07ab66f 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -35,7 +35,7 @@ public class NettyConnectionsPool implements ConnectionsPool { private final ConcurrentHashMap> connectionsPool = new ConcurrentHashMap>(); private final ConcurrentHashMap channel2IdleChannel = new ConcurrentHashMap(); private final AtomicBoolean isClosed = new AtomicBoolean(false); - private final Timer idleConnectionDetector = new Timer(); + private final Timer idleConnectionDetector = new Timer(true); private final boolean sslConnectionPoolEnabled; private final int maxTotalConnections; private final int maxConnectionPerHost; From 8264af051e753ff408e860607575178a2d892b7d Mon Sep 17 00:00:00 2001 From: Romain SERTELON Date: Mon, 28 Nov 2011 11:30:01 +0100 Subject: [PATCH 0010/2844] Handles params & queryParams only if maps are not empty Params were set in the request even if the map of params was empty, this could lead to requests with no body even if we set one. This commit fixes this behaviour for Netty provider. The same has been done for queryParams (in RequestBuilderBase) to prevent '?' to be added even if not wanted --- src/main/java/com/ning/http/client/RequestBuilderBase.java | 2 +- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/RequestBuilderBase.java b/src/main/java/com/ning/http/client/RequestBuilderBase.java index 04c52cdbaf..1e7efe1e5f 100644 --- a/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -134,7 +134,7 @@ private String toUrl(boolean encode) { throw new IllegalArgumentException("Illegal URL: " + url, e); } - if (queryParams != null) { + if (queryParams != null && !queryParams.isEmpty()) { StringBuilder builder = new StringBuilder(); if (!url.substring(8).contains("/")) { // no other "/" than http[s]:// -> http://localhost:1234 diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 61c0a9fd77..0863718573 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -712,7 +712,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, int length = lengthWrapper[0]; nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes, 0, length)); - } else if (request.getParams() != null) { + } else if (request.getParams() != null && !request.getParams().isEmpty()) { StringBuilder sb = new StringBuilder(); for (final Entry> paramEntry : request.getParams()) { final String key = paramEntry.getKey(); From c7b372f3ae70eb455512e77356ef6af5e759fd5a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 28 Nov 2011 09:13:37 -0500 Subject: [PATCH 0011/2844] Cosmetics, no functional changes --- .../netty/NettyAsyncHttpProvider.java | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4df17cea7a..33bbbc6cc6 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -129,22 +129,15 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { private final static String HTTP_HANDLER = "httpHandler"; - final static String SSL_HANDLER = "sslHandler"; + private final static String SSL_HANDLER = "sslHandler"; private final static String HTTPS = "https"; private final static String HTTP = "http"; - private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); - private final ClientBootstrap plainBootstrap; - private final ClientBootstrap secureBootstrap; - private final static int MAX_BUFFERED_BYTES = 8192; - private final AsyncHttpClientConfig config; - private final AtomicBoolean isClose = new AtomicBoolean(false); - private final ClientSocketChannelFactory socketChannelFactory; private final ChannelGroup openChannels = new @@ -161,21 +154,13 @@ public boolean remove(Object o) { private final ConnectionsPool connectionsPool; - private Semaphore freeConnections = null; - private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; - private boolean executeConnectAsync = true; - public static final ThreadLocal IN_IO_THREAD = new ThreadLocalBoolean(); - private final boolean trackConnections; - private final boolean useRawUrl; - private final static NTLMEngine ntlmEngine = new NTLMEngine(); - private final static SpnegoEngine spnegoEngine = new SpnegoEngine(); public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { @@ -492,7 +477,7 @@ public void operationComplete(ChannelFuture cf) { } } - + private static boolean isProxyServer(AsyncHttpClientConfig config, Request request) { return request.getProxyServer() != null || config.getProxyServer() != null; } From 6e714f44e0f2fb60c620c05e2300df45b36661c8 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 28 Nov 2011 10:59:01 -0500 Subject: [PATCH 0012/2844] First drop for WebSocket support. Not tested, not working --- .../netty/NettyAsyncHttpProvider.java | 721 +++++++++++------- .../providers/netty/NettyWebSocket.java | 65 ++ .../http/client/providers/netty/Protocol.java | 27 + .../ning/http/client/websocket/WebSocket.java | 12 +- .../client/websocket/WebSocketListener.java | 23 + .../websocket/WebSocketUpgradeHandler.java | 9 +- 6 files changed, 559 insertions(+), 298 deletions(-) create mode 100644 src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/Protocol.java create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketListener.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 33bbbc6cc6..2f4c933408 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -46,6 +46,7 @@ import com.ning.http.client.ntlm.NTLMEngine; import com.ning.http.client.ntlm.NTLMEngineException; import com.ning.http.client.providers.netty.spnego.SpnegoEngine; +import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartBody; import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.util.AsyncHttpProviderUtils; @@ -86,8 +87,12 @@ import org.jboss.netty.handler.codec.http.HttpHeaders; import org.jboss.netty.handler.codec.http.HttpMethod; import org.jboss.netty.handler.codec.http.HttpRequest; +import org.jboss.netty.handler.codec.http.HttpRequestEncoder; import org.jboss.netty.handler.codec.http.HttpResponse; +import org.jboss.netty.handler.codec.http.HttpResponseDecoder; import org.jboss.netty.handler.codec.http.HttpVersion; +import org.jboss.netty.handler.codec.http.websocket.DefaultWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocket.WebSocketFrameEncoder; import org.jboss.netty.handler.ssl.SslHandler; import org.jboss.netty.handler.stream.ChunkedFile; import org.jboss.netty.handler.stream.ChunkedWriteHandler; @@ -129,12 +134,14 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { private final static String HTTP_HANDLER = "httpHandler"; - private final static String SSL_HANDLER = "sslHandler"; + protected final static String SSL_HANDLER = "sslHandler"; private final static String HTTPS = "https"; private final static String HTTP = "http"; + private static final String WEBSOCKET = "ws"; private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); private final ClientBootstrap plainBootstrap; private final ClientBootstrap secureBootstrap; + private final ClientBootstrap webSocketBootstrap; private final static int MAX_BUFFERED_BYTES = 8192; private final AsyncHttpClientConfig config; private final AtomicBoolean isClose = new AtomicBoolean(false); @@ -151,8 +158,6 @@ public boolean remove(Object o) { return removed; } }; - - private final ConnectionsPool connectionsPool; private Semaphore freeConnections = null; private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; @@ -162,6 +167,8 @@ public boolean remove(Object o) { private final boolean useRawUrl; private final static NTLMEngine ntlmEngine = new NTLMEngine(); private final static SpnegoEngine spnegoEngine = new SpnegoEngine(); + private final Protocol httpProtocol = new HttpProtocol(); + private final Protocol webSocketProtocol = new WebSocketProtocol(); public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { @@ -188,6 +195,7 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { } plainBootstrap = new ClientBootstrap(socketChannelFactory); secureBootstrap = new ClientBootstrap(socketChannelFactory); + webSocketBootstrap = new ClientBootstrap(socketChannelFactory); configureNetty(); this.config = config; @@ -256,6 +264,18 @@ public ChannelPipeline getPipeline() throws Exception { DefaultChannelFuture.setUseDeadLockChecker(true); } } + + webSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + pipeline.addLast("ws-decoder", new HttpResponseDecoder()); + pipeline.addLast("ws-encoder", new WebSocketFrameEncoder()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + return pipeline; + } + }); } void constructSSLPipeline(final NettyConnectListener cl) { @@ -479,7 +499,7 @@ public void operationComplete(ChannelFuture cf) { } private static boolean isProxyServer(AsyncHttpClientConfig config, Request request) { - return request.getProxyServer() != null || config.getProxyServer() != null; + return request.getProxyServer() != null || config.getProxyServer() != null; } protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, @@ -510,17 +530,23 @@ private static HttpRequest construct(AsyncHttpClientConfig config, nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { StringBuilder path = null; - if(isProxyServer(config, request)) - path = new StringBuilder(uri.toString()); + if (isProxyServer(config, request)) + path = new StringBuilder(uri.toString()); else { - path = new StringBuilder(uri.getRawPath()); - if (uri.getQuery() != null) { - path.append("?").append(uri.getRawQuery()); - } + path = new StringBuilder(uri.getRawPath()); + if (uri.getQuery() != null) { + path.append("?").append(uri.getRawQuery()); + } } nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path.toString()); } + if (uri.getScheme().equalsIgnoreCase(WEBSOCKET)) { + nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); + nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); + nettyRequest.addHeader(HttpHeaders.Names.ORIGIN, "http://" + uri.getHost()); + } + if (host != null) { if (uri.getPort() == -1) { nettyRequest.setHeader(HttpHeaders.Names.HOST, host); @@ -732,7 +758,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, /** * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. */ - if (uri.toString().startsWith("https")) { + if (uri.toString().startsWith(HTTPS)) { ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); mre.writeRequest(new ChannelBufferOutputStream(b)); nettyRequest.setContent(b); @@ -779,6 +805,7 @@ public void close() { socketChannelFactory.releaseExternalResources(); plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); + webSocketBootstrap.releaseExternalResources(); } catch (Throwable t) { log.warn("Unexpected error on close", t); } @@ -813,6 +840,10 @@ private ListenableFuture doConnect(final Request request, final AsyncHand throw new IOException("Closed"); } + if (request.getUrl().startsWith(WEBSOCKET) && !validateWebSocketRequest(request, asyncHandler)) { + throw new IOException("WebSocket method must be a GET"); + } + ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); String requestUrl; if (useRawUrl) { @@ -903,7 +934,6 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } } - NettyConnectListener c = new NettyConnectListener.Builder(config, request, asyncHandler, f, this, bufferedBytes).build(uri); boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, uri.getHost()); @@ -912,7 +942,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } ChannelFuture channelFuture; - ClientBootstrap bootstrap = useSSl ? secureBootstrap : plainBootstrap; + ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? webSocketBootstrap : (useSSl ? secureBootstrap : plainBootstrap); bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); // Do no enable this with win. @@ -1021,7 +1051,6 @@ private void finishChannel(final ChannelHandlerContext ctx) { public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) throws Exception { //call super to reset the read timeout super.messageReceived(ctx, e); - IN_IO_THREAD.set(Boolean.TRUE); if (ctx.getAttachment() == null) { log.debug("ChannelHandlerContext wasn't having any attachment"); @@ -1053,276 +1082,8 @@ public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) thr return; } - final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); - future.touch(); - - // The connect timeout occured. - if (future.isCancelled() || future.isDone()) { - finishChannel(ctx); - return; - } - - HttpRequest nettyRequest = future.getNettyRequest(); - AsyncHandler handler = future.getAsyncHandler(); - Request request = future.getRequest(); - HttpResponse response = null; - try { - if (e.getMessage() instanceof HttpResponse) { - response = (HttpResponse) e.getMessage(); - - log.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); - - // Required if there is some trailing headers. - future.setHttpResponse(response); - - int statusCode = response.getStatus().getCode(); - - String ka = response.getHeader(HttpHeaders.Names.CONNECTION); - future.setKeepAlive(ka == null || ka.toLowerCase().equals("keep-alive")); - - List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - - HttpResponseStatus status = new ResponseStatus(future.getURI(), response, this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build(); - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - try { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - abort(future, efe); - } - } - - // The request has changed - if (fc.replayRequest()) { - replayRequest(future, fc, response, ctx); - return; - } - - Realm newRealm = null; - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); - final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); - final RequestBuilder builder = new RequestBuilder(future.getRequest()); - - if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { - builder.setUrl(future.getURI().toString()); - } - - if (statusCode == 401 - && wwwAuth.size() > 0 - && !future.getAndSetAuth(true)) { - - future.setState(NettyResponseFuture.STATE.NEW); - // NTLM - if (!wwwAuth.contains("Kerberos") && (wwwAuth.contains("NTLM") || (wwwAuth.contains("Negotiate")))) { - newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (wwwAuth.contains("Negotiate")) { - newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) return; - } else { - Realm.RealmBuilder realmBuilder; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) - ; - } else { - realmBuilder = new Realm.RealmBuilder(); - } - newRealm = realmBuilder - .setUri(URI.create(request.getUrl()).getPath()) - .setMethodName(request.getMethod()) - .setUsePreemptiveAuth(true) - .parseWWWAuthenticateHeader(wwwAuth.get(0)) - .build(); - } - - final Realm nr = newRealm; - - log.debug("Sending authentication to {}", request.getUrl()); - AsyncCallable ac = new AsyncCallable(future) { - public Object call() throws Exception { - drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); - nextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); - return null; - } - }; - - if (future.getKeepAlive() && response.isChunked()) { - // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); - } else { - ac.call(); - } - return; - } - - if (statusCode == 100) { - future.getAndSetWriteHeaders(false); - future.getAndSetWriteBody(true); - writeRequest(ctx.getChannel(), config, future, nettyRequest); - return; - } - - List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); - if (statusCode == 407 - && proxyAuth.size() > 0 - && !future.getAndSetAuth(true)) { - - log.debug("Sending proxy authentication to {}", request.getUrl()); - - future.setState(NettyResponseFuture.STATE.NEW); - - if (!proxyAuth.contains("Kerberos") && (proxyAuth.get(0).contains("NTLM") || (proxyAuth.contains("Negotiate")))) { - newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (proxyAuth.contains("Negotiate")) { - newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) return; - } else { - newRealm = future.getRequest().getRealm(); - } - - Request req = builder.setHeaders(headers).setRealm(newRealm).build(); - future.setReuseChannel(true); - future.setConnectAllowed(true); - nextRequest(req, future); - return; - } - - if (future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT) - && statusCode == 200) { - - log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); - - if (future.getKeepAlive()) { - future.attachChannel(ctx.getChannel(), true); - } - - try { - log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - upgradeProtocol(ctx.getChannel().getPipeline(), request.getUrl()); - } catch (Throwable ex) { - abort(future, ex); - } - Request req = builder.build(); - future.setReuseChannel(true); - future.setConnectAllowed(false); - nextRequest(req, future); - return; - } - - boolean redirectEnabled = request.isRedirectEnabled() ? true : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { - - if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { - // We must allow 401 handling again. - future.getAndSetAuth(false); - - String location = response.getHeader(HttpHeaders.Names.LOCATION); - URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); - boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); - - if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { - final RequestBuilder nBuilder = stripQueryString ? - new RequestBuilder(future.getRequest()).setQueryParameters(null) - : new RequestBuilder(future.getRequest()); - - final URI initialConnectionUri = future.getURI(); - final boolean initialConnectionKeepAlive = future.getKeepAlive(); - future.setURI(uri); - final String newUrl = uri.toString(); - - log.debug("Redirecting to {}", newUrl); - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); - } - - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); - } - - AsyncCallable ac = new AsyncCallable(future) { - public Object call() throws Exception { - if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && - connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { - return null; - } - finishChannel(ctx); - return null; - } - }; - - if (response.isChunked()) { - // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); - } else { - ac.call(); - } - nextRequest(nBuilder.setUrl(newUrl).build(), future); - return; - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } - - if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { - finishUpdate(future, ctx, response.isChunked()); - return; - } else if (updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), response, this))) { - finishUpdate(future, ctx, response.isChunked()); - return; - } else if (!response.isChunked()) { - if (response.getContent().readableBytes() != 0) { - updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, this, true)); - } - finishUpdate(future, ctx, false); - return; - } - - if (nettyRequest.getMethod().equals(HttpMethod.HEAD)) { - updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, this, true)); - markAsDone(future, ctx); - drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); - } - - } else if (e.getMessage() instanceof HttpChunk) { - HttpChunk chunk = (HttpChunk) e.getMessage(); - - if (handler != null) { - if (chunk.isLast() || updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), null, this, chunk, chunk.isLast()))) { - if (chunk instanceof DefaultHttpChunkTrailer) { - updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), - future.getHttpResponse(), this, (HttpChunkTrailer) chunk)); - } - finishUpdate(future, ctx, !chunk.isLast()); - } - } - } - } catch (Exception t) { - if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) - .request(future.getRequest()).ioException(IOException.class.cast(t)).build(); - fc = handleIoException(fc, future); - - if (fc.replayRequest()) { - replayRequest(future, fc, response, ctx); - return; - } - } - - try { - abort(future, t); - } finally { - finishUpdate(future, ctx, false); - throw t; - } - } + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.handle(ctx, e); } private Realm kerberosChallenge(List proxyAuth, @@ -1739,6 +1500,9 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) } closeChannel(ctx); ctx.sendUpstream(e); + + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.onError(ctx, e); } protected static boolean abortOnConnectCloseException(Throwable cause) { @@ -2149,5 +1913,394 @@ public boolean canCacheConnection() { public void destroy() { } } + + private static final boolean validateWebSocketRequest(Request request, AsyncHandler asyncHandler) { + if (request.getMethod() != "GET" || WebSocketUpgradeHandler.class.isAssignableFrom(asyncHandler.getClass())) { + return false; + } + return true; + } + + private final class HttpProtocol implements Protocol { + @Override + public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { + final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + future.touch(); + + // The connect timeout occured. + if (future.isCancelled() || future.isDone()) { + finishChannel(ctx); + return; + } + + HttpRequest nettyRequest = future.getNettyRequest(); + AsyncHandler handler = future.getAsyncHandler(); + Request request = future.getRequest(); + HttpResponse response = null; + try { + if (e.getMessage() instanceof HttpResponse) { + response = (HttpResponse) e.getMessage(); + + log.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); + + // Required if there is some trailing headers. + future.setHttpResponse(response); + + int statusCode = response.getStatus().getCode(); + + String ka = response.getHeader(HttpHeaders.Names.CONNECTION); + future.setKeepAlive(ka == null || ka.toLowerCase().equals("keep-alive")); + + List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); + Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); + + HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build(); + for (ResponseFilter asyncFilter : config.getResponseFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + abort(future, efe); + } + } + + // The request has changed + if (fc.replayRequest()) { + replayRequest(future, fc, response, ctx); + return; + } + + Realm newRealm = null; + ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); + final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); + final RequestBuilder builder = new RequestBuilder(future.getRequest()); + + if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { + builder.setUrl(future.getURI().toString()); + } + + if (statusCode == 401 + && wwwAuth.size() > 0 + && !future.getAndSetAuth(true)) { + + future.setState(NettyResponseFuture.STATE.NEW); + // NTLM + if (!wwwAuth.contains("Kerberos") && (wwwAuth.contains("NTLM") || (wwwAuth.contains("Negotiate")))) { + newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (wwwAuth.contains("Negotiate")) { + newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) return; + } else { + Realm.RealmBuilder realmBuilder; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) + ; + } else { + realmBuilder = new Realm.RealmBuilder(); + } + newRealm = realmBuilder + .setUri(URI.create(request.getUrl()).getPath()) + .setMethodName(request.getMethod()) + .setUsePreemptiveAuth(true) + .parseWWWAuthenticateHeader(wwwAuth.get(0)) + .build(); + } + + final Realm nr = newRealm; + + log.debug("Sending authentication to {}", request.getUrl()); + AsyncCallable ac = new AsyncCallable(future) { + public Object call() throws Exception { + drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); + nextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); + return null; + } + }; + + if (future.getKeepAlive() && response.isChunked()) { + // We must make sure there is no bytes left before executing the next request. + ctx.setAttachment(ac); + } else { + ac.call(); + } + return; + } + + if (statusCode == 100) { + future.getAndSetWriteHeaders(false); + future.getAndSetWriteBody(true); + writeRequest(ctx.getChannel(), config, future, nettyRequest); + return; + } + + List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); + if (statusCode == 407 + && proxyAuth.size() > 0 + && !future.getAndSetAuth(true)) { + + log.debug("Sending proxy authentication to {}", request.getUrl()); + + future.setState(NettyResponseFuture.STATE.NEW); + + if (!proxyAuth.contains("Kerberos") && (proxyAuth.get(0).contains("NTLM") || (proxyAuth.contains("Negotiate")))) { + newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (proxyAuth.contains("Negotiate")) { + newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) return; + } else { + newRealm = future.getRequest().getRealm(); + } + + Request req = builder.setHeaders(headers).setRealm(newRealm).build(); + future.setReuseChannel(true); + future.setConnectAllowed(true); + nextRequest(req, future); + return; + } + + if (future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT) + && statusCode == 200) { + + log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); + + if (future.getKeepAlive()) { + future.attachChannel(ctx.getChannel(), true); + } + + try { + log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); + upgradeProtocol(ctx.getChannel().getPipeline(), request.getUrl()); + } catch (Throwable ex) { + abort(future, ex); + } + Request req = builder.build(); + future.setReuseChannel(true); + future.setConnectAllowed(false); + nextRequest(req, future); + return; + } + + boolean redirectEnabled = request.isRedirectEnabled() ? true : config.isRedirectEnabled(); + if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { + + if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { + // We must allow 401 handling again. + future.getAndSetAuth(false); + + String location = response.getHeader(HttpHeaders.Names.LOCATION); + URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); + boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); + + if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { + final RequestBuilder nBuilder = stripQueryString ? + new RequestBuilder(future.getRequest()).setQueryParameters(null) + : new RequestBuilder(future.getRequest()); + + final URI initialConnectionUri = future.getURI(); + final boolean initialConnectionKeepAlive = future.getKeepAlive(); + future.setURI(uri); + final String newUrl = uri.toString(); + + log.debug("Redirecting to {}", newUrl); + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + AsyncCallable ac = new AsyncCallable(future) { + public Object call() throws Exception { + if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && + connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { + return null; + } + finishChannel(ctx); + return null; + } + }; + + if (response.isChunked()) { + // We must make sure there is no bytes left before executing the next request. + ctx.setAttachment(ac); + } else { + ac.call(); + } + nextRequest(nBuilder.setUrl(newUrl).build(), future); + return; + } + } else { + throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); + } + } + + if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { + finishUpdate(future, ctx, response.isChunked()); + return; + } else if (updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this))) { + finishUpdate(future, ctx, response.isChunked()); + return; + } else if (!response.isChunked()) { + if (response.getContent().readableBytes() != 0) { + updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); + } + finishUpdate(future, ctx, false); + return; + } + + if (nettyRequest.getMethod().equals(HttpMethod.HEAD)) { + updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); + markAsDone(future, ctx); + drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); + } + + } else if (e.getMessage() instanceof HttpChunk) { + HttpChunk chunk = (HttpChunk) e.getMessage(); + + if (handler != null) { + if (chunk.isLast() || updateBodyAndInterrupt(future, handler, + new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, chunk, chunk.isLast()))) { + if (chunk instanceof DefaultHttpChunkTrailer) { + updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), + future.getHttpResponse(), NettyAsyncHttpProvider.this, (HttpChunkTrailer) chunk)); + } + finishUpdate(future, ctx, !chunk.isLast()); + } + } + } + } catch (Exception t) { + if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) + .request(future.getRequest()).ioException(IOException.class.cast(t)).build(); + fc = handleIoException(fc, future); + + if (fc.replayRequest()) { + replayRequest(future, fc, response, ctx); + return; + } + } + + try { + abort(future, t); + } finally { + finishUpdate(future, ctx, false); + throw t; + } + } + } + + @Override + public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { + } + + @Override + public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { + } + } + + private final class WebSocketProtocol implements Protocol { + + @Override + public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { + final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + + if (e.getMessage() instanceof HttpResponse) { + HttpResponse response = (HttpResponse) e.getMessage(); + final org.jboss.netty.handler.codec.http.HttpResponseStatus status = + new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); + + final boolean validStatus = response.getStatus().equals(status); + final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE).equals(HttpHeaders.Values.WEBSOCKET); + final boolean validConnection = response.getHeader(HttpHeaders.Names.CONNECTION).equals(HttpHeaders.Values.UPGRADE); + + HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; + + if (!validStatus || !validUpgrade || !validConnection || statusReceived) { + throw new IOException("Invalid handshake response"); + } + + if (h.onHeadersReceived(new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this)) == STATE.CONTINUE) { + h.onSuccess(new NettyWebSocket(ctx.getChannel())); + } + } else if (e.getMessage() instanceof DefaultWebSocketFrame) { + final DefaultWebSocketFrame frame = (DefaultWebSocketFrame) e.getMessage(); + + HttpChunk webSocketChunk = new HttpChunk() { + private ChannelBuffer content; + + @Override + public boolean isLast() { + return false; + } + + @Override + public ChannelBuffer getContent() { + return content; + } + + @Override + public void setContent(ChannelBuffer content) { + this.content = content; + } + }; + + webSocketChunk.setContent(ChannelBuffers.wrappedBuffer(frame.getBinaryData())); + ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, webSocketChunk, true); + h.onBodyPartReceived(rp); + + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + webSocket.onMessage(rp.getBodyPartBytes()); + } + } + + @Override + public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { + try { + log.trace("onError {}", e); + if (!NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { + return; + } + + NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + webSocket.onError(e.getCause()); + webSocket.close(); + } catch (Throwable t) { + log.error("onError", t); + } + } + + @Override + public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { + log.trace("onClose {}", e); + if (!NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { + return; + } + + try { + NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + + webSocket.close(); + } catch (Throwable t) { + log.error("onError", t); + + } + } + } } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java new file mode 100644 index 0000000000..5f97b164df --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.websocket.WebSocket; +import com.ning.http.client.websocket.WebSocketListener; +import org.jboss.netty.channel.Channel; + +import java.util.concurrent.ConcurrentLinkedQueue; + +public class NettyWebSocket implements WebSocket { + + private final Channel channel; + private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); + + public NettyWebSocket(Channel channel) { + this.channel = channel; + } + + @Override + public WebSocket sendMessage(byte[] message) { + channel.write(message); + return this; + } + + @Override + public WebSocket addMessageListener(WebSocketListener l) { + listeners.add(l); + return this; + } + + @Override + public void close() { + onClose(); + channel.close(); + } + + protected void onMessage(byte[] message) { + for (WebSocketListener l : listeners) { + l.onMessage(message); + } + } + + protected void onError(Throwable t) { + for (WebSocketListener l : listeners) { + l.onError(t); + } + } + + protected void onClose() { + for (WebSocketListener l : listeners) { + l.onClose(); + } + } +} diff --git a/src/main/java/com/ning/http/client/providers/netty/Protocol.java b/src/main/java/com/ning/http/client/providers/netty/Protocol.java new file mode 100644 index 0000000000..718cd20305 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/Protocol.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ChannelStateEvent; +import org.jboss.netty.channel.ExceptionEvent; +import org.jboss.netty.channel.MessageEvent; + +public interface Protocol { + + void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception; + + void onError(ChannelHandlerContext ctx, ExceptionEvent e); + + void onClose(ChannelHandlerContext ctx, ChannelStateEvent e); +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index 3e7ab622cb..492d07a488 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -21,15 +21,5 @@ public interface WebSocket { WebSocket addMessageListener(WebSocketListener l); - public static interface WebSocketListener { - - void onMessage(byte[] message); - - void onClose(); - - void onError(Throwable t); - - } - - WebSocket close(); + void close(); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java new file mode 100644 index 0000000000..40ad3e9489 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +public interface WebSocketListener { + + void onMessage(byte[] message); + + void onClose(); + + void onError(Throwable t); + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index c0b15962fd..d7fa5387c7 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -17,6 +17,7 @@ import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.UpgradeHandler; +import org.jboss.netty.handler.codec.http.HttpResponse; /** * An {@link AsyncHandler} which is able to execute WebSocket upgrade. @@ -32,7 +33,7 @@ public void onThrowable(Throwable t) { @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - throw new IllegalStateException(); + return STATE.CONTINUE; } @Override @@ -46,11 +47,14 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio @Override public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - throw new IllegalStateException(); + return STATE.CONTINUE; } @Override public WebSocket onCompleted() throws Exception { + if (webSocket == null) { + throw new IllegalStateException("WebSocket is null"); + } return webSocket; } @@ -63,5 +67,4 @@ public void onSuccess(WebSocket webSocket) { public void onFailure(Throwable t) { } - } From 29b2d369e765cc60db57749d448e709d798debf0 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 28 Nov 2011 14:10:48 -0500 Subject: [PATCH 0013/2844] Make WebSocket support hybi-10, make it work --- .../ning/http/client/RequestBuilderBase.java | 12 +- .../netty/NettyAsyncHttpProvider.java | 40 +- .../providers/netty/NettyWebSocket.java | 4 +- .../client/providers/netty/WebSocketUtil.java | 73 ++++ .../netty/netty4/BinaryWebSocketFrame.java | 80 ++++ .../netty/netty4/CloseWebSocketFrame.java | 63 +++ .../netty4/ContinuationWebSocketFrame.java | 156 +++++++ .../netty/netty4/PingWebSocketFrame.java | 79 ++++ .../netty/netty4/PongWebSocketFrame.java | 78 ++++ .../netty/netty4/TextWebSocketFrame.java | 140 +++++++ .../providers/netty/netty4/UTF8Exception.java | 47 +++ .../providers/netty/netty4/UTF8Output.java | 89 ++++ .../netty/netty4/WebSocket08FrameDecoder.java | 384 ++++++++++++++++++ .../netty/netty4/WebSocket08FrameEncoder.java | 186 +++++++++ .../netty/netty4/WebSocketFrame.java | 92 +++++ .../netty/netty4/WebSocketFrameType.java | 37 ++ .../http/util/AsyncHttpProviderUtils.java | 2 +- 17 files changed, 1542 insertions(+), 20 deletions(-) create mode 100644 src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java create mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java diff --git a/src/main/java/com/ning/http/client/RequestBuilderBase.java b/src/main/java/com/ning/http/client/RequestBuilderBase.java index 04c52cdbaf..92bf624551 100644 --- a/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -127,11 +127,13 @@ private String toUrl(boolean encode) { url = "http://localhost"; } - String uri; - try { - uri = URI.create(url).toURL().toString(); - } catch (Throwable e) { - throw new IllegalArgumentException("Illegal URL: " + url, e); + String uri = url; + if (!uri.startsWith("ws")) { + try { + uri = URI.create(url).toURL().toString(); + } catch (Throwable e) { + throw new IllegalArgumentException("Illegal URL: " + url, e); + } } if (queryParams != null) { diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 19fdd3b0b1..30ba1427ee 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -46,6 +46,9 @@ import com.ning.http.client.ntlm.NTLMEngine; import com.ning.http.client.ntlm.NTLMEngineException; import com.ning.http.client.providers.netty.spnego.SpnegoEngine; +import com.ning.http.client.providers.netty.netty4.WebSocket08FrameDecoder; +import com.ning.http.client.providers.netty.netty4.WebSocket08FrameEncoder; +import com.ning.http.client.providers.netty.netty4.WebSocketFrame; import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartBody; import com.ning.http.multipart.MultipartRequestEntity; @@ -91,8 +94,6 @@ import org.jboss.netty.handler.codec.http.HttpResponse; import org.jboss.netty.handler.codec.http.HttpResponseDecoder; import org.jboss.netty.handler.codec.http.HttpVersion; -import org.jboss.netty.handler.codec.http.websocket.DefaultWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocket.WebSocketFrameEncoder; import org.jboss.netty.handler.ssl.SslHandler; import org.jboss.netty.handler.stream.ChunkedFile; import org.jboss.netty.handler.stream.ChunkedWriteHandler; @@ -133,6 +134,7 @@ import static org.jboss.netty.channel.Channels.pipeline; public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { + private final static String WEBSOCKET_KEY = "Sec-WebSocket-Key"; private final static String HTTP_HANDLER = "httpHandler"; protected final static String SSL_HANDLER = "sslHandler"; private final static String HTTPS = "https"; @@ -271,7 +273,7 @@ public ChannelPipeline getPipeline() throws Exception { public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = pipeline(); pipeline.addLast("ws-decoder", new HttpResponseDecoder()); - pipeline.addLast("ws-encoder", new WebSocketFrameEncoder()); + pipeline.addLast("ws-encoder", new HttpRequestEncoder()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); return pipeline; } @@ -540,11 +542,13 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path.toString()); } - - if (uri.getScheme().equalsIgnoreCase(WEBSOCKET)) { + boolean webSocket = uri.getScheme().equalsIgnoreCase(WEBSOCKET); + if (webSocket) { nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); - nettyRequest.addHeader(HttpHeaders.Names.ORIGIN, "http://" + uri.getHost()); + nettyRequest.addHeader("Sec-WebSocket-Origin", "http://" + uri.getHost()); + nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); + nettyRequest.addHeader("Sec-WebSocket-Version", "8"); } if (host != null) { @@ -640,7 +644,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } } - if (!request.getHeaders().containsKey(HttpHeaders.Names.CONNECTION)) { + if (!webSocket && !request.getHeaders().containsKey(HttpHeaders.Names.CONNECTION)) { nettyRequest.setHeader(HttpHeaders.Names.CONNECTION, "keep-alive"); } @@ -1915,7 +1919,7 @@ public void destroy() { } private static final boolean validateWebSocketRequest(Request request, AsyncHandler asyncHandler) { - if (request.getMethod() != "GET" || WebSocketUpgradeHandler.class.isAssignableFrom(asyncHandler.getClass())) { + if (request.getMethod() != "GET" || !WebSocketUpgradeHandler.class.isAssignableFrom(asyncHandler.getClass())) { return false; } return true; @@ -2220,21 +2224,30 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); final boolean validStatus = response.getStatus().equals(status); - final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE).equals(HttpHeaders.Values.WEBSOCKET); + final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; final boolean validConnection = response.getHeader(HttpHeaders.Names.CONNECTION).equals(HttpHeaders.Values.UPGRADE); HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; - if (!validStatus || !validUpgrade || !validConnection || statusReceived) { + if (!validStatus || !validUpgrade || !validConnection || !statusReceived) { throw new IOException("Invalid handshake response"); } + String accept = response.getHeader("Sec-WebSocket-Accept"); + String key = WebSocketUtil.getAcceptKey(future.getNettyRequest().getHeader(WEBSOCKET_KEY)); + if (accept == null || !accept.equals(key) ) { + throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); + } + if (h.onHeadersReceived(new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this)) == STATE.CONTINUE) { h.onSuccess(new NettyWebSocket(ctx.getChannel())); } - } else if (e.getMessage() instanceof DefaultWebSocketFrame) { - final DefaultWebSocketFrame frame = (DefaultWebSocketFrame) e.getMessage(); + ctx.getPipeline().replace("ws-decoder", "ws-decoder", new WebSocket08FrameDecoder(false,false)); + ctx.getPipeline().replace("ws-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); + future.done(null); + } else if (e.getMessage() instanceof WebSocketFrame) { + final WebSocketFrame frame = (WebSocketFrame) e.getMessage(); HttpChunk webSocketChunk = new HttpChunk() { private ChannelBuffer content; @@ -2261,6 +2274,8 @@ public void setContent(ChannelBuffer content) { NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); webSocket.onMessage(rp.getBodyPartBytes()); + } else { + log.error("Invalid attachment {}", ctx.getAttachment()); } } @@ -2298,7 +2313,6 @@ public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { webSocket.close(); } catch (Throwable t) { log.error("onError", t); - } } } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 5f97b164df..c6d4f9dd56 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -12,8 +12,10 @@ */ package com.ning.http.client.providers.netty; +import com.ning.http.client.providers.netty.netty4.BinaryWebSocketFrame; import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketListener; +import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import java.util.concurrent.ConcurrentLinkedQueue; @@ -29,7 +31,7 @@ public NettyWebSocket(Channel channel) { @Override public WebSocket sendMessage(byte[] message) { - channel.write(message); + channel.write(new BinaryWebSocketFrame(ChannelBuffers.wrappedBuffer(message))); return this; } diff --git a/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java new file mode 100644 index 0000000000..0e9cf3501f --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.util.Base64; +import org.jboss.netty.util.CharsetUtil; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public final class WebSocketUtil { + public static final String MAGIC_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + + public static String getKey() { + byte[] nonce = createRandomBytes(16); + return base64Encode(nonce); + } + + public static String getAcceptKey(String key) throws UnsupportedEncodingException { + String acceptSeed = key + MAGIC_GUID; + byte[] sha1 = sha1(acceptSeed.getBytes("US-ASCII")); + return base64Encode(sha1); + } + + public static byte[] md5(byte[] bytes) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + return md.digest(bytes); + } catch (NoSuchAlgorithmException e) { + throw new InternalError("MD5 not supported on this platform"); + } + } + + public static byte[] sha1(byte[] bytes) { + try { + MessageDigest md = MessageDigest.getInstance("SHA1"); + return md.digest(bytes); + } catch (NoSuchAlgorithmException e) { + throw new InternalError("SHA-1 not supported on this platform"); + } + } + + public static String base64Encode(byte[] bytes) { + return Base64.encode(bytes); + } + + public static byte[] createRandomBytes(int size) { + byte[] bytes = new byte[size]; + + for (int i = 0; i < size; i++) { + bytes[i] = (byte) createRandomNumber(0, 255); + } + + return bytes; + } + + public static int createRandomNumber(int min, int max) { + return (int) (Math.random() * max + min); + } + +} + diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java new file mode 100644 index 0000000000..8a5f2bf533 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; + +/** + * Web Socket frame containing binary data + * + * @author Vibul Imtarnasan + */ +public class BinaryWebSocketFrame extends WebSocketFrame { + + /** + * Creates a new empty binary frame. + */ + public BinaryWebSocketFrame() { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } + + /** + * Creates a new binary frame with the specified binary data. The final + * fragment flag is set to true. + * + * @param binaryData + * the content of the frame. + */ + public BinaryWebSocketFrame(ChannelBuffer binaryData) { + this.setBinaryData(binaryData); + } + + /** + * Creates a new binary frame with the specified binary data and the final + * fragment flag. + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param binaryData + * the content of the frame. + */ + public BinaryWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setBinaryData(binaryData); + } + + @Override + public String toString() { + return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; + } + +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java new file mode 100644 index 0000000000..de7a180116 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffers; + +/** + * Web Socket Frame for closing the connection + * + * @author Vibul Imtarnasan + */ +public class CloseWebSocketFrame extends WebSocketFrame { + + /** + * Creates a new empty close frame. + */ + public CloseWebSocketFrame() { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } + + /** + * Creates a new close frame + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + */ + public CloseWebSocketFrame(boolean finalFragment, int rsv) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + } + + @Override + public String toString() { + return getClass().getSimpleName(); + } +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java new file mode 100644 index 0000000000..041cfac01b --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; +import org.jboss.netty.util.CharsetUtil; + +/** + * Web Socket continuation frame containing continuation text or binary data. + * This is used for fragmented messages where the contents of a messages is + * contained more than 1 frame. + * + * @author Vibul Imtarnasan + */ +public class ContinuationWebSocketFrame extends WebSocketFrame { + + private String aggregatedText = null; + + /** + * Creates a new empty continuation frame. + */ + public ContinuationWebSocketFrame() { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } + + /** + * Creates a new continuation frame with the specified binary data. The + * final fragment flag is set to true. + * + * @param binaryData + * the content of the frame. + */ + public ContinuationWebSocketFrame(ChannelBuffer binaryData) { + this.setBinaryData(binaryData); + } + + /** + * Creates a new continuation frame with the specified binary data + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param binaryData + * the content of the frame. + */ + public ContinuationWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setBinaryData(binaryData); + } + + /** + * Creates a new continuation frame with the specified binary data + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param binaryData + * the content of the frame. + * @param aggregatedText + * Aggregated text set by decoder on the final continuation frame + * of a fragmented text message + */ + public ContinuationWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData, String aggregatedText) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setBinaryData(binaryData); + this.aggregatedText = aggregatedText; + } + + /** + * Creates a new continuation frame with the specified text data + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param text + * text content of the frame. + */ + public ContinuationWebSocketFrame(boolean finalFragment, int rsv, String text) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setText(text); + } + + /** + * Returns the text data in this frame + */ + public String getText() { + if (this.getBinaryData() == null) { + return null; + } + return this.getBinaryData().toString(CharsetUtil.UTF_8); + } + + /** + * Sets the string for this frame + * + * @param text + * text to store + */ + public void setText(String text) { + if (text == null || text.equalsIgnoreCase("")) { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } else { + this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); + } + } + + @Override + public String toString() { + return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; + } + + /** + * Aggregated text returned by decoder on the final continuation frame of a + * fragmented text message + */ + public String getAggregatedText() { + return aggregatedText; + } + + public void setAggregatedText(String aggregatedText) { + this.aggregatedText = aggregatedText; + } + +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java new file mode 100644 index 0000000000..04acbe8e9b --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; + +/** + * Web Socket frame containing binary data + * + * @author Vibul Imtarnasan + */ +public class PingWebSocketFrame extends WebSocketFrame { + + /** + * Creates a new empty ping frame. + */ + public PingWebSocketFrame() { + this.setFinalFragment(true); + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } + + /** + * Creates a new ping frame with the specified binary data. + * + * @param binaryData + * the content of the frame. + */ + public PingWebSocketFrame(ChannelBuffer binaryData) { + this.setBinaryData(binaryData); + } + + /** + * Creates a new ping frame with the specified binary data + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param binaryData + * the content of the frame. + */ + public PingWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setBinaryData(binaryData); + } + + @Override + public String toString() { + return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; + } + +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java new file mode 100644 index 0000000000..f754a2c88a --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; + +/** + * Web Socket frame containing binary data + * + * @author Vibul Imtarnasan + */ +public class PongWebSocketFrame extends WebSocketFrame { + + /** + * Creates a new empty pong frame. + */ + public PongWebSocketFrame() { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } + + /** + * Creates a new pong frame with the specified binary data. + * + * @param binaryData + * the content of the frame. + */ + public PongWebSocketFrame(ChannelBuffer binaryData) { + this.setBinaryData(binaryData); + } + + /** + * Creates a new pong frame with the specified binary data + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param binaryData + * the content of the frame. + */ + public PongWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setBinaryData(binaryData); + } + + @Override + public String toString() { + return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; + } + +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java new file mode 100644 index 0000000000..9af42897c6 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; +import org.jboss.netty.util.CharsetUtil; + +/** + * Web Socket text frame with assumed UTF-8 encoding + * + * @author Vibul Imtarnasan + * + */ +public class TextWebSocketFrame extends WebSocketFrame { + + /** + * Creates a new empty text frame. + */ + public TextWebSocketFrame() { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } + + /** + * Creates a new text frame with the specified text string. The final + * fragment flag is set to true. + * + * @param text + * String to put in the frame + */ + public TextWebSocketFrame(String text) { + if (text == null || text.equalsIgnoreCase("")) { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } else { + this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); + } + } + + /** + * Creates a new text frame with the specified binary data. The final + * fragment flag is set to true. + * + * @param binaryData + * the content of the frame. Must be UTF-8 encoded + */ + public TextWebSocketFrame(ChannelBuffer binaryData) { + this.setBinaryData(binaryData); + } + + /** + * Creates a new text frame with the specified text string. The final + * fragment flag is set to true. + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param text + * String to put in the frame + */ + public TextWebSocketFrame(boolean finalFragment, int rsv, String text) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + if (text == null || text.equalsIgnoreCase("")) { + this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); + } else { + this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); + } + } + + /** + * Creates a new text frame with the specified binary data. The final + * fragment flag is set to true. + * + * @param finalFragment + * flag indicating if this frame is the final fragment + * @param rsv + * reserved bits used for protocol extensions + * @param binaryData + * the content of the frame. Must be UTF-8 encoded + */ + public TextWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { + this.setFinalFragment(finalFragment); + this.setRsv(rsv); + this.setBinaryData(binaryData); + } + + /** + * Returns the text data in this frame + */ + public String getText() { + if (this.getBinaryData() == null) { + return null; + } + return this.getBinaryData().toString(CharsetUtil.UTF_8); + } + + /** + * Sets the string for this frame + * + * @param text + * text to store + */ + public void setText(String text) { + if (text == null) { + throw new NullPointerException("text"); + } + this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); + } + + @Override + public String toString() { + return getClass().getSimpleName() + "(text: " + getText() + ')'; + } +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java new file mode 100644 index 0000000000..eabd3cb49e --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Adaptation of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + * + * Copyright (c) 2008-2009 Bjoern Hoehrmann + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +package com.ning.http.client.providers.netty.netty4; + +/** + * Invalid UTF8 bytes encountered + * + * @author Bjoern Hoehrmann + * @author https://github.com/joewalnes/webbit + * @author Vibul Imtarnasan + */ +public class UTF8Exception extends RuntimeException { + private static final long serialVersionUID = 1L; + + public UTF8Exception(String reason) { + super(reason); + } +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java new file mode 100644 index 0000000000..c2c5971040 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Adaptation of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + * + * Copyright (c) 2008-2009 Bjoern Hoehrmann + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and + * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +package com.ning.http.client.providers.netty.netty4; + +/** + * Checks UTF8 bytes for validity before converting it into a string + * + * @author Bjoern Hoehrmann + * @author https://github.com/joewalnes/webbit + * @author Vibul Imtarnasan + */ +public class UTF8Output { + private static final int UTF8_ACCEPT = 0; + private static final int UTF8_REJECT = 12; + + private static final byte[] TYPES = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 11, 6, 6, 6, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 }; + + private static final byte[] STATES = { 0, 12, 24, 36, 60, 96, 84, 12, 12, 12, 48, 72, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 0, 12, 12, 12, 24, 12, 12, 12, 12, 12, 24, 12, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 24, 12, 12, 12, + 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 }; + + private int state = UTF8_ACCEPT; + private int codep = 0; + + private final StringBuilder stringBuilder; + + public UTF8Output(byte[] bytes) { + stringBuilder = new StringBuilder(bytes.length); + write(bytes); + } + + public void write(byte[] bytes) { + for (byte b : bytes) { + write(b); + } + } + + public void write(int b) { + byte type = TYPES[b & 0xFF]; + + codep = (state != UTF8_ACCEPT) ? (b & 0x3f) | (codep << 6) : (0xff >> type) & (b); + + state = STATES[state + type]; + + if (state == UTF8_ACCEPT) { + stringBuilder.append((char) codep); + } else if (state == UTF8_REJECT) { + throw new UTF8Exception("bytes are not UTF-8"); + } + } + + @Override + public String toString() { + if (state != UTF8_ACCEPT) { + throw new UTF8Exception("bytes are not UTF-8"); + } + return stringBuilder.toString(); + } +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java new file mode 100644 index 0000000000..fa59f866af --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java @@ -0,0 +1,384 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +// (BSD License: http://www.opensource.org/licenses/bsd-license) +// +// Copyright (c) 2011, Joe Walnes and contributors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// +// * 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. +// +// * Neither the name of the Webbit nor the names of +// its contributors may be used to endorse or promote products +// derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR +// 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 OF SUCH DAMAGE. + +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFutureListener; +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.handler.codec.frame.CorruptedFrameException; +import org.jboss.netty.handler.codec.frame.TooLongFrameException; +import org.jboss.netty.handler.codec.replay.ReplayingDecoder; +import org.jboss.netty.logging.InternalLogger; +import org.jboss.netty.logging.InternalLoggerFactory; + +/** + * Decodes a web socket frame from wire protocol version 8 format. This code was + * forked from webbit and + * modified. + * + * @author Aslak Hellesøy + * @author Vibul Imtarnasan + */ +public class WebSocket08FrameDecoder extends ReplayingDecoder { + + private static final InternalLogger logger = InternalLoggerFactory.getInstance(WebSocket08FrameDecoder.class); + + private static final byte OPCODE_CONT = 0x0; + private static final byte OPCODE_TEXT = 0x1; + private static final byte OPCODE_BINARY = 0x2; + private static final byte OPCODE_CLOSE = 0x8; + private static final byte OPCODE_PING = 0x9; + private static final byte OPCODE_PONG = 0xA; + + private UTF8Output fragmentedFramesText = null; + private int fragmentedFramesCount = 0; + + private boolean frameFinalFlag; + private int frameRsv; + private int frameOpcode; + private long framePayloadLength; + private ChannelBuffer framePayload = null; + private int framePayloadBytesRead = 0; + private ChannelBuffer maskingKey; + + private boolean allowExtensions = false; + private boolean maskedPayload = false; + private boolean receivedClosingHandshake = false; + + public enum State { + FRAME_START, MASKING_KEY, PAYLOAD, CORRUPT + } + + /** + * Constructor + * + * @param maskedPayload + * Web socket servers must set this to true processed incoming + * masked payload. Client implementations must set this to false. + * @param allowExtensions + * Flag to allow reserved extension bits to be used or not + */ + public WebSocket08FrameDecoder(boolean maskedPayload, boolean allowExtensions) { + super(State.FRAME_START); + this.maskedPayload = maskedPayload; + this.allowExtensions = allowExtensions; + } + + @Override + protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, State state) throws Exception { + + // Discard all data received if closing handshake was received before. + if (receivedClosingHandshake) { + buffer.skipBytes(actualReadableBytes()); + return null; + } + + switch (state) { + case FRAME_START: + framePayloadBytesRead = 0; + framePayloadLength = -1; + framePayload = null; + + // FIN, RSV, OPCODE + byte b = buffer.readByte(); + frameFinalFlag = (b & 0x80) != 0; + frameRsv = (b & 0x70) >> 4; + frameOpcode = (b & 0x0F); + + logger.debug("Decoding WebSocket Frame opCode=" + frameOpcode); + + // MASK, PAYLOAD LEN 1 + b = buffer.readByte(); + boolean frameMasked = (b & 0x80) != 0; + int framePayloadLen1 = (b & 0x7F); + + if (frameRsv != 0 && !this.allowExtensions) { + protocolViolation(channel, "RSV != 0 and no extension negotiated, RSV:" + frameRsv); + return null; + } + + if (this.maskedPayload && !frameMasked) { + protocolViolation(channel, "unmasked client to server frame"); + return null; + } + if (frameOpcode > 7) { // control frame (have MSB in opcode set) + + // control frames MUST NOT be fragmented + if (!frameFinalFlag) { + protocolViolation(channel, "fragmented control frame"); + return null; + } + + // control frames MUST have payload 125 octets or less + if (framePayloadLen1 > 125) { + protocolViolation(channel, "control frame with payload length > 125 octets"); + return null; + } + + // check for reserved control frame opcodes + if (!(frameOpcode == OPCODE_CLOSE || frameOpcode == OPCODE_PING || frameOpcode == OPCODE_PONG)) { + protocolViolation(channel, "control frame using reserved opcode " + frameOpcode); + return null; + } + + // close frame : if there is a body, the first two bytes of the + // body MUST be a 2-byte + // unsigned integer (in network byte order) representing a + // status code + if (frameOpcode == 8 && framePayloadLen1 == 1) { + protocolViolation(channel, "received close control frame with payload len 1"); + return null; + } + } else { // data frame + // check for reserved data frame opcodes + if (!(frameOpcode == OPCODE_CONT || frameOpcode == OPCODE_TEXT || frameOpcode == OPCODE_BINARY)) { + protocolViolation(channel, "data frame using reserved opcode " + frameOpcode); + return null; + } + + // check opcode vs message fragmentation state 1/2 + if (fragmentedFramesCount == 0 && frameOpcode == OPCODE_CONT) { + protocolViolation(channel, "received continuation data frame outside fragmented message"); + return null; + } + + // check opcode vs message fragmentation state 2/2 + if (fragmentedFramesCount != 0 && frameOpcode != OPCODE_CONT && frameOpcode != OPCODE_PING) { + protocolViolation(channel, "received non-continuation data frame while inside fragmented message"); + return null; + } + } + + if (framePayloadLen1 == 126) { + framePayloadLength = buffer.readUnsignedShort(); + if (framePayloadLength < 126) { + protocolViolation(channel, "invalid data frame length (not using minimal length encoding)"); + return null; + } + } else if (framePayloadLen1 == 127) { + framePayloadLength = buffer.readLong(); + // TODO: check if it's bigger than 0x7FFFFFFFFFFFFFFF, Maybe + // just check if it's negative? + + if (framePayloadLength < 65536) { + protocolViolation(channel, "invalid data frame length (not using minimal length encoding)"); + return null; + } + } else { + framePayloadLength = framePayloadLen1; + } + + // logger.debug("Frame length=" + framePayloadLength); + checkpoint(State.MASKING_KEY); + case MASKING_KEY: + if (this.maskedPayload) { + maskingKey = buffer.readBytes(4); + } + checkpoint(State.PAYLOAD); + case PAYLOAD: + // Some times, the payload may not be delivered in 1 nice packet + // We need to accumulate the data until we have it all + int rbytes = actualReadableBytes(); + ChannelBuffer payloadBuffer = null; + + int willHaveReadByteCount = framePayloadBytesRead + rbytes; + // logger.debug("Frame rbytes=" + rbytes + " willHaveReadByteCount=" + // + willHaveReadByteCount + " framePayloadLength=" + + // framePayloadLength); + if (willHaveReadByteCount == framePayloadLength) { + // We have all our content so proceed to process + payloadBuffer = buffer.readBytes(rbytes); + } else if (willHaveReadByteCount < framePayloadLength) { + // We don't have all our content so accumulate payload. + // Returning null means we will get called back + payloadBuffer = buffer.readBytes(rbytes); + if (framePayload == null) { + framePayload = channel.getConfig().getBufferFactory().getBuffer(toFrameLength(framePayloadLength)); + } + framePayload.writeBytes(payloadBuffer); + framePayloadBytesRead = framePayloadBytesRead + rbytes; + + // Return null to wait for more bytes to arrive + return null; + } else if (willHaveReadByteCount > framePayloadLength) { + // We have more than what we need so read up to the end of frame + // Leave the remainder in the buffer for next frame + payloadBuffer = buffer.readBytes(toFrameLength(framePayloadLength - framePayloadBytesRead)); + } + + // Now we have all the data, the next checkpoint must be the next + // frame + checkpoint(State.FRAME_START); + + // Take the data that we have in this packet + if (framePayload == null) { + framePayload = payloadBuffer; + } else { + framePayload.writeBytes(payloadBuffer); + } + + // Unmask data if needed + if (this.maskedPayload) { + unmask(framePayload); + } + + // Processing for fragmented messages + String aggregatedText = null; + if (frameFinalFlag) { + // Final frame of the sequence. Apparently ping frames are + // allowed in the middle of a fragmented message + if (frameOpcode != OPCODE_PING) { + fragmentedFramesCount = 0; + + // Check text for UTF8 correctness + if (frameOpcode == OPCODE_TEXT || fragmentedFramesText != null) { + // Check UTF-8 correctness for this payload + checkUTF8String(channel, framePayload.array()); + + // This does a second check to make sure UTF-8 + // correctness for entire text message + aggregatedText = fragmentedFramesText.toString(); + + fragmentedFramesText = null; + } + } + } else { + // Not final frame so we can expect more frames in the + // fragmented sequence + if (fragmentedFramesCount == 0) { + // First text or binary frame for a fragmented set + fragmentedFramesText = null; + if (frameOpcode == OPCODE_TEXT) { + checkUTF8String(channel, framePayload.array()); + } + } else { + // Subsequent frames - only check if init frame is text + if (fragmentedFramesText != null) { + checkUTF8String(channel, framePayload.array()); + } + } + + // Increment counter + fragmentedFramesCount++; + } + + // Return the frame + if (frameOpcode == OPCODE_TEXT) { + return new TextWebSocketFrame(frameFinalFlag, frameRsv, framePayload); + } else if (frameOpcode == OPCODE_BINARY) { + return new BinaryWebSocketFrame(frameFinalFlag, frameRsv, framePayload); + } else if (frameOpcode == OPCODE_PING) { + return new PingWebSocketFrame(frameFinalFlag, frameRsv, framePayload); + } else if (frameOpcode == OPCODE_PONG) { + return new PongWebSocketFrame(frameFinalFlag, frameRsv, framePayload); + } else if (frameOpcode == OPCODE_CONT) { + return new ContinuationWebSocketFrame(frameFinalFlag, frameRsv, framePayload, aggregatedText); + } else if (frameOpcode == OPCODE_CLOSE) { + this.receivedClosingHandshake = true; + return new CloseWebSocketFrame(frameFinalFlag, frameRsv); + } else { + throw new UnsupportedOperationException("Cannot decode web socket frame with opcode: " + frameOpcode); + } + case CORRUPT: + // If we don't keep reading Netty will throw an exception saying + // we can't return null if no bytes read and state not changed. + buffer.readByte(); + return null; + default: + throw new Error("Shouldn't reach here."); + } + } + + private void unmask(ChannelBuffer frame) { + byte[] bytes = frame.array(); + for (int i = 0; i < bytes.length; i++) { + frame.setByte(i, frame.getByte(i) ^ maskingKey.getByte(i % 4)); + } + } + + private void protocolViolation(Channel channel, String reason) throws CorruptedFrameException { + checkpoint(State.CORRUPT); + if (channel.isConnected()) { + channel.write(ChannelBuffers.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE); + channel.close().awaitUninterruptibly(); + } + throw new CorruptedFrameException(reason); + } + + private int toFrameLength(long l) throws TooLongFrameException { + if (l > Integer.MAX_VALUE) { + throw new TooLongFrameException("Length:" + l); + } else { + return (int) l; + } + } + + private void checkUTF8String(Channel channel, byte[] bytes) throws CorruptedFrameException { + try { + // StringBuilder sb = new StringBuilder("UTF8 " + bytes.length + + // " bytes: "); + // for (byte b : bytes) { + // sb.append(Integer.toHexString(b)).append(" "); + // } + // logger.debug(sb.toString()); + + if (fragmentedFramesText == null) { + fragmentedFramesText = new UTF8Output(bytes); + } else { + fragmentedFramesText.write(bytes); + } + } catch (UTF8Exception ex) { + protocolViolation(channel, "invalid UTF-8 bytes"); + } + } +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java new file mode 100644 index 0000000000..4b95354af6 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +// (BSD License: http://www.opensource.org/licenses/bsd-license) +// +// Copyright (c) 2011, Joe Walnes and contributors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or +// without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// +// * 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. +// +// * Neither the name of the Webbit nor the names of +// its contributors may be used to endorse or promote products +// derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR +// 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 OF SUCH DAMAGE. + +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.handler.codec.frame.TooLongFrameException; +import org.jboss.netty.handler.codec.oneone.OneToOneEncoder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.nio.ByteBuffer; + +/** + *

+ * Encodes a web socket frame into wire protocol version 8 format. This code was + * forked from webbit and + * modified. + *

+ * + * @author Aslak Hellesøy + * @author Vibul Imtarnasan + */ +public class WebSocket08FrameEncoder extends OneToOneEncoder { + + private static final Logger logger = LoggerFactory.getLogger(WebSocket08FrameEncoder.class); + + private static final byte OPCODE_CONT = 0x0; + private static final byte OPCODE_TEXT = 0x1; + private static final byte OPCODE_BINARY = 0x2; + private static final byte OPCODE_CLOSE = 0x8; + private static final byte OPCODE_PING = 0x9; + private static final byte OPCODE_PONG = 0xA; + + private boolean maskPayload = false; + + /** + * Constructor + * + * @param maskPayload + * Web socket clients must set this to true to mask payload. + * Server implementations must set this to false. + */ + public WebSocket08FrameEncoder(boolean maskPayload) { + this.maskPayload = maskPayload; + } + + @Override + protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception { + + byte[] mask = null; + + if (msg instanceof WebSocketFrame) { + WebSocketFrame frame = (WebSocketFrame) msg; + ChannelBuffer data = frame.getBinaryData(); + if (data == null) { + data = ChannelBuffers.EMPTY_BUFFER; + } + + byte opcode; + if (frame instanceof TextWebSocketFrame) { + opcode = OPCODE_TEXT; + } else if (frame instanceof PingWebSocketFrame) { + opcode = OPCODE_PING; + } else if (frame instanceof PongWebSocketFrame) { + opcode = OPCODE_PONG; + } else if (frame instanceof CloseWebSocketFrame) { + opcode = OPCODE_CLOSE; + } else if (frame instanceof BinaryWebSocketFrame) { + opcode = OPCODE_BINARY; + } else if (frame instanceof ContinuationWebSocketFrame) { + opcode = OPCODE_CONT; + } else { + throw new UnsupportedOperationException("Cannot encode frame of type: " + frame.getClass().getName()); + } + + int length = data.readableBytes(); + + logger.debug("Encoding WebSocket Frame opCode=" + opcode + " length=" + length); + + int b0 = 0; + if (frame.isFinalFragment()) { + b0 |= (1 << 7); + } + b0 |= (frame.getRsv() % 8) << 4; + b0 |= opcode % 128; + + ChannelBuffer header; + ChannelBuffer body; + + if (opcode == OPCODE_PING && length > 125) { + throw new TooLongFrameException("invalid payload for PING (payload length must be <= 125, was " + length); + } + + int maskLength = this.maskPayload ? 4 : 0; + if (length <= 125) { + header = ChannelBuffers.buffer(2 + maskLength); + header.writeByte(b0); + byte b = (byte) (this.maskPayload ? (0x80 | (byte) length) : (byte) length); + header.writeByte(b); + } else if (length <= 0xFFFF) { + header = ChannelBuffers.buffer(4 + maskLength); + header.writeByte(b0); + header.writeByte(this.maskPayload ? (0xFE) : 126); + header.writeByte((length >>> 8) & 0xFF); + header.writeByte((length) & 0xFF); + } else { + header = ChannelBuffers.buffer(10 + maskLength); + header.writeByte(b0); + header.writeByte(this.maskPayload ? (0xFF) : 127); + header.writeLong(length); + } + + // Write payload + if (this.maskPayload) { + Integer random = (int) (Math.random() * Integer.MAX_VALUE); + mask = ByteBuffer.allocate(4).putInt(random).array(); + header.writeBytes(mask); + + body = ChannelBuffers.buffer(length); + int counter = 0; + while (data.readableBytes() > 0) { + byte byteData = data.readByte(); + body.writeByte(byteData ^ mask[+counter++ % 4]); + } + } else { + body = data; + } + return ChannelBuffers.wrappedBuffer(header, body); + } + + // If not websocket, then just return the message + return msg; + } + +} \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java new file mode 100644 index 0000000000..a6c3f90f49 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +import org.jboss.netty.buffer.ChannelBuffer; + +/** + * Base class for web socket frames + * + * @author The Netty Project + */ +public abstract class WebSocketFrame { + + /** + * Flag to indicate if this frame is the final fragment in a message. The + * first fragment (frame) may also be the final fragment. + */ + private boolean finalFragment = true; + + /** + * RSV1, RSV2, RSV3 used for extensions + */ + private int rsv = 0; + + /** + * Contents of this frame + */ + private ChannelBuffer binaryData; + + /** + * Returns binary data + */ + public ChannelBuffer getBinaryData() { + return binaryData; + } + + /** + * Sets the binary data for this frame + */ + public void setBinaryData(ChannelBuffer binaryData) { + this.binaryData = binaryData; + } + + /** + * Flag to indicate if this frame is the final fragment in a message. The + * first fragment (frame) may also be the final fragment. + */ + public boolean isFinalFragment() { + return finalFragment; + } + + public void setFinalFragment(boolean finalFragment) { + this.finalFragment = finalFragment; + } + + /** + * Bits used for extensions to the standard. + */ + public int getRsv() { + return rsv; + } + + public void setRsv(int rsv) { + this.rsv = rsv; + } + +} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java new file mode 100644 index 0000000000..449497aec6 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Red Hat, Inc. + * + * Red Hat licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.netty4; + +/** + * Type of web socket frames + * + * @author The Netty Project + */ +public enum WebSocketFrameType { + TEXT, BINARY, PING, PONG, CLOSE, CONTINUATION +} diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 8f85e2f967..746fbf8f71 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -137,7 +137,7 @@ public final static SimpleDateFormat[] get() { public final static URI createUri(String u) { URI uri = URI.create(u); final String scheme = uri.getScheme(); - if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https")) { + if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https") && !scheme.equalsIgnoreCase("ws")) { throw new IllegalArgumentException("The URI scheme, of the URI " + u + ", must be equal (ignoring case) to 'http' or 'https'"); } From b671676197edf5003c353089b7b3209226e74eef Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 28 Nov 2011 15:21:13 -0500 Subject: [PATCH 0014/2844] Bump to the latest Netty version. Needed to add JBoss repo for now as Central doesn't have it yet it seems --- pom.xml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index d37e0da7b1..1c6ffc33c6 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> org.sonatype.oss oss-parent @@ -62,7 +62,7 @@ org.jboss.netty netty - 3.2.5.Final + 3.2.7.Final javax.servlet @@ -384,11 +384,11 @@ + implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> + implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/> + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/> @@ -536,6 +536,15 @@ ${distMgmtSnapshotsUrl} + + + repository.jboss.org + https://repository.jboss.org/nexus/content/repositories/releases/ + + false + + + http://oss.sonatype.org/content/repositories/snapshots true From bce9f9020edc9bff9a71a4a63cbefc327f621db5 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 29 Nov 2011 10:43:10 -0800 Subject: [PATCH 0015/2844] Modularize ahc. --- modules/api/pom.xml | 70 +++++++ .../http/client/AsyncCompletionHandler.java | 0 .../client/AsyncCompletionHandlerBase.java | 0 .../com/ning/http/client/AsyncHandler.java | 0 .../com/ning/http/client/AsyncHttpClient.java | 0 .../http/client/AsyncHttpClientConfig.java | 0 .../client/AsyncHttpClientConfigBean.java | 0 .../ning/http/client/AsyncHttpProvider.java | 0 .../http/client/AsyncHttpProviderConfig.java | 0 .../main/java/com/ning/http/client/Body.java | 0 .../com/ning/http/client/BodyConsumer.java | 0 .../client/BodyDeferringAsyncHandler.java | 0 .../com/ning/http/client/BodyGenerator.java | 0 .../com/ning/http/client/ByteArrayPart.java | 0 .../com/ning/http/client/ConnectionsPool.java | 0 .../java/com/ning/http/client/Cookie.java | 0 .../java/com/ning/http/client/FilePart.java | 0 .../FluentCaseInsensitiveStringsMap.java | 0 .../ning/http/client/FluentStringsMap.java | 0 .../com/ning/http/client/HttpContent.java | 0 .../http/client/HttpResponseBodyPart.java | 0 .../ning/http/client/HttpResponseHeaders.java | 0 .../ning/http/client/HttpResponseStatus.java | 0 .../ning/http/client/ListenableFuture.java | 0 .../http/client/MaxRedirectException.java | 0 .../main/java/com/ning/http/client/Part.java | 0 .../ning/http/client/PerRequestConfig.java | 0 .../http/client/ProgressAsyncHandler.java | 0 .../com/ning/http/client/ProxyServer.java | 0 .../ning/http/client/RandomAccessBody.java | 0 .../main/java/com/ning/http/client/Realm.java | 0 .../java/com/ning/http/client/Request.java | 0 .../com/ning/http/client/RequestBuilder.java | 0 .../ning/http/client/RequestBuilderBase.java | 0 .../java/com/ning/http/client/Response.java | 0 .../http/client/ResumableBodyConsumer.java | 0 .../ning/http/client/SSLEngineFactory.java | 0 .../ning/http/client/SignatureCalculator.java | 0 .../http/client/SimpleAsyncHttpClient.java | 0 .../java/com/ning/http/client/StringPart.java | 0 .../ning/http/client/ThrowableHandler.java | 0 .../com/ning/http/client/UpgradeHandler.java | 0 .../consumers/AppendableBodyConsumer.java | 0 .../consumers/ByteBufferBodyConsumer.java | 0 .../client/consumers/FileBodyConsumer.java | 0 .../consumers/OutputStreamBodyConsumer.java | 0 .../ResumableRandomAccessFileListener.java | 0 .../client/extra/ThrottleRequestFilter.java | 0 .../http/client/filter/FilterContext.java | 0 .../http/client/filter/FilterException.java | 0 .../http/client/filter/IOExceptionFilter.java | 0 .../http/client/filter/RequestFilter.java | 0 .../http/client/filter/ResponseFilter.java | 0 .../generators/ByteArrayBodyGenerator.java | 0 .../client/generators/FileBodyGenerator.java | 0 .../generators/InputStreamBodyGenerator.java | 0 .../listenable/AbstractListenableFuture.java | 0 .../http/client/listenable/ExecutionList.java | 0 .../listener/TransferCompletionHandler.java | 0 .../client/listener/TransferListener.java | 0 .../com/ning/http/client/ntlm/NTLMEngine.java | 0 .../http/client/ntlm/NTLMEngineException.java | 0 .../ning/http/client/oauth/ConsumerKey.java | 0 .../oauth/OAuthSignatureCalculator.java | 0 .../ning/http/client/oauth/RequestToken.java | 0 .../http/client/oauth/ThreadSafeHMAC.java | 0 .../providers/jdk/JDKAsyncHttpProvider.java | 0 .../jdk/JDKAsyncHttpProviderConfig.java | 0 .../providers/jdk/JDKDelegateFuture.java | 0 .../http/client/providers/jdk/JDKFuture.java | 0 .../client/providers/jdk/JDKResponse.java | 0 .../providers/jdk/ResponseBodyPart.java | 0 .../client/providers/jdk/ResponseHeaders.java | 0 .../client/providers/jdk/ResponseStatus.java | 0 .../PropertiesBasedResumableProcessor.java | 0 .../resumable/ResumableAsyncHandler.java | 0 .../resumable/ResumableIOExceptionFilter.java | 0 .../client/resumable/ResumableListener.java | 0 .../ning/http/client/simple/HeaderMap.java | 0 .../simple/SimpleAHCTransferListener.java | 0 .../webdav/WebDavCompletionHandlerBase.java | 0 .../http/client/webdav/WebDavResponse.java | 0 .../ning/http/client/websocket/WebSocket.java | 0 .../client/websocket/WebSocketListener.java | 0 .../websocket/WebSocketUpgradeHandler.java | 1 - .../http/multipart/ByteArrayPartSource.java | 0 .../com/ning/http/multipart/FilePart.java | 0 .../ning/http/multipart/FilePartSource.java | 0 .../ning/http/multipart/MultipartBody.java | 0 .../http/multipart/MultipartEncodingUtil.java | 0 .../multipart/MultipartRequestEntity.java | 0 .../java/com/ning/http/multipart/Part.java | 0 .../com/ning/http/multipart/PartBase.java | 0 .../com/ning/http/multipart/PartSource.java | 0 .../ning/http/multipart/RequestEntity.java | 0 .../com/ning/http/multipart/StringPart.java | 0 .../http/util/AllowAllHostnameVerifier.java | 0 .../http/util/AsyncHttpProviderUtils.java | 0 .../ning/http/util/AuthenticatorUtils.java | 0 .../main/java/com/ning/http/util/Base64.java | 0 .../java/com/ning/http/util/DateUtil.java | 0 .../java/com/ning/http/util/ProxyUtils.java | 0 .../java/com/ning/http/util/SslUtils.java | 0 .../java/com/ning/http/util/UTF8Codec.java | 0 .../com/ning/http/util/UTF8UrlEncoder.java | 0 .../java/com/ning/http/client/RealmTest.java | 0 .../http/client/async/AbstractBasicTest.java | 0 .../client/async/AsyncProvidersBasicTest.java | 1 - .../client/async/AsyncStreamHandlerTest.java | 0 .../async/AsyncStreamLifecycleTest.java | 0 .../http/client/async/AuthTimeoutTest.java | 1 - .../ning/http/client/async/BasicAuthTest.java | 1 - .../http/client/async/BasicHttpsTest.java | 0 .../ning/http/client/async/BodyChunkTest.java | 0 .../async/BodyDeferringAsyncHandlerTest.java | 0 .../client/async/ByteBufferCapacityTest.java | 0 .../ning/http/client/async/ChunkingTest.java | 0 .../http/client/async/ComplexClientTest.java | 0 .../http/client/async/ConnectionPoolTest.java | 49 +---- .../http/client/async/DigestAuthTest.java | 1 - .../ning/http/client/async/EmptyBodyTest.java | 0 .../http/client/async/ErrorResponseTest.java | 0 .../client/async/Expect100ContinueTest.java | 0 .../client/async/FilePartLargeFileTest.java | 0 .../ning/http/client/async/FilterTest.java | 0 .../FluentCaseInsensitiveStringsMapTest.java | 0 .../client/async/FluentStringsMapTest.java | 1 + .../client/async/FollowingThreadTest.java | 0 .../ning/http/client/async/Head302Test.java | 1 - .../client/async/HostnameVerifierTest.java | 0 .../client/async/HttpToHttpsRedirectTest.java | 0 .../client/async/IdleStateHandlerTest.java | 0 .../http/client/async/InputStreamTest.java | 0 .../client/async/ListenableFutureTest.java | 0 .../client/async/MaxConnectionsInThreads.java | 0 .../client/async/MaxTotalConnectionTest.java | 0 .../client/async/MultipartUploadTest.java | 0 .../http/client/async/MultipleHeaderTest.java | 0 .../http/client/async/NoNullResponseTest.java | 0 .../async/NonAsciiContentLengthTest.java | 0 .../http/client/async/ParamEncodingTest.java | 0 .../async/PerRequestRelative302Test.java | 0 .../client/async/PerRequestTimeoutTest.java | 0 .../http/client/async/PostWithQSTest.java | 1 + .../ning/http/client/async/ProviderUtil.java | 18 -- .../com/ning/http/client/async/ProxyTest.java | 2 - .../client/async/ProxyyTunnellingTest.java | 0 .../http/client/async/PutLargeFileTest.java | 0 .../client/async/QueryParametersTest.java | 0 .../com/ning/http/client/async/RC10KTest.java | 0 .../async/RedirectConnectionUsageTest.java | 1 - .../http/client/async/Relative302Test.java | 0 .../http/client/async/RemoteSiteTest.java | 0 .../http/client/async/RequestBuilderTest.java | 0 .../http/client/async/RetryRequestTest.java | 0 .../SimpleAsyncClientErrorBehaviourTest.java | 0 .../async/SimpleAsyncHttpClientTest.java | 0 .../client/async/TransferListenerTest.java | 0 .../http/client/async/WebDavBasicTest.java | 0 .../http/client/async/ZeroCopyFileTest.java | 0 .../client/oauth/TestSignatureCalculator.java | 0 .../resumable/MapResumableProcessor.java | 0 ...PropertiesBasedResumableProcesserTest.java | 7 +- .../resumable/ResumableAsyncHandlerTest.java | 5 +- .../com/ning/http/util/ProxyUtilsTest.java | 0 .../com/ning/http/util/TestUTF8UrlCodec.java | 0 modules/bundles/all/pom.xml | 121 +++++++++++ modules/bundles/pom.xml | 21 ++ modules/pom.xml | 23 ++ modules/providers/apache/pom.xml | 115 ++++++++++ .../apache/ApacheAsyncHttpProvider.java | 0 .../apache/ApacheAsyncHttpProviderConfig.java | 0 .../providers/apache/ApacheResponse.java | 0 .../apache/ApacheResponseBodyPart.java | 0 .../apache/ApacheResponseFuture.java | 0 .../apache/ApacheResponseHeaders.java | 0 .../apache/ApacheResponseStatus.java | 0 modules/providers/grizzly/pom.xml | 87 ++++++++ .../grizzly/FeedableBodyGenerator.java | 0 .../grizzly/GrizzlyAsyncHttpProvider.java | 0 .../GrizzlyAsyncHttpProviderConfig.java | 0 .../grizzly/GrizzlyConnectionsPool.java | 0 .../providers/grizzly/GrizzlyResponse.java | 0 .../grizzly/GrizzlyResponseBodyPart.java | 0 .../grizzly/GrizzlyResponseFuture.java | 0 .../grizzly/GrizzlyResponseHeaders.java | 0 .../grizzly/GrizzlyResponseStatus.java | 0 .../grizzly/TransportCustomizer.java | 0 .../GrizzlyAsyncProviderBasicTest.java | 0 .../GrizzlyAsyncStreamHandlerTest.java | 0 .../GrizzlyAsyncStreamLifecycleTest.java | 0 .../async/grizzly/GrizzlyAuthTimeoutTest.java | 0 .../async/grizzly/GrizzlyBasicAuthTest.java | 0 .../async/grizzly/GrizzlyBasicHttpsTest.java | 0 .../async/grizzly/GrizzlyBodyChunkTest.java | 0 .../GrizzlyBodyDeferringAsyncHandlerTest.java | 0 .../GrizzlyByteBufferCapacityTest.java | 0 .../async/grizzly/GrizzlyChunkingTest.java | 0 .../grizzly/GrizzlyComplexClientTest.java | 0 .../grizzly/GrizzlyConnectionPoolTest.java | 67 +++--- .../async/grizzly/GrizzlyDigestAuthTest.java | 0 .../async/grizzly/GrizzlyEmptyBodyTest.java | 0 .../grizzly/GrizzlyErrorResponseTest.java | 0 .../grizzly/GrizzlyExpectContinue100Test.java | 0 .../async/grizzly/GrizzlyFilterTest.java | 0 .../grizzly/GrizzlyFollowingThreadTest.java | 0 .../async/grizzly/GrizzlyHead302Test.java | 0 .../GrizzlyHttpToHttpsRedirectTest.java | 0 .../grizzly/GrizzlyIdleStateHandlerTest.java | 0 .../async/grizzly/GrizzlyInputStreamTest.java | 0 .../grizzly/GrizzlyListenableFutureTest.java | 0 .../GrizzlyMaxConnectionsInThreadsTest.java | 0 .../GrizzlyMaxTotalConnectionTest.java | 0 .../grizzly/GrizzlyMultipleHeaderTest.java | 0 .../grizzly/GrizzlyNoNullResponseTest.java | 0 .../GrizzlyNonAsciiContentLengthTest.java | 0 .../grizzly/GrizzlyParamEncodingTest.java | 0 .../GrizzlyPerRequestRelative302Test.java | 0 .../grizzly/GrizzlyPerRequestTimeoutTest.java | 0 .../async/grizzly/GrizzlyPostWithQSTest.java | 0 .../async/grizzly/GrizzlyProxyTest.java | 0 .../grizzly/GrizzlyProxyTunnelingTest.java | 0 .../grizzly/GrizzlyPutLargeFileTest.java | 0 .../grizzly/GrizzlyQueryParametersTest.java | 0 .../async/grizzly/GrizzlyRC10KTest.java | 0 .../GrizzlyRedirectConnectionUsageTest.java | 0 .../async/grizzly/GrizzlyRelative302Test.java | 0 .../async/grizzly/GrizzlyRemoteSiteTest.java | 0 .../grizzly/GrizzlyRetryRequestTest.java | 0 .../grizzly/GrizzlyTransferListenerTest.java | 0 .../grizzly/src}/test/resources/300k.png | Bin .../src}/test/resources/SimpleTextFile.txt | 0 .../src}/test/resources/client.keystore | Bin .../grizzly/src}/test/resources/gzip.txt.gz | Bin .../src}/test/resources/logback-test.xml | 0 .../src}/test/resources/realm.properties | 0 .../src}/test/resources/ssltest-cacerts.jks | Bin .../src}/test/resources/ssltest-keystore.jks | Bin .../grizzly/src}/test/resources/textfile.txt | 0 .../grizzly/src}/test/resources/textfile2.txt | 0 modules/providers/netty/pom.xml | 92 ++++++++ .../providers/netty/BodyChunkedInput.java | 0 .../providers/netty/BodyFileRegion.java | 0 .../providers/netty}/CleanupChannelGroup.java | 2 +- .../netty/NettyAsyncHttpProvider.java | 1 - .../netty/NettyAsyncHttpProviderConfig.java | 0 .../providers/netty/NettyConnectListener.java | 0 .../providers/netty/NettyConnectionsPool.java | 0 .../client/providers/netty/NettyResponse.java | 0 .../providers/netty/NettyResponseFuture.java | 0 .../providers/netty/NettyWebSocket.java | 0 .../http/client/providers/netty/Protocol.java | 0 .../providers/netty/ResponseBodyPart.java | 0 .../providers/netty/ResponseHeaders.java | 0 .../providers/netty/ResponseStatus.java | 0 .../client/providers/netty/WebSocketUtil.java | 0 .../netty/netty4/BinaryWebSocketFrame.java | 0 .../netty/netty4/CloseWebSocketFrame.java | 0 .../netty4/ContinuationWebSocketFrame.java | 0 .../netty/netty4/PingWebSocketFrame.java | 0 .../netty/netty4/PongWebSocketFrame.java | 0 .../netty/netty4/TextWebSocketFrame.java | 0 .../providers/netty/netty4/UTF8Exception.java | 0 .../providers/netty/netty4/UTF8Output.java | 0 .../netty/netty4/WebSocket08FrameDecoder.java | 0 .../netty/netty4/WebSocket08FrameEncoder.java | 0 .../netty/netty4/WebSocketFrame.java | 0 .../netty/netty4/WebSocketFrameType.java | 0 .../providers/netty/spnego/SpnegoEngine.java | 0 .../netty/spnego/SpnegoTokenGenerator.java | 0 .../netty/NettyAsyncHttpProviderTest.java | 0 .../netty/NettyAsyncProviderBasicTest.java | 0 .../async}/netty/NettyAsyncResponseTest.java | 4 +- .../netty/NettyAsyncStreamHandlerTest.java | 0 .../netty/NettyAsyncStreamLifecycleTest.java | 0 .../async/netty/NettyAuthTimeoutTest.java | 0 .../async/netty/NettyBasicAuthTest.java | 0 .../async/netty/NettyBasicHttpsTest.java | 0 .../async/netty/NettyBodyChunkTest.java | 0 .../NettyBodyDeferringAsyncHandlerTest.java | 0 .../netty/NettyByteBufferCapacityTest.java | 1 - .../client/async/netty/NettyChunkingTest.java | 0 .../async/netty/NettyComplexClientTest.java | 0 .../async/netty/NettyConnectionPoolTest.java | 28 +++ .../async/netty/NettyDigestAuthTest.java | 0 .../async/netty/NettyEmptyBodyTest.java | 0 .../async/netty/NettyErrorResponseTest.java | 0 .../netty/NettyExpect100ContinueTest.java | 0 .../netty/NettyFilePartLargeFileTest.java | 0 .../client/async/netty/NettyFilterTest.java | 0 .../async/netty/NettyFollowingThreadTest.java | 0 .../client/async/netty/NettyHead302Test.java | 0 .../netty/NettyHostnameVerifierTest.java | 0 .../netty/NettyHttpToHttpsRedirectTest.java | 0 .../netty/NettyIdleStateHandlerTest.java | 0 .../async/netty/NettyInputStreamTest.java | 0 .../netty/NettyListenableFutureTest.java | 0 .../netty/NettyMaxConnectionsInThreads.java | 0 .../netty/NettyMaxTotalConnectionTest.java | 0 .../async/netty/NettyMultipartUploadTest.java | 0 .../async/netty/NettyMultipleHeaderTest.java | 0 .../async/netty/NettyNoNullResponseTest.java | 0 .../netty/NettyNonAsciiContentLengthTest.java | 0 .../async/netty/NettyParamEncodingTest.java | 0 .../netty/NettyPerRequestRelative302Test.java | 0 .../netty/NettyPerRequestTimeoutTest.java | 0 .../async/netty/NettyPostWithQSTest.java | 0 .../client/async/netty/NettyProxyTest.java | 0 .../async/netty/NettyProxyTunnellingTest.java | 0 .../async/netty/NettyPutLargeFileTest.java | 0 .../async/netty/NettyQueryParametersTest.java | 0 .../client/async/netty/NettyRC10KTest.java | 0 .../NettyRedirectConnectionUsageTest.java | 0 .../async/netty/NettyRelative302Test.java | 0 .../async/netty/NettyRemoteSiteTest.java | 0 .../async/netty/NettyRetryRequestTest.java | 0 .../netty/NettySimpleAsyncHttpClientTest.java | 4 + .../netty/NettyTransferListenerTest.java | 0 .../async/netty/NettyWebDavBasicTest.java | 0 .../async/netty/NettyZeroCopyFileTest.java | 1 - .../async/netty}/RetryNonBlockingIssue.java | 2 +- .../netty/src/test/resources/300k.png | Bin 0 -> 265495 bytes .../src/test/resources/SimpleTextFile.txt | 1 + .../netty/src/test/resources/client.keystore | Bin 0 -> 1277 bytes .../netty/src/test/resources/gzip.txt.gz | Bin 0 -> 47 bytes .../netty/src/test/resources/logback-test.xml | 13 ++ .../netty/src/test/resources/realm.properties | 1 + .../src/test/resources/ssltest-cacerts.jks | Bin 0 -> 29888 bytes .../src/test/resources/ssltest-keystore.jks | Bin 0 -> 1445 bytes .../netty/src/test/resources/textfile.txt | 1 + .../netty/src/test/resources/textfile2.txt | 1 + modules/providers/pom.xml | 24 +++ pom.xml | 198 ++---------------- .../GrizzlySimpleAsyncHttpClientTest.java | 31 --- 334 files changed, 659 insertions(+), 340 deletions(-) create mode 100644 modules/api/pom.xml rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncCompletionHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncHttpClient.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncHttpClientConfig.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncHttpProvider.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/AsyncHttpProviderConfig.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/Body.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/BodyConsumer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/BodyGenerator.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ByteArrayPart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ConnectionsPool.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/Cookie.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/FilePart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/FluentStringsMap.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/HttpContent.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/HttpResponseBodyPart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/HttpResponseHeaders.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/HttpResponseStatus.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ListenableFuture.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/MaxRedirectException.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/Part.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/PerRequestConfig.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ProgressAsyncHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ProxyServer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/RandomAccessBody.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/Realm.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/Request.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/RequestBuilder.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/RequestBuilderBase.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/Response.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ResumableBodyConsumer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/SSLEngineFactory.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/SignatureCalculator.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/SimpleAsyncHttpClient.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/StringPart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ThrowableHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/UpgradeHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/consumers/FileBodyConsumer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/filter/FilterContext.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/filter/FilterException.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/filter/IOExceptionFilter.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/filter/RequestFilter.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/filter/ResponseFilter.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/generators/FileBodyGenerator.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/listenable/ExecutionList.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/listener/TransferCompletionHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/listener/TransferListener.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ntlm/NTLMEngine.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/ntlm/NTLMEngineException.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/oauth/ConsumerKey.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/oauth/RequestToken.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/JDKFuture.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/JDKResponse.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/resumable/ResumableListener.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/simple/HeaderMap.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/webdav/WebDavResponse.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/websocket/WebSocket.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/websocket/WebSocketListener.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java (97%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/ByteArrayPartSource.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/FilePart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/FilePartSource.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/MultipartBody.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/MultipartEncodingUtil.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/MultipartRequestEntity.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/Part.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/PartBase.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/PartSource.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/RequestEntity.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/multipart/StringPart.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/AllowAllHostnameVerifier.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/AsyncHttpProviderUtils.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/AuthenticatorUtils.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/Base64.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/DateUtil.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/ProxyUtils.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/SslUtils.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/UTF8Codec.java (100%) rename {src => modules/api/src}/main/java/com/ning/http/util/UTF8UrlEncoder.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/RealmTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/AbstractBasicTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/AuthTimeoutTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/BasicAuthTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/BasicHttpsTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/BodyChunkTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ChunkingTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ComplexClientTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ConnectionPoolTest.java (90%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/DigestAuthTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/EmptyBodyTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ErrorResponseTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/Expect100ContinueTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/FilePartLargeFileTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/FilterTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/FluentStringsMapTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/FollowingThreadTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/Head302Test.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/HostnameVerifierTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/IdleStateHandlerTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/InputStreamTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ListenableFutureTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/MultipartUploadTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/MultipleHeaderTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/NoNullResponseTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ParamEncodingTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/PerRequestRelative302Test.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/PostWithQSTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ProviderUtil.java (55%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ProxyTest.java (99%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/PutLargeFileTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/QueryParametersTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/RC10KTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java (98%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/Relative302Test.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/RemoteSiteTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/RequestBuilderTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/RetryRequestTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/TransferListenerTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/WebDavBasicTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/async/ZeroCopyFileTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/resumable/MapResumableProcessor.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java (84%) rename {src => modules/api/src}/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java (93%) rename {src => modules/api/src}/test/java/com/ning/http/util/ProxyUtilsTest.java (100%) rename {src => modules/api/src}/test/java/com/ning/http/util/TestUTF8UrlCodec.java (100%) create mode 100644 modules/bundles/all/pom.xml create mode 100644 modules/bundles/pom.xml create mode 100644 modules/pom.xml create mode 100644 modules/providers/apache/pom.xml rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java (100%) rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java (100%) rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponse.java (100%) rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java (100%) rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java (100%) rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java (100%) rename {src => modules/providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java (100%) create mode 100644 modules/providers/grizzly/pom.xml rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java (100%) rename {src => modules/providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java (90%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java (100%) rename {src => modules/providers/grizzly/src}/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java (100%) rename {src => modules/providers/grizzly/src}/test/resources/300k.png (100%) rename {src => modules/providers/grizzly/src}/test/resources/SimpleTextFile.txt (100%) rename {src => modules/providers/grizzly/src}/test/resources/client.keystore (100%) rename {src => modules/providers/grizzly/src}/test/resources/gzip.txt.gz (100%) rename {src => modules/providers/grizzly/src}/test/resources/logback-test.xml (100%) rename {src => modules/providers/grizzly/src}/test/resources/realm.properties (100%) rename {src => modules/providers/grizzly/src}/test/resources/ssltest-cacerts.jks (100%) rename {src => modules/providers/grizzly/src}/test/resources/ssltest-keystore.jks (100%) rename {src => modules/providers/grizzly/src}/test/resources/textfile.txt (100%) rename {src => modules/providers/grizzly/src}/test/resources/textfile2.txt (100%) create mode 100644 modules/providers/netty/pom.xml rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java (100%) rename {src/main/java/com/ning/http/util => modules/providers/netty/src/main/java/com/ning/http/client/providers/netty}/CleanupChannelGroup.java (98%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java (99%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyResponse.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/Protocol.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/ResponseStatus.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java (100%) rename {src => modules/providers/netty/src}/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java (100%) rename {src/test/java/com/ning/http/client/providers => modules/providers/netty/src/test/java/com/ning/http/client/async}/netty/NettyAsyncResponseTest.java (95%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java (95%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java (62%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyFilterTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyHead302Test.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyProxyTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java (83%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java (100%) rename {src => modules/providers/netty/src}/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java (95%) rename {src/test/java/com/ning/http/client/async => modules/providers/netty/src/test/java/com/ning/http/client/async/netty}/RetryNonBlockingIssue.java (99%) create mode 100644 modules/providers/netty/src/test/resources/300k.png create mode 100644 modules/providers/netty/src/test/resources/SimpleTextFile.txt create mode 100644 modules/providers/netty/src/test/resources/client.keystore create mode 100644 modules/providers/netty/src/test/resources/gzip.txt.gz create mode 100644 modules/providers/netty/src/test/resources/logback-test.xml create mode 100644 modules/providers/netty/src/test/resources/realm.properties create mode 100644 modules/providers/netty/src/test/resources/ssltest-cacerts.jks create mode 100644 modules/providers/netty/src/test/resources/ssltest-keystore.jks create mode 100644 modules/providers/netty/src/test/resources/textfile.txt create mode 100644 modules/providers/netty/src/test/resources/textfile2.txt create mode 100644 modules/providers/pom.xml delete mode 100644 src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java diff --git a/modules/api/pom.xml b/modules/api/pom.xml new file mode 100644 index 0000000000..a857ad63da --- /dev/null +++ b/modules/api/pom.xml @@ -0,0 +1,70 @@ + + + 4.0.0 + + + com.ning + async-http-client-modules + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-api + 1.7.0-SNAPSHOT + jar + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + test-jar + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + com.ning.http.*;version="$(replace;$(project.version);-SNAPSHOT;"")" + + + + + + osgi-bundle + package + + bundle + + + + + + + + + + org.slf4j + slf4j-api + 1.6.2 + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/AsyncCompletionHandler.java b/modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncCompletionHandler.java rename to modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java diff --git a/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java b/modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java rename to modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java diff --git a/src/main/java/com/ning/http/client/AsyncHandler.java b/modules/api/src/main/java/com/ning/http/client/AsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHandler.java rename to modules/api/src/main/java/com/ning/http/client/AsyncHandler.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/modules/api/src/main/java/com/ning/http/client/AsyncHttpClient.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpClient.java rename to modules/api/src/main/java/com/ning/http/client/AsyncHttpClient.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpClientConfig.java rename to modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java rename to modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/modules/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpProvider.java rename to modules/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java b/modules/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java rename to modules/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/Body.java b/modules/api/src/main/java/com/ning/http/client/Body.java similarity index 100% rename from src/main/java/com/ning/http/client/Body.java rename to modules/api/src/main/java/com/ning/http/client/Body.java diff --git a/src/main/java/com/ning/http/client/BodyConsumer.java b/modules/api/src/main/java/com/ning/http/client/BodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/BodyConsumer.java rename to modules/api/src/main/java/com/ning/http/client/BodyConsumer.java diff --git a/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java b/modules/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java rename to modules/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java diff --git a/src/main/java/com/ning/http/client/BodyGenerator.java b/modules/api/src/main/java/com/ning/http/client/BodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/BodyGenerator.java rename to modules/api/src/main/java/com/ning/http/client/BodyGenerator.java diff --git a/src/main/java/com/ning/http/client/ByteArrayPart.java b/modules/api/src/main/java/com/ning/http/client/ByteArrayPart.java similarity index 100% rename from src/main/java/com/ning/http/client/ByteArrayPart.java rename to modules/api/src/main/java/com/ning/http/client/ByteArrayPart.java diff --git a/src/main/java/com/ning/http/client/ConnectionsPool.java b/modules/api/src/main/java/com/ning/http/client/ConnectionsPool.java similarity index 100% rename from src/main/java/com/ning/http/client/ConnectionsPool.java rename to modules/api/src/main/java/com/ning/http/client/ConnectionsPool.java diff --git a/src/main/java/com/ning/http/client/Cookie.java b/modules/api/src/main/java/com/ning/http/client/Cookie.java similarity index 100% rename from src/main/java/com/ning/http/client/Cookie.java rename to modules/api/src/main/java/com/ning/http/client/Cookie.java diff --git a/src/main/java/com/ning/http/client/FilePart.java b/modules/api/src/main/java/com/ning/http/client/FilePart.java similarity index 100% rename from src/main/java/com/ning/http/client/FilePart.java rename to modules/api/src/main/java/com/ning/http/client/FilePart.java diff --git a/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java b/modules/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java similarity index 100% rename from src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java rename to modules/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java diff --git a/src/main/java/com/ning/http/client/FluentStringsMap.java b/modules/api/src/main/java/com/ning/http/client/FluentStringsMap.java similarity index 100% rename from src/main/java/com/ning/http/client/FluentStringsMap.java rename to modules/api/src/main/java/com/ning/http/client/FluentStringsMap.java diff --git a/src/main/java/com/ning/http/client/HttpContent.java b/modules/api/src/main/java/com/ning/http/client/HttpContent.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpContent.java rename to modules/api/src/main/java/com/ning/http/client/HttpContent.java diff --git a/src/main/java/com/ning/http/client/HttpResponseBodyPart.java b/modules/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpResponseBodyPart.java rename to modules/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/HttpResponseHeaders.java b/modules/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpResponseHeaders.java rename to modules/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/HttpResponseStatus.java b/modules/api/src/main/java/com/ning/http/client/HttpResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpResponseStatus.java rename to modules/api/src/main/java/com/ning/http/client/HttpResponseStatus.java diff --git a/src/main/java/com/ning/http/client/ListenableFuture.java b/modules/api/src/main/java/com/ning/http/client/ListenableFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/ListenableFuture.java rename to modules/api/src/main/java/com/ning/http/client/ListenableFuture.java diff --git a/src/main/java/com/ning/http/client/MaxRedirectException.java b/modules/api/src/main/java/com/ning/http/client/MaxRedirectException.java similarity index 100% rename from src/main/java/com/ning/http/client/MaxRedirectException.java rename to modules/api/src/main/java/com/ning/http/client/MaxRedirectException.java diff --git a/src/main/java/com/ning/http/client/Part.java b/modules/api/src/main/java/com/ning/http/client/Part.java similarity index 100% rename from src/main/java/com/ning/http/client/Part.java rename to modules/api/src/main/java/com/ning/http/client/Part.java diff --git a/src/main/java/com/ning/http/client/PerRequestConfig.java b/modules/api/src/main/java/com/ning/http/client/PerRequestConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/PerRequestConfig.java rename to modules/api/src/main/java/com/ning/http/client/PerRequestConfig.java diff --git a/src/main/java/com/ning/http/client/ProgressAsyncHandler.java b/modules/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/ProgressAsyncHandler.java rename to modules/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java diff --git a/src/main/java/com/ning/http/client/ProxyServer.java b/modules/api/src/main/java/com/ning/http/client/ProxyServer.java similarity index 100% rename from src/main/java/com/ning/http/client/ProxyServer.java rename to modules/api/src/main/java/com/ning/http/client/ProxyServer.java diff --git a/src/main/java/com/ning/http/client/RandomAccessBody.java b/modules/api/src/main/java/com/ning/http/client/RandomAccessBody.java similarity index 100% rename from src/main/java/com/ning/http/client/RandomAccessBody.java rename to modules/api/src/main/java/com/ning/http/client/RandomAccessBody.java diff --git a/src/main/java/com/ning/http/client/Realm.java b/modules/api/src/main/java/com/ning/http/client/Realm.java similarity index 100% rename from src/main/java/com/ning/http/client/Realm.java rename to modules/api/src/main/java/com/ning/http/client/Realm.java diff --git a/src/main/java/com/ning/http/client/Request.java b/modules/api/src/main/java/com/ning/http/client/Request.java similarity index 100% rename from src/main/java/com/ning/http/client/Request.java rename to modules/api/src/main/java/com/ning/http/client/Request.java diff --git a/src/main/java/com/ning/http/client/RequestBuilder.java b/modules/api/src/main/java/com/ning/http/client/RequestBuilder.java similarity index 100% rename from src/main/java/com/ning/http/client/RequestBuilder.java rename to modules/api/src/main/java/com/ning/http/client/RequestBuilder.java diff --git a/src/main/java/com/ning/http/client/RequestBuilderBase.java b/modules/api/src/main/java/com/ning/http/client/RequestBuilderBase.java similarity index 100% rename from src/main/java/com/ning/http/client/RequestBuilderBase.java rename to modules/api/src/main/java/com/ning/http/client/RequestBuilderBase.java diff --git a/src/main/java/com/ning/http/client/Response.java b/modules/api/src/main/java/com/ning/http/client/Response.java similarity index 100% rename from src/main/java/com/ning/http/client/Response.java rename to modules/api/src/main/java/com/ning/http/client/Response.java diff --git a/src/main/java/com/ning/http/client/ResumableBodyConsumer.java b/modules/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/ResumableBodyConsumer.java rename to modules/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/SSLEngineFactory.java b/modules/api/src/main/java/com/ning/http/client/SSLEngineFactory.java similarity index 100% rename from src/main/java/com/ning/http/client/SSLEngineFactory.java rename to modules/api/src/main/java/com/ning/http/client/SSLEngineFactory.java diff --git a/src/main/java/com/ning/http/client/SignatureCalculator.java b/modules/api/src/main/java/com/ning/http/client/SignatureCalculator.java similarity index 100% rename from src/main/java/com/ning/http/client/SignatureCalculator.java rename to modules/api/src/main/java/com/ning/http/client/SignatureCalculator.java diff --git a/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java b/modules/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java similarity index 100% rename from src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java rename to modules/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java diff --git a/src/main/java/com/ning/http/client/StringPart.java b/modules/api/src/main/java/com/ning/http/client/StringPart.java similarity index 100% rename from src/main/java/com/ning/http/client/StringPart.java rename to modules/api/src/main/java/com/ning/http/client/StringPart.java diff --git a/src/main/java/com/ning/http/client/ThrowableHandler.java b/modules/api/src/main/java/com/ning/http/client/ThrowableHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/ThrowableHandler.java rename to modules/api/src/main/java/com/ning/http/client/ThrowableHandler.java diff --git a/src/main/java/com/ning/http/client/UpgradeHandler.java b/modules/api/src/main/java/com/ning/http/client/UpgradeHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/UpgradeHandler.java rename to modules/api/src/main/java/com/ning/http/client/UpgradeHandler.java diff --git a/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java b/modules/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java rename to modules/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java b/modules/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java rename to modules/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java b/modules/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java rename to modules/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java b/modules/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java rename to modules/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/modules/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java similarity index 100% rename from src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java rename to modules/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java diff --git a/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java b/modules/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java rename to modules/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java diff --git a/src/main/java/com/ning/http/client/filter/FilterContext.java b/modules/api/src/main/java/com/ning/http/client/filter/FilterContext.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/FilterContext.java rename to modules/api/src/main/java/com/ning/http/client/filter/FilterContext.java diff --git a/src/main/java/com/ning/http/client/filter/FilterException.java b/modules/api/src/main/java/com/ning/http/client/filter/FilterException.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/FilterException.java rename to modules/api/src/main/java/com/ning/http/client/filter/FilterException.java diff --git a/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java b/modules/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/IOExceptionFilter.java rename to modules/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java diff --git a/src/main/java/com/ning/http/client/filter/RequestFilter.java b/modules/api/src/main/java/com/ning/http/client/filter/RequestFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/RequestFilter.java rename to modules/api/src/main/java/com/ning/http/client/filter/RequestFilter.java diff --git a/src/main/java/com/ning/http/client/filter/ResponseFilter.java b/modules/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/ResponseFilter.java rename to modules/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java diff --git a/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java b/modules/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java rename to modules/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java b/modules/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/generators/FileBodyGenerator.java rename to modules/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java b/modules/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java rename to modules/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java b/modules/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java rename to modules/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java diff --git a/src/main/java/com/ning/http/client/listenable/ExecutionList.java b/modules/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java similarity index 100% rename from src/main/java/com/ning/http/client/listenable/ExecutionList.java rename to modules/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java diff --git a/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java b/modules/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java rename to modules/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java diff --git a/src/main/java/com/ning/http/client/listener/TransferListener.java b/modules/api/src/main/java/com/ning/http/client/listener/TransferListener.java similarity index 100% rename from src/main/java/com/ning/http/client/listener/TransferListener.java rename to modules/api/src/main/java/com/ning/http/client/listener/TransferListener.java diff --git a/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java similarity index 100% rename from src/main/java/com/ning/http/client/ntlm/NTLMEngine.java rename to modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java diff --git a/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java b/modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java similarity index 100% rename from src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java rename to modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java diff --git a/src/main/java/com/ning/http/client/oauth/ConsumerKey.java b/modules/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/ConsumerKey.java rename to modules/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java diff --git a/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/modules/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java rename to modules/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java diff --git a/src/main/java/com/ning/http/client/oauth/RequestToken.java b/modules/api/src/main/java/com/ning/http/client/oauth/RequestToken.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/RequestToken.java rename to modules/api/src/main/java/com/ning/http/client/oauth/RequestToken.java diff --git a/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java b/modules/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java rename to modules/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java b/modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java rename to modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java diff --git a/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java b/modules/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java rename to modules/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java diff --git a/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java b/modules/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java rename to modules/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java diff --git a/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java b/modules/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java rename to modules/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java diff --git a/src/main/java/com/ning/http/client/resumable/ResumableListener.java b/modules/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/ResumableListener.java rename to modules/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java diff --git a/src/main/java/com/ning/http/client/simple/HeaderMap.java b/modules/api/src/main/java/com/ning/http/client/simple/HeaderMap.java similarity index 100% rename from src/main/java/com/ning/http/client/simple/HeaderMap.java rename to modules/api/src/main/java/com/ning/http/client/simple/HeaderMap.java diff --git a/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java b/modules/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java similarity index 100% rename from src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java rename to modules/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java diff --git a/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java b/modules/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java similarity index 100% rename from src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java rename to modules/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java diff --git a/src/main/java/com/ning/http/client/webdav/WebDavResponse.java b/modules/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/webdav/WebDavResponse.java rename to modules/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/modules/api/src/main/java/com/ning/http/client/websocket/WebSocket.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocket.java rename to modules/api/src/main/java/com/ning/http/client/websocket/WebSocket.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/modules/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketListener.java rename to modules/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/modules/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java similarity index 97% rename from src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java rename to modules/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index d7fa5387c7..dfd07bef33 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/modules/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -17,7 +17,6 @@ import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.UpgradeHandler; -import org.jboss.netty.handler.codec.http.HttpResponse; /** * An {@link AsyncHandler} which is able to execute WebSocket upgrade. diff --git a/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java b/modules/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java similarity index 100% rename from src/main/java/com/ning/http/multipart/ByteArrayPartSource.java rename to modules/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java diff --git a/src/main/java/com/ning/http/multipart/FilePart.java b/modules/api/src/main/java/com/ning/http/multipart/FilePart.java similarity index 100% rename from src/main/java/com/ning/http/multipart/FilePart.java rename to modules/api/src/main/java/com/ning/http/multipart/FilePart.java diff --git a/src/main/java/com/ning/http/multipart/FilePartSource.java b/modules/api/src/main/java/com/ning/http/multipart/FilePartSource.java similarity index 100% rename from src/main/java/com/ning/http/multipart/FilePartSource.java rename to modules/api/src/main/java/com/ning/http/multipart/FilePartSource.java diff --git a/src/main/java/com/ning/http/multipart/MultipartBody.java b/modules/api/src/main/java/com/ning/http/multipart/MultipartBody.java similarity index 100% rename from src/main/java/com/ning/http/multipart/MultipartBody.java rename to modules/api/src/main/java/com/ning/http/multipart/MultipartBody.java diff --git a/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java b/modules/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java similarity index 100% rename from src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java rename to modules/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java diff --git a/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java b/modules/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java similarity index 100% rename from src/main/java/com/ning/http/multipart/MultipartRequestEntity.java rename to modules/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java diff --git a/src/main/java/com/ning/http/multipart/Part.java b/modules/api/src/main/java/com/ning/http/multipart/Part.java similarity index 100% rename from src/main/java/com/ning/http/multipart/Part.java rename to modules/api/src/main/java/com/ning/http/multipart/Part.java diff --git a/src/main/java/com/ning/http/multipart/PartBase.java b/modules/api/src/main/java/com/ning/http/multipart/PartBase.java similarity index 100% rename from src/main/java/com/ning/http/multipart/PartBase.java rename to modules/api/src/main/java/com/ning/http/multipart/PartBase.java diff --git a/src/main/java/com/ning/http/multipart/PartSource.java b/modules/api/src/main/java/com/ning/http/multipart/PartSource.java similarity index 100% rename from src/main/java/com/ning/http/multipart/PartSource.java rename to modules/api/src/main/java/com/ning/http/multipart/PartSource.java diff --git a/src/main/java/com/ning/http/multipart/RequestEntity.java b/modules/api/src/main/java/com/ning/http/multipart/RequestEntity.java similarity index 100% rename from src/main/java/com/ning/http/multipart/RequestEntity.java rename to modules/api/src/main/java/com/ning/http/multipart/RequestEntity.java diff --git a/src/main/java/com/ning/http/multipart/StringPart.java b/modules/api/src/main/java/com/ning/http/multipart/StringPart.java similarity index 100% rename from src/main/java/com/ning/http/multipart/StringPart.java rename to modules/api/src/main/java/com/ning/http/multipart/StringPart.java diff --git a/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java b/modules/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java similarity index 100% rename from src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java rename to modules/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/modules/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java rename to modules/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java diff --git a/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/modules/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/AuthenticatorUtils.java rename to modules/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java diff --git a/src/main/java/com/ning/http/util/Base64.java b/modules/api/src/main/java/com/ning/http/util/Base64.java similarity index 100% rename from src/main/java/com/ning/http/util/Base64.java rename to modules/api/src/main/java/com/ning/http/util/Base64.java diff --git a/src/main/java/com/ning/http/util/DateUtil.java b/modules/api/src/main/java/com/ning/http/util/DateUtil.java similarity index 100% rename from src/main/java/com/ning/http/util/DateUtil.java rename to modules/api/src/main/java/com/ning/http/util/DateUtil.java diff --git a/src/main/java/com/ning/http/util/ProxyUtils.java b/modules/api/src/main/java/com/ning/http/util/ProxyUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/ProxyUtils.java rename to modules/api/src/main/java/com/ning/http/util/ProxyUtils.java diff --git a/src/main/java/com/ning/http/util/SslUtils.java b/modules/api/src/main/java/com/ning/http/util/SslUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/SslUtils.java rename to modules/api/src/main/java/com/ning/http/util/SslUtils.java diff --git a/src/main/java/com/ning/http/util/UTF8Codec.java b/modules/api/src/main/java/com/ning/http/util/UTF8Codec.java similarity index 100% rename from src/main/java/com/ning/http/util/UTF8Codec.java rename to modules/api/src/main/java/com/ning/http/util/UTF8Codec.java diff --git a/src/main/java/com/ning/http/util/UTF8UrlEncoder.java b/modules/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java similarity index 100% rename from src/main/java/com/ning/http/util/UTF8UrlEncoder.java rename to modules/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java diff --git a/src/test/java/com/ning/http/client/RealmTest.java b/modules/api/src/test/java/com/ning/http/client/RealmTest.java similarity index 100% rename from src/test/java/com/ning/http/client/RealmTest.java rename to modules/api/src/test/java/com/ning/http/client/RealmTest.java diff --git a/src/test/java/com/ning/http/client/async/AbstractBasicTest.java b/modules/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/AbstractBasicTest.java rename to modules/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java diff --git a/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/modules/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java rename to modules/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index 41421e46ef..f64b051a24 100755 --- a/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -30,7 +30,6 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import com.ning.http.client.StringPart; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/modules/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java rename to modules/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java b/modules/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java rename to modules/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java diff --git a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/modules/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/AuthTimeoutTest.java rename to modules/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java index 6f5fb4eb2a..3a3b8675bd 100644 --- a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java @@ -38,7 +38,6 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; -import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.Future; diff --git a/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/modules/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/BasicAuthTest.java rename to modules/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java index 791e8ab9ed..64149fd852 100644 --- a/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java @@ -53,7 +53,6 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.URL; -import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.ExecutionException; diff --git a/src/test/java/com/ning/http/client/async/BasicHttpsTest.java b/modules/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/BasicHttpsTest.java rename to modules/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java diff --git a/src/test/java/com/ning/http/client/async/BodyChunkTest.java b/modules/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/BodyChunkTest.java rename to modules/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java diff --git a/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java b/modules/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java rename to modules/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/modules/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java diff --git a/src/test/java/com/ning/http/client/async/ChunkingTest.java b/modules/api/src/test/java/com/ning/http/client/async/ChunkingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ChunkingTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ChunkingTest.java diff --git a/src/test/java/com/ning/http/client/async/ComplexClientTest.java b/modules/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ComplexClientTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java diff --git a/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/modules/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java similarity index 90% rename from src/test/java/com/ning/http/client/async/ConnectionPoolTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java index 8f02356c90..49725314ca 100644 --- a/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java @@ -21,7 +21,6 @@ import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; import com.ning.http.client.Response; -import org.jboss.netty.channel.Channel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -42,6 +41,8 @@ public abstract class ConnectionPoolTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); + + protected abstract ConnectionsPool createPool(boolean canCache); @Test(groups = {"standalone", "default_provider"}) public void testMaxTotalConnections() { @@ -143,28 +144,7 @@ public Response onCompleted(Response response) throws @Test(groups = {"standalone", "default_provider"}) public void testInvalidConnectionsPool() { - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return false; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return false; - } - - public void destroy() { - - } - }; + ConnectionsPool cp = createPool(false); AsyncHttpClient client = getAsyncHttpClient( new AsyncHttpClientConfig.Builder() @@ -187,28 +167,7 @@ public void destroy() { @Test(groups = {"standalone", "default_provider"}) public void testValidConnectionsPool() { - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return true; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - - } - }; + ConnectionsPool cp = createPool(true); AsyncHttpClient client = getAsyncHttpClient( new AsyncHttpClientConfig.Builder() diff --git a/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/modules/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/DigestAuthTest.java rename to modules/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java index 9753e4d922..42b9d3ab25 100644 --- a/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java @@ -37,7 +37,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.ExecutionException; diff --git a/src/test/java/com/ning/http/client/async/EmptyBodyTest.java b/modules/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/EmptyBodyTest.java rename to modules/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java diff --git a/src/test/java/com/ning/http/client/async/ErrorResponseTest.java b/modules/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ErrorResponseTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java b/modules/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/Expect100ContinueTest.java rename to modules/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java diff --git a/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/modules/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java rename to modules/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/FilterTest.java b/modules/api/src/test/java/com/ning/http/client/async/FilterTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FilterTest.java rename to modules/api/src/test/java/com/ning/http/client/async/FilterTest.java diff --git a/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java b/modules/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java rename to modules/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java diff --git a/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java b/modules/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/FluentStringsMapTest.java rename to modules/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java index d6c6795985..c528a3221f 100644 --- a/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java @@ -16,6 +16,7 @@ package com.ning.http.client.async; import com.ning.http.client.FluentStringsMap; +import org.testng.Assert; import org.testng.annotations.Test; import java.util.Arrays; diff --git a/src/test/java/com/ning/http/client/async/FollowingThreadTest.java b/modules/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FollowingThreadTest.java rename to modules/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java diff --git a/src/test/java/com/ning/http/client/async/Head302Test.java b/modules/api/src/test/java/com/ning/http/client/async/Head302Test.java similarity index 99% rename from src/test/java/com/ning/http/client/async/Head302Test.java rename to modules/api/src/test/java/com/ning/http/client/async/Head302Test.java index c84f827dce..d73397326d 100644 --- a/src/test/java/com/ning/http/client/async/Head302Test.java +++ b/modules/api/src/test/java/com/ning/http/client/async/Head302Test.java @@ -21,7 +21,6 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.omg.CORBA.TIMEOUT; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/modules/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/HostnameVerifierTest.java rename to modules/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java diff --git a/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java b/modules/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java rename to modules/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java diff --git a/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java b/modules/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java rename to modules/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/InputStreamTest.java b/modules/api/src/test/java/com/ning/http/client/async/InputStreamTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/InputStreamTest.java rename to modules/api/src/test/java/com/ning/http/client/async/InputStreamTest.java diff --git a/src/test/java/com/ning/http/client/async/ListenableFutureTest.java b/modules/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ListenableFutureTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java diff --git a/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java b/modules/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java rename to modules/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java diff --git a/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java b/modules/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java rename to modules/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java diff --git a/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/modules/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MultipartUploadTest.java rename to modules/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java diff --git a/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java b/modules/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MultipleHeaderTest.java rename to modules/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java diff --git a/src/test/java/com/ning/http/client/async/NoNullResponseTest.java b/modules/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/NoNullResponseTest.java rename to modules/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/modules/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java rename to modules/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java diff --git a/src/test/java/com/ning/http/client/async/ParamEncodingTest.java b/modules/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ParamEncodingTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java diff --git a/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/modules/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java rename to modules/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java diff --git a/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java b/modules/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java rename to modules/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java diff --git a/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/modules/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/PostWithQSTest.java rename to modules/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java index d99498bd18..ee1cc22ae4 100644 --- a/src/test/java/com/ning/http/client/async/PostWithQSTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java @@ -21,6 +21,7 @@ import com.ning.http.client.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.Assert; import org.testng.annotations.Test; import javax.servlet.ServletException; diff --git a/src/test/java/com/ning/http/client/async/ProviderUtil.java b/modules/api/src/test/java/com/ning/http/client/async/ProviderUtil.java similarity index 55% rename from src/test/java/com/ning/http/client/async/ProviderUtil.java rename to modules/api/src/test/java/com/ning/http/client/async/ProviderUtil.java index 70f79dc94c..a136b5ec0a 100644 --- a/src/test/java/com/ning/http/client/async/ProviderUtil.java +++ b/modules/api/src/test/java/com/ning/http/client/async/ProviderUtil.java @@ -17,8 +17,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.providers.apache.ApacheAsyncHttpProvider; -import com.ning.http.client.providers.jdk.JDKAsyncHttpProvider; public class ProviderUtil { @@ -31,20 +29,4 @@ public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { } } - public static AsyncHttpClient apacheProvider(AsyncHttpClientConfig config) { - if (config == null) { - return new AsyncHttpClient(new ApacheAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); - } else { - return new AsyncHttpClient(new ApacheAsyncHttpProvider(config)); - } - } - - public static AsyncHttpClient jdkProvider(AsyncHttpClientConfig config) { - if (config == null) { - return new AsyncHttpClient(new JDKAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); - } else { - return new AsyncHttpClient(new JDKAsyncHttpProvider(config)); - } - } - } diff --git a/src/test/java/com/ning/http/client/async/ProxyTest.java b/modules/api/src/test/java/com/ning/http/client/async/ProxyTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/ProxyTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ProxyTest.java index 941897ce0c..4129a4a729 100644 --- a/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/ProxyTest.java @@ -21,8 +21,6 @@ import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ProxyServer; import com.ning.http.client.Response; -import com.ning.http.client.ProxyServer.Protocol; -import com.ning.http.util.ProxyUtils; import java.io.IOException; import java.net.ConnectException; diff --git a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java b/modules/api/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java diff --git a/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/modules/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PutLargeFileTest.java rename to modules/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/QueryParametersTest.java b/modules/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/QueryParametersTest.java rename to modules/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java diff --git a/src/test/java/com/ning/http/client/async/RC10KTest.java b/modules/api/src/test/java/com/ning/http/client/async/RC10KTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RC10KTest.java rename to modules/api/src/test/java/com/ning/http/client/async/RC10KTest.java diff --git a/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java b/modules/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java similarity index 98% rename from src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java rename to modules/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java index 6cc687e49f..4900102ca6 100644 --- a/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java +++ b/modules/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java @@ -21,7 +21,6 @@ import com.ning.http.client.ListenableFuture; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; diff --git a/src/test/java/com/ning/http/client/async/Relative302Test.java b/modules/api/src/test/java/com/ning/http/client/async/Relative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/Relative302Test.java rename to modules/api/src/test/java/com/ning/http/client/async/Relative302Test.java diff --git a/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/modules/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RemoteSiteTest.java rename to modules/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java diff --git a/src/test/java/com/ning/http/client/async/RequestBuilderTest.java b/modules/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RequestBuilderTest.java rename to modules/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java diff --git a/src/test/java/com/ning/http/client/async/RetryRequestTest.java b/modules/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RetryRequestTest.java rename to modules/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java diff --git a/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java b/modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java rename to modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java diff --git a/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java b/modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java rename to modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java diff --git a/src/test/java/com/ning/http/client/async/TransferListenerTest.java b/modules/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/TransferListenerTest.java rename to modules/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java diff --git a/src/test/java/com/ning/http/client/async/WebDavBasicTest.java b/modules/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/WebDavBasicTest.java rename to modules/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java diff --git a/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/modules/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java rename to modules/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java diff --git a/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java b/modules/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java similarity index 100% rename from src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java rename to modules/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java diff --git a/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java b/modules/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java similarity index 100% rename from src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java rename to modules/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java diff --git a/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java b/modules/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java similarity index 84% rename from src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java rename to modules/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java index e9969a599b..e88243b9bb 100644 --- a/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java +++ b/modules/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java @@ -13,6 +13,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ +import org.testng.Assert; import org.testng.annotations.Test; import java.util.Map; @@ -32,9 +33,9 @@ public void testSaveLoad() p.save(null); p = new PropertiesBasedResumableProcessor(); Map m = p.load(); - assertEquals(m.size(), 2); - assertEquals(m.get("http://localhost/test.url"), Long.valueOf(15L)); - assertEquals(m.get("http://localhost/test2.url"), Long.valueOf(50L)); + Assert.assertEquals(m.size(), 2); + Assert.assertEquals(m.get("http://localhost/test.url"), Long.valueOf(15L)); + Assert.assertEquals(m.get("http://localhost/test2.url"), Long.valueOf(50L)); } } diff --git a/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java b/modules/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java similarity index 93% rename from src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java rename to modules/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java index 8c9160eb37..576d79feb6 100644 --- a/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java +++ b/modules/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java @@ -16,6 +16,7 @@ import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; +import org.testng.Assert; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; @@ -34,12 +35,12 @@ public void testAdjustRange() { Request newRequest = h.adjustRequestRange(request); assertEquals(newRequest.getUrl(), request.getUrl()); String rangeHeader = newRequest.getHeaders().getFirstValue("Range"); - assertNull(rangeHeader); + Assert.assertNull(rangeHeader); proc.put("http://test/url", 5000); newRequest = h.adjustRequestRange(request); assertEquals(newRequest.getUrl(), request.getUrl()); rangeHeader = newRequest.getHeaders().getFirstValue("Range"); - assertEquals(rangeHeader, "bytes=5000-"); + Assert.assertEquals(rangeHeader, "bytes=5000-"); } } diff --git a/src/test/java/com/ning/http/util/ProxyUtilsTest.java b/modules/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java similarity index 100% rename from src/test/java/com/ning/http/util/ProxyUtilsTest.java rename to modules/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java diff --git a/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java b/modules/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java similarity index 100% rename from src/test/java/com/ning/http/util/TestUTF8UrlCodec.java rename to modules/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java diff --git a/modules/bundles/all/pom.xml b/modules/bundles/all/pom.xml new file mode 100644 index 0000000000..da79c3ebce --- /dev/null +++ b/modules/bundles/all/pom.xml @@ -0,0 +1,121 @@ + + + 4.0.0 + + + com.ning + async-http-client-bundles + 1.7.0-SNAPSHOT + + + com.ning + async-http-client + 1.7.0-SNAPSHOT + jar + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + + + * + + com.ning.http.*;-split-package:=merge-first + + + true + + + + osgi-bundle + package + + bundle + + + + + + org.apache.maven.plugins + maven-shade-plugin + 1.4 + + + package + + shade + + + true + shaded + true + + + commons-codec:commons-codec + + commons-lang:commons-lang + commons-logging:commons-logging + + junit:junit + log4j:log4j + + commons-httpclient:commons-httpclient + + + org.jboss.netty:netty + + + commons-httpclient:commons-httpclient + + + org.glassfish.grizzly:* + + + org.glassfish.gmbal:* + + + org.glassfish.external:* + + + + + + + + + + + + + + + + + com.ning + async-http-client-api + ${project.version} + + + com.ning + async-http-client-apache-provider + ${project.version} + + + com.ning + async-http-client-grizzly-provider + ${project.version} + + + com.ning + async-http-client-netty-provider + ${project.version} + + + \ No newline at end of file diff --git a/modules/bundles/pom.xml b/modules/bundles/pom.xml new file mode 100644 index 0000000000..5fe1d3c355 --- /dev/null +++ b/modules/bundles/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + + com.ning + async-http-client-modules + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-bundles + 1.7.0-SNAPSHOT + pom + + + all + + \ No newline at end of file diff --git a/modules/pom.xml b/modules/pom.xml new file mode 100644 index 0000000000..c87f132a1a --- /dev/null +++ b/modules/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + + com.ning + async-http-client-project + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-modules + 1.7.0-SNAPSHOT + pom + + + api + providers + bundles + + \ No newline at end of file diff --git a/modules/providers/apache/pom.xml b/modules/providers/apache/pom.xml new file mode 100644 index 0000000000..874b16fcae --- /dev/null +++ b/modules/providers/apache/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + + + com.ning + async-http-client-providers + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-apache-provider + 1.7.0-SNAPSHOT + jar + + + + + org.codehaus.mojo + clirr-maven-plugin + 2.3 + + + **/NettyAsyncHttpProvider$* + **/AsyncHandler$STATE + **/ProxyServer$Protocol + **/Realm$AuthScheme + + **/SimpleAsyncHttpClient$ErrorDocumentBehaviour + + **/SpnegoEngine + **/Request + **/Request$EntityWriter + **/RequestBuilderBase + **/Response + **/Response$ + **/NettyResponseFuture + **/**ResponseBodyPart + + + + + check-api-compat + verify + + check-no-fork + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + org.apache.commons.httpclient;resolution:=optional, + org.apache.commons.httpclient.*;resolution:=optional, + * + + + com.ning.http.client.providers.apache.*;version="$(replace;$(project.version);-SNAPSHOT;"")" + + + + + + osgi-bundle + package + + bundle + + + + + + + + + + com.ning + async-http-client-api + ${project.version} + + + + commons-httpclient + commons-httpclient + 3.1 + true + + + commons-lang + commons-lang + 2.4 + true + + + commons-logging + commons-logging + 1.1.1 + true + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java b/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java rename to modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java diff --git a/modules/providers/grizzly/pom.xml b/modules/providers/grizzly/pom.xml new file mode 100644 index 0000000000..1d11c4d62b --- /dev/null +++ b/modules/providers/grizzly/pom.xml @@ -0,0 +1,87 @@ + + + 4.0.0 + + + com.ning + async-http-client-providers + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-grizzly-provider + 1.7.0-SNAPSHOT + jar + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + org.glassfish.grizzly.*;resolution:=optional, + * + + + com.ning.http.client.providers.grizzly.*;version="$(replace;$(project.version);-SNAPSHOT;"")" + + + + + + osgi-bundle + package + + bundle + + + + + + + + + + org.glassfish.grizzly + grizzly-http + 2.2-SNAPSHOT + + + com.ning + async-http-client-api + ${project.version} + + + com.ning + async-http-client-api + ${project.version} + test + tests + + + + + + jvnet-nexus-snapshots + https://maven.java.net/content/repositories/snapshots + + false + + + true + + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java b/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java rename to modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java similarity index 90% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java index 5781f71391..14865779fe 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java +++ b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java @@ -72,48 +72,6 @@ public void testMaxTotalConnectionsException() { } - @Override - public void testValidConnectionsPool() { - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Connection connection) { - return true; - } - - public Connection poll(String connection) { - return null; - } - - public boolean removeAll(Connection connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - - } - }; - - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; - try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; - } - assertNull(exception); - client.close(); - } - @Test(groups = {"standalone", "default_provider"}) public void testInvalidConnectionsPool() { @@ -220,4 +178,29 @@ public Response onCompleted(Response response) throws client.close(); } + @Override + protected ConnectionsPool createPool(final boolean canCache) { + return new ConnectionsPool() { + + public boolean offer(String key, Connection connection) { + return canCache; + } + + public Connection poll(String connection) { + return null; + } + + public boolean removeAll(Connection connection) { + return false; + } + + public boolean canCacheConnection() { + return canCache; + } + + public void destroy() { + + } + }; + } } diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java b/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java rename to modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java diff --git a/src/test/resources/300k.png b/modules/providers/grizzly/src/test/resources/300k.png similarity index 100% rename from src/test/resources/300k.png rename to modules/providers/grizzly/src/test/resources/300k.png diff --git a/src/test/resources/SimpleTextFile.txt b/modules/providers/grizzly/src/test/resources/SimpleTextFile.txt similarity index 100% rename from src/test/resources/SimpleTextFile.txt rename to modules/providers/grizzly/src/test/resources/SimpleTextFile.txt diff --git a/src/test/resources/client.keystore b/modules/providers/grizzly/src/test/resources/client.keystore similarity index 100% rename from src/test/resources/client.keystore rename to modules/providers/grizzly/src/test/resources/client.keystore diff --git a/src/test/resources/gzip.txt.gz b/modules/providers/grizzly/src/test/resources/gzip.txt.gz similarity index 100% rename from src/test/resources/gzip.txt.gz rename to modules/providers/grizzly/src/test/resources/gzip.txt.gz diff --git a/src/test/resources/logback-test.xml b/modules/providers/grizzly/src/test/resources/logback-test.xml similarity index 100% rename from src/test/resources/logback-test.xml rename to modules/providers/grizzly/src/test/resources/logback-test.xml diff --git a/src/test/resources/realm.properties b/modules/providers/grizzly/src/test/resources/realm.properties similarity index 100% rename from src/test/resources/realm.properties rename to modules/providers/grizzly/src/test/resources/realm.properties diff --git a/src/test/resources/ssltest-cacerts.jks b/modules/providers/grizzly/src/test/resources/ssltest-cacerts.jks similarity index 100% rename from src/test/resources/ssltest-cacerts.jks rename to modules/providers/grizzly/src/test/resources/ssltest-cacerts.jks diff --git a/src/test/resources/ssltest-keystore.jks b/modules/providers/grizzly/src/test/resources/ssltest-keystore.jks similarity index 100% rename from src/test/resources/ssltest-keystore.jks rename to modules/providers/grizzly/src/test/resources/ssltest-keystore.jks diff --git a/src/test/resources/textfile.txt b/modules/providers/grizzly/src/test/resources/textfile.txt similarity index 100% rename from src/test/resources/textfile.txt rename to modules/providers/grizzly/src/test/resources/textfile.txt diff --git a/src/test/resources/textfile2.txt b/modules/providers/grizzly/src/test/resources/textfile2.txt similarity index 100% rename from src/test/resources/textfile2.txt rename to modules/providers/grizzly/src/test/resources/textfile2.txt diff --git a/modules/providers/netty/pom.xml b/modules/providers/netty/pom.xml new file mode 100644 index 0000000000..dd7a5500ae --- /dev/null +++ b/modules/providers/netty/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + + com.ning + async-http-client-providers + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-netty-provider + 1.7.0-SNAPSHOT + jar + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + org.jboss.netty.*;resolution:=optional, + * + + + com.ning.http.client.providers.netty.*;version="$(replace;$(project.version);-SNAPSHOT;"")" + + + + + + osgi-bundle + package + + bundle + + + + + + + + + + com.ning + async-http-client-api + ${project.version} + + + com.ning + async-http-client-api + ${project.version} + test + tests + + + org.jboss.netty + netty + 3.2.5.Final + + + javax.servlet + servlet-api + + + commons-logging + commons-logging + + + org.slf4j + slf4j-api + + + log4j + log4j + + + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java diff --git a/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java diff --git a/src/main/java/com/ning/http/util/CleanupChannelGroup.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/CleanupChannelGroup.java similarity index 98% rename from src/main/java/com/ning/http/util/CleanupChannelGroup.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/CleanupChannelGroup.java index 23ecc2f30b..7d326f316f 100644 --- a/src/main/java/com/ning/http/util/CleanupChannelGroup.java +++ b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/CleanupChannelGroup.java @@ -26,7 +26,7 @@ * limitations under the License. */ -package com.ning.http.util; +package com.ning.http.client.providers.netty; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java similarity index 99% rename from src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 30ba1427ee..89c4f12805 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -54,7 +54,6 @@ import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.util.AsyncHttpProviderUtils; import com.ning.http.util.AuthenticatorUtils; -import com.ning.http.util.CleanupChannelGroup; import com.ning.http.util.ProxyUtils; import com.ning.http.util.SslUtils; import com.ning.http.util.UTF8UrlEncoder; diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyResponse.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java diff --git a/src/main/java/com/ning/http/client/providers/netty/Protocol.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/Protocol.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java diff --git a/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java b/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java rename to modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java diff --git a/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncResponseTest.java similarity index 95% rename from src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncResponseTest.java index c6a92f8c6a..e0ce2c2921 100644 --- a/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncResponseTest.java @@ -11,11 +11,13 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package com.ning.http.client.async.netty; import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.providers.netty.NettyResponse; +import com.ning.http.client.providers.netty.ResponseStatus; import org.testng.annotations.Test; import java.text.SimpleDateFormat; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java index ca2d231985..3a4b4a528e 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java +++ b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java @@ -14,7 +14,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AbstractBasicTest; import com.ning.http.client.async.ByteBufferCapacityTest; import com.ning.http.client.async.ProviderUtil; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java similarity index 62% rename from src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java index 912ed49019..9ca8af6a68 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java +++ b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java @@ -14,8 +14,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.ConnectionsPool; import com.ning.http.client.async.ConnectionPoolTest; import com.ning.http.client.async.ProviderUtil; +import org.jboss.netty.channel.Channel; public class NettyConnectionPoolTest extends ConnectionPoolTest { @@ -24,4 +26,30 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); } + + @Override + protected ConnectionsPool createPool(final boolean canCache) { + return new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return canCache; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return canCache; + } + + public void destroy() { + + } + }; + } } diff --git a/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java similarity index 83% rename from src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java index 757ad583d3..3367ac129d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java +++ b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java @@ -28,4 +28,8 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return null; } + @Override + public void RequestByteArrayOutputStreamBodyConsumerTest() throws Throwable { + super.RequestByteArrayOutputStreamBodyConsumerTest(); //To change body of overridden methods use File | Settings | File Templates. + } } diff --git a/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java index eb47fe624d..6f664bd87f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java +++ b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java @@ -15,7 +15,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.async.TransferListenerTest; import com.ning.http.client.async.ZeroCopyFileTest; public class NettyZeroCopyFileTest extends ZeroCopyFileTest { diff --git a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/RetryNonBlockingIssue.java similarity index 99% rename from src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java rename to modules/providers/netty/src/test/java/com/ning/http/client/async/netty/RetryNonBlockingIssue.java index 92f7a3698f..02b4fc3895 100644 --- a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java +++ b/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/RetryNonBlockingIssue.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package com.ning.http.client.async.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/modules/providers/netty/src/test/resources/300k.png b/modules/providers/netty/src/test/resources/300k.png new file mode 100644 index 0000000000000000000000000000000000000000..bff4a8598918ed4945bc27db894230d8b5b7cc80 GIT binary patch literal 265495 zcmV)wK$O3UP)4Tx0C)k_S!Y-jOSA6TybDWOa?Uv;S#r)f3c`|eT%s5Vq5=jGkfbOeQNVzJ zh$0}MqDW9c0mXoTprU{v@eX><`M&#n_x`(oZtt@_?^ab;_fFMxSJeQ(wn&bM2tm*R z5E@2_vNh7>b#`&(#ZCYu{J{b>AWZg-j?l5THV6M}`#B1rJ?4nip058@?0;s^`}jtC z0{~gWY%iZ^?@$;w0f5l;j)^gK?Ay7^5D+m@x`oAdDyXu>T*tw1>TZV>Ifw zjJ>TM0BBYKaMWaSls^DOL72`P>+KKgA?gEwVF>dH3@SLKmISf(2yATe*JC?a8Df; zV!3AE#SN|_M0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iOn=pH5UUpu7c^*uJ14D!zLxc-M zgc~6uZ6FCUnORuK8JuDioKuTRGSf1X6H8JJw_C*ONBIp?t9JAd-LS^H^J>eHt$^+4$Ij$YztJ& zbd7aT3j7^u+Z*v~|Ix3z48EP79h!5!(Yis_B>z)d!uIT$0ZW(6pZ|iTT0rTL|L&F7 z|7|}e{lhx^`LPwtMEO~MH-Ec)RPHd7X^3!?*hHgmrJvVnCtlZj|4E5ia_&VB#^X$) z4AT<=`bCww&up5svuV-m7VZxbGG9SX`~Gl2>$Tao_fGFw9b>j5d}rm9^}Byry=wXy z?!#@%-jp5~8Q!<+N~Hg@LUw`1hAp0Ag~~5{G{l6rpXW5{IkD`ajaXH8NKLQCgT?FQ zv^Os+otU?{p8J=gY0}5vNmYz0)@PP{+_xfdLg$L+`wyd@&S#s{ofg+n9jcnb=wtow zyr&j(V+#XQV}qE#=dv>_tVS0SM zb^Yo%sXLrK}p1`GzeOd@Pw zodt4u{6e(vA2`HO+B92w!wh#|NKWxz^=|T`qCJkbBGpxg?9xA-vrW8om3MhUa?$C( Q>4ou<|EC`eTz_&S0BPL&!vFvP literal 0 HcmV?d00001 diff --git a/modules/providers/netty/src/test/resources/gzip.txt.gz b/modules/providers/netty/src/test/resources/gzip.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..80aeb98d2b03a00c13d7c2725d3e281f47a57d81 GIT binary patch literal 47 zcmb2|=HR#?o9WBIoL-e#pjT2+!r;CBl#a)_^V*(gwKoQx@Hl(&Bs)Xnt@zJE3=9ka Do?Q|u literal 0 HcmV?d00001 diff --git a/modules/providers/netty/src/test/resources/logback-test.xml b/modules/providers/netty/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..4acf278710 --- /dev/null +++ b/modules/providers/netty/src/test/resources/logback-test.xml @@ -0,0 +1,13 @@ + + + + %d [%thread] %level %logger - %m%n + + + + + + + + + \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/realm.properties b/modules/providers/netty/src/test/resources/realm.properties new file mode 100644 index 0000000000..bc9faad66a --- /dev/null +++ b/modules/providers/netty/src/test/resources/realm.properties @@ -0,0 +1 @@ +user=admin, admin \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/ssltest-cacerts.jks b/modules/providers/netty/src/test/resources/ssltest-cacerts.jks new file mode 100644 index 0000000000000000000000000000000000000000..9c1ffbe49a7b27a250fc7d00fedd45405744fc38 GIT binary patch literal 29888 zcmdsg1zZ*R`aa!#=sbXQokN3kih^`XH_|DkbSf!GBM1V5NGRPR5|Rp10!j-aAxfz5 zpL0OPSa;5{yC#2}VXjB1E`)!BZzxD-0W9piKBoe?>k7 z7Y&m={7m=`E+Qf-Dgq>^2Z{~BL_^j_K?5OaYeLB&B(M!E5S|WjB~9Q;oM0s<3vMVK zga)<)8$|kL2UyF^)7=An-pb>Wvzt9s6e4_d0F>2&4Ga|#5dnWW^5_&`F0g{L8`#X# z!`9i&&ezHk?CEX=c6M^`fyzT0&36^I9zHj~prAV9()g$lccMl+vTkQ>1f!WBS1{sf%1> z?LdZHXJ%emiNO0jqL+XLk>HedBO;1mp0@4CEkVq?CG^Z%Xr+=p#4qpml%mlj&+cYz zzBE027~sjF+&gg)kw(8#e;}bX`c&V0Qp{-}2ZTUb%aS|aY;&V0r{jL+RJUjLDkR+` zuW$UGH-#kQYr{#lrc&)LDy?f4AC?PNI)#V~^Vn#S#wY1cKN!W=Q4AtMIa?OOGSs0L z**5i|xG;}=!nW9vQ2kYlmHo{dUPIzY$cPAtC%+*;+<|Wh5uwC7X7ql2XL|Lb_8{u! zO=yfk@p!QUGrsHE?NUu0b3{dUxz`7h9@wCax@{Gz${~}=>Zg&0_iy$+87>?*O%4^^ zZ4;s~>sc!ASV)-AD!2;`x|cHDhjF*IH6<{>$t{1$4wP&~_vpIVXP-EfVF}fho$UTT z8-G?cg?*(=Z+he283v!T6!?|Y5@3(p< ztgOsE-R+#L+}$nApup}AUUl3nU+oD}I3yS;7?7*g9AqR!BqT(Xliw-|U_>;(w;|LJ zN|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Vsnr|)s^LgUfOf|NnYO)S zjPM=F3S*W|CLsV~>GyB+IWBZZ{;AOYI3)j@FZTIYUi)|KPW=*DJd#xfzqXjtL-moF z!Xcr!p`{>qX${kitXwi?@6yhSW#%N_s%gF$QJ%@IbYBDa)I7u2AEVu=442wl0v-D9 zY(M8{-PubkwzyTHh=e~puP#a?<`8Y573wnC))7D8CjX>JzqOAqOET}qY8W3qwFIq% zsgqZxO;|@)yV;Qf{a@bi(_EC};ihIUSJTZn_Oa;jzOKEk!wH4^|gKF_(#8tA4@lW=+Zd(SpK;7LM`c(&h7%?_;A_W(D-b*&d+B392QxIJIT3K8mjl zD{82bd5MoMGV?JzzH+EdLh~lFT=|uA+s^a;bW5`p^R?;g?M?mD*u4DX)2wTJ_K$`~ z#fkJvE@N^%ad{7lPReD;f9}%Zm{iq$IVx_bD+t@EUm~~$zKvw#WsG;v> z2OhmMYxnZ|yX#+->E!eXE~-yw$zt*nR+kRnUzKmhKB-f`D8BgiSiiiy@i@=+UFyYfkd(N8_S4}x2gVV#U}iarSjKkO6^c`eDA}GZT?GhqaIO2{k-+j; z(NrA!B5fX{#$yzgxAe|(3BBY~#J{_?Q#?sKe-+Kpl%+>rqn~tL63ucc$=2VLkA%>! zEXzD54_V8;pn2gfD!D02i%j6>!J;Bs#M3)@hGls#7MTMX#cJg|cChX#T{ZLWJ=GE! zU5K~hP9gnS1$iTKXu&(?HoNMF6kM`PJ!9O|sN22V0yYKe@03qG# A2><{9 literal 0 HcmV?d00001 diff --git a/modules/providers/netty/src/test/resources/ssltest-keystore.jks b/modules/providers/netty/src/test/resources/ssltest-keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..a95b7c5f4fbe9f9cba881475b3854861cb182263 GIT binary patch literal 1445 zcmezO_TO6u1_mY|W&~rFV#CB@AV=73#>MqOiCqRwOxq0j*toRW7+Dy#m;@OaSs7TG zm==Ahum1KTDl}5e`kqee9lk>GwJCjfCp7D~ov*(x`E$+b6=xjpnr%q9^|4>@`!@E+ zi}uIu{+!!*!-C=Vp@lxxA&;l{Nk*7CEQ|PTX1Z`q#lHsu!v5(6#vw9KEZxO~bf#Zb zE?Il~dGkX>A=cv6>qSIP+-5VqZyGyUOVDFdgS=Z}_JfL#JMP&==)6<6Sh2b9`t5ry zzPG<5v@n$N`kc{=4oZz#{&v|`N2`6xPN7puSbB3j=P~RMOPb*@xlF*s=gqB!uVbHl z2<4ScJw8W+`&G{xr?Pq@ONfRqihy3>ye<~BGoZ+h#{_(N>D|Fs2ur2%ps7pF>I zDyq!Qu>EItI4*4OBcD3qb*tuHm9|&fwWayCaOz5XseaVX$*ge1Rv~TixJ>9JFm50^r<=XRnFV)>E5XyX* z`20}6VuG$_v3GNlivo}JLPd+C-52%4{>}87eQM$FyR%#4dd~lTX}Zdhn78D zytSvNb1s=yot+rkvqPAJ?zzMvo@KDD8@ayqLK67Bw^~d=)8$1RIHVRV%M2zL;>ym3BqC9{cp0q5C^#N!jg;Oqrb#c%Au7>88ae?(Y>*m{+_%clwSNmXJJ#2fue( zuJwJi@zm*L*}2hczl+}&I(v&Z{!e{~)NHj6dxQ**W%OyC*S>kOC&pB3PjK_JM&HO^ zRTfe!{SI<_w7t5|Kk+(W=VGl)mKCeLEB4tu{LIA6$iRr~JYXVV2D)pqdW7|<3-SD= zw~jv1mb8iy&d&Q#`!qf`dG>O9pQr~tnf__VzSRmDJ@rmb-s#wH?mS~d;Zu_jv8;Q9 z_!+M@r%rmY%EEvlj5C;{;O@<$*r}E~J@OlQHe8oaPUyCHC1O(4B!1-dme<8*cPnpb uEt|hX&w*2cNrXr4-_Nv(?*ugF{&{FJ?S$IdRLMmwGq0yv95LW9JOTidn?aWV literal 0 HcmV?d00001 diff --git a/modules/providers/netty/src/test/resources/textfile.txt b/modules/providers/netty/src/test/resources/textfile.txt new file mode 100644 index 0000000000..87daee60a9 --- /dev/null +++ b/modules/providers/netty/src/test/resources/textfile.txt @@ -0,0 +1 @@ +filecontent: hello \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/textfile2.txt b/modules/providers/netty/src/test/resources/textfile2.txt new file mode 100644 index 0000000000..6a91fe609c --- /dev/null +++ b/modules/providers/netty/src/test/resources/textfile2.txt @@ -0,0 +1 @@ +filecontent: hello2 \ No newline at end of file diff --git a/modules/providers/pom.xml b/modules/providers/pom.xml new file mode 100644 index 0000000000..6938bd02c4 --- /dev/null +++ b/modules/providers/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + + + com.ning + async-http-client-modules + 1.7.0-SNAPSHOT + + + com.ning + async-http-client-providers + 1.7.0-SNAPSHOT + pom + + + apache + grizzly + netty + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index d37e0da7b1..a26f69f942 100644 --- a/pom.xml +++ b/pom.xml @@ -8,10 +8,10 @@ 4.0.0 com.ning - async-http-client + async-http-client-project Asynchronous Http Client 1.7.0-SNAPSHOT - jar + pom Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. @@ -59,36 +59,6 @@ - - org.jboss.netty - netty - 3.2.5.Final - - - javax.servlet - servlet-api - - - commons-logging - commons-logging - - - org.slf4j - slf4j-api - - - log4j - log4j - - - - - - org.slf4j - slf4j-api - 1.6.2 - - ch.qos.logback @@ -165,25 +135,6 @@ test - - - commons-httpclient - commons-httpclient - 3.1 - true - - - commons-lang - commons-lang - 2.4 - true - - - commons-logging - commons-logging - 1.1.1 - true - @@ -241,38 +192,7 @@ - - org.apache.felix - maven-bundle-plugin - 2.3.4 - true - - META-INF - - $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) - - Sonatype - - org.jboss.netty.*;resolution:=optional, - org.apache.commons.httpclient;resolution:=optional, - org.apache.commons.httpclient.*;resolution:=optional, - * - - - com.ning.http.*;version="$(replace;$(project.version);-SNAPSHOT;"")" - - - - - - osgi-bundle - package - - bundle - - - - + org.apache.maven.plugins maven-enforcer-plugin @@ -288,9 +208,11 @@ 2.0.9 + @@ -359,108 +281,9 @@ - - org.apache.maven.plugins - maven-shade-plugin - 1.2.1 - - - package - - shade - - - true - shaded - - - commons-codec:commons-codec - commons-lang:commons-lang - commons-logging:commons-logging - junit:junit - log4j:log4j - commons-httpclient:commons-httpclient - - - - - - - - - - - - - org.codehaus.mojo - clirr-maven-plugin - 2.3 - - - **/NettyAsyncHttpProvider$* - **/AsyncHandler$STATE - **/ProxyServer$Protocol - **/Realm$AuthScheme - **/SimpleAsyncHttpClient$ErrorDocumentBehaviour - **/SpnegoEngine - **/Request - **/Request$EntityWriter - **/RequestBuilderBase - **/Response - **/Response$ - **/NettyResponseFuture - **/**ResponseBodyPart - - - - - check-api-compat - verify - - check-no-fork - - - - - - grizzly - - [1.6,) - - - asdfasfd/** - asdfasdf/** - asdfasdf - 1.6 - 1.6 - - - - org.glassfish.grizzly - grizzly-http - 2.2-SNAPSHOT - true - - - - - jvnet-nexus-snapshots - https://maven.java.net/content/repositories/snapshots - - false - - - true - - - - release-sign-artifacts @@ -536,11 +359,18 @@ ${distMgmtSnapshotsUrl} + + + modules + + http://oss.sonatype.org/content/repositories/snapshots true - com/ning/http/client/providers/grizzly/*.java - com/ning/http/client/async/grizzly/*.java + + a + + a com.ning.http.client.providers.grizzly 1.5 1.5 diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java deleted file mode 100644 index 2740b809e7..0000000000 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package com.ning.http.client.async.grizzly; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.SimpleAsyncHttpClientTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; - -public class GrizzlySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); - } - -} From 17f35a8422ccd6bbe13949b78e837701a017324b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 30 Nov 2011 09:36:10 -0800 Subject: [PATCH 0016/2844] Revert "Modularize ahc." This reverts commit bce9f9020edc9bff9a71a4a63cbefc327f621db5. --- modules/api/pom.xml | 70 ------- modules/bundles/all/pom.xml | 121 ----------- modules/bundles/pom.xml | 21 -- modules/pom.xml | 23 -- modules/providers/apache/pom.xml | 115 ---------- modules/providers/grizzly/pom.xml | 87 -------- modules/providers/netty/pom.xml | 92 -------- .../netty/src/test/resources/300k.png | Bin 265495 -> 0 bytes .../src/test/resources/SimpleTextFile.txt | 1 - .../netty/src/test/resources/client.keystore | Bin 1277 -> 0 bytes .../netty/src/test/resources/gzip.txt.gz | Bin 47 -> 0 bytes .../netty/src/test/resources/logback-test.xml | 13 -- .../netty/src/test/resources/realm.properties | 1 - .../src/test/resources/ssltest-cacerts.jks | Bin 29888 -> 0 bytes .../src/test/resources/ssltest-keystore.jks | Bin 1445 -> 0 bytes .../netty/src/test/resources/textfile.txt | 1 - .../netty/src/test/resources/textfile2.txt | 1 - modules/providers/pom.xml | 24 --- pom.xml | 198 ++++++++++++++++-- .../http/client/AsyncCompletionHandler.java | 0 .../client/AsyncCompletionHandlerBase.java | 0 .../com/ning/http/client/AsyncHandler.java | 0 .../com/ning/http/client/AsyncHttpClient.java | 0 .../http/client/AsyncHttpClientConfig.java | 0 .../client/AsyncHttpClientConfigBean.java | 0 .../ning/http/client/AsyncHttpProvider.java | 0 .../http/client/AsyncHttpProviderConfig.java | 0 .../main/java/com/ning/http/client/Body.java | 0 .../com/ning/http/client/BodyConsumer.java | 0 .../client/BodyDeferringAsyncHandler.java | 0 .../com/ning/http/client/BodyGenerator.java | 0 .../com/ning/http/client/ByteArrayPart.java | 0 .../com/ning/http/client/ConnectionsPool.java | 0 .../java/com/ning/http/client/Cookie.java | 0 .../java/com/ning/http/client/FilePart.java | 0 .../FluentCaseInsensitiveStringsMap.java | 0 .../ning/http/client/FluentStringsMap.java | 0 .../com/ning/http/client/HttpContent.java | 0 .../http/client/HttpResponseBodyPart.java | 0 .../ning/http/client/HttpResponseHeaders.java | 0 .../ning/http/client/HttpResponseStatus.java | 0 .../ning/http/client/ListenableFuture.java | 0 .../http/client/MaxRedirectException.java | 0 .../main/java/com/ning/http/client/Part.java | 0 .../ning/http/client/PerRequestConfig.java | 0 .../http/client/ProgressAsyncHandler.java | 0 .../com/ning/http/client/ProxyServer.java | 0 .../ning/http/client/RandomAccessBody.java | 0 .../main/java/com/ning/http/client/Realm.java | 0 .../java/com/ning/http/client/Request.java | 0 .../com/ning/http/client/RequestBuilder.java | 0 .../ning/http/client/RequestBuilderBase.java | 0 .../java/com/ning/http/client/Response.java | 0 .../http/client/ResumableBodyConsumer.java | 0 .../ning/http/client/SSLEngineFactory.java | 0 .../ning/http/client/SignatureCalculator.java | 0 .../http/client/SimpleAsyncHttpClient.java | 0 .../java/com/ning/http/client/StringPart.java | 0 .../ning/http/client/ThrowableHandler.java | 0 .../com/ning/http/client/UpgradeHandler.java | 0 .../consumers/AppendableBodyConsumer.java | 0 .../consumers/ByteBufferBodyConsumer.java | 0 .../client/consumers/FileBodyConsumer.java | 0 .../consumers/OutputStreamBodyConsumer.java | 0 .../ResumableRandomAccessFileListener.java | 0 .../client/extra/ThrottleRequestFilter.java | 0 .../http/client/filter/FilterContext.java | 0 .../http/client/filter/FilterException.java | 0 .../http/client/filter/IOExceptionFilter.java | 0 .../http/client/filter/RequestFilter.java | 0 .../http/client/filter/ResponseFilter.java | 0 .../generators/ByteArrayBodyGenerator.java | 0 .../client/generators/FileBodyGenerator.java | 0 .../generators/InputStreamBodyGenerator.java | 0 .../listenable/AbstractListenableFuture.java | 0 .../http/client/listenable/ExecutionList.java | 0 .../listener/TransferCompletionHandler.java | 0 .../client/listener/TransferListener.java | 0 .../com/ning/http/client/ntlm/NTLMEngine.java | 0 .../http/client/ntlm/NTLMEngineException.java | 0 .../ning/http/client/oauth/ConsumerKey.java | 0 .../oauth/OAuthSignatureCalculator.java | 0 .../ning/http/client/oauth/RequestToken.java | 0 .../http/client/oauth/ThreadSafeHMAC.java | 0 .../apache/ApacheAsyncHttpProvider.java | 0 .../apache/ApacheAsyncHttpProviderConfig.java | 0 .../providers/apache/ApacheResponse.java | 0 .../apache/ApacheResponseBodyPart.java | 0 .../apache/ApacheResponseFuture.java | 0 .../apache/ApacheResponseHeaders.java | 0 .../apache/ApacheResponseStatus.java | 0 .../grizzly/FeedableBodyGenerator.java | 0 .../grizzly/GrizzlyAsyncHttpProvider.java | 0 .../GrizzlyAsyncHttpProviderConfig.java | 0 .../grizzly/GrizzlyConnectionsPool.java | 0 .../providers/grizzly/GrizzlyResponse.java | 0 .../grizzly/GrizzlyResponseBodyPart.java | 0 .../grizzly/GrizzlyResponseFuture.java | 0 .../grizzly/GrizzlyResponseHeaders.java | 0 .../grizzly/GrizzlyResponseStatus.java | 0 .../grizzly/TransportCustomizer.java | 0 .../providers/jdk/JDKAsyncHttpProvider.java | 0 .../jdk/JDKAsyncHttpProviderConfig.java | 0 .../providers/jdk/JDKDelegateFuture.java | 0 .../http/client/providers/jdk/JDKFuture.java | 0 .../client/providers/jdk/JDKResponse.java | 0 .../providers/jdk/ResponseBodyPart.java | 0 .../client/providers/jdk/ResponseHeaders.java | 0 .../client/providers/jdk/ResponseStatus.java | 0 .../providers/netty/BodyChunkedInput.java | 0 .../providers/netty/BodyFileRegion.java | 0 .../netty/NettyAsyncHttpProvider.java | 1 + .../netty/NettyAsyncHttpProviderConfig.java | 0 .../providers/netty/NettyConnectListener.java | 0 .../providers/netty/NettyConnectionsPool.java | 0 .../client/providers/netty/NettyResponse.java | 0 .../providers/netty/NettyResponseFuture.java | 0 .../providers/netty/NettyWebSocket.java | 0 .../http/client/providers/netty/Protocol.java | 0 .../providers/netty/ResponseBodyPart.java | 0 .../providers/netty/ResponseHeaders.java | 0 .../providers/netty/ResponseStatus.java | 0 .../client/providers/netty/WebSocketUtil.java | 0 .../netty/netty4/BinaryWebSocketFrame.java | 0 .../netty/netty4/CloseWebSocketFrame.java | 0 .../netty4/ContinuationWebSocketFrame.java | 0 .../netty/netty4/PingWebSocketFrame.java | 0 .../netty/netty4/PongWebSocketFrame.java | 0 .../netty/netty4/TextWebSocketFrame.java | 0 .../providers/netty/netty4/UTF8Exception.java | 0 .../providers/netty/netty4/UTF8Output.java | 0 .../netty/netty4/WebSocket08FrameDecoder.java | 0 .../netty/netty4/WebSocket08FrameEncoder.java | 0 .../netty/netty4/WebSocketFrame.java | 0 .../netty/netty4/WebSocketFrameType.java | 0 .../providers/netty/spnego/SpnegoEngine.java | 0 .../netty/spnego/SpnegoTokenGenerator.java | 0 .../PropertiesBasedResumableProcessor.java | 0 .../resumable/ResumableAsyncHandler.java | 0 .../resumable/ResumableIOExceptionFilter.java | 0 .../client/resumable/ResumableListener.java | 0 .../ning/http/client/simple/HeaderMap.java | 0 .../simple/SimpleAHCTransferListener.java | 0 .../webdav/WebDavCompletionHandlerBase.java | 0 .../http/client/webdav/WebDavResponse.java | 0 .../ning/http/client/websocket/WebSocket.java | 0 .../client/websocket/WebSocketListener.java | 0 .../websocket/WebSocketUpgradeHandler.java | 1 + .../http/multipart/ByteArrayPartSource.java | 0 .../com/ning/http/multipart/FilePart.java | 0 .../ning/http/multipart/FilePartSource.java | 0 .../ning/http/multipart/MultipartBody.java | 0 .../http/multipart/MultipartEncodingUtil.java | 0 .../multipart/MultipartRequestEntity.java | 0 .../java/com/ning/http/multipart/Part.java | 0 .../com/ning/http/multipart/PartBase.java | 0 .../com/ning/http/multipart/PartSource.java | 0 .../ning/http/multipart/RequestEntity.java | 0 .../com/ning/http/multipart/StringPart.java | 0 .../http/util/AllowAllHostnameVerifier.java | 0 .../http/util/AsyncHttpProviderUtils.java | 0 .../ning/http/util/AuthenticatorUtils.java | 0 .../main/java/com/ning/http/util/Base64.java | 0 .../ning/http/util}/CleanupChannelGroup.java | 2 +- .../java/com/ning/http/util/DateUtil.java | 0 .../java/com/ning/http/util/ProxyUtils.java | 0 .../java/com/ning/http/util/SslUtils.java | 0 .../java/com/ning/http/util/UTF8Codec.java | 0 .../com/ning/http/util/UTF8UrlEncoder.java | 0 .../java/com/ning/http/client/RealmTest.java | 0 .../http/client/async/AbstractBasicTest.java | 0 .../client/async/AsyncProvidersBasicTest.java | 1 + .../client/async/AsyncStreamHandlerTest.java | 0 .../async/AsyncStreamLifecycleTest.java | 0 .../http/client/async/AuthTimeoutTest.java | 1 + .../ning/http/client/async/BasicAuthTest.java | 1 + .../http/client/async/BasicHttpsTest.java | 0 .../ning/http/client/async/BodyChunkTest.java | 0 .../async/BodyDeferringAsyncHandlerTest.java | 0 .../client/async/ByteBufferCapacityTest.java | 0 .../ning/http/client/async/ChunkingTest.java | 0 .../http/client/async/ComplexClientTest.java | 0 .../http/client/async/ConnectionPoolTest.java | 49 ++++- .../http/client/async/DigestAuthTest.java | 1 + .../ning/http/client/async/EmptyBodyTest.java | 0 .../http/client/async/ErrorResponseTest.java | 0 .../client/async/Expect100ContinueTest.java | 0 .../client/async/FilePartLargeFileTest.java | 0 .../ning/http/client/async/FilterTest.java | 0 .../FluentCaseInsensitiveStringsMapTest.java | 0 .../client/async/FluentStringsMapTest.java | 1 - .../client/async/FollowingThreadTest.java | 0 .../ning/http/client/async/Head302Test.java | 1 + .../client/async/HostnameVerifierTest.java | 0 .../client/async/HttpToHttpsRedirectTest.java | 0 .../client/async/IdleStateHandlerTest.java | 0 .../http/client/async/InputStreamTest.java | 0 .../client/async/ListenableFutureTest.java | 0 .../client/async/MaxConnectionsInThreads.java | 0 .../client/async/MaxTotalConnectionTest.java | 0 .../client/async/MultipartUploadTest.java | 0 .../http/client/async/MultipleHeaderTest.java | 0 .../http/client/async/NoNullResponseTest.java | 0 .../async/NonAsciiContentLengthTest.java | 0 .../http/client/async/ParamEncodingTest.java | 0 .../async/PerRequestRelative302Test.java | 0 .../client/async/PerRequestTimeoutTest.java | 0 .../http/client/async/PostWithQSTest.java | 1 - .../ning/http/client/async/ProviderUtil.java | 18 ++ .../com/ning/http/client/async/ProxyTest.java | 2 + .../client/async/ProxyyTunnellingTest.java | 0 .../http/client/async/PutLargeFileTest.java | 0 .../client/async/QueryParametersTest.java | 0 .../com/ning/http/client/async/RC10KTest.java | 0 .../async/RedirectConnectionUsageTest.java | 1 + .../http/client/async/Relative302Test.java | 0 .../http/client/async/RemoteSiteTest.java | 0 .../http/client/async/RequestBuilderTest.java | 0 .../client/async}/RetryNonBlockingIssue.java | 2 +- .../http/client/async/RetryRequestTest.java | 0 .../SimpleAsyncClientErrorBehaviourTest.java | 0 .../async/SimpleAsyncHttpClientTest.java | 0 .../client/async/TransferListenerTest.java | 0 .../http/client/async/WebDavBasicTest.java | 0 .../http/client/async/ZeroCopyFileTest.java | 0 .../GrizzlyAsyncProviderBasicTest.java | 0 .../GrizzlyAsyncStreamHandlerTest.java | 0 .../GrizzlyAsyncStreamLifecycleTest.java | 0 .../async/grizzly/GrizzlyAuthTimeoutTest.java | 0 .../async/grizzly/GrizzlyBasicAuthTest.java | 0 .../async/grizzly/GrizzlyBasicHttpsTest.java | 0 .../async/grizzly/GrizzlyBodyChunkTest.java | 0 .../GrizzlyBodyDeferringAsyncHandlerTest.java | 0 .../GrizzlyByteBufferCapacityTest.java | 0 .../async/grizzly/GrizzlyChunkingTest.java | 0 .../grizzly/GrizzlyComplexClientTest.java | 0 .../grizzly/GrizzlyConnectionPoolTest.java | 67 +++--- .../async/grizzly/GrizzlyDigestAuthTest.java | 0 .../async/grizzly/GrizzlyEmptyBodyTest.java | 0 .../grizzly/GrizzlyErrorResponseTest.java | 0 .../grizzly/GrizzlyExpectContinue100Test.java | 0 .../async/grizzly/GrizzlyFilterTest.java | 0 .../grizzly/GrizzlyFollowingThreadTest.java | 0 .../async/grizzly/GrizzlyHead302Test.java | 0 .../GrizzlyHttpToHttpsRedirectTest.java | 0 .../grizzly/GrizzlyIdleStateHandlerTest.java | 0 .../async/grizzly/GrizzlyInputStreamTest.java | 0 .../grizzly/GrizzlyListenableFutureTest.java | 0 .../GrizzlyMaxConnectionsInThreadsTest.java | 0 .../GrizzlyMaxTotalConnectionTest.java | 0 .../grizzly/GrizzlyMultipleHeaderTest.java | 0 .../grizzly/GrizzlyNoNullResponseTest.java | 0 .../GrizzlyNonAsciiContentLengthTest.java | 0 .../grizzly/GrizzlyParamEncodingTest.java | 0 .../GrizzlyPerRequestRelative302Test.java | 0 .../grizzly/GrizzlyPerRequestTimeoutTest.java | 0 .../async/grizzly/GrizzlyPostWithQSTest.java | 0 .../async/grizzly/GrizzlyProxyTest.java | 0 .../grizzly/GrizzlyProxyTunnelingTest.java | 0 .../grizzly/GrizzlyPutLargeFileTest.java | 0 .../grizzly/GrizzlyQueryParametersTest.java | 0 .../async/grizzly/GrizzlyRC10KTest.java | 0 .../GrizzlyRedirectConnectionUsageTest.java | 0 .../async/grizzly/GrizzlyRelative302Test.java | 0 .../async/grizzly/GrizzlyRemoteSiteTest.java | 0 .../grizzly/GrizzlyRetryRequestTest.java | 0 .../GrizzlySimpleAsyncHttpClientTest.java | 31 +++ .../grizzly/GrizzlyTransferListenerTest.java | 0 .../netty/NettyAsyncHttpProviderTest.java | 0 .../netty/NettyAsyncProviderBasicTest.java | 0 .../netty/NettyAsyncStreamHandlerTest.java | 0 .../netty/NettyAsyncStreamLifecycleTest.java | 0 .../async/netty/NettyAuthTimeoutTest.java | 0 .../async/netty/NettyBasicAuthTest.java | 0 .../async/netty/NettyBasicHttpsTest.java | 0 .../async/netty/NettyBodyChunkTest.java | 0 .../NettyBodyDeferringAsyncHandlerTest.java | 0 .../netty/NettyByteBufferCapacityTest.java | 1 + .../client/async/netty/NettyChunkingTest.java | 0 .../async/netty/NettyComplexClientTest.java | 0 .../async/netty/NettyConnectionPoolTest.java | 28 --- .../async/netty/NettyDigestAuthTest.java | 0 .../async/netty/NettyEmptyBodyTest.java | 0 .../async/netty/NettyErrorResponseTest.java | 0 .../netty/NettyExpect100ContinueTest.java | 0 .../netty/NettyFilePartLargeFileTest.java | 0 .../client/async/netty/NettyFilterTest.java | 0 .../async/netty/NettyFollowingThreadTest.java | 0 .../client/async/netty/NettyHead302Test.java | 0 .../netty/NettyHostnameVerifierTest.java | 0 .../netty/NettyHttpToHttpsRedirectTest.java | 0 .../netty/NettyIdleStateHandlerTest.java | 0 .../async/netty/NettyInputStreamTest.java | 0 .../netty/NettyListenableFutureTest.java | 0 .../netty/NettyMaxConnectionsInThreads.java | 0 .../netty/NettyMaxTotalConnectionTest.java | 0 .../async/netty/NettyMultipartUploadTest.java | 0 .../async/netty/NettyMultipleHeaderTest.java | 0 .../async/netty/NettyNoNullResponseTest.java | 0 .../netty/NettyNonAsciiContentLengthTest.java | 0 .../async/netty/NettyParamEncodingTest.java | 0 .../netty/NettyPerRequestRelative302Test.java | 0 .../netty/NettyPerRequestTimeoutTest.java | 0 .../async/netty/NettyPostWithQSTest.java | 0 .../client/async/netty/NettyProxyTest.java | 0 .../async/netty/NettyProxyTunnellingTest.java | 0 .../async/netty/NettyPutLargeFileTest.java | 0 .../async/netty/NettyQueryParametersTest.java | 0 .../client/async/netty/NettyRC10KTest.java | 0 .../NettyRedirectConnectionUsageTest.java | 0 .../async/netty/NettyRelative302Test.java | 0 .../async/netty/NettyRemoteSiteTest.java | 0 .../async/netty/NettyRetryRequestTest.java | 0 .../netty/NettySimpleAsyncHttpClientTest.java | 4 - .../netty/NettyTransferListenerTest.java | 0 .../async/netty/NettyWebDavBasicTest.java | 0 .../async/netty/NettyZeroCopyFileTest.java | 1 + .../client/oauth/TestSignatureCalculator.java | 0 .../netty/NettyAsyncResponseTest.java | 4 +- .../resumable/MapResumableProcessor.java | 0 ...PropertiesBasedResumableProcesserTest.java | 7 +- .../resumable/ResumableAsyncHandlerTest.java | 5 +- .../com/ning/http/util/ProxyUtilsTest.java | 0 .../com/ning/http/util/TestUTF8UrlCodec.java | 0 .../src => src}/test/resources/300k.png | Bin .../test/resources/SimpleTextFile.txt | 0 .../test/resources/client.keystore | Bin .../src => src}/test/resources/gzip.txt.gz | Bin .../test/resources/logback-test.xml | 0 .../test/resources/realm.properties | 0 .../test/resources/ssltest-cacerts.jks | Bin .../test/resources/ssltest-keystore.jks | Bin .../src => src}/test/resources/textfile.txt | 0 .../src => src}/test/resources/textfile2.txt | 0 334 files changed, 340 insertions(+), 659 deletions(-) delete mode 100644 modules/api/pom.xml delete mode 100644 modules/bundles/all/pom.xml delete mode 100644 modules/bundles/pom.xml delete mode 100644 modules/pom.xml delete mode 100644 modules/providers/apache/pom.xml delete mode 100644 modules/providers/grizzly/pom.xml delete mode 100644 modules/providers/netty/pom.xml delete mode 100644 modules/providers/netty/src/test/resources/300k.png delete mode 100644 modules/providers/netty/src/test/resources/SimpleTextFile.txt delete mode 100644 modules/providers/netty/src/test/resources/client.keystore delete mode 100644 modules/providers/netty/src/test/resources/gzip.txt.gz delete mode 100644 modules/providers/netty/src/test/resources/logback-test.xml delete mode 100644 modules/providers/netty/src/test/resources/realm.properties delete mode 100644 modules/providers/netty/src/test/resources/ssltest-cacerts.jks delete mode 100644 modules/providers/netty/src/test/resources/ssltest-keystore.jks delete mode 100644 modules/providers/netty/src/test/resources/textfile.txt delete mode 100644 modules/providers/netty/src/test/resources/textfile2.txt delete mode 100644 modules/providers/pom.xml rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncCompletionHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncHttpClient.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncHttpClientConfig.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncHttpProvider.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/AsyncHttpProviderConfig.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/Body.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/BodyConsumer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/BodyGenerator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ByteArrayPart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ConnectionsPool.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/Cookie.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/FilePart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/FluentStringsMap.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/HttpContent.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/HttpResponseBodyPart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/HttpResponseHeaders.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/HttpResponseStatus.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ListenableFuture.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/MaxRedirectException.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/Part.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/PerRequestConfig.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ProgressAsyncHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ProxyServer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/RandomAccessBody.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/Realm.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/Request.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/RequestBuilder.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/RequestBuilderBase.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/Response.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ResumableBodyConsumer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/SSLEngineFactory.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/SignatureCalculator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/SimpleAsyncHttpClient.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/StringPart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ThrowableHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/UpgradeHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/consumers/FileBodyConsumer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/filter/FilterContext.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/filter/FilterException.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/filter/IOExceptionFilter.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/filter/RequestFilter.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/filter/ResponseFilter.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/generators/FileBodyGenerator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/listenable/ExecutionList.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/listener/TransferCompletionHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/listener/TransferListener.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ntlm/NTLMEngine.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/ntlm/NTLMEngineException.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/oauth/ConsumerKey.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/oauth/RequestToken.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheResponse.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java (100%) rename {modules/providers/apache/src => src}/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java (100%) rename {modules/providers/grizzly/src => src}/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/JDKFuture.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/JDKResponse.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java (99%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyResponse.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/Protocol.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/ResponseStatus.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java (100%) rename {modules/providers/netty/src => src}/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/resumable/ResumableListener.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/simple/HeaderMap.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/webdav/WebDavResponse.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/websocket/WebSocket.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/websocket/WebSocketListener.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java (97%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/ByteArrayPartSource.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/FilePart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/FilePartSource.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/MultipartBody.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/MultipartEncodingUtil.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/MultipartRequestEntity.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/Part.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/PartBase.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/PartSource.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/RequestEntity.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/multipart/StringPart.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/AllowAllHostnameVerifier.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/AsyncHttpProviderUtils.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/AuthenticatorUtils.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/Base64.java (100%) rename {modules/providers/netty/src/main/java/com/ning/http/client/providers/netty => src/main/java/com/ning/http/util}/CleanupChannelGroup.java (98%) rename {modules/api/src => src}/main/java/com/ning/http/util/DateUtil.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/ProxyUtils.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/SslUtils.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/UTF8Codec.java (100%) rename {modules/api/src => src}/main/java/com/ning/http/util/UTF8UrlEncoder.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/RealmTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/AbstractBasicTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/AuthTimeoutTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/BasicAuthTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/BasicHttpsTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/BodyChunkTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ChunkingTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ComplexClientTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ConnectionPoolTest.java (90%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/DigestAuthTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/EmptyBodyTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ErrorResponseTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/Expect100ContinueTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/FilePartLargeFileTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/FilterTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/FluentStringsMapTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/FollowingThreadTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/Head302Test.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/HostnameVerifierTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/IdleStateHandlerTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/InputStreamTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ListenableFutureTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/MultipartUploadTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/MultipleHeaderTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/NoNullResponseTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ParamEncodingTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/PerRequestRelative302Test.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/PostWithQSTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ProviderUtil.java (55%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ProxyTest.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/PutLargeFileTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/QueryParametersTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/RC10KTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java (98%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/Relative302Test.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/RemoteSiteTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/RequestBuilderTest.java (100%) rename {modules/providers/netty/src/test/java/com/ning/http/client/async/netty => src/test/java/com/ning/http/client/async}/RetryNonBlockingIssue.java (99%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/RetryRequestTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/TransferListenerTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/WebDavBasicTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/async/ZeroCopyFileTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java (90%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java (100%) rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java (100%) create mode 100644 src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java rename {modules/providers/grizzly/src => src}/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java (95%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java (62%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyFilterTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyHead302Test.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyProxyTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java (83%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java (100%) rename {modules/providers/netty/src => src}/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java (95%) rename {modules/api/src => src}/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java (100%) rename {modules/providers/netty/src/test/java/com/ning/http/client/async => src/test/java/com/ning/http/client/providers}/netty/NettyAsyncResponseTest.java (95%) rename {modules/api/src => src}/test/java/com/ning/http/client/resumable/MapResumableProcessor.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java (84%) rename {modules/api/src => src}/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java (93%) rename {modules/api/src => src}/test/java/com/ning/http/util/ProxyUtilsTest.java (100%) rename {modules/api/src => src}/test/java/com/ning/http/util/TestUTF8UrlCodec.java (100%) rename {modules/providers/grizzly/src => src}/test/resources/300k.png (100%) rename {modules/providers/grizzly/src => src}/test/resources/SimpleTextFile.txt (100%) rename {modules/providers/grizzly/src => src}/test/resources/client.keystore (100%) rename {modules/providers/grizzly/src => src}/test/resources/gzip.txt.gz (100%) rename {modules/providers/grizzly/src => src}/test/resources/logback-test.xml (100%) rename {modules/providers/grizzly/src => src}/test/resources/realm.properties (100%) rename {modules/providers/grizzly/src => src}/test/resources/ssltest-cacerts.jks (100%) rename {modules/providers/grizzly/src => src}/test/resources/ssltest-keystore.jks (100%) rename {modules/providers/grizzly/src => src}/test/resources/textfile.txt (100%) rename {modules/providers/grizzly/src => src}/test/resources/textfile2.txt (100%) diff --git a/modules/api/pom.xml b/modules/api/pom.xml deleted file mode 100644 index a857ad63da..0000000000 --- a/modules/api/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-modules - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-api - 1.7.0-SNAPSHOT - jar - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - test-jar - - - - - - org.apache.felix - maven-bundle-plugin - 2.3.4 - true - - META-INF - - - $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) - - Sonatype - - com.ning.http.*;version="$(replace;$(project.version);-SNAPSHOT;"")" - - - - - - osgi-bundle - package - - bundle - - - - - - - - - - org.slf4j - slf4j-api - 1.6.2 - - - - \ No newline at end of file diff --git a/modules/bundles/all/pom.xml b/modules/bundles/all/pom.xml deleted file mode 100644 index da79c3ebce..0000000000 --- a/modules/bundles/all/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-bundles - 1.7.0-SNAPSHOT - - - com.ning - async-http-client - 1.7.0-SNAPSHOT - jar - - - - org.apache.felix - maven-bundle-plugin - 2.3.4 - - - * - - com.ning.http.*;-split-package:=merge-first - - - true - - - - osgi-bundle - package - - bundle - - - - - - org.apache.maven.plugins - maven-shade-plugin - 1.4 - - - package - - shade - - - true - shaded - true - - - commons-codec:commons-codec - - commons-lang:commons-lang - commons-logging:commons-logging - - junit:junit - log4j:log4j - - commons-httpclient:commons-httpclient - - - org.jboss.netty:netty - - - commons-httpclient:commons-httpclient - - - org.glassfish.grizzly:* - - - org.glassfish.gmbal:* - - - org.glassfish.external:* - - - - - - - - - - - - - - - - - com.ning - async-http-client-api - ${project.version} - - - com.ning - async-http-client-apache-provider - ${project.version} - - - com.ning - async-http-client-grizzly-provider - ${project.version} - - - com.ning - async-http-client-netty-provider - ${project.version} - - - \ No newline at end of file diff --git a/modules/bundles/pom.xml b/modules/bundles/pom.xml deleted file mode 100644 index 5fe1d3c355..0000000000 --- a/modules/bundles/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-modules - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-bundles - 1.7.0-SNAPSHOT - pom - - - all - - \ No newline at end of file diff --git a/modules/pom.xml b/modules/pom.xml deleted file mode 100644 index c87f132a1a..0000000000 --- a/modules/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-project - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-modules - 1.7.0-SNAPSHOT - pom - - - api - providers - bundles - - \ No newline at end of file diff --git a/modules/providers/apache/pom.xml b/modules/providers/apache/pom.xml deleted file mode 100644 index 874b16fcae..0000000000 --- a/modules/providers/apache/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-providers - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-apache-provider - 1.7.0-SNAPSHOT - jar - - - - - org.codehaus.mojo - clirr-maven-plugin - 2.3 - - - **/NettyAsyncHttpProvider$* - **/AsyncHandler$STATE - **/ProxyServer$Protocol - **/Realm$AuthScheme - - **/SimpleAsyncHttpClient$ErrorDocumentBehaviour - - **/SpnegoEngine - **/Request - **/Request$EntityWriter - **/RequestBuilderBase - **/Response - **/Response$ - **/NettyResponseFuture - **/**ResponseBodyPart - - - - - check-api-compat - verify - - check-no-fork - - - - - - org.apache.felix - maven-bundle-plugin - 2.3.4 - true - - META-INF - - - $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) - - Sonatype - - org.apache.commons.httpclient;resolution:=optional, - org.apache.commons.httpclient.*;resolution:=optional, - * - - - com.ning.http.client.providers.apache.*;version="$(replace;$(project.version);-SNAPSHOT;"")" - - - - - - osgi-bundle - package - - bundle - - - - - - - - - - com.ning - async-http-client-api - ${project.version} - - - - commons-httpclient - commons-httpclient - 3.1 - true - - - commons-lang - commons-lang - 2.4 - true - - - commons-logging - commons-logging - 1.1.1 - true - - - - \ No newline at end of file diff --git a/modules/providers/grizzly/pom.xml b/modules/providers/grizzly/pom.xml deleted file mode 100644 index 1d11c4d62b..0000000000 --- a/modules/providers/grizzly/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-providers - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-grizzly-provider - 1.7.0-SNAPSHOT - jar - - - - - org.apache.felix - maven-bundle-plugin - 2.3.4 - true - - META-INF - - - $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) - - Sonatype - - org.glassfish.grizzly.*;resolution:=optional, - * - - - com.ning.http.client.providers.grizzly.*;version="$(replace;$(project.version);-SNAPSHOT;"")" - - - - - - osgi-bundle - package - - bundle - - - - - - - - - - org.glassfish.grizzly - grizzly-http - 2.2-SNAPSHOT - - - com.ning - async-http-client-api - ${project.version} - - - com.ning - async-http-client-api - ${project.version} - test - tests - - - - - - jvnet-nexus-snapshots - https://maven.java.net/content/repositories/snapshots - - false - - - true - - - - - \ No newline at end of file diff --git a/modules/providers/netty/pom.xml b/modules/providers/netty/pom.xml deleted file mode 100644 index dd7a5500ae..0000000000 --- a/modules/providers/netty/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-providers - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-netty-provider - 1.7.0-SNAPSHOT - jar - - - - - org.apache.felix - maven-bundle-plugin - 2.3.4 - true - - META-INF - - - $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) - - Sonatype - - org.jboss.netty.*;resolution:=optional, - * - - - com.ning.http.client.providers.netty.*;version="$(replace;$(project.version);-SNAPSHOT;"")" - - - - - - osgi-bundle - package - - bundle - - - - - - - - - - com.ning - async-http-client-api - ${project.version} - - - com.ning - async-http-client-api - ${project.version} - test - tests - - - org.jboss.netty - netty - 3.2.5.Final - - - javax.servlet - servlet-api - - - commons-logging - commons-logging - - - org.slf4j - slf4j-api - - - log4j - log4j - - - - - - \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/300k.png b/modules/providers/netty/src/test/resources/300k.png deleted file mode 100644 index bff4a8598918ed4945bc27db894230d8b5b7cc80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265495 zcmV)wK$O3UP)4Tx0C)k_S!Y-jOSA6TybDWOa?Uv;S#r)f3c`|eT%s5Vq5=jGkfbOeQNVzJ zh$0}MqDW9c0mXoTprU{v@eX><`M&#n_x`(oZtt@_?^ab;_fFMxSJeQ(wn&bM2tm*R z5E@2_vNh7>b#`&(#ZCYu{J{b>AWZg-j?l5THV6M}`#B1rJ?4nip058@?0;s^`}jtC z0{~gWY%iZ^?@$;w0f5l;j)^gK?Ay7^5D+m@x`oAdDyXu>T*tw1>TZV>Ifw zjJ>TM0BBYKaMWaSls^DOL72`P>+KKgA?gEwVF>dH3@SLKmISf(2yATe*JC?a8Df; zV!3AE#SN|_M0^t{EX!1t}!4OC>*_(?IwmE-rxY^zs;JFY=zzl={Ul0SL z;64mU0dt@S^#AImfFB^koLHC_4T8ZZ7>B|m!r?LDFy{SBPVYY`hQG)8!{h$DMqc0z z%f|dO=bzbl;W_`-83=q}{5PEp&#}kbTV1qAV9LMd{99sA-|yAP*2&JxZvDL`lrTyj zrHIl+X`nPws(=^8jA92;sC_6ElnzP@r4I8{fg$(^Yxe(pjeGh-Z~Da+geRyu2Eg3C z|L*lS7dZZw4*ci$f2;rm4lK4T{=EVKD8BLVa{z!|ctk=}pnm{`R|kG_eILq#?`Z&9z5{^&^e>uFH0;hv z0Q4?+$3(^c(TCc*paB8U!XC;7xPbr=h3~UGPy*^e8yEmnUipdECAUeFH)!Amd!rojwY088K}*n}Vm3lSj_#0K#| zLXZR`52-+!kO5>4*+MRmC*%)>K`~GglnP}+IZzRF1*(B=KzE={=rJ?|y@K9B^Ux1y z1A#<1*wO$Lb@XTkWt7Z$P8pYvJBaPY(w@TN08IVMdU9O21P>gqNHFyHAXq0 zyit*;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vrW8om3MhUa?$C( Q>4ou<|EC`eTz_&S0BPL&!vFvP diff --git a/modules/providers/netty/src/test/resources/gzip.txt.gz b/modules/providers/netty/src/test/resources/gzip.txt.gz deleted file mode 100644 index 80aeb98d2b03a00c13d7c2725d3e281f47a57d81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47 zcmb2|=HR#?o9WBIoL-e#pjT2+!r;CBl#a)_^V*(gwKoQx@Hl(&Bs)Xnt@zJE3=9ka Do?Q|u diff --git a/modules/providers/netty/src/test/resources/logback-test.xml b/modules/providers/netty/src/test/resources/logback-test.xml deleted file mode 100644 index 4acf278710..0000000000 --- a/modules/providers/netty/src/test/resources/logback-test.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - %d [%thread] %level %logger - %m%n - - - - - - - - - \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/realm.properties b/modules/providers/netty/src/test/resources/realm.properties deleted file mode 100644 index bc9faad66a..0000000000 --- a/modules/providers/netty/src/test/resources/realm.properties +++ /dev/null @@ -1 +0,0 @@ -user=admin, admin \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/ssltest-cacerts.jks b/modules/providers/netty/src/test/resources/ssltest-cacerts.jks deleted file mode 100644 index 9c1ffbe49a7b27a250fc7d00fedd45405744fc38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29888 zcmdsg1zZ*R`aa!#=sbXQokN3kih^`XH_|DkbSf!GBM1V5NGRPR5|Rp10!j-aAxfz5 zpL0OPSa;5{yC#2}VXjB1E`)!BZzxD-0W9piKBoe?>k7 z7Y&m={7m=`E+Qf-Dgq>^2Z{~BL_^j_K?5OaYeLB&B(M!E5S|WjB~9Q;oM0s<3vMVK zga)<)8$|kL2UyF^)7=An-pb>Wvzt9s6e4_d0F>2&4Ga|#5dnWW^5_&`F0g{L8`#X# z!`9i&&ezHk?CEX=c6M^`fyzT0&36^I9zHj~prAV9()g$lccMl+vTkQ>1f!WBS1{sf%1> z?L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gVV#U}iarSjKkO6^c`eDA}GZT?GhqaIO2{k-+j; z(NrA!B5fX{#$yzgxAe|(3BBY~#J{_?Q#?sKe-+Kpl%+>rqn~tL63ucc$=2VLkA%>! zEXzD54_V8;pn2gfD!D02i%j6>!J;Bs#M3)@hGls#7MTMX#cJg|cChX#T{ZLWJ=GE! zU5K~hP9gnS1$iTKXu&(?HoNMF6kM`PJ!9O|sN22V0yYKe@03qG# A2><{9 diff --git a/modules/providers/netty/src/test/resources/ssltest-keystore.jks b/modules/providers/netty/src/test/resources/ssltest-keystore.jks deleted file mode 100644 index a95b7c5f4fbe9f9cba881475b3854861cb182263..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1445 zcmezO_TO6u1_mY|W&~rFV#CB@AV=73#>MqOiCqRwOxq0j*toRW7+Dy#m;@OaSs7TG zm==Ahum1KTDl}5e`kqee9lk>GwJCjfCp7D~ov*(x`E$+b6=xjpnr%q9^|4>@`!@E+ zi}uIu{+!!*!-C=Vp@lxxA&;l{Nk*7CEQ|PTX1Z`q#lHsu!v5(6#vw9KEZxO~bf#Zb zE?Il~dGkX>A=cv6>qSIP+-5VqZyGyUOVDFdgS=Z}_JfL#JMP&==)6<6Sh2b9`t5ry zzPG<5v@n$N`kc{=4oZz#{&v|`N2`6xPN7puSbB3j=P~RMOPb*@xlF*s=gqB!uVbHl z2<4ScJw8W+`&G{xr?Pq@ONfRqihy3>ye<~BGoZ+h#{_(N>D|Fs2ur2%ps7pF>I zDyq!Qu>EItI4*4OBcD3qb*tuHm9|&fwWayCaOz5XseaVX$*ge1Rv~TixJ>9JFm50^r<=XRnFV)>E5XyX* z`20}6VuG$_v3GNlivo}JLPd+C-52%4{>}87eQM$FyR%#4dd~lTX}Zdhn78D zytSvNb1s=yot+rkvqPAJ?zzMvo@KDD8@ayqLK67Bw^~d=)8$1RIHVRV%M2zL;>ym3BqC9{cp0q5C^#N!jg;Oqrb#c%Au7>88ae?(Y>*m{+_%clwSNmXJJ#2fue( zuJwJi@zm*L*}2hczl+}&I(v&Z{!e{~)NHj6dxQ**W%OyC*S>kOC&pB3PjK_JM&HO^ zRTfe!{SI<_w7t5|Kk+(W=VGl)mKCeLEB4tu{LIA6$iRr~JYXVV2D)pqdW7|<3-SD= zw~jv1mb8iy&d&Q#`!qf`dG>O9pQr~tnf__VzSRmDJ@rmb-s#wH?mS~d;Zu_jv8;Q9 z_!+M@r%rmY%EEvlj5C;{;O@<$*r}E~J@OlQHe8oaPUyCHC1O(4B!1-dme<8*cPnpb uEt|hX&w*2cNrXr4-_Nv(?*ugF{&{FJ?S$IdRLMmwGq0yv95LW9JOTidn?aWV diff --git a/modules/providers/netty/src/test/resources/textfile.txt b/modules/providers/netty/src/test/resources/textfile.txt deleted file mode 100644 index 87daee60a9..0000000000 --- a/modules/providers/netty/src/test/resources/textfile.txt +++ /dev/null @@ -1 +0,0 @@ -filecontent: hello \ No newline at end of file diff --git a/modules/providers/netty/src/test/resources/textfile2.txt b/modules/providers/netty/src/test/resources/textfile2.txt deleted file mode 100644 index 6a91fe609c..0000000000 --- a/modules/providers/netty/src/test/resources/textfile2.txt +++ /dev/null @@ -1 +0,0 @@ -filecontent: hello2 \ No newline at end of file diff --git a/modules/providers/pom.xml b/modules/providers/pom.xml deleted file mode 100644 index 6938bd02c4..0000000000 --- a/modules/providers/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - 4.0.0 - - - com.ning - async-http-client-modules - 1.7.0-SNAPSHOT - - - com.ning - async-http-client-providers - 1.7.0-SNAPSHOT - pom - - - apache - grizzly - netty - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index a26f69f942..d37e0da7b1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,10 +8,10 @@ 4.0.0 com.ning - async-http-client-project + async-http-client Asynchronous Http Client 1.7.0-SNAPSHOT - pom + jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. @@ -59,6 +59,36 @@ + + org.jboss.netty + netty + 3.2.5.Final + + + javax.servlet + servlet-api + + + commons-logging + commons-logging + + + org.slf4j + slf4j-api + + + log4j + log4j + + + + + + org.slf4j + slf4j-api + 1.6.2 + + ch.qos.logback @@ -135,6 +165,25 @@ test + + + commons-httpclient + commons-httpclient + 3.1 + true + + + commons-lang + commons-lang + 2.4 + true + + + commons-logging + commons-logging + 1.1.1 + true + @@ -192,7 +241,38 @@ - + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + org.jboss.netty.*;resolution:=optional, + org.apache.commons.httpclient;resolution:=optional, + org.apache.commons.httpclient.*;resolution:=optional, + * + + + com.ning.http.*;version="$(replace;$(project.version);-SNAPSHOT;"")" + + + + + + osgi-bundle + package + + bundle + + + + org.apache.maven.plugins maven-enforcer-plugin @@ -208,11 +288,9 @@ 2.0.9 - @@ -281,9 +359,108 @@ + + org.apache.maven.plugins + maven-shade-plugin + 1.2.1 + + + package + + shade + + + true + shaded + + + commons-codec:commons-codec + commons-lang:commons-lang + commons-logging:commons-logging + junit:junit + log4j:log4j + commons-httpclient:commons-httpclient + + + + + + + + + + + + + org.codehaus.mojo + clirr-maven-plugin + 2.3 + + + **/NettyAsyncHttpProvider$* + **/AsyncHandler$STATE + **/ProxyServer$Protocol + **/Realm$AuthScheme + **/SimpleAsyncHttpClient$ErrorDocumentBehaviour + **/SpnegoEngine + **/Request + **/Request$EntityWriter + **/RequestBuilderBase + **/Response + **/Response$ + **/NettyResponseFuture + **/**ResponseBodyPart + + + + + check-api-compat + verify + + check-no-fork + + + + + + grizzly + + [1.6,) + + + asdfasfd/** + asdfasdf/** + asdfasdf + 1.6 + 1.6 + + + + org.glassfish.grizzly + grizzly-http + 2.2-SNAPSHOT + true + + + + + jvnet-nexus-snapshots + https://maven.java.net/content/repositories/snapshots + + false + + + true + + + + release-sign-artifacts @@ -359,18 +536,11 @@ ${distMgmtSnapshotsUrl} - - - modules - - http://oss.sonatype.org/content/repositories/snapshots true - - a - - a + com/ning/http/client/providers/grizzly/*.java + com/ning/http/client/async/grizzly/*.java com.ning.http.client.providers.grizzly 1.5 1.5 diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java b/src/main/java/com/ning/http/client/AsyncCompletionHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java rename to src/main/java/com/ning/http/client/AsyncCompletionHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java b/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java rename to src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncHandler.java b/src/main/java/com/ning/http/client/AsyncHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncHandler.java rename to src/main/java/com/ning/http/client/AsyncHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncHttpClient.java b/src/main/java/com/ning/http/client/AsyncHttpClient.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncHttpClient.java rename to src/main/java/com/ning/http/client/AsyncHttpClient.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java rename to src/main/java/com/ning/http/client/AsyncHttpClientConfig.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java rename to src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/src/main/java/com/ning/http/client/AsyncHttpProvider.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java rename to src/main/java/com/ning/http/client/AsyncHttpProvider.java diff --git a/modules/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java rename to src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java diff --git a/modules/api/src/main/java/com/ning/http/client/Body.java b/src/main/java/com/ning/http/client/Body.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/Body.java rename to src/main/java/com/ning/http/client/Body.java diff --git a/modules/api/src/main/java/com/ning/http/client/BodyConsumer.java b/src/main/java/com/ning/http/client/BodyConsumer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/BodyConsumer.java rename to src/main/java/com/ning/http/client/BodyConsumer.java diff --git a/modules/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java b/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java rename to src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/BodyGenerator.java b/src/main/java/com/ning/http/client/BodyGenerator.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/BodyGenerator.java rename to src/main/java/com/ning/http/client/BodyGenerator.java diff --git a/modules/api/src/main/java/com/ning/http/client/ByteArrayPart.java b/src/main/java/com/ning/http/client/ByteArrayPart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ByteArrayPart.java rename to src/main/java/com/ning/http/client/ByteArrayPart.java diff --git a/modules/api/src/main/java/com/ning/http/client/ConnectionsPool.java b/src/main/java/com/ning/http/client/ConnectionsPool.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ConnectionsPool.java rename to src/main/java/com/ning/http/client/ConnectionsPool.java diff --git a/modules/api/src/main/java/com/ning/http/client/Cookie.java b/src/main/java/com/ning/http/client/Cookie.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/Cookie.java rename to src/main/java/com/ning/http/client/Cookie.java diff --git a/modules/api/src/main/java/com/ning/http/client/FilePart.java b/src/main/java/com/ning/http/client/FilePart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/FilePart.java rename to src/main/java/com/ning/http/client/FilePart.java diff --git a/modules/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java b/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java rename to src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java diff --git a/modules/api/src/main/java/com/ning/http/client/FluentStringsMap.java b/src/main/java/com/ning/http/client/FluentStringsMap.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/FluentStringsMap.java rename to src/main/java/com/ning/http/client/FluentStringsMap.java diff --git a/modules/api/src/main/java/com/ning/http/client/HttpContent.java b/src/main/java/com/ning/http/client/HttpContent.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/HttpContent.java rename to src/main/java/com/ning/http/client/HttpContent.java diff --git a/modules/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java b/src/main/java/com/ning/http/client/HttpResponseBodyPart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java rename to src/main/java/com/ning/http/client/HttpResponseBodyPart.java diff --git a/modules/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java b/src/main/java/com/ning/http/client/HttpResponseHeaders.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java rename to src/main/java/com/ning/http/client/HttpResponseHeaders.java diff --git a/modules/api/src/main/java/com/ning/http/client/HttpResponseStatus.java b/src/main/java/com/ning/http/client/HttpResponseStatus.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/HttpResponseStatus.java rename to src/main/java/com/ning/http/client/HttpResponseStatus.java diff --git a/modules/api/src/main/java/com/ning/http/client/ListenableFuture.java b/src/main/java/com/ning/http/client/ListenableFuture.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ListenableFuture.java rename to src/main/java/com/ning/http/client/ListenableFuture.java diff --git a/modules/api/src/main/java/com/ning/http/client/MaxRedirectException.java b/src/main/java/com/ning/http/client/MaxRedirectException.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/MaxRedirectException.java rename to src/main/java/com/ning/http/client/MaxRedirectException.java diff --git a/modules/api/src/main/java/com/ning/http/client/Part.java b/src/main/java/com/ning/http/client/Part.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/Part.java rename to src/main/java/com/ning/http/client/Part.java diff --git a/modules/api/src/main/java/com/ning/http/client/PerRequestConfig.java b/src/main/java/com/ning/http/client/PerRequestConfig.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/PerRequestConfig.java rename to src/main/java/com/ning/http/client/PerRequestConfig.java diff --git a/modules/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java b/src/main/java/com/ning/http/client/ProgressAsyncHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java rename to src/main/java/com/ning/http/client/ProgressAsyncHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/ProxyServer.java b/src/main/java/com/ning/http/client/ProxyServer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ProxyServer.java rename to src/main/java/com/ning/http/client/ProxyServer.java diff --git a/modules/api/src/main/java/com/ning/http/client/RandomAccessBody.java b/src/main/java/com/ning/http/client/RandomAccessBody.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/RandomAccessBody.java rename to src/main/java/com/ning/http/client/RandomAccessBody.java diff --git a/modules/api/src/main/java/com/ning/http/client/Realm.java b/src/main/java/com/ning/http/client/Realm.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/Realm.java rename to src/main/java/com/ning/http/client/Realm.java diff --git a/modules/api/src/main/java/com/ning/http/client/Request.java b/src/main/java/com/ning/http/client/Request.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/Request.java rename to src/main/java/com/ning/http/client/Request.java diff --git a/modules/api/src/main/java/com/ning/http/client/RequestBuilder.java b/src/main/java/com/ning/http/client/RequestBuilder.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/RequestBuilder.java rename to src/main/java/com/ning/http/client/RequestBuilder.java diff --git a/modules/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/src/main/java/com/ning/http/client/RequestBuilderBase.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/RequestBuilderBase.java rename to src/main/java/com/ning/http/client/RequestBuilderBase.java diff --git a/modules/api/src/main/java/com/ning/http/client/Response.java b/src/main/java/com/ning/http/client/Response.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/Response.java rename to src/main/java/com/ning/http/client/Response.java diff --git a/modules/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java b/src/main/java/com/ning/http/client/ResumableBodyConsumer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java rename to src/main/java/com/ning/http/client/ResumableBodyConsumer.java diff --git a/modules/api/src/main/java/com/ning/http/client/SSLEngineFactory.java b/src/main/java/com/ning/http/client/SSLEngineFactory.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/SSLEngineFactory.java rename to src/main/java/com/ning/http/client/SSLEngineFactory.java diff --git a/modules/api/src/main/java/com/ning/http/client/SignatureCalculator.java b/src/main/java/com/ning/http/client/SignatureCalculator.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/SignatureCalculator.java rename to src/main/java/com/ning/http/client/SignatureCalculator.java diff --git a/modules/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java b/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java rename to src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java diff --git a/modules/api/src/main/java/com/ning/http/client/StringPart.java b/src/main/java/com/ning/http/client/StringPart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/StringPart.java rename to src/main/java/com/ning/http/client/StringPart.java diff --git a/modules/api/src/main/java/com/ning/http/client/ThrowableHandler.java b/src/main/java/com/ning/http/client/ThrowableHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ThrowableHandler.java rename to src/main/java/com/ning/http/client/ThrowableHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/UpgradeHandler.java b/src/main/java/com/ning/http/client/UpgradeHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/UpgradeHandler.java rename to src/main/java/com/ning/http/client/UpgradeHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java rename to src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java diff --git a/modules/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java rename to src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java diff --git a/modules/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java rename to src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java diff --git a/modules/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java rename to src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java diff --git a/modules/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java rename to src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java diff --git a/modules/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java b/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java rename to src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java diff --git a/modules/api/src/main/java/com/ning/http/client/filter/FilterContext.java b/src/main/java/com/ning/http/client/filter/FilterContext.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/filter/FilterContext.java rename to src/main/java/com/ning/http/client/filter/FilterContext.java diff --git a/modules/api/src/main/java/com/ning/http/client/filter/FilterException.java b/src/main/java/com/ning/http/client/filter/FilterException.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/filter/FilterException.java rename to src/main/java/com/ning/http/client/filter/FilterException.java diff --git a/modules/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java b/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java rename to src/main/java/com/ning/http/client/filter/IOExceptionFilter.java diff --git a/modules/api/src/main/java/com/ning/http/client/filter/RequestFilter.java b/src/main/java/com/ning/http/client/filter/RequestFilter.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/filter/RequestFilter.java rename to src/main/java/com/ning/http/client/filter/RequestFilter.java diff --git a/modules/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java b/src/main/java/com/ning/http/client/filter/ResponseFilter.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java rename to src/main/java/com/ning/http/client/filter/ResponseFilter.java diff --git a/modules/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java b/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java rename to src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java diff --git a/modules/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java b/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java rename to src/main/java/com/ning/http/client/generators/FileBodyGenerator.java diff --git a/modules/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java b/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java rename to src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java diff --git a/modules/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java b/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java rename to src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java diff --git a/modules/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java b/src/main/java/com/ning/http/client/listenable/ExecutionList.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java rename to src/main/java/com/ning/http/client/listenable/ExecutionList.java diff --git a/modules/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java b/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java rename to src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/listener/TransferListener.java b/src/main/java/com/ning/http/client/listener/TransferListener.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/listener/TransferListener.java rename to src/main/java/com/ning/http/client/listener/TransferListener.java diff --git a/modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java rename to src/main/java/com/ning/http/client/ntlm/NTLMEngine.java diff --git a/modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java b/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java rename to src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java diff --git a/modules/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java b/src/main/java/com/ning/http/client/oauth/ConsumerKey.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java rename to src/main/java/com/ning/http/client/oauth/ConsumerKey.java diff --git a/modules/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java rename to src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java diff --git a/modules/api/src/main/java/com/ning/http/client/oauth/RequestToken.java b/src/main/java/com/ning/http/client/oauth/RequestToken.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/oauth/RequestToken.java rename to src/main/java/com/ning/http/client/oauth/RequestToken.java diff --git a/modules/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java b/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java rename to src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java diff --git a/modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java similarity index 100% rename from modules/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java rename to src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java rename to src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java rename to src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java diff --git a/modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java b/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java similarity index 100% rename from modules/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java rename to src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java rename to src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java rename to src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java rename to src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java rename to src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java rename to src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java rename to src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java rename to src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java diff --git a/modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java rename to src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java rename to src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java b/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java rename to src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java similarity index 99% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java rename to src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 89c4f12805..30ba1427ee 100644 --- a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -54,6 +54,7 @@ import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.util.AsyncHttpProviderUtils; import com.ning.http.util.AuthenticatorUtils; +import com.ning.http.util.CleanupChannelGroup; import com.ning.http.util.ProxyUtils; import com.ning.http.util.SslUtils; import com.ning.http.util.UTF8UrlEncoder; diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java rename to src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java b/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java rename to src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java rename to src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java rename to src/main/java/com/ning/http/client/providers/netty/NettyResponse.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java rename to src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java rename to src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java b/src/main/java/com/ning/http/client/providers/netty/Protocol.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java rename to src/main/java/com/ning/http/client/providers/netty/Protocol.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java rename to src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java b/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java rename to src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java b/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java rename to src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java rename to src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java rename to src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java rename to src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java similarity index 100% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java rename to src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java diff --git a/modules/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java b/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java rename to src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java diff --git a/modules/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java b/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java rename to src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java diff --git a/modules/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java b/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java rename to src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java diff --git a/modules/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java b/src/main/java/com/ning/http/client/resumable/ResumableListener.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java rename to src/main/java/com/ning/http/client/resumable/ResumableListener.java diff --git a/modules/api/src/main/java/com/ning/http/client/simple/HeaderMap.java b/src/main/java/com/ning/http/client/simple/HeaderMap.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/simple/HeaderMap.java rename to src/main/java/com/ning/http/client/simple/HeaderMap.java diff --git a/modules/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java b/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java rename to src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java diff --git a/modules/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java b/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java rename to src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java diff --git a/modules/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java b/src/main/java/com/ning/http/client/webdav/WebDavResponse.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java rename to src/main/java/com/ning/http/client/webdav/WebDavResponse.java diff --git a/modules/api/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/websocket/WebSocket.java rename to src/main/java/com/ning/http/client/websocket/WebSocket.java diff --git a/modules/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java rename to src/main/java/com/ning/http/client/websocket/WebSocketListener.java diff --git a/modules/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java similarity index 97% rename from modules/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java rename to src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index dfd07bef33..d7fa5387c7 100644 --- a/modules/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -17,6 +17,7 @@ import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.UpgradeHandler; +import org.jboss.netty.handler.codec.http.HttpResponse; /** * An {@link AsyncHandler} which is able to execute WebSocket upgrade. diff --git a/modules/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java b/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java rename to src/main/java/com/ning/http/multipart/ByteArrayPartSource.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/FilePart.java b/src/main/java/com/ning/http/multipart/FilePart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/FilePart.java rename to src/main/java/com/ning/http/multipart/FilePart.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/FilePartSource.java b/src/main/java/com/ning/http/multipart/FilePartSource.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/FilePartSource.java rename to src/main/java/com/ning/http/multipart/FilePartSource.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/MultipartBody.java b/src/main/java/com/ning/http/multipart/MultipartBody.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/MultipartBody.java rename to src/main/java/com/ning/http/multipart/MultipartBody.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java b/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java rename to src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java b/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java rename to src/main/java/com/ning/http/multipart/MultipartRequestEntity.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/Part.java b/src/main/java/com/ning/http/multipart/Part.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/Part.java rename to src/main/java/com/ning/http/multipart/Part.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/PartBase.java b/src/main/java/com/ning/http/multipart/PartBase.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/PartBase.java rename to src/main/java/com/ning/http/multipart/PartBase.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/PartSource.java b/src/main/java/com/ning/http/multipart/PartSource.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/PartSource.java rename to src/main/java/com/ning/http/multipart/PartSource.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/RequestEntity.java b/src/main/java/com/ning/http/multipart/RequestEntity.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/RequestEntity.java rename to src/main/java/com/ning/http/multipart/RequestEntity.java diff --git a/modules/api/src/main/java/com/ning/http/multipart/StringPart.java b/src/main/java/com/ning/http/multipart/StringPart.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/multipart/StringPart.java rename to src/main/java/com/ning/http/multipart/StringPart.java diff --git a/modules/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java b/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java rename to src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java diff --git a/modules/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java rename to src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java diff --git a/modules/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/src/main/java/com/ning/http/util/AuthenticatorUtils.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java rename to src/main/java/com/ning/http/util/AuthenticatorUtils.java diff --git a/modules/api/src/main/java/com/ning/http/util/Base64.java b/src/main/java/com/ning/http/util/Base64.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/Base64.java rename to src/main/java/com/ning/http/util/Base64.java diff --git a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/CleanupChannelGroup.java b/src/main/java/com/ning/http/util/CleanupChannelGroup.java similarity index 98% rename from modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/CleanupChannelGroup.java rename to src/main/java/com/ning/http/util/CleanupChannelGroup.java index 7d326f316f..23ecc2f30b 100644 --- a/modules/providers/netty/src/main/java/com/ning/http/client/providers/netty/CleanupChannelGroup.java +++ b/src/main/java/com/ning/http/util/CleanupChannelGroup.java @@ -26,7 +26,7 @@ * limitations under the License. */ -package com.ning.http.client.providers.netty; +package com.ning.http.util; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; diff --git a/modules/api/src/main/java/com/ning/http/util/DateUtil.java b/src/main/java/com/ning/http/util/DateUtil.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/DateUtil.java rename to src/main/java/com/ning/http/util/DateUtil.java diff --git a/modules/api/src/main/java/com/ning/http/util/ProxyUtils.java b/src/main/java/com/ning/http/util/ProxyUtils.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/ProxyUtils.java rename to src/main/java/com/ning/http/util/ProxyUtils.java diff --git a/modules/api/src/main/java/com/ning/http/util/SslUtils.java b/src/main/java/com/ning/http/util/SslUtils.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/SslUtils.java rename to src/main/java/com/ning/http/util/SslUtils.java diff --git a/modules/api/src/main/java/com/ning/http/util/UTF8Codec.java b/src/main/java/com/ning/http/util/UTF8Codec.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/UTF8Codec.java rename to src/main/java/com/ning/http/util/UTF8Codec.java diff --git a/modules/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java b/src/main/java/com/ning/http/util/UTF8UrlEncoder.java similarity index 100% rename from modules/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java rename to src/main/java/com/ning/http/util/UTF8UrlEncoder.java diff --git a/modules/api/src/test/java/com/ning/http/client/RealmTest.java b/src/test/java/com/ning/http/client/RealmTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/RealmTest.java rename to src/test/java/com/ning/http/client/RealmTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java b/src/test/java/com/ning/http/client/async/AbstractBasicTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java rename to src/test/java/com/ning/http/client/async/AbstractBasicTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java rename to src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index f64b051a24..41421e46ef 100755 --- a/modules/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -30,6 +30,7 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import com.ning.http.client.StringPart; +import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/modules/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java rename to src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java b/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java rename to src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java rename to src/test/java/com/ning/http/client/async/AuthTimeoutTest.java index 3a3b8675bd..6f5fb4eb2a 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java @@ -38,6 +38,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; +import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.Future; diff --git a/modules/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/src/test/java/com/ning/http/client/async/BasicAuthTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java rename to src/test/java/com/ning/http/client/async/BasicAuthTest.java index 64149fd852..791e8ab9ed 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/src/test/java/com/ning/http/client/async/BasicAuthTest.java @@ -53,6 +53,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.URL; +import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.ExecutionException; diff --git a/modules/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java b/src/test/java/com/ning/http/client/async/BasicHttpsTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java rename to src/test/java/com/ning/http/client/async/BasicHttpsTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java b/src/test/java/com/ning/http/client/async/BodyChunkTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java rename to src/test/java/com/ning/http/client/async/BodyChunkTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java b/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java rename to src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java rename to src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ChunkingTest.java b/src/test/java/com/ning/http/client/async/ChunkingTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ChunkingTest.java rename to src/test/java/com/ning/http/client/async/ChunkingTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java b/src/test/java/com/ning/http/client/async/ComplexClientTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java rename to src/test/java/com/ning/http/client/async/ComplexClientTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java similarity index 90% rename from modules/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java rename to src/test/java/com/ning/http/client/async/ConnectionPoolTest.java index 49725314ca..8f02356c90 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java @@ -21,6 +21,7 @@ import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; import com.ning.http.client.Response; +import org.jboss.netty.channel.Channel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -41,8 +42,6 @@ public abstract class ConnectionPoolTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); - - protected abstract ConnectionsPool createPool(boolean canCache); @Test(groups = {"standalone", "default_provider"}) public void testMaxTotalConnections() { @@ -144,7 +143,28 @@ public Response onCompleted(Response response) throws @Test(groups = {"standalone", "default_provider"}) public void testInvalidConnectionsPool() { - ConnectionsPool cp = createPool(false); + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return false; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return false; + } + + public void destroy() { + + } + }; AsyncHttpClient client = getAsyncHttpClient( new AsyncHttpClientConfig.Builder() @@ -167,7 +187,28 @@ public void testInvalidConnectionsPool() { @Test(groups = {"standalone", "default_provider"}) public void testValidConnectionsPool() { - ConnectionsPool cp = createPool(true); + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return true; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { + + } + }; AsyncHttpClient client = getAsyncHttpClient( new AsyncHttpClientConfig.Builder() diff --git a/modules/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/src/test/java/com/ning/http/client/async/DigestAuthTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java rename to src/test/java/com/ning/http/client/async/DigestAuthTest.java index 42b9d3ab25..9753e4d922 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/src/test/java/com/ning/http/client/async/DigestAuthTest.java @@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.concurrent.ExecutionException; diff --git a/modules/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java b/src/test/java/com/ning/http/client/async/EmptyBodyTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java rename to src/test/java/com/ning/http/client/async/EmptyBodyTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java b/src/test/java/com/ning/http/client/async/ErrorResponseTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java rename to src/test/java/com/ning/http/client/async/ErrorResponseTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java b/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java rename to src/test/java/com/ning/http/client/async/Expect100ContinueTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java rename to src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/FilterTest.java b/src/test/java/com/ning/http/client/async/FilterTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/FilterTest.java rename to src/test/java/com/ning/http/client/async/FilterTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java b/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java rename to src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java b/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java rename to src/test/java/com/ning/http/client/async/FluentStringsMapTest.java index c528a3221f..d6c6795985 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java +++ b/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java @@ -16,7 +16,6 @@ package com.ning.http.client.async; import com.ning.http.client.FluentStringsMap; -import org.testng.Assert; import org.testng.annotations.Test; import java.util.Arrays; diff --git a/modules/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java b/src/test/java/com/ning/http/client/async/FollowingThreadTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java rename to src/test/java/com/ning/http/client/async/FollowingThreadTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/Head302Test.java b/src/test/java/com/ning/http/client/async/Head302Test.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/Head302Test.java rename to src/test/java/com/ning/http/client/async/Head302Test.java index d73397326d..c84f827dce 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/Head302Test.java +++ b/src/test/java/com/ning/http/client/async/Head302Test.java @@ -21,6 +21,7 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import org.eclipse.jetty.server.handler.AbstractHandler; +import org.omg.CORBA.TIMEOUT; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/modules/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java rename to src/test/java/com/ning/http/client/async/HostnameVerifierTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java b/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java rename to src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java b/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java rename to src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/InputStreamTest.java b/src/test/java/com/ning/http/client/async/InputStreamTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/InputStreamTest.java rename to src/test/java/com/ning/http/client/async/InputStreamTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java b/src/test/java/com/ning/http/client/async/ListenableFutureTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java rename to src/test/java/com/ning/http/client/async/ListenableFutureTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java b/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java rename to src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java b/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java rename to src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/src/test/java/com/ning/http/client/async/MultipartUploadTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java rename to src/test/java/com/ning/http/client/async/MultipartUploadTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java b/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java rename to src/test/java/com/ning/http/client/async/MultipleHeaderTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java b/src/test/java/com/ning/http/client/async/NoNullResponseTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java rename to src/test/java/com/ning/http/client/async/NoNullResponseTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java rename to src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java b/src/test/java/com/ning/http/client/async/ParamEncodingTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java rename to src/test/java/com/ning/http/client/async/ParamEncodingTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java rename to src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java b/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java rename to src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/src/test/java/com/ning/http/client/async/PostWithQSTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java rename to src/test/java/com/ning/http/client/async/PostWithQSTest.java index ee1cc22ae4..d99498bd18 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java +++ b/src/test/java/com/ning/http/client/async/PostWithQSTest.java @@ -21,7 +21,6 @@ import com.ning.http.client.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; import org.testng.annotations.Test; import javax.servlet.ServletException; diff --git a/modules/api/src/test/java/com/ning/http/client/async/ProviderUtil.java b/src/test/java/com/ning/http/client/async/ProviderUtil.java similarity index 55% rename from modules/api/src/test/java/com/ning/http/client/async/ProviderUtil.java rename to src/test/java/com/ning/http/client/async/ProviderUtil.java index a136b5ec0a..70f79dc94c 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/ProviderUtil.java +++ b/src/test/java/com/ning/http/client/async/ProviderUtil.java @@ -17,6 +17,8 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.apache.ApacheAsyncHttpProvider; +import com.ning.http.client.providers.jdk.JDKAsyncHttpProvider; public class ProviderUtil { @@ -29,4 +31,20 @@ public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { } } + public static AsyncHttpClient apacheProvider(AsyncHttpClientConfig config) { + if (config == null) { + return new AsyncHttpClient(new ApacheAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); + } else { + return new AsyncHttpClient(new ApacheAsyncHttpProvider(config)); + } + } + + public static AsyncHttpClient jdkProvider(AsyncHttpClientConfig config) { + if (config == null) { + return new AsyncHttpClient(new JDKAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); + } else { + return new AsyncHttpClient(new JDKAsyncHttpProvider(config)); + } + } + } diff --git a/modules/api/src/test/java/com/ning/http/client/async/ProxyTest.java b/src/test/java/com/ning/http/client/async/ProxyTest.java similarity index 99% rename from modules/api/src/test/java/com/ning/http/client/async/ProxyTest.java rename to src/test/java/com/ning/http/client/async/ProxyTest.java index 4129a4a729..941897ce0c 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/src/test/java/com/ning/http/client/async/ProxyTest.java @@ -21,6 +21,8 @@ import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ProxyServer; import com.ning.http.client.Response; +import com.ning.http.client.ProxyServer.Protocol; +import com.ning.http.util.ProxyUtils; import java.io.IOException; import java.net.ConnectException; diff --git a/modules/api/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java rename to src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/src/test/java/com/ning/http/client/async/PutLargeFileTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java rename to src/test/java/com/ning/http/client/async/PutLargeFileTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java b/src/test/java/com/ning/http/client/async/QueryParametersTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java rename to src/test/java/com/ning/http/client/async/QueryParametersTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/RC10KTest.java b/src/test/java/com/ning/http/client/async/RC10KTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/RC10KTest.java rename to src/test/java/com/ning/http/client/async/RC10KTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java b/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java similarity index 98% rename from modules/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java rename to src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java index 4900102ca6..6cc687e49f 100644 --- a/modules/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java +++ b/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java @@ -21,6 +21,7 @@ import com.ning.http.client.ListenableFuture; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; +import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; diff --git a/modules/api/src/test/java/com/ning/http/client/async/Relative302Test.java b/src/test/java/com/ning/http/client/async/Relative302Test.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/Relative302Test.java rename to src/test/java/com/ning/http/client/async/Relative302Test.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/src/test/java/com/ning/http/client/async/RemoteSiteTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java rename to src/test/java/com/ning/http/client/async/RemoteSiteTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java b/src/test/java/com/ning/http/client/async/RequestBuilderTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java rename to src/test/java/com/ning/http/client/async/RequestBuilderTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/RetryNonBlockingIssue.java b/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java similarity index 99% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/RetryNonBlockingIssue.java rename to src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java index 02b4fc3895..92f7a3698f 100644 --- a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/RetryNonBlockingIssue.java +++ b/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.async; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/modules/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java b/src/test/java/com/ning/http/client/async/RetryRequestTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java rename to src/test/java/com/ning/http/client/async/RetryRequestTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java b/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java rename to src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java rename to src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java b/src/test/java/com/ning/http/client/async/TransferListenerTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java rename to src/test/java/com/ning/http/client/async/TransferListenerTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java b/src/test/java/com/ning/http/client/async/WebDavBasicTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java rename to src/test/java/com/ning/http/client/async/WebDavBasicTest.java diff --git a/modules/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java rename to src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java similarity index 90% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java index 14865779fe..5781f71391 100644 --- a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java @@ -72,6 +72,48 @@ public void testMaxTotalConnectionsException() { } + @Override + public void testValidConnectionsPool() { + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Connection connection) { + return true; + } + + public Connection poll(String connection) { + return null; + } + + public boolean removeAll(Connection connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { + + } + }; + + AsyncHttpClient client = getAsyncHttpClient( + new AsyncHttpClientConfig.Builder() + .setConnectionsPool(cp) + .build() + ); + + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNull(exception); + client.close(); + } + @Test(groups = {"standalone", "default_provider"}) public void testInvalidConnectionsPool() { @@ -178,29 +220,4 @@ public Response onCompleted(Response response) throws client.close(); } - @Override - protected ConnectionsPool createPool(final boolean canCache) { - return new ConnectionsPool() { - - public boolean offer(String key, Connection connection) { - return canCache; - } - - public Connection poll(String connection) { - return null; - } - - public boolean removeAll(Connection connection) { - return false; - } - - public boolean canCacheConnection() { - return canCache; - } - - public void destroy() { - - } - }; - } } diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java new file mode 100644 index 0000000000..2740b809e7 --- /dev/null +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.async.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.SimpleAsyncHttpClientTest; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; + +public class GrizzlySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } + +} diff --git a/modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java similarity index 100% rename from modules/providers/grizzly/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java rename to src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java similarity index 95% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java index 3a4b4a528e..ca2d231985 100644 --- a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java @@ -14,6 +14,7 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.AbstractBasicTest; import com.ning.http.client.async.ByteBufferCapacityTest; import com.ning.http.client.async.ProviderUtil; diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java b/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java b/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java b/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java similarity index 62% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java index 9ca8af6a68..912ed49019 100644 --- a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java @@ -14,10 +14,8 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ConnectionsPool; import com.ning.http.client.async.ConnectionPoolTest; import com.ning.http.client.async.ProviderUtil; -import org.jboss.netty.channel.Channel; public class NettyConnectionPoolTest extends ConnectionPoolTest { @@ -26,30 +24,4 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); } - - @Override - protected ConnectionsPool createPool(final boolean canCache) { - return new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return canCache; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return canCache; - } - - public void destroy() { - - } - }; - } } diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java b/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java b/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java b/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java b/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java b/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java b/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java b/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java b/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java rename to src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java b/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java b/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java b/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java b/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java b/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java rename to src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java b/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java b/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java b/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java b/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java b/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java b/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java b/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java rename to src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java b/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java b/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java b/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java b/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java b/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java b/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java rename to src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java b/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java b/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java similarity index 83% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java rename to src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java index 3367ac129d..757ad583d3 100644 --- a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java @@ -28,8 +28,4 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return null; } - @Override - public void RequestByteArrayOutputStreamBodyConsumerTest() throws Throwable { - super.RequestByteArrayOutputStreamBodyConsumerTest(); //To change body of overridden methods use File | Settings | File Templates. - } } diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java b/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java similarity index 100% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java b/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java similarity index 95% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java rename to src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java index 6f664bd87f..eb47fe624d 100644 --- a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java @@ -15,6 +15,7 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.async.TransferListenerTest; import com.ning.http.client.async.ZeroCopyFileTest; public class NettyZeroCopyFileTest extends ZeroCopyFileTest { diff --git a/modules/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java b/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java rename to src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java diff --git a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncResponseTest.java b/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java similarity index 95% rename from modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncResponseTest.java rename to src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java index e0ce2c2921..c6a92f8c6a 100644 --- a/modules/providers/netty/src/test/java/com/ning/http/client/async/netty/NettyAsyncResponseTest.java +++ b/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -11,13 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.providers.netty.NettyResponse; -import com.ning.http.client.providers.netty.ResponseStatus; import org.testng.annotations.Test; import java.text.SimpleDateFormat; diff --git a/modules/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java b/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java rename to src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java diff --git a/modules/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java b/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java similarity index 84% rename from modules/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java rename to src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java index e88243b9bb..e9969a599b 100644 --- a/modules/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java +++ b/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java @@ -13,7 +13,6 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -import org.testng.Assert; import org.testng.annotations.Test; import java.util.Map; @@ -33,9 +32,9 @@ public void testSaveLoad() p.save(null); p = new PropertiesBasedResumableProcessor(); Map m = p.load(); - Assert.assertEquals(m.size(), 2); - Assert.assertEquals(m.get("http://localhost/test.url"), Long.valueOf(15L)); - Assert.assertEquals(m.get("http://localhost/test2.url"), Long.valueOf(50L)); + assertEquals(m.size(), 2); + assertEquals(m.get("http://localhost/test.url"), Long.valueOf(15L)); + assertEquals(m.get("http://localhost/test2.url"), Long.valueOf(50L)); } } diff --git a/modules/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java b/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java similarity index 93% rename from modules/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java rename to src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java index 576d79feb6..8c9160eb37 100644 --- a/modules/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java +++ b/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java @@ -16,7 +16,6 @@ import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; -import org.testng.Assert; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; @@ -35,12 +34,12 @@ public void testAdjustRange() { Request newRequest = h.adjustRequestRange(request); assertEquals(newRequest.getUrl(), request.getUrl()); String rangeHeader = newRequest.getHeaders().getFirstValue("Range"); - Assert.assertNull(rangeHeader); + assertNull(rangeHeader); proc.put("http://test/url", 5000); newRequest = h.adjustRequestRange(request); assertEquals(newRequest.getUrl(), request.getUrl()); rangeHeader = newRequest.getHeaders().getFirstValue("Range"); - Assert.assertEquals(rangeHeader, "bytes=5000-"); + assertEquals(rangeHeader, "bytes=5000-"); } } diff --git a/modules/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java b/src/test/java/com/ning/http/util/ProxyUtilsTest.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java rename to src/test/java/com/ning/http/util/ProxyUtilsTest.java diff --git a/modules/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java b/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java similarity index 100% rename from modules/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java rename to src/test/java/com/ning/http/util/TestUTF8UrlCodec.java diff --git a/modules/providers/grizzly/src/test/resources/300k.png b/src/test/resources/300k.png similarity index 100% rename from modules/providers/grizzly/src/test/resources/300k.png rename to src/test/resources/300k.png diff --git a/modules/providers/grizzly/src/test/resources/SimpleTextFile.txt b/src/test/resources/SimpleTextFile.txt similarity index 100% rename from modules/providers/grizzly/src/test/resources/SimpleTextFile.txt rename to src/test/resources/SimpleTextFile.txt diff --git a/modules/providers/grizzly/src/test/resources/client.keystore b/src/test/resources/client.keystore similarity index 100% rename from modules/providers/grizzly/src/test/resources/client.keystore rename to src/test/resources/client.keystore diff --git a/modules/providers/grizzly/src/test/resources/gzip.txt.gz b/src/test/resources/gzip.txt.gz similarity index 100% rename from modules/providers/grizzly/src/test/resources/gzip.txt.gz rename to src/test/resources/gzip.txt.gz diff --git a/modules/providers/grizzly/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml similarity index 100% rename from modules/providers/grizzly/src/test/resources/logback-test.xml rename to src/test/resources/logback-test.xml diff --git a/modules/providers/grizzly/src/test/resources/realm.properties b/src/test/resources/realm.properties similarity index 100% rename from modules/providers/grizzly/src/test/resources/realm.properties rename to src/test/resources/realm.properties diff --git a/modules/providers/grizzly/src/test/resources/ssltest-cacerts.jks b/src/test/resources/ssltest-cacerts.jks similarity index 100% rename from modules/providers/grizzly/src/test/resources/ssltest-cacerts.jks rename to src/test/resources/ssltest-cacerts.jks diff --git a/modules/providers/grizzly/src/test/resources/ssltest-keystore.jks b/src/test/resources/ssltest-keystore.jks similarity index 100% rename from modules/providers/grizzly/src/test/resources/ssltest-keystore.jks rename to src/test/resources/ssltest-keystore.jks diff --git a/modules/providers/grizzly/src/test/resources/textfile.txt b/src/test/resources/textfile.txt similarity index 100% rename from modules/providers/grizzly/src/test/resources/textfile.txt rename to src/test/resources/textfile.txt diff --git a/modules/providers/grizzly/src/test/resources/textfile2.txt b/src/test/resources/textfile2.txt similarity index 100% rename from modules/providers/grizzly/src/test/resources/textfile2.txt rename to src/test/resources/textfile2.txt From aa1c9cb202f4de38c6a3be705965c7fbba6f24c8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 30 Nov 2011 15:43:41 -0800 Subject: [PATCH 0017/2844] Remove netty import. --- .../com/ning/http/client/websocket/WebSocketUpgradeHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index d7fa5387c7..dfd07bef33 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -17,7 +17,6 @@ import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.UpgradeHandler; -import org.jboss.netty.handler.codec.http.HttpResponse; /** * An {@link AsyncHandler} which is able to execute WebSocket upgrade. From 37ce401c6804c2bc096ed3031118c012187afbd2 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 2 Dec 2011 10:15:49 -0800 Subject: [PATCH 0018/2844] Initial cut of Grizzly-based WS client. --- pom.xml | 2 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 218 ++++++++++++++++-- .../http/util/AsyncHttpProviderUtils.java | 5 +- 3 files changed, 208 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index d37e0da7b1..616ba37a92 100644 --- a/pom.xml +++ b/pom.xml @@ -443,7 +443,7 @@ org.glassfish.grizzly - grizzly-http + grizzly-websockets 2.2-SNAPSHOT true diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 6455e26177..9f1299892e 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -34,9 +34,13 @@ import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; +import com.ning.http.client.UpgradeHandler; import com.ning.http.client.filter.FilterContext; import com.ning.http.client.filter.ResponseFilter; import com.ning.http.client.listener.TransferCompletionHandler; +import com.ning.http.client.websocket.WebSocket; +import com.ning.http.client.websocket.WebSocketListener; +import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.util.AsyncHttpProviderUtils; import com.ning.http.util.AuthenticatorUtils; @@ -85,6 +89,13 @@ import org.glassfish.grizzly.utils.BufferOutputStream; import org.glassfish.grizzly.utils.DelayedExecutor; import org.glassfish.grizzly.utils.IdleTimeoutFilter; +import org.glassfish.grizzly.websockets.DataFrame; +import org.glassfish.grizzly.websockets.DefaultWebSocket; +import org.glassfish.grizzly.websockets.HandShake; +import org.glassfish.grizzly.websockets.ProtocolHandler; +import org.glassfish.grizzly.websockets.Version; +import org.glassfish.grizzly.websockets.WebSocketEngine; +import org.glassfish.grizzly.websockets.WebSocketFilter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -97,6 +108,7 @@ import java.io.UnsupportedEncodingException; import java.net.InetSocketAddress; import java.net.URI; +import java.net.URISyntaxException; import java.net.URLEncoder; import java.security.NoSuchAlgorithmException; import java.util.Collection; @@ -372,6 +384,7 @@ public void onTimeout(Connection connection) { } else { doDefaultTransportConfig(); } + fcb.add(new WebSocketFilter()); clientTransport.setProcessor(fcb.build()); @@ -509,7 +522,7 @@ boolean sendRequest(final FilterChainContext ctx, } - private static boolean requestHasEntityBody(Request request) { + private static boolean requestHasEntityBody(final Request request) { final String method = request.getMethod(); return (Method.POST.matchesMethod(method) @@ -560,6 +573,12 @@ final class HttpTransactionContext { String lastRedirectURI; AtomicLong totalBodyWritten = new AtomicLong(); AsyncHandler.STATE currentState; + + String wsRequestURI; + boolean isWSRequest; + HandShake handshake; + ProtocolHandler protocolHandler; + WebSocket webSocket; // -------------------------------------------------------- Constructors @@ -715,6 +734,8 @@ public NextAction handleWrite(final FilterChainContext ctx) if (!sendAsGrizzlyRequest((Request) message, ctx)) { return ctx.getSuspendAction(); } + } else if (message instanceof Buffer) { + return ctx.getInvokeAction(); } return ctx.getStopAction(); @@ -735,17 +756,36 @@ public NextAction handleEvent(final FilterChainContext ctx, } +// @Override +// public NextAction handleRead(FilterChainContext ctx) throws IOException { +// Object message = ctx.getMessage(); +// if (HttpPacket.isHttp(message)) { +// final HttpPacket packet = (HttpPacket) message; +// HttpResponsePacket responsePacket; +// if (HttpContent.isContent(packet)) { +// responsePacket = (HttpResponsePacket) ((HttpContent) packet).getHttpHeader(); +// } else { +// responsePacket = (HttpResponsePacket) packet; +// } +// if (HttpStatus.SWITCHING_PROTOCOLS_101.statusMatches(responsePacket.getStatus())) { +// return ctx.getStopAction(); +// } +// } +// return super.handleRead(ctx); +// } // ----------------------------------------------------- Private Methods - - private boolean sendAsGrizzlyRequest(final Request request, final FilterChainContext ctx) throws IOException { final HttpTransactionContext httpCtx = getHttpTransactionContext(ctx.getConnection()); + if (isUpgradeRequest(httpCtx.handler) && isWSRequest(httpCtx.requestUrl)) { + httpCtx.isWSRequest = true; + convertToUpgradeRequest(httpCtx); + } final URI uri = AsyncHttpProviderUtils.createUri(httpCtx.requestUrl); final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); @@ -783,7 +823,20 @@ private boolean sendAsGrizzlyRequest(final Request request, } } - final HttpRequestPacket requestPacket = builder.build(); + HttpRequestPacket requestPacket; + if (httpCtx.isWSRequest) { + try { + final URI wsURI = new URI(httpCtx.wsRequestURI); + httpCtx.protocolHandler = Version.DRAFT17.createHandler(true); + httpCtx.handshake = httpCtx.protocolHandler.createHandShake(wsURI); + requestPacket = (HttpRequestPacket) + httpCtx.handshake.composeHeaders().getHttpHeader(); + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid WS URI: " + httpCtx.wsRequestURI); + } + } else { + requestPacket = builder.build(); + } if (!useProxy) { addQueryString(request, requestPacket); } @@ -814,6 +867,30 @@ private boolean sendAsGrizzlyRequest(final Request request, } + private boolean isUpgradeRequest(final AsyncHandler handler) { + return (handler instanceof UpgradeHandler); + } + + + private boolean isWSRequest(final String requestUri) { + return (requestUri.charAt(0) == 'w' && requestUri.charAt(1) == 's'); + } + + + private void convertToUpgradeRequest(final HttpTransactionContext ctx) { + final int colonIdx = ctx.requestUrl.indexOf(':'); + + if (colonIdx < 2 || colonIdx > 3) { + throw new IllegalArgumentException("Invalid websocket URL: " + ctx.requestUrl); + } + + final StringBuilder sb = new StringBuilder(ctx.requestUrl); + sb.replace(0, colonIdx, ((colonIdx == 2) ? "http" : "https")); + ctx.wsRequestURI = ctx.requestUrl; + ctx.requestUrl = sb.toString(); + } + + private ProxyServer getProxyServer(Request request) { ProxyServer proxyServer = request.getProxyServer(); @@ -1162,15 +1239,33 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } if (context.currentState != AsyncHandler.STATE.ABORT) { + boolean upgrade = context.currentState == AsyncHandler.STATE.UPGRADE; + try { + context.currentState = handler.onHeadersReceived( + new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, + null, + provider)); + } catch (Exception e) { + httpHeader.setSkipRemainder(true); + context.abort(e); + return; + } + if (upgrade) { try { - context.currentState = handler.onHeadersReceived( - new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, - null, - provider)); + context.protocolHandler.setConnection(ctx.getConnection()); + DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); + ws.onConnect(); + context.webSocket = new GrizzlyWebSocketAdapter(ws); + WebSocketEngine.getEngine().setWebSocketHolder(ctx.getConnection(), + context.protocolHandler, + ws); + ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); + context.result(handler.onCompleted()); } catch (Exception e) { httpHeader.setSkipRemainder(true); context.abort(e); - } + } + } } } @@ -1180,7 +1275,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, @Override protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { - boolean result; + boolean result = false; if (httpHeader.isSkipRemainder()) { clearResponse(ctx.getConnection()); cleanup(ctx, provider); @@ -1263,7 +1358,6 @@ private static boolean isRedirect(final int status) { } - // ------------------------------------------------------- Inner Classes @@ -1391,7 +1485,6 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, responsePacket, httpTransactionContext); } else { - //requestToSend = httpTransactionContext.request; httpTransactionContext.statusHandler = null; httpTransactionContext.invocationStatus = InvocationStatus.CONTINUE; try { @@ -1478,7 +1571,7 @@ private static Request newRequest(final URI uri, } - } // END AsyncHttpClientFilter + } // END AsyncHttpClientEventFilter private static final class ClientEncodingFilter implements EncodingFilter { @@ -2364,5 +2457,102 @@ public void getBytes(byte[] bytes) { // TODO implement } - } + } // END GrizzlyTransferAdapter + + + private static final class GrizzlyWebSocketAdapter implements WebSocket { + + private final org.glassfish.grizzly.websockets.WebSocket gWebSocket; + + // -------------------------------------------------------- Constructors + + + GrizzlyWebSocketAdapter(final org.glassfish.grizzly.websockets.WebSocket gWebSocket) { + this.gWebSocket = gWebSocket; + } + + + // ------------------------------------------ Methods from AHC WebSocket + + + @Override + public WebSocket sendMessage(byte[] message) { + gWebSocket.send(message); + return this; + } + + @Override + public WebSocket addMessageListener(WebSocketListener l) { + gWebSocket.add(new AHCWebSocketListenerAdapter(l)); + return this; + } + + @Override + public void close() { + gWebSocket.close(); + } + + } // END GrizzlyWebSocketAdapter + + + private static final class AHCWebSocketListenerAdapter implements org.glassfish.grizzly.websockets.WebSocketListener { + + private final WebSocketListener ahcListener; + + // -------------------------------------------------------- Constructors + + + AHCWebSocketListenerAdapter(final WebSocketListener ahcListener) { + this.ahcListener = ahcListener; + } + + + // ------------------------------ Methods from Grizzly WebSocketListener + + + @Override + public void onClose(org.glassfish.grizzly.websockets.WebSocket webSocket, DataFrame dataFrame) { + ahcListener.onClose(); + } + + @Override + public void onConnect(org.glassfish.grizzly.websockets.WebSocket webSocket) { + // no-op + } + + @Override + public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, String s) { + // no-op + } + + @Override + public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { + ahcListener.onMessage(bytes); + } + + @Override + public void onPing(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { + // no-op + } + + @Override + public void onPong(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { + // no-op + } + + @Override + public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean b) { + // no-op + } + + @Override + public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean b) { + // no-op + } + + } // END AHCWebSocketListenerAdapter + } + + + diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 746fbf8f71..9a6dadcb59 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -137,9 +137,10 @@ public final static SimpleDateFormat[] get() { public final static URI createUri(String u) { URI uri = URI.create(u); final String scheme = uri.getScheme(); - if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https") && !scheme.equalsIgnoreCase("ws")) { + if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https") && !scheme.equalsIgnoreCase("ws") + && !scheme.equalsIgnoreCase("wss")) { throw new IllegalArgumentException("The URI scheme, of the URI " + u - + ", must be equal (ignoring case) to 'http' or 'https'"); + + ", must be equal (ignoring case) to 'http', 'https', 'ws', or 'wss'"); } String path = uri.getPath(); From 2206977dccb614342f0211fbbf7b87a5b75955ef Mon Sep 17 00:00:00 2001 From: Hubert Iwaniuk Date: Sun, 4 Dec 2011 20:45:55 +0100 Subject: [PATCH 0019/2844] Removed JBoss repository, new Netty is in Central. --- pom.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pom.xml b/pom.xml index 1c6ffc33c6..42cb821c00 100644 --- a/pom.xml +++ b/pom.xml @@ -536,15 +536,6 @@ ${distMgmtSnapshotsUrl} - - - repository.jboss.org - https://repository.jboss.org/nexus/content/repositories/releases/ - - false - - - http://oss.sonatype.org/content/repositories/snapshots true From 3f38a220c3fe4cdd4f6c06576bc98a8e9e7f7e26 Mon Sep 17 00:00:00 2001 From: Jenny Williamson Date: Mon, 5 Dec 2011 16:53:58 -0800 Subject: [PATCH 0020/2844] enable turning off redirects per request request.setRedirectsEnabled(bool) was being ignored unless it was true. instead, only default to config.redirectEnabled if redirectEnabled hasn't been set either way for the request. --- .../java/com/ning/http/client/Request.java | 7 +++++++ .../ning/http/client/RequestBuilderBase.java | 10 +++++++--- .../netty/NettyAsyncHttpProvider.java | 2 +- .../async/PerRequestRelative302Test.java | 19 +++++++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ning/http/client/Request.java b/src/main/java/com/ning/http/client/Request.java index ad90b9e7bb..52ef0cbb72 100644 --- a/src/main/java/com/ning/http/client/Request.java +++ b/src/main/java/com/ning/http/client/Request.java @@ -200,6 +200,13 @@ public static interface EntityWriter { */ public boolean isRedirectEnabled(); + /** + * + * @return true> if request's redirectEnabled setting + * should be used in place of client's + */ + public boolean isRedirectOverrideSet(); + /** * Return Per request configuration. * diff --git a/src/main/java/com/ning/http/client/RequestBuilderBase.java b/src/main/java/com/ning/http/client/RequestBuilderBase.java index 1e7efe1e5f..2a80fd409a 100644 --- a/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -61,7 +61,7 @@ private static final class RequestImpl implements Request { public ProxyServer proxyServer; private Realm realm; private File file; - private boolean followRedirects; + private Boolean followRedirects; private PerRequestConfig perRequestConfig; private long rangeOffset = 0; public String charset; @@ -92,7 +92,7 @@ public RequestImpl(Request prototype) { this.proxyServer = prototype.getProxyServer(); this.realm = prototype.getRealm(); this.file = prototype.getFile(); - this.followRedirects = prototype.isRedirectEnabled(); + this.followRedirects = prototype.isRedirectOverrideSet()? prototype.isRedirectEnabled() : null; this.perRequestConfig = prototype.getPerRequestConfig(); this.rangeOffset = prototype.getRangeOffset(); this.charset = prototype.getBodyEncoding(); @@ -259,7 +259,11 @@ public File getFile() { } public boolean isRedirectEnabled() { - return followRedirects; + return (followRedirects != null && followRedirects); + } + + public boolean isRedirectOverrideSet(){ + return followRedirects != null; } public PerRequestConfig getPerRequestConfig() { diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 0863718573..c07046f67a 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1229,7 +1229,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectEnabled() ? true : config.isRedirectEnabled(); + boolean redirectEnabled = request.isRedirectOverrideSet()? request.isRedirectEnabled() : config.isRedirectEnabled(); if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { diff --git a/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java index 85c6629477..756a258339 100644 --- a/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java +++ b/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java @@ -112,6 +112,25 @@ public void redirected302Test() throws Throwable { assertTrue(baseUrl.matches(anyMicrosoftPage), "response does not show redirection to " + anyMicrosoftPage); } + @Test(groups = {"online", "default_provider"}) + public void notRedirected302Test() throws Throwable { + isSet.getAndSet(false); + AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); + AsyncHttpClient c = getAsyncHttpClient(cg); + + + // once + Response response = c.prepareGet(getTargetUrl()) + .setFollowRedirects(false) + .setHeader("X-redirect", "http://www.microsoft.com/") + .execute().get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 302); + + c.close(); + } + private String getBaseUrl(URI uri) { String url = uri.toString(); int port = uri.getPort(); From 4e6e58fc9c839f495854e5cd631e1acfaa52e2a3 Mon Sep 17 00:00:00 2001 From: Jenny Williamson Date: Mon, 5 Dec 2011 17:22:18 -0800 Subject: [PATCH 0021/2844] throw illegalArg error on null location some url shorteners sometimes return 302s without a location header (bah.) throw illegal arg exception rather than NPE from URI.resolve --- src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 8f85e2f967..867a60b01f 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -218,6 +218,8 @@ public final static String getHost(URI uri) { } public final static URI getRedirectUri(URI uri, String location) { + if(location == null) + throw new IllegalArgumentException("URI " + uri + " was redirected to null location"); URI newUri = uri.resolve(location); String scheme = newUri.getScheme(); From d405d81114e72ce7efaa9470d1ae975dfae33263 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 6 Dec 2011 14:35:54 -0500 Subject: [PATCH 0022/2844] More work on WebSocket implementation --- .../grizzly/GrizzlyAsyncHttpProvider.java | 22 +++-- .../netty/NettyAsyncHttpProvider.java | 1 + .../providers/netty/NettyWebSocket.java | 31 ++++++- .../ning/http/client/websocket/WebSocket.java | 2 + .../websocket/WebSocketByteListener.java | 19 +++++ .../client/websocket/WebSocketListener.java | 4 +- .../websocket/WebSocketPingListener.java | 19 +++++ .../websocket/WebSocketTextListener.java | 19 +++++ .../websocket/WebSocketUpgradeHandler.java | 81 ++++++++++++++++++- 9 files changed, 186 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 9f1299892e..5cb8bc4162 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -39,6 +39,7 @@ import com.ning.http.client.filter.ResponseFilter; import com.ning.http.client.listener.TransferCompletionHandler; import com.ning.http.client.websocket.WebSocket; +import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartRequestEntity; @@ -2481,9 +2482,15 @@ public WebSocket sendMessage(byte[] message) { return this; } + @Override + public WebSocket sendTextMessage(String message) { + gWebSocket.send(message); + return this; + } + @Override public WebSocket addMessageListener(WebSocketListener l) { - gWebSocket.add(new AHCWebSocketListenerAdapter(l)); + gWebSocket.add(new AHCWebSocketListenerAdapter(l, this)); return this; } @@ -2498,12 +2505,14 @@ public void close() { private static final class AHCWebSocketListenerAdapter implements org.glassfish.grizzly.websockets.WebSocketListener { private final WebSocketListener ahcListener; + private final WebSocket webSocket; // -------------------------------------------------------- Constructors - AHCWebSocketListenerAdapter(final WebSocketListener ahcListener) { + AHCWebSocketListenerAdapter(final WebSocketListener ahcListener, WebSocket webSocket) { this.ahcListener = ahcListener; + this.webSocket = webSocket; } @@ -2511,8 +2520,9 @@ private static final class AHCWebSocketListenerAdapter implements org.glassfish. @Override - public void onClose(org.glassfish.grizzly.websockets.WebSocket webSocket, DataFrame dataFrame) { - ahcListener.onClose(); + public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataFrame dataFrame) { + // TODO NEED A WebSocket instance + ahcListener.onClose(webSocket); } @Override @@ -2527,7 +2537,9 @@ public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, Stri @Override public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - ahcListener.onMessage(bytes); + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onMessage(bytes); + } } @Override diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 30ba1427ee..71d7ca983c 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2274,6 +2274,7 @@ public void setContent(ChannelBuffer content) { NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); webSocket.onMessage(rp.getBodyPartBytes()); + webSocket.onTextMessage(frame.getBinaryData().toString("UTF-8")); } else { log.error("Invalid attachment {}", ctx.getAttachment()); } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index c6d4f9dd56..8eccb9cc41 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -14,12 +14,17 @@ import com.ning.http.client.providers.netty.netty4.BinaryWebSocketFrame; import com.ning.http.client.websocket.WebSocket; +import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; +import com.ning.http.client.websocket.WebSocketTextListener; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; +import java.io.UnsupportedEncodingException; import java.util.concurrent.ConcurrentLinkedQueue; +import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; + public class NettyWebSocket implements WebSocket { private final Channel channel; @@ -31,7 +36,17 @@ public NettyWebSocket(Channel channel) { @Override public WebSocket sendMessage(byte[] message) { - channel.write(new BinaryWebSocketFrame(ChannelBuffers.wrappedBuffer(message))); + channel.write(new BinaryWebSocketFrame(wrappedBuffer(message))); + return this; + } + + @Override + public WebSocket sendTextMessage(String message) { + try { + channel.write(new BinaryWebSocketFrame(wrappedBuffer(message.getBytes("ISO-8859-1")))); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } return this; } @@ -49,7 +64,17 @@ public void close() { protected void onMessage(byte[] message) { for (WebSocketListener l : listeners) { - l.onMessage(message); + if (WebSocketByteListener.class.isAssignableFrom(l.getClass())) { + WebSocketByteListener.class.cast(l).onMessage(message); + } + } + } + + protected void onTextMessage(String message) { + for (WebSocketListener l : listeners) { + if (WebSocketTextListener.class.isAssignableFrom(l.getClass())) { + WebSocketTextListener.class.cast(l).onMessage(message); + } } } @@ -61,7 +86,7 @@ protected void onError(Throwable t) { protected void onClose() { for (WebSocketListener l : listeners) { - l.onClose(); + l.onClose(this); } } } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index 492d07a488..bdfa5a14a3 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -19,6 +19,8 @@ public interface WebSocket { WebSocket sendMessage(byte[] message); + WebSocket sendTextMessage(String message); + WebSocket addMessageListener(WebSocketListener l); void close(); diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java new file mode 100644 index 0000000000..cd02a6dff3 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +public interface WebSocketByteListener extends WebSocketListener { + + void onMessage(byte[] message); + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java index 40ad3e9489..3755867b80 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java @@ -14,9 +14,9 @@ public interface WebSocketListener { - void onMessage(byte[] message); + void onOpen(WebSocket websocket); - void onClose(); + void onClose(WebSocket websocket); void onError(Throwable t); diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java new file mode 100644 index 0000000000..27d2767088 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +public interface WebSocketPingListener extends WebSocketListener { + + void onPing(byte[] message); + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java new file mode 100644 index 0000000000..f73d396957 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +public interface WebSocketTextListener extends WebSocketListener { + + void onMessage(String message); + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index dfd07bef33..8a9dcfab7b 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -13,17 +13,33 @@ package com.ning.http.client.websocket; import com.ning.http.client.AsyncHandler; +import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.UpgradeHandler; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicBoolean; + /** * An {@link AsyncHandler} which is able to execute WebSocket upgrade. */ public class WebSocketUpgradeHandler implements UpgradeHandler, AsyncHandler { private WebSocket webSocket; + private final ConcurrentLinkedQueue l; + private final String protocol; + private final long maxByteSize; + private final long maxTextSize; + private final AtomicBoolean ok = new AtomicBoolean(false); + + private WebSocketUpgradeHandler(Builder b) { + l = b.l; + protocol = b.protocol; + maxByteSize = b.maxByteSize; + maxTextSize = b.maxTextSize; + } @Override public void onThrowable(Throwable t) { @@ -40,7 +56,7 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio if (responseStatus.getStatusCode() == 101) { return STATE.UPGRADE; } else { - throw new IllegalStateException("Invalid Upgrade protocol"); + throw new IllegalStateException("Invalid Upgrade protocol"); } } @@ -52,7 +68,7 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { @Override public WebSocket onCompleted() throws Exception { if (webSocket == null) { - throw new IllegalStateException("WebSocket is null"); + throw new IllegalStateException("WebSocket is null"); } return webSocket; } @@ -60,10 +76,71 @@ public WebSocket onCompleted() throws Exception { @Override public void onSuccess(WebSocket webSocket) { this.webSocket = webSocket; + for(WebSocketListener w: l) { + webSocket.addMessageListener(w); + w.onOpen(webSocket); + } + ok.set(true); } @Override public void onFailure(Throwable t) { + for(WebSocketListener w: l) { + if (!ok.get()){ + webSocket.addMessageListener(w); + } + w.onError(t); + } } + /** + * Build a {@link WebSocketUpgradeHandler} + */ + public final static class Builder { + private ConcurrentLinkedQueue l = new ConcurrentLinkedQueue(); + private String protocol = ""; + private long maxByteSize = 8192; + private long maxTextSize = 8192; + + /** + * Add a {@link WebSocketListener} that will be added to the {@link WebSocket} + * + * @param listener a {@link WebSocketListener} + * @return this + */ + public Builder addWebSocketListener(WebSocketListener listener) { + l.add(listener); + return this; + } + + /** + * Remove a {@link WebSocketListener} + * + * @param listener a {@link WebSocketListener} + * @return this + */ + public Builder removeWebSocketListener(WebSocketListener listener) { + l.remove(listener); + return this; + } + + public Builder setProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + public Builder setMaxByteSize(long maxByteSize) { + this.maxByteSize = maxByteSize; + return this; + } + + public Builder setMaxTextSize(long maxTextSize) { + this.maxTextSize = maxTextSize; + return this; + } + + public WebSocketUpgradeHandler build(){ + return new WebSocketUpgradeHandler(this); + } + } } From 8796f95519c09e2379360d4129cf475d3b766506 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 6 Dec 2011 11:57:50 -0800 Subject: [PATCH 0023/2844] Add support for ping and text listener types. --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 5cb8bc4162..49e69ca376 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -41,6 +41,8 @@ import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; +import com.ning.http.client.websocket.WebSocketPingListener; +import com.ning.http.client.websocket.WebSocketTextListener; import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.util.AsyncHttpProviderUtils; @@ -1276,7 +1278,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, @Override protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { - boolean result = false; + boolean result; if (httpHeader.isSkipRemainder()) { clearResponse(ctx.getConnection()); cleanup(ctx, provider); @@ -2521,7 +2523,6 @@ private static final class AHCWebSocketListenerAdapter implements org.glassfish. @Override public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataFrame dataFrame) { - // TODO NEED A WebSocket instance ahcListener.onClose(webSocket); } @@ -2532,7 +2533,9 @@ public void onConnect(org.glassfish.grizzly.websockets.WebSocket webSocket) { @Override public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, String s) { - // no-op + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onMessage(s); + } } @Override @@ -2544,7 +2547,9 @@ public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, byte @Override public void onPing(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - // no-op + if (WebSocketPingListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketPingListener.class.cast(ahcListener).onPing(bytes); + } } @Override From 60df5c94f552eca10c0776614f10f9d5e5613a7f Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 13 Dec 2011 15:13:02 -0800 Subject: [PATCH 0024/2844] Fix compilation error due to API change. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 49e69ca376..0fc1cac0a6 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1160,10 +1160,11 @@ protected void onInitialLineParsed(HttpHeader httpHeader, } + @Override - protected void onHttpError(final HttpHeader httpHeader, - final FilterChainContext ctx, - final Throwable t) throws IOException { + protected void onHttpHeaderError(final HttpHeader httpHeader, + final FilterChainContext ctx, + final Throwable t) throws IOException { t.printStackTrace(); httpHeader.setSkipRemainder(true); final HttpTransactionContext context = From 6aac1bf749274e1cd17386db48ad580d5db57975 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 13 Dec 2011 16:26:54 -0800 Subject: [PATCH 0025/2844] Add sendfile support (not functional with SSL) - forced to do byte copy in that case. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 141 +++++++++++++----- .../async/grizzly/GrizzlyBasicHttpsTest.java | 4 + 2 files changed, 104 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 0fc1cac0a6..2831dc8a85 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -53,6 +53,8 @@ import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.EmptyCompletionHandler; +import org.glassfish.grizzly.FileTransfer; import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.WriteResult; import org.glassfish.grizzly.attributes.Attribute; @@ -138,7 +140,10 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { private final static Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); - + private static final boolean SEND_FILE_SUPPORT; + static { + SEND_FILE_SUPPORT = configSendFileSupport(); + } private final Attribute REQUEST_STATE_ATTR = Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTransactionContext.class.getName()); @@ -153,6 +158,7 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { + // ------------------------------------------------------------ Constructors @@ -421,6 +427,29 @@ void touchConnection(final Connection c, final Request request) { // --------------------------------------------------------- Private Methods + + + private static boolean configSendFileSupport() { + + return !((System.getProperty("os.name").equalsIgnoreCase("linux") + && !linuxSendFileSupported()) + || System.getProperty("os.name").equalsIgnoreCase("HP-UX")); + } + + + private static boolean linuxSendFileSupported() { + final String version = System.getProperty("java.version"); + if (version.startsWith("1.6")) { + int idx = version.indexOf('_'); + if (idx == -1) { + return false; + } + final int patchRev = Integer.parseInt(version.substring(idx + 1)); + return (patchRev >= 18); + } else { + return version.startsWith("1.7") || version.startsWith("1.8"); + } + } private void doDefaultTransportConfig() { final ExecutorService service = clientConfig.executorService(); @@ -791,7 +820,7 @@ private boolean sendAsGrizzlyRequest(final Request request, } final URI uri = AsyncHttpProviderUtils.createUri(httpCtx.requestUrl); final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); - + boolean secure = "https".equals(uri.getScheme()); builder.method(request.getMethod()); builder.protocol(Protocol.HTTP_1_1); String host = request.getVirtualHost(); @@ -807,7 +836,7 @@ private boolean sendAsGrizzlyRequest(final Request request, final ProxyServer proxy = getProxyServer(request); final boolean useProxy = (proxy != null); if (useProxy) { - if ("https".equals(uri.getScheme())) { + if (secure) { builder.method(Method.CONNECT); builder.uri(AsyncHttpProviderUtils.getAuthority(uri)); } else { @@ -840,6 +869,7 @@ private boolean sendAsGrizzlyRequest(final Request request, } else { requestPacket = builder.build(); } + requestPacket.setSecure(true); if (!useProxy) { addQueryString(request, requestPacket); } @@ -860,10 +890,12 @@ private boolean sendAsGrizzlyRequest(final Request request, } } final AsyncHandler h = httpCtx.handler; - if (TransferCompletionHandler.class.isAssignableFrom(h.getClass())) { - final FluentCaseInsensitiveStringsMap map = - new FluentCaseInsensitiveStringsMap(request.getHeaders()); - TransferCompletionHandler.class.cast(h).transferAdapter(new GrizzlyTransferAdapter(map)); + if (h != null) { + if (TransferCompletionHandler.class.isAssignableFrom(h.getClass())) { + final FluentCaseInsensitiveStringsMap map = + new FluentCaseInsensitiveStringsMap(request.getHeaders()); + TransferCompletionHandler.class.cast(h).transferAdapter(new GrizzlyTransferAdapter(map)); + } } return sendRequest(ctx, request, requestPacket); @@ -1070,8 +1102,10 @@ protected void onHttpContentParsed(HttpContent content, protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); final AsyncHandler handler = context.handler; - if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { - ((TransferCompletionHandler) handler).onHeaderWriteCompleted(); + if (handler != null) { + if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { + ((TransferCompletionHandler) handler).onHeaderWriteCompleted(); + } } } @@ -1079,13 +1113,15 @@ protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ct protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); final AsyncHandler handler = context.handler; - if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { - final int written = content.getContent().remaining(); - final long total = context.totalBodyWritten.addAndGet(written); - ((TransferCompletionHandler) handler).onContentWriteProgress( - written, - total, - content.getHttpHeader().getContentLength()); + if (handler != null) { + if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { + final int written = content.getContent().remaining(); + final long total = context.totalBodyWritten.addAndGet(written); + ((TransferCompletionHandler) handler).onContentWriteProgress( + written, + total, + content.getHttpHeader().getContentLength()); + } } } @@ -1994,7 +2030,7 @@ public boolean doHandle(final FilterChainContext ctx, } // END PartsBodyHandler - private static final class FileBodyHandler implements BodyHandler { + private final class FileBodyHandler implements BodyHandler { // -------------------------------------------- Methods from BodyHandler @@ -2010,34 +2046,57 @@ public boolean doHandle(final FilterChainContext ctx, throws IOException { final File f = request.getFile(); - final FileInputStream fis = new FileInputStream(request.getFile()); - final MemoryManager mm = ctx.getMemoryManager(); - AtomicInteger written = new AtomicInteger(); - boolean last = false; requestPacket.setContentLengthLong(f.length()); - try { - for (byte[] buf = new byte[MAX_CHUNK_SIZE]; !last; ) { - Buffer b = null; - int read; - if ((read = fis.read(buf)) < 0) { - last = true; - b = Buffers.EMPTY_BUFFER; + final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); + if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { + final FileInputStream fis = new FileInputStream(request.getFile()); + final MemoryManager mm = ctx.getMemoryManager(); + AtomicInteger written = new AtomicInteger(); + boolean last = false; + try { + for (byte[] buf = new byte[MAX_CHUNK_SIZE]; !last; ) { + Buffer b = null; + int read; + if ((read = fis.read(buf)) < 0) { + last = true; + b = Buffers.EMPTY_BUFFER; + } + if (b != Buffers.EMPTY_BUFFER) { + written.addAndGet(read); + b = Buffers.wrap(mm, buf, 0, read); + } + + final HttpContent content = + requestPacket.httpContentBuilder().content(b). + last(last).build(); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); } - if (b != Buffers.EMPTY_BUFFER) { - written.addAndGet(read); - b = Buffers.wrap(mm, buf, 0, read); + } finally { + try { + fis.close(); + } catch (IOException ignored) { } - - final HttpContent content = - requestPacket.httpContentBuilder().content(b). - last(last).build(); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - } finally { - try { - fis.close(); - } catch (IOException ignored) { } + } else { + // write the headers + ctx.write(requestPacket, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + ctx.write(new FileTransfer(f), new EmptyCompletionHandler() { + + @Override + public void updated(WriteResult result) { + final AsyncHandler handler = context.handler; + if (handler != null) { + if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { + final long written = result.getWrittenSize(); + final long total = context.totalBodyWritten.addAndGet(written); + ((TransferCompletionHandler) handler).onContentWriteProgress( + written, + total, + requestPacket.getContentLength()); + } + } + } + }); } return true; diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java index bfd11ad848..14e56cc88e 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java @@ -28,4 +28,8 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); } + @Override + public void zeroCopyPostTest() throws Throwable { + super.zeroCopyPostTest(); //To change body of overridden methods use File | Settings | File Templates. + } } From 241dc364eaa7d94430b293c3226db14731477d31 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 16 Dec 2011 08:58:52 -0500 Subject: [PATCH 0026/2844] Fix broken build --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 6455e26177..b5078b8d19 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1081,7 +1081,7 @@ protected void onInitialLineParsed(HttpHeader httpHeader, } @Override - protected void onHttpError(final HttpHeader httpHeader, + protected void onHttpHeaderError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t) throws IOException { t.printStackTrace(); From f968567eb05f432341646866f40624802473617d Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 16 Dec 2011 10:07:15 -0500 Subject: [PATCH 0027/2844] Add documentation, improve design. No functional change. --- .../ning/http/client/websocket/WebSocket.java | 18 +++++ .../websocket/WebSocketByteListener.java | 7 ++ .../client/websocket/WebSocketListener.java | 15 ++++ .../websocket/WebSocketPingListener.java | 7 ++ .../websocket/WebSocketPongListener.java | 26 +++++++ .../websocket/WebSocketTextListener.java | 7 ++ .../websocket/WebSocketUpgradeHandler.java | 69 +++++++++++++++---- 7 files changed, 136 insertions(+), 13 deletions(-) create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index bdfa5a14a3..ee5ad42a29 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -17,11 +17,29 @@ */ public interface WebSocket { + /** + * Sen a byte message. + * @param message a byte message + * @return this + */ WebSocket sendMessage(byte[] message); + /** + * Send a text message + * @param message a text message + * @return this. + */ WebSocket sendTextMessage(String message); + /** + * Add a {@link WebSocketListener} + * @param l a {@link WebSocketListener} + * @return this + */ WebSocket addMessageListener(WebSocketListener l); + /** + * Close the WebSocket. + */ void close(); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java index cd02a6dff3..cafee7b0ea 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java @@ -12,8 +12,15 @@ */ package com.ning.http.client.websocket; +/** + * A {@link WebSocketListener} for bytes + */ public interface WebSocketByteListener extends WebSocketListener { + /** + * Invoked when bytes are available. + * @param message a byte array. + */ void onMessage(byte[] message); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java index 3755867b80..6149aeffca 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java @@ -12,12 +12,27 @@ */ package com.ning.http.client.websocket; +/** + * A generic {@link WebSocketListener} for WebSocket events. Use the appropriate listener for receiving message bytes. + */ public interface WebSocketListener { + /** + * Invoked when the {@link WebSocket} is open. + * @param websocket + */ void onOpen(WebSocket websocket); + /** + * Invoked when the {@link WebSocket} is close. + * @param websocket + */ void onClose(WebSocket websocket); + /** + * Invoked when the {@link WebSocket} is open. + * @param t a {@link Throwable} + */ void onError(Throwable t); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java index 27d2767088..adc3f82833 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java @@ -12,8 +12,15 @@ */ package com.ning.http.client.websocket; +/** + * A WebSocket's Ping Listener + */ public interface WebSocketPingListener extends WebSocketListener { + /** + * Invoked when a ping message is received + * @param message a byte array + */ void onPing(byte[] message); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java new file mode 100644 index 0000000000..6f398ce0ff --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +/** + * A WebSocket's Pong Listener + */ +public interface WebSocketPongListener extends WebSocketListener { + + /** + * Invoked when a pong message is received + * @param message a byte array + */ + void onPong(byte[] message); + +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java index f73d396957..544c0027cd 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java @@ -12,8 +12,15 @@ */ package com.ning.http.client.websocket; +/** + * A {@link WebSocketListener} for text message + */ public interface WebSocketTextListener extends WebSocketListener { + /** + * Invoked when WebSocket text message are received. + * @param message a {@link String} message + */ void onMessage(String message); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index 8a9dcfab7b..20a305dc12 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -23,7 +23,7 @@ import java.util.concurrent.atomic.AtomicBoolean; /** - * An {@link AsyncHandler} which is able to execute WebSocket upgrade. + * An {@link AsyncHandler} which is able to execute WebSocket upgrade. Use the Builder for configuring WebSocket options. */ public class WebSocketUpgradeHandler implements UpgradeHandler, AsyncHandler { @@ -41,18 +41,27 @@ private WebSocketUpgradeHandler(Builder b) { maxTextSize = b.maxTextSize; } + /** + * {@inheritDoc} + */ @Override - public void onThrowable(Throwable t) { + public final void onThrowable(Throwable t) { onFailure(t); } + /** + * {@inheritDoc} + */ @Override - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + public final STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { return STATE.CONTINUE; } + /** + * {@inheritDoc} + */ @Override - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + public final STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { if (responseStatus.getStatusCode() == 101) { return STATE.UPGRADE; } else { @@ -60,33 +69,45 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio } } + /** + * {@inheritDoc} + */ @Override - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + public final STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { return STATE.CONTINUE; } + /** + * {@inheritDoc} + */ @Override - public WebSocket onCompleted() throws Exception { + public final WebSocket onCompleted() throws Exception { if (webSocket == null) { throw new IllegalStateException("WebSocket is null"); } return webSocket; } + /** + * {@inheritDoc} + */ @Override - public void onSuccess(WebSocket webSocket) { + public final void onSuccess(WebSocket webSocket) { this.webSocket = webSocket; - for(WebSocketListener w: l) { + for (WebSocketListener w : l) { webSocket.addMessageListener(w); w.onOpen(webSocket); } ok.set(true); } + /** + * {@inheritDoc} + */ @Override - public void onFailure(Throwable t) { - for(WebSocketListener w: l) { - if (!ok.get()){ + public final void onFailure(Throwable t) { + for (WebSocketListener w : l) { + if (!ok.get()) { webSocket.addMessageListener(w); } w.onError(t); @@ -102,7 +123,7 @@ public final static class Builder { private long maxByteSize = 8192; private long maxTextSize = 8192; - /** + /** * Add a {@link WebSocketListener} that will be added to the {@link WebSocket} * * @param listener a {@link WebSocketListener} @@ -124,22 +145,44 @@ public Builder removeWebSocketListener(WebSocketListener listener) { return this; } + /** + * Set the WebSocket protocol. + * + * @param protocol the WebSocket protocol. + * @return this + */ public Builder setProtocol(String protocol) { this.protocol = protocol; return this; } + /** + * Set the max size of the WebSocket byte message that will be sent. + * + * @param maxByteSize max size of the WebSocket byte message + * @return this + */ public Builder setMaxByteSize(long maxByteSize) { this.maxByteSize = maxByteSize; return this; } + /** + * Set the max size of the WebSocket text message that will be sent. + * + * @param maxTextSize max size of the WebSocket byte message + * @return this + */ public Builder setMaxTextSize(long maxTextSize) { this.maxTextSize = maxTextSize; return this; } - public WebSocketUpgradeHandler build(){ + /** + * Build a {@link WebSocketUpgradeHandler} + * @return a {@link WebSocketUpgradeHandler} + */ + public WebSocketUpgradeHandler build() { return new WebSocketUpgradeHandler(this); } } From 50f03d6af1beb4d1498b9487e0f7aa9f276c1d71 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 16 Dec 2011 10:08:24 -0500 Subject: [PATCH 0028/2844] Bump Jetty Version to start using WebSocket --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 616ba37a92..9e919d973b 100644 --- a/pom.xml +++ b/pom.xml @@ -112,25 +112,25 @@ org.eclipse.jetty jetty-server - 7.1.4.v20100610 + 8.1.0.RC1 test org.eclipse.jetty jetty-servlet - 7.1.4.v20100610 + 8.1.0.RC1 test org.eclipse.jetty jetty-servlets - 7.1.4.v20100610 + 8.1.0.RC1 test org.eclipse.jetty jetty-security - 7.1.4.v20100610 + 8.1.0.RC1 test From d81c72dab05950ed11cdc095e31c7a11a49f062b Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 16 Dec 2011 13:46:44 -0500 Subject: [PATCH 0029/2844] Full support for websocket for Grizzly/Netty provider --- pom.xml | 6 + .../netty/NettyAsyncHttpProvider.java | 6 +- .../providers/netty/NettyWebSocket.java | 14 +- .../websocket/WebSocketUpgradeHandler.java | 1 - .../http/client/async/AuthTimeoutTest.java | 11 +- .../ning/http/client/async/BasicAuthTest.java | 18 +- .../http/client/async/DigestAuthTest.java | 9 +- .../client/websocket/AbstractBasicTest.java | 103 +++++++ .../client/websocket/ByteMessageTest.java | 191 +++++++++++++ .../client/websocket/TextMessageTest.java | 267 ++++++++++++++++++ .../grizzly/GrizzlyByteMessageText.java | 29 ++ .../grizzly/GrizzlyTextMessageText.java | 29 ++ .../websocket/netty/NettyByteMessageText.java | 26 ++ .../websocket/netty/NettyTextMessageText.java | 25 ++ 14 files changed, 717 insertions(+), 18 deletions(-) create mode 100644 src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/ByteMessageTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/TextMessageTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java create mode 100644 src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java create mode 100644 src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java create mode 100644 src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java diff --git a/pom.xml b/pom.xml index 9e919d973b..b0d78e364d 100644 --- a/pom.xml +++ b/pom.xml @@ -121,6 +121,12 @@ 8.1.0.RC1 test + + org.eclipse.jetty + jetty-websocket + 8.1.0.RC1 + test + org.eclipse.jetty jetty-servlets diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 71d7ca983c..90cefbf927 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2236,15 +2236,15 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { String accept = response.getHeader("Sec-WebSocket-Accept"); String key = WebSocketUtil.getAcceptKey(future.getNettyRequest().getHeader(WEBSOCKET_KEY)); - if (accept == null || !accept.equals(key) ) { + if (accept == null || !accept.equals(key)) { throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); } + ctx.getPipeline().replace("ws-decoder", "ws-decoder", new WebSocket08FrameDecoder(false, false)); + ctx.getPipeline().replace("ws-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); if (h.onHeadersReceived(new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this)) == STATE.CONTINUE) { h.onSuccess(new NettyWebSocket(ctx.getChannel())); } - ctx.getPipeline().replace("ws-decoder", "ws-decoder", new WebSocket08FrameDecoder(false,false)); - ctx.getPipeline().replace("ws-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); future.done(null); } else if (e.getMessage() instanceof WebSocketFrame) { final WebSocketFrame frame = (WebSocketFrame) e.getMessage(); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 8eccb9cc41..8957776f0d 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -13,6 +13,7 @@ package com.ning.http.client.providers.netty; import com.ning.http.client.providers.netty.netty4.BinaryWebSocketFrame; +import com.ning.http.client.providers.netty.netty4.TextWebSocketFrame; import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; @@ -42,11 +43,7 @@ public WebSocket sendMessage(byte[] message) { @Override public WebSocket sendTextMessage(String message) { - try { - channel.write(new BinaryWebSocketFrame(wrappedBuffer(message.getBytes("ISO-8859-1")))); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } + channel.write(new TextWebSocketFrame(message)); return this; } @@ -89,4 +86,11 @@ protected void onClose() { l.onClose(this); } } + + @Override + public String toString() { + return "NettyWebSocket{" + + "channel=" + channel + + '}'; + } } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index 20a305dc12..b5a0e4ef64 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -13,7 +13,6 @@ package com.ning.http.client.websocket; import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; diff --git a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java index 6f5fb4eb2a..eda2991303 100644 --- a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java @@ -20,7 +20,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; -import org.eclipse.jetty.http.security.Constraint; import org.eclipse.jetty.security.ConstraintMapping; import org.eclipse.jetty.security.ConstraintSecurityHandler; import org.eclipse.jetty.security.HashLoginService; @@ -31,6 +30,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.util.security.Constraint; import org.testng.annotations.Test; import javax.servlet.ServletException; @@ -38,8 +38,10 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; @@ -89,8 +91,11 @@ public void setUpServer(String auth) knownRoles.add(admin); ConstraintSecurityHandler security = new ConstraintSecurityHandler(); - - security.setConstraintMappings(new ConstraintMapping[]{mapping}, knownRoles); + + List cm = new ArrayList(); + cm.add(mapping); + + security.setConstraintMappings(cm, knownRoles); security.setAuthenticator(new BasicAuthenticator()); security.setLoginService(loginService); security.setStrict(false); diff --git a/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/src/test/java/com/ning/http/client/async/BasicAuthTest.java index 791e8ab9ed..bbdefbd3e7 100644 --- a/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/src/test/java/com/ning/http/client/async/BasicAuthTest.java @@ -30,7 +30,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; -import org.eclipse.jetty.http.security.Constraint; import org.eclipse.jetty.security.ConstraintMapping; import org.eclipse.jetty.security.ConstraintSecurityHandler; import org.eclipse.jetty.security.HashLoginService; @@ -42,6 +41,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.util.security.Constraint; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -53,8 +53,10 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.URL; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -102,12 +104,15 @@ public void setUpGlobal() throws Exception { mapping.setConstraint(constraint); mapping.setPathSpec("/*"); + List cm = new ArrayList(); + cm.add(mapping); + Set knownRoles = new HashSet(); knownRoles.add(user); knownRoles.add(admin); ConstraintSecurityHandler security = new ConstraintSecurityHandler(); - security.setConstraintMappings(new ConstraintMapping[]{mapping}, knownRoles); + security.setConstraintMappings(cm, knownRoles); security.setAuthenticator(new BasicAuthenticator()); security.setLoginService(loginService); security.setStrict(false); @@ -139,7 +144,8 @@ private String getFileContent(final File file) { if (in != null) { try { in.close(); - } catch (IOException ignored) {} + } catch (IOException ignored) { + } } } @@ -182,7 +188,11 @@ public void handle(String arg0, Request arg1, HttpServletRequest arg2, HttpServl super.handle(arg0, arg1, arg2, arg3); } }; - security.setConstraintMappings(new ConstraintMapping[]{mapping}, knownRoles); + + List cm = new ArrayList(); + cm.add(mapping); + + security.setConstraintMappings(cm, knownRoles); security.setAuthenticator(new DigestAuthenticator()); security.setLoginService(loginService); security.setStrict(true); diff --git a/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/src/test/java/com/ning/http/client/async/DigestAuthTest.java index 9753e4d922..6471174c1e 100644 --- a/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/src/test/java/com/ning/http/client/async/DigestAuthTest.java @@ -19,7 +19,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; -import org.eclipse.jetty.http.security.Constraint; import org.eclipse.jetty.security.ConstraintMapping; import org.eclipse.jetty.security.ConstraintSecurityHandler; import org.eclipse.jetty.security.HashLoginService; @@ -30,6 +29,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.util.security.Constraint; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,8 +37,10 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -82,12 +84,15 @@ public void setUpGlobal() throws Exception { mapping.setConstraint(constraint); mapping.setPathSpec("/*"); + List cm = new ArrayList(); + cm.add(mapping); + Set knownRoles = new HashSet(); knownRoles.add(user); knownRoles.add(admin); ConstraintSecurityHandler security = new ConstraintSecurityHandler(); - security.setConstraintMappings(new ConstraintMapping[]{mapping}, knownRoles); + security.setConstraintMappings(cm, knownRoles); security.setAuthenticator(new DigestAuthenticator()); security.setLoginService(loginService); security.setStrict(false); diff --git a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java new file mode 100644 index 0000000000..7959eabe2d --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.HandlerWrapper; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.websocket.WebSocketFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.ServerSocket; + +public abstract class AbstractBasicTest extends Server { + + public abstract class WebSocketHandler extends HandlerWrapper implements WebSocketFactory.Acceptor { + private final WebSocketFactory _webSocketFactory = new WebSocketFactory(this, 32 * 1024); + + public WebSocketFactory getWebSocketFactory() { + return _webSocketFactory; + } + + /* ------------------------------------------------------------ */ + @Override + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + if (_webSocketFactory.acceptWebSocket(request, response) || response.isCommitted()) + return; + super.handle(target, baseRequest, request, response); + } + + /* ------------------------------------------------------------ */ + public boolean checkOrigin(HttpServletRequest request, String origin) { + return true; + } + + } + + protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); + protected int port1; + SelectChannelConnector _connector; + + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws Exception { + stop(); + } + + protected int findFreePort() throws IOException { + ServerSocket socket = null; + + try { + socket = new ServerSocket(0); + + return socket.getLocalPort(); + } finally { + if (socket != null) { + socket.close(); + } + } + } + + protected String getTargetUrl() { + return String.format("ws://127.0.0.1:%d/", port1); + } + + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { + port1 = 8080; + _connector = new SelectChannelConnector(); + _connector.setPort(port1); + + addConnector(_connector); + WebSocketHandler _wsHandler = getWebSocketHandler(); + + setHandler(_wsHandler); + + start(); + log.info("Local HTTP server started successfully"); + } + + public abstract WebSocketHandler getWebSocketHandler() ; + + public abstract AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config); + +} diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java new file mode 100644 index 0000000000..e391f64093 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.netty.NettyWebSocket; +import org.testng.annotations.Test; + +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.util.Arrays; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +import static org.testng.Assert.assertEquals; + +public abstract class ByteMessageTest extends AbstractBasicTest { + + private final class EchoByteWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnBinaryMessage { + + private Connection connection; + + @Override + public void onOpen(Connection connection) { + this.connection = connection; + } + + @Override + public void onClose(int i, String s) { + connection.close(); + } + + @Override + public void onMessage(byte[] bytes, int i, int i1) { + try { + connection.sendMessage(bytes, i, i1); + } catch (IOException e) { + try { + connection.sendMessage("FAIL"); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + } + } + + @Override + public WebSocketHandler getWebSocketHandler() { + return new WebSocketHandler() { + @Override + public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { + return new EchoByteWebSocket(); + } + }; + } + + @Test + public void echoByte() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(new byte[0]); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { + } + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + text.set(message); + latch.countDown(); + } + }).build()).get(); + + websocket.sendMessage("ECHO".getBytes()); + + latch.await(); + assertEquals(text.get(), "ECHO".getBytes()); + } + + @Test + public void echoTwoMessagesTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(null); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { + } + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); + } + }).build()).get(); + + websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); + + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); + } + + @Test + public void echoOnOpenMessagesTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(null); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { + websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); + } + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java new file mode 100644 index 0000000000..ee4f2e27a6 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import org.testng.annotations.Test; + +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +import static org.testng.Assert.assertEquals; + +public abstract class TextMessageTest extends AbstractBasicTest { + + private final class EchoTextWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnTextMessage { + + private Connection connection; + + @Override + public void onOpen(Connection connection) { + this.connection = connection; + } + + @Override + public void onClose(int i, String s) { + connection.close(); + } + + @Override + public void onMessage(String s) { + try { + connection.sendMessage(s); + } catch (IOException e) { + try { + connection.sendMessage("FAIL"); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + } + } + + @Override + public WebSocketHandler getWebSocketHandler() { + return new WebSocketHandler() { + @Override + public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { + return new EchoTextWebSocket(); + } + }; + } + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + @Test(timeOut = 60000) + public void onOpen() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + + latch.await(); + assertEquals(text.get(), "OnOpen"); + } + + @Test(timeOut = 60000) + public void onClose() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnClose"); + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.close(); + + latch.await(); + assertEquals(text.get(), "OnClose"); + } + + @Test(timeOut = 60000) + public void echoText() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(message); + latch.countDown(); + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.sendTextMessage("ECHO"); + + latch.await(); + assertEquals(text.get(), "ECHO"); + } + + @Test(timeOut = 60000) + public void echoDoubleListenerText() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(message); + latch.countDown(); + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(text.get() + message); + latch.countDown(); + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.sendTextMessage("ECHO"); + + latch.await(); + assertEquals(text.get(), "ECHOECHO"); + } + + @Test + public void echoTwoMessagesTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(text.get() + message); + latch.countDown(); + } + + boolean t = false; + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + websocket.sendTextMessage("ECHO").sendTextMessage("ECHO"); + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "ECHOECHO"); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java new file mode 100644 index 0000000000..38f597e866 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.websocket.ByteMessageTest; + +public class GrizzlyByteMessageText extends ByteMessageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java new file mode 100644 index 0000000000..ccce7a2f4d --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.websocket.ByteMessageTest; + +public class GrizzlyTextMessageText extends ByteMessageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java new file mode 100644 index 0000000000..f81b70614c --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.async.ZeroCopyFileTest; +import com.ning.http.client.websocket.ByteMessageTest; + +public class NettyByteMessageText extends ByteMessageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java new file mode 100644 index 0000000000..564c681fa6 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.websocket.ByteMessageTest; + +public class NettyTextMessageText extends ByteMessageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } +} From 81a598e040cbba02f5d7734344c949326dbafa1a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 16 Dec 2011 14:10:42 -0500 Subject: [PATCH 0030/2844] Fix test due to bump in Jetty version --- .../ning/http/client/async/ProxyyTunnellingTest.java | 6 +++--- .../async/grizzly/GrizzlyAsyncProviderBasicTest.java | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java index 6fb2198843..1459a9c6f3 100644 --- a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java +++ b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java @@ -111,7 +111,7 @@ public Response onCompleted(Response response) throws Exception { }); Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(7.1.4.v20100610)"); + assertEquals(r.getHeader("server"), "Jetty(8.1.0.RC1)"); asyncHttpClient.close(); } @@ -142,7 +142,7 @@ public Response onCompleted(Response response) throws Exception { }); Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(7.1.4.v20100610)"); + assertEquals(r.getHeader("server"), "Jetty(8.1.0.RC1)"); asyncHttpClient.close(); } @@ -162,7 +162,7 @@ public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, Response r = client.get().get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(7.1.4.v20100610)"); + assertEquals(r.getHeader("server"), "Jetty(8.1.0.RC1)"); client.close(); } diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java index 6c68ff867a..6e6b88d67a 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -16,6 +16,8 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.Response; import com.ning.http.client.async.AsyncProvidersBasicTest; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig; @@ -23,8 +25,14 @@ import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; +import static org.testng.Assert.assertEquals; public class GrizzlyAsyncProviderBasicTest extends AsyncProvidersBasicTest { @@ -49,4 +57,8 @@ public void customize(TCPNIOTransport transport, FilterChainBuilder builder) { }); return config; } + + @Test(groups = {"standalone", "default_provider", "async"}, enabled = false) + public void asyncDoPostBasicGZIPTest() throws Throwable { + } } From 0e62c92351540eca1eedf661721fb04d8bea7f7e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 16 Dec 2011 13:47:50 -0800 Subject: [PATCH 0031/2844] Remove any previous auth headers. --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 5441655412..9b30636baa 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1442,12 +1442,14 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, .parseWWWAuthenticateHeader(auth) .build(); if (auth.toLowerCase().startsWith("basic")) { + req.getHeaders().remove(Header.Authorization.toString()); try { req.getHeaders().add(Header.Authorization.toString(), AuthenticatorUtils.computeBasicAuthentication(realm)); } catch (UnsupportedEncodingException ignored) { } } else if (auth.toLowerCase().startsWith("digest")) { + req.getHeaders().remove(Header.Authorization.toString()); try { req.getHeaders().add(Header.Authorization.toString(), AuthenticatorUtils.computeDigestAuthentication(realm)); From 089f56842b7dbf95668a9ce6ff52e4c3aee4dba8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 16 Dec 2011 14:27:03 -0800 Subject: [PATCH 0032/2844] Update redirect handling to support per-request configuration. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 9b30636baa..65cacbf7e3 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1054,14 +1054,12 @@ private static final class AsyncHttpClientEventFilter extends HttpClientFilter { this.provider = provider; HANDLER_MAP.put(HttpStatus.UNAUTHORIZED_401.getStatusCode(), AuthorizationHandler.INSTANCE); - if (provider.clientConfig.isRedirectEnabled()) { - HANDLER_MAP.put(HttpStatus.MOVED_PERMANENTLY_301.getStatusCode(), - RedirectHandler.INSTANCE); - HANDLER_MAP.put(HttpStatus.FOUND_302.getStatusCode(), - RedirectHandler.INSTANCE); - HANDLER_MAP.put(HttpStatus.TEMPORARY_REDIRECT_307.getStatusCode(), - RedirectHandler.INSTANCE); - } + HANDLER_MAP.put(HttpStatus.MOVED_PERMANENTLY_301.getStatusCode(), + RedirectHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.FOUND_302.getStatusCode(), + RedirectHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.TEMPORARY_REDIRECT_307.getStatusCode(), + RedirectHandler.INSTANCE); } @@ -1156,6 +1154,11 @@ protected void onInitialLineParsed(HttpHeader httpHeader, if (HANDLER_MAP.containsKey(status)) { context.statusHandler = HANDLER_MAP.get(status); } + if (context.statusHandler instanceof RedirectHandler) { + if (!isRedirectAllowed(context)) { + context.statusHandler = null; + } + } } if (isRedirectAllowed(context)) { if (isRedirect(status)) { @@ -1347,6 +1350,9 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c private static boolean isRedirectAllowed(final HttpTransactionContext ctx) { boolean allowed = ctx.request.isRedirectEnabled(); + if (ctx.request.isRedirectOverrideSet()) { + return allowed; + } if (!allowed) { allowed = ctx.redirectsAllowed; } From e1d67a0d95bc33227e40fb43cf9d8e733548031b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Sat, 17 Dec 2011 18:37:33 -0800 Subject: [PATCH 0033/2844] - add fragment support to listener interfaces Grizzly provide now passes latest autobahn WS client test suite. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 23 ++++++++++++------- .../websocket/WebSocketByteListener.java | 9 ++++++++ .../websocket/WebSocketTextListener.java | 8 +++++++ .../client/websocket/ByteMessageTest.java | 12 ++++++++++ .../client/websocket/TextMessageTest.java | 16 +++++++++++++ 5 files changed, 60 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 65cacbf7e3..315a141c10 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -42,6 +42,7 @@ import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketPingListener; +import com.ning.http.client.websocket.WebSocketPongListener; import com.ning.http.client.websocket.WebSocketTextListener; import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartRequestEntity; @@ -870,7 +871,7 @@ private boolean sendAsGrizzlyRequest(final Request request, requestPacket = builder.build(); } requestPacket.setSecure(true); - if (!useProxy) { + if (!useProxy && !httpCtx.isWSRequest) { addQueryString(request, requestPacket); } addHeaders(request, requestPacket); @@ -1301,8 +1302,8 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, ws.onConnect(); context.webSocket = new GrizzlyWebSocketAdapter(ws); WebSocketEngine.getEngine().setWebSocketHolder(ctx.getConnection(), - context.protocolHandler, - ws); + context.protocolHandler, + ws); ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); context.result(handler.onCompleted()); } catch (Exception e) { @@ -2596,8 +2597,8 @@ public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataF } @Override - public void onConnect(org.glassfish.grizzly.websockets.WebSocket webSocket) { - // no-op + public void onConnect(org.glassfish.grizzly.websockets.WebSocket gWebSocket) { + ahcListener.onOpen(webSocket); } @Override @@ -2623,17 +2624,23 @@ public void onPing(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] @Override public void onPong(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - // no-op + if (WebSocketPongListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketPongListener.class.cast(ahcListener).onPong(bytes); + } } @Override public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean b) { - // no-op + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onFragment(s, b); + } } @Override public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean b) { - // no-op + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, b); + } } } // END AHCWebSocketListenerAdapter diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java index cafee7b0ea..cd75be791a 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java @@ -23,4 +23,13 @@ public interface WebSocketByteListener extends WebSocketListener { */ void onMessage(byte[] message); + + /** + * Invoked when bytes of a fragmented message are available. + * + * @param fragment byte[] fragment. + * @param last if this fragment is the last in the series. + */ + void onFragment(byte[] fragment, boolean last); + } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java index 544c0027cd..ae8a2e6fdc 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java @@ -23,4 +23,12 @@ public interface WebSocketTextListener extends WebSocketListener { */ void onMessage(String message); + /** + * Invoked when WebSocket text fragments are received. + * + * @param fragment text fragment + * @param last if this fragment is the last of the series. + */ + void onFragment(String fragment, boolean last); + } diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index e391f64093..82469205bf 100644 --- a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -94,6 +94,10 @@ public void onMessage(byte[] message) { text.set(message); latch.countDown(); } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } }).build()).get(); websocket.sendMessage("ECHO".getBytes()); @@ -138,6 +142,10 @@ public void onMessage(byte[] message) { } latch.countDown(); } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } }).build()).get(); websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); @@ -183,6 +191,10 @@ public void onMessage(byte[] message) { } latch.countDown(); } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } }).build()).get(); latch.await(); diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index ee4f2e27a6..9494896bdc 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -146,6 +146,10 @@ public void onMessage(String message) { latch.countDown(); } + @Override + public void onFragment(String fragment, boolean last) { + } + @Override public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { } @@ -183,6 +187,10 @@ public void onMessage(String message) { latch.countDown(); } + @Override + public void onFragment(String fragment, boolean last) { + } + @Override public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { } @@ -205,6 +213,10 @@ public void onMessage(String message) { latch.countDown(); } + @Override + public void onFragment(String fragment, boolean last) { + } + @Override public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { } @@ -242,6 +254,10 @@ public void onMessage(String message) { latch.countDown(); } + @Override + public void onFragment(String fragment, boolean last) { + } + boolean t = false; @Override From c5daf9cafb43ca259f695bd6c1e9268799457e6b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 20 Dec 2011 07:25:40 -0800 Subject: [PATCH 0034/2844] Fix Grizzly provider compilation error due to 2.2 API changes. Add websocket idle timeout. --- .../http/client/AsyncHttpClientConfig.java | 13 ++++ .../grizzly/GrizzlyAsyncHttpProvider.java | 65 +++++++++++++------ .../grizzly/GrizzlyConnectionsPool.java | 9 +-- .../grizzly/GrizzlyResponseFuture.java | 7 +- .../GrizzlyAsyncProviderBasicTest.java | 6 ++ 5 files changed, 68 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index aca9e69fa4..7528c78c39 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -56,6 +56,7 @@ public class AsyncHttpClientConfig { protected int maxTotalConnections; protected int maxConnectionPerHost; protected int connectionTimeOutInMs; + protected int webSocketTimeoutInMs; protected int idleConnectionInPoolTimeoutInMs; protected int idleConnectionTimeoutInMs; protected int requestTimeoutInMs; @@ -89,6 +90,7 @@ protected AsyncHttpClientConfig() { private AsyncHttpClientConfig(int maxTotalConnections, int maxConnectionPerHost, int connectionTimeOutInMs, + int webSocketTimeoutInMs, int idleConnectionInPoolTimeoutInMs, int idleConnectionTimeoutInMs, int requestTimeoutInMs, @@ -118,6 +120,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.maxTotalConnections = maxTotalConnections; this.maxConnectionPerHost = maxConnectionPerHost; this.connectionTimeOutInMs = connectionTimeOutInMs; + this.webSocketTimeoutInMs = webSocketTimeoutInMs; this.idleConnectionInPoolTimeoutInMs = idleConnectionInPoolTimeoutInMs; this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; this.requestTimeoutInMs = requestTimeoutInMs; @@ -187,6 +190,14 @@ public int getConnectionTimeoutInMs() { return connectionTimeOutInMs; } + /** + * Return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} connection may be idle before being timed out. + * @return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} connection may be idle before being timed out. + */ + public int getWebSocketTimeoutInMs() { + return webSocketTimeoutInMs; + } + /** * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. * @@ -452,6 +463,7 @@ public static class Builder { private int defaultMaxTotalConnections = Integer.getInteger(ASYNC_CLIENT + "defaultMaxTotalConnections", -1); private int defaultMaxConnectionPerHost = Integer.getInteger(ASYNC_CLIENT + "defaultMaxConnectionsPerHost", -1); private int defaultConnectionTimeOutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultConnectionTimeoutInMS", 60 * 1000); + private int defaultWebsocketTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultWebsocketTimoutInMS", 15 * 60 * 1000); private int defaultIdleConnectionInPoolTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionInPoolTimeoutInMS", 60 * 1000); private int defaultIdleConnectionTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionTimeoutInMS", 60 * 1000); private int defaultRequestTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultRequestTimeoutInMS", 60 * 1000); @@ -957,6 +969,7 @@ public AsyncHttpClientConfig build() { return new AsyncHttpClientConfig(defaultMaxTotalConnections, defaultMaxConnectionPerHost, defaultConnectionTimeOutInMs, + defaultWebsocketTimeoutInMs, defaultIdleConnectionInPoolTimeoutInMs, defaultIdleConnectionTimeoutInMs, defaultRequestTimeoutInMs, diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 315a141c10..fd313ff021 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -122,6 +122,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.Callable; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Semaphore; @@ -129,6 +130,7 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; @@ -1136,13 +1138,8 @@ protected void onInitialLineParsed(HttpHeader httpHeader, provider.getHttpTransactionContext(ctx.getConnection()); final int status = ((HttpResponsePacket) httpHeader).getStatus(); if (HttpStatus.CONINTUE_100.statusMatches(status)) { - try { - ctx.notifyUpstream(new ContinueEvent(context)); - return; - } catch (IOException e) { - httpHeader.setSkipRemainder(true); - context.abort(e); - } + ctx.notifyUpstream(new ContinueEvent(context)); + return; } if (context.statusHandler != null && !context.statusHandler.handlesStatus(status)) { @@ -1305,6 +1302,12 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, context.protocolHandler, ws); ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); + final int wsTimeout = context.provider.clientConfig.getWebSocketTimeoutInMs(); + IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), + ((wsTimeout <= 0) + ? IdleTimeoutFilter.FOREVER + : wsTimeout), + TimeUnit.MILLISECONDS); context.result(handler.onCompleted()); } catch (Exception e) { httpHeader.setSkipRemainder(true); @@ -1371,10 +1374,7 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx, context.abort(new IOException("Maximum pooled connections exceeded")); } else { if (!context.provider.connectionManager.returnConnection(context.requestUrl, c)) { - try { - ctx.getConnection().close().markForRecycle(true); - } catch (IOException ignored) { - } + ctx.getConnection().close().markForRecycle(true); } } @@ -2271,7 +2271,7 @@ void doAsyncConnect(final String url, String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, requestFuture, connectHandler)); + createConnectionCompletionHandler(request, requestFuture, null, null, connectHandler)); } @@ -2288,18 +2288,27 @@ private Connection obtainConnection0(final String url, String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); + final AtomicReference connectionRef = + new AtomicReference(); + final CountDownLatch latch = new CountDownLatch(1); if (cTimeout > 0) { - return connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, - requestFuture, - null)).get(cTimeout, TimeUnit.MILLISECONDS); + connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), + createConnectionCompletionHandler(request, + requestFuture, + connectionRef, + latch, + null)); + latch.await(cTimeout, TimeUnit.MILLISECONDS); } else { - return connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, - requestFuture, - null)).get(); + connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), + createConnectionCompletionHandler(request, + requestFuture, + connectionRef, + null, + null)); + latch.await(); } - + return connectionRef.get(); } private ProxyServer getProxyServer(Request request) { @@ -2340,6 +2349,8 @@ void destroy() { CompletionHandler createConnectionCompletionHandler(final Request request, final GrizzlyResponseFuture future, + final AtomicReference connectionReference, + final CountDownLatch latch, final CompletionHandler wrappedHandler) { return new CompletionHandler() { public void cancelled() { @@ -2348,6 +2359,9 @@ public void cancelled() { } else { future.cancel(true); } + if (latch != null) { + latch.countDown(); + } } public void failed(Throwable throwable) { @@ -2356,6 +2370,9 @@ public void failed(Throwable throwable) { } else { future.abort(throwable); } + if (latch != null) { + latch.countDown(); + } } public void completed(Connection connection) { @@ -2365,6 +2382,12 @@ public void completed(Connection connection) { connection.addCloseListener(connectionMonitor); wrappedHandler.completed(connection); } + if (connectionReference != null) { + connectionReference.set(connection); + } + if (latch != null) { + latch.countDown(); + } } public void updated(Connection result) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index c03999bd74..94f5a6bf6c 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -410,13 +410,10 @@ boolean isEmpty() { } void destroy() { - try { - for (Connection c : queue) { - c.close().markForRecycle(true); - } - queue.clear(); - } catch (IOException ignored) { + for (Connection c : queue) { + c.close().markForRecycle(true); } + queue.clear(); queues.remove(this); } diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java index 987b46ac42..b1da7b6f9e 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java @@ -182,11 +182,8 @@ void setDelegate(final FutureImpl delegate) { private void closeConnection() { - try { - if (connection != null && !connection.isOpen()) { - connection.close().markForRecycle(true); - } - } catch (IOException ignored) { + if (connection != null && !connection.isOpen()) { + connection.close().markForRecycle(true); } } diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java index 6e6b88d67a..aabccc9349 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -45,6 +45,12 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); } + @Override + @Test + public void asyncHeaderPOSTTest() throws Throwable { + super.asyncHeaderPOSTTest(); //To change body of overridden methods use File | Settings | File Templates. + } + @Override protected AsyncHttpProviderConfig getProviderConfig() { final GrizzlyAsyncHttpProviderConfig config = new GrizzlyAsyncHttpProviderConfig(); From fdcb3f5d7d24328d849d1b375aa37e3608740ee7 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 20 Dec 2011 07:43:34 -0800 Subject: [PATCH 0035/2844] Rename ws timeout attribute to include the term idle. --- .../http/client/AsyncHttpClientConfig.java | 28 +++++++++++++------ .../grizzly/GrizzlyAsyncHttpProvider.java | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 7528c78c39..4086cc8e76 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -56,7 +56,7 @@ public class AsyncHttpClientConfig { protected int maxTotalConnections; protected int maxConnectionPerHost; protected int connectionTimeOutInMs; - protected int webSocketTimeoutInMs; + protected int webSocketIdleTimeoutInMs; protected int idleConnectionInPoolTimeoutInMs; protected int idleConnectionTimeoutInMs; protected int requestTimeoutInMs; @@ -120,7 +120,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.maxTotalConnections = maxTotalConnections; this.maxConnectionPerHost = maxConnectionPerHost; this.connectionTimeOutInMs = connectionTimeOutInMs; - this.webSocketTimeoutInMs = webSocketTimeoutInMs; + this.webSocketIdleTimeoutInMs = webSocketTimeoutInMs; this.idleConnectionInPoolTimeoutInMs = idleConnectionInPoolTimeoutInMs; this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; this.requestTimeoutInMs = requestTimeoutInMs; @@ -191,11 +191,11 @@ public int getConnectionTimeoutInMs() { } /** - * Return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} connection may be idle before being timed out. - * @return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} connection may be idle before being timed out. + * Return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} may be idle before being timed out. + * @return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} may be idle before being timed out. */ - public int getWebSocketTimeoutInMs() { - return webSocketTimeoutInMs; + public int getWebSocketIdleTimeoutInMs() { + return webSocketIdleTimeoutInMs; } /** @@ -463,7 +463,7 @@ public static class Builder { private int defaultMaxTotalConnections = Integer.getInteger(ASYNC_CLIENT + "defaultMaxTotalConnections", -1); private int defaultMaxConnectionPerHost = Integer.getInteger(ASYNC_CLIENT + "defaultMaxConnectionsPerHost", -1); private int defaultConnectionTimeOutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultConnectionTimeoutInMS", 60 * 1000); - private int defaultWebsocketTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultWebsocketTimoutInMS", 15 * 60 * 1000); + private int defaultWebsocketIdleTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultWebsocketTimoutInMS", 15 * 60 * 1000); private int defaultIdleConnectionInPoolTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionInPoolTimeoutInMS", 60 * 1000); private int defaultIdleConnectionTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionTimeoutInMS", 60 * 1000); private int defaultRequestTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultRequestTimeoutInMS", 60 * 1000); @@ -540,6 +540,18 @@ public Builder setConnectionTimeoutInMs(int defaultConnectionTimeOutInMs) { return this; } + /** + * Set the maximum time in millisecond an {@link com.ning.http.client.websocket.WebSocket} can stay idle. + * + * @param defaultWebSocketIdleTimeoutInMs + * the maximum time in millisecond an {@link com.ning.http.client.websocket.WebSocket} can stay idle. + * @return a {@link Builder} + */ + public Builder setWebSocketIdleTimeoutInMs(int defaultWebSocketIdleTimeoutInMs) { + this.defaultWebsocketIdleTimeoutInMs = defaultWebSocketIdleTimeoutInMs; + return this; + } + /** * Set the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. * @@ -969,7 +981,7 @@ public AsyncHttpClientConfig build() { return new AsyncHttpClientConfig(defaultMaxTotalConnections, defaultMaxConnectionPerHost, defaultConnectionTimeOutInMs, - defaultWebsocketTimeoutInMs, + defaultWebsocketIdleTimeoutInMs, defaultIdleConnectionInPoolTimeoutInMs, defaultIdleConnectionTimeoutInMs, defaultRequestTimeoutInMs, diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index fd313ff021..ed86da291b 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1302,7 +1302,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, context.protocolHandler, ws); ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); - final int wsTimeout = context.provider.clientConfig.getWebSocketTimeoutInMs(); + final int wsTimeout = context.provider.clientConfig.getWebSocketIdleTimeoutInMs(); IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), ((wsTimeout <= 0) ? IdleTimeoutFilter.FOREVER From 012e5f76ad6096ce6d68eaad53034100ec2cd63e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 20 Dec 2011 13:59:33 -0800 Subject: [PATCH 0036/2844] Use Grizzly 2.2 final. --- pom.xml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 8cb88b486d..c3a755ac94 100644 --- a/pom.xml +++ b/pom.xml @@ -450,22 +450,10 @@ org.glassfish.grizzly grizzly-websockets - 2.2-SNAPSHOT + 2.2 true - - - jvnet-nexus-snapshots - https://maven.java.net/content/repositories/snapshots - - false - - - true - - - release-sign-artifacts From e742eb33ab9a201502d83f5cd8b9df76bffe9381 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 09:19:59 -0500 Subject: [PATCH 0037/2844] Fix merge clash that removed that line --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 9726073dde..ba96e019eb 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2089,7 +2089,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectEnabled() ? true : config.isRedirectEnabled(); + boolean redirectEnabled = request.isRedirectOverrideSet()? request.isRedirectEnabled() : config.isRedirectEnabled(); if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { From 5628054abd667ce40d26daaab69c2a1188fce3e8 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 09:59:39 -0500 Subject: [PATCH 0038/2844] Port pull request https://github.com/sonatype/async-http-client/commit/8db5ea0c1d3ac4fb998b3d071b0c549816b4e356 --- src/main/java/com/ning/http/client/Realm.java | 24 +++++++++++++++++-- .../netty/NettyAsyncHttpProvider.java | 5 ++-- .../ning/http/util/AuthenticatorUtils.java | 2 ++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ning/http/client/Realm.java b/src/main/java/com/ning/http/client/Realm.java index 0135e53322..07c84bfa3a 100644 --- a/src/main/java/com/ning/http/client/Realm.java +++ b/src/main/java/com/ning/http/client/Realm.java @@ -37,6 +37,7 @@ public class Realm { private final String nonce; private final String algorithm; private final String response; + private final String opaque; private final String qop; private final String nc; private final String cnonce; @@ -71,7 +72,8 @@ private Realm(AuthScheme scheme, String uri, String method, boolean usePreemptiveAuth, - String domain, String enc, String host, boolean messageType2Received) { + String domain, String enc, String host, boolean messageType2Received, + String opaque) { this.principal = principal; this.password = password; @@ -80,6 +82,7 @@ private Realm(AuthScheme scheme, this.nonce = nonce; this.algorithm = algorithm; this.response = response; + this.opaque = opaque; this.qop = qop; this.nc = nc; this.cnonce = cnonce; @@ -125,6 +128,10 @@ public String getResponse() { return response; } + public String getOpaque() { + return opaque; + } + public String getQop() { return qop; } @@ -265,6 +272,7 @@ public static class RealmBuilder { private String nonce = ""; private String algorithm = "MD5"; private String response = ""; + private String opaque = ""; private String qop = "auth"; private String nc = "00000001"; private String cnonce = ""; @@ -369,6 +377,15 @@ public RealmBuilder setResponse(String response) { return this; } + public String getOpaque() { + return this.opaque; + } + + public RealmBuilder setOpaque(String opaque) { + this.opaque = opaque; + return this; + } + public String getQop() { return qop; } @@ -418,6 +435,7 @@ public RealmBuilder parseWWWAuthenticateHeader(String headerLine) { setRealmName(match(headerLine, "realm")); setNonce(match(headerLine, "nonce")); setAlgorithm(match(headerLine, "algorithm")); + setOpaque(match(headerLine, "opaque")); setQop(match(headerLine, "qop")); if (getNonce() != null && !getNonce().equalsIgnoreCase("")) { setScheme(AuthScheme.DIGEST); @@ -441,6 +459,7 @@ public RealmBuilder clone(Realm clone) { setPassword(clone.getPassword()); setPrincipal(clone.getPrincipal()); setEnconding(clone.getEncoding()); + setOpaque(clone.getOpaque()); setQop(clone.getQop()); setScheme(clone.getScheme()); setUri(clone.getUri()); @@ -585,7 +604,8 @@ public Realm build() { domain, enc, host, - messageType2Received); + messageType2Received, + opaque); } } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index ba96e019eb..12cc315fdd 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2014,7 +2014,8 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws .build(); } - final Realm nr = newRealm; + final Realm nr = new Realm.RealmBuilder().clone(newRealm) + .setUri(request.getUrl()).build(); log.debug("Sending authentication to {}", request.getUrl()); AsyncCallable ac = new AsyncCallable(future) { @@ -2089,7 +2090,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectOverrideSet()? request.isRedirectEnabled() : config.isRedirectEnabled(); + boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { diff --git a/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/src/main/java/com/ning/http/util/AuthenticatorUtils.java index 56c88a3888..d98e916577 100644 --- a/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/src/main/java/com/ning/http/util/AuthenticatorUtils.java @@ -40,6 +40,8 @@ public static String computeDigestAuthentication(Realm realm) throws NoSuchAlgor builder.append("algorithm").append('=').append(realm.getAlgorithm()).append(", "); construct(builder, "response", realm.getResponse()); + if (realm.getOpaque() != null && realm.getOpaque() != null && realm.getOpaque().equals("") == false) + construct(builder, "opaque", realm.getOpaque()); builder.append("qop").append('=').append(realm.getQop()).append(", "); builder.append("nc").append('=').append(realm.getNc()).append(", "); construct(builder, "cnonce", realm.getCnonce(), true); From edd767d2591166ffae60e8c9893ea17963be8823 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 10:46:05 -0500 Subject: [PATCH 0039/2844] [maven-release-plugin] prepare release async-http-client-1.7.0-RC1 --- pom.xml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index c3a755ac94..9e4a759db0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,5 @@ - + org.sonatype.oss oss-parent @@ -10,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.0-SNAPSHOT + 1.7.0-RC1 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and @@ -389,12 +388,9 @@ - - - + + + From 76734ff694e6bcbee513f23c7c5bf9803bcfb084 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 10:46:10 -0500 Subject: [PATCH 0040/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9e4a759db0..84c5ef2a1b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.0-RC1 + 1.7.0-RC2-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 53c25a4e2f8a6db78a15ac38b3d2302de738a935 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 21 Dec 2011 09:46:42 -0800 Subject: [PATCH 0041/2844] Fix NPE introduced by api-induced refactoring. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 43 +++++-------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index ed86da291b..7ec1490ff6 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -76,6 +76,7 @@ import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.Protocol; +import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.http.util.CookieSerializerUtils; import org.glassfish.grizzly.http.util.DataChunk; @@ -94,6 +95,7 @@ import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy; import org.glassfish.grizzly.utils.BufferOutputStream; import org.glassfish.grizzly.utils.DelayedExecutor; +import org.glassfish.grizzly.utils.Futures; import org.glassfish.grizzly.utils.IdleTimeoutFilter; import org.glassfish.grizzly.websockets.DataFrame; import org.glassfish.grizzly.websockets.DefaultWebSocket; @@ -122,7 +124,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.Callable; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Semaphore; @@ -130,7 +131,6 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; @@ -2271,7 +2271,7 @@ void doAsyncConnect(final String url, String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, requestFuture, null, null, connectHandler)); + createConnectionCompletionHandler(request, requestFuture, connectHandler)); } @@ -2288,27 +2288,18 @@ private Connection obtainConnection0(final String url, String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); - final AtomicReference connectionRef = - new AtomicReference(); - final CountDownLatch latch = new CountDownLatch(1); + FutureImpl future = Futures.createSafeFuture(); + CompletionHandler ch = Futures.toCompletionHandler(future, + createConnectionCompletionHandler(request, requestFuture, null)); if (cTimeout > 0) { connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, - requestFuture, - connectionRef, - latch, - null)); - latch.await(cTimeout, TimeUnit.MILLISECONDS); + ch); + return future.get(cTimeout, TimeUnit.MILLISECONDS); } else { connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, - requestFuture, - connectionRef, - null, - null)); - latch.await(); + ch); + return future.get(); } - return connectionRef.get(); } private ProxyServer getProxyServer(Request request) { @@ -2349,8 +2340,6 @@ void destroy() { CompletionHandler createConnectionCompletionHandler(final Request request, final GrizzlyResponseFuture future, - final AtomicReference connectionReference, - final CountDownLatch latch, final CompletionHandler wrappedHandler) { return new CompletionHandler() { public void cancelled() { @@ -2359,9 +2348,6 @@ public void cancelled() { } else { future.cancel(true); } - if (latch != null) { - latch.countDown(); - } } public void failed(Throwable throwable) { @@ -2370,9 +2356,6 @@ public void failed(Throwable throwable) { } else { future.abort(throwable); } - if (latch != null) { - latch.countDown(); - } } public void completed(Connection connection) { @@ -2382,12 +2365,6 @@ public void completed(Connection connection) { connection.addCloseListener(connectionMonitor); wrappedHandler.completed(connection); } - if (connectionReference != null) { - connectionReference.set(connection); - } - if (latch != null) { - latch.countDown(); - } } public void updated(Connection result) { From 44866b8d4e01e7ab634cc17808e151ecd1785da0 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 21 Dec 2011 09:46:42 -0800 Subject: [PATCH 0042/2844] Fix NPE introduced by api-induced refactoring. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 43 +++++-------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index ed86da291b..7ec1490ff6 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -76,6 +76,7 @@ import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.Protocol; +import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.http.util.CookieSerializerUtils; import org.glassfish.grizzly.http.util.DataChunk; @@ -94,6 +95,7 @@ import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy; import org.glassfish.grizzly.utils.BufferOutputStream; import org.glassfish.grizzly.utils.DelayedExecutor; +import org.glassfish.grizzly.utils.Futures; import org.glassfish.grizzly.utils.IdleTimeoutFilter; import org.glassfish.grizzly.websockets.DataFrame; import org.glassfish.grizzly.websockets.DefaultWebSocket; @@ -122,7 +124,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.Callable; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Semaphore; @@ -130,7 +131,6 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; @@ -2271,7 +2271,7 @@ void doAsyncConnect(final String url, String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, requestFuture, null, null, connectHandler)); + createConnectionCompletionHandler(request, requestFuture, connectHandler)); } @@ -2288,27 +2288,18 @@ private Connection obtainConnection0(final String url, String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); - final AtomicReference connectionRef = - new AtomicReference(); - final CountDownLatch latch = new CountDownLatch(1); + FutureImpl future = Futures.createSafeFuture(); + CompletionHandler ch = Futures.toCompletionHandler(future, + createConnectionCompletionHandler(request, requestFuture, null)); if (cTimeout > 0) { connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, - requestFuture, - connectionRef, - latch, - null)); - latch.await(cTimeout, TimeUnit.MILLISECONDS); + ch); + return future.get(cTimeout, TimeUnit.MILLISECONDS); } else { connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, - requestFuture, - connectionRef, - null, - null)); - latch.await(); + ch); + return future.get(); } - return connectionRef.get(); } private ProxyServer getProxyServer(Request request) { @@ -2349,8 +2340,6 @@ void destroy() { CompletionHandler createConnectionCompletionHandler(final Request request, final GrizzlyResponseFuture future, - final AtomicReference connectionReference, - final CountDownLatch latch, final CompletionHandler wrappedHandler) { return new CompletionHandler() { public void cancelled() { @@ -2359,9 +2348,6 @@ public void cancelled() { } else { future.cancel(true); } - if (latch != null) { - latch.countDown(); - } } public void failed(Throwable throwable) { @@ -2370,9 +2356,6 @@ public void failed(Throwable throwable) { } else { future.abort(throwable); } - if (latch != null) { - latch.countDown(); - } } public void completed(Connection connection) { @@ -2382,12 +2365,6 @@ public void completed(Connection connection) { connection.addCloseListener(connectionMonitor); wrappedHandler.completed(connection); } - if (connectionReference != null) { - connectionReference.set(connection); - } - if (latch != null) { - latch.countDown(); - } } public void updated(Connection result) { From 57daba1cdfd414b888244abb20d72119854f58bb Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 09:19:59 -0500 Subject: [PATCH 0043/2844] Fix merge clash that removed that line --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 9726073dde..ba96e019eb 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2089,7 +2089,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectEnabled() ? true : config.isRedirectEnabled(); + boolean redirectEnabled = request.isRedirectOverrideSet()? request.isRedirectEnabled() : config.isRedirectEnabled(); if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { From 70763fbeb7faa7ebc5e6cdf7e93438fd3e069056 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 09:59:39 -0500 Subject: [PATCH 0044/2844] Port pull request https://github.com/sonatype/async-http-client/commit/8db5ea0c1d3ac4fb998b3d071b0c549816b4e356 --- src/main/java/com/ning/http/client/Realm.java | 24 +++++++++++++++++-- .../netty/NettyAsyncHttpProvider.java | 5 ++-- .../ning/http/util/AuthenticatorUtils.java | 2 ++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ning/http/client/Realm.java b/src/main/java/com/ning/http/client/Realm.java index 0135e53322..07c84bfa3a 100644 --- a/src/main/java/com/ning/http/client/Realm.java +++ b/src/main/java/com/ning/http/client/Realm.java @@ -37,6 +37,7 @@ public class Realm { private final String nonce; private final String algorithm; private final String response; + private final String opaque; private final String qop; private final String nc; private final String cnonce; @@ -71,7 +72,8 @@ private Realm(AuthScheme scheme, String uri, String method, boolean usePreemptiveAuth, - String domain, String enc, String host, boolean messageType2Received) { + String domain, String enc, String host, boolean messageType2Received, + String opaque) { this.principal = principal; this.password = password; @@ -80,6 +82,7 @@ private Realm(AuthScheme scheme, this.nonce = nonce; this.algorithm = algorithm; this.response = response; + this.opaque = opaque; this.qop = qop; this.nc = nc; this.cnonce = cnonce; @@ -125,6 +128,10 @@ public String getResponse() { return response; } + public String getOpaque() { + return opaque; + } + public String getQop() { return qop; } @@ -265,6 +272,7 @@ public static class RealmBuilder { private String nonce = ""; private String algorithm = "MD5"; private String response = ""; + private String opaque = ""; private String qop = "auth"; private String nc = "00000001"; private String cnonce = ""; @@ -369,6 +377,15 @@ public RealmBuilder setResponse(String response) { return this; } + public String getOpaque() { + return this.opaque; + } + + public RealmBuilder setOpaque(String opaque) { + this.opaque = opaque; + return this; + } + public String getQop() { return qop; } @@ -418,6 +435,7 @@ public RealmBuilder parseWWWAuthenticateHeader(String headerLine) { setRealmName(match(headerLine, "realm")); setNonce(match(headerLine, "nonce")); setAlgorithm(match(headerLine, "algorithm")); + setOpaque(match(headerLine, "opaque")); setQop(match(headerLine, "qop")); if (getNonce() != null && !getNonce().equalsIgnoreCase("")) { setScheme(AuthScheme.DIGEST); @@ -441,6 +459,7 @@ public RealmBuilder clone(Realm clone) { setPassword(clone.getPassword()); setPrincipal(clone.getPrincipal()); setEnconding(clone.getEncoding()); + setOpaque(clone.getOpaque()); setQop(clone.getQop()); setScheme(clone.getScheme()); setUri(clone.getUri()); @@ -585,7 +604,8 @@ public Realm build() { domain, enc, host, - messageType2Received); + messageType2Received, + opaque); } } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index ba96e019eb..12cc315fdd 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2014,7 +2014,8 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws .build(); } - final Realm nr = newRealm; + final Realm nr = new Realm.RealmBuilder().clone(newRealm) + .setUri(request.getUrl()).build(); log.debug("Sending authentication to {}", request.getUrl()); AsyncCallable ac = new AsyncCallable(future) { @@ -2089,7 +2090,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectOverrideSet()? request.isRedirectEnabled() : config.isRedirectEnabled(); + boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { diff --git a/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/src/main/java/com/ning/http/util/AuthenticatorUtils.java index 56c88a3888..d98e916577 100644 --- a/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/src/main/java/com/ning/http/util/AuthenticatorUtils.java @@ -40,6 +40,8 @@ public static String computeDigestAuthentication(Realm realm) throws NoSuchAlgor builder.append("algorithm").append('=').append(realm.getAlgorithm()).append(", "); construct(builder, "response", realm.getResponse()); + if (realm.getOpaque() != null && realm.getOpaque() != null && realm.getOpaque().equals("") == false) + construct(builder, "opaque", realm.getOpaque()); builder.append("qop").append('=').append(realm.getQop()).append(", "); builder.append("nc").append('=').append(realm.getNc()).append(", "); construct(builder, "cnonce", realm.getCnonce(), true); From 5d0053902f2e0667c19fd2eceabdf283e2861745 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 10:46:05 -0500 Subject: [PATCH 0045/2844] [maven-release-plugin] prepare release async-http-client-1.7.0-RC1 --- pom.xml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index c3a755ac94..9e4a759db0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,5 @@ - + org.sonatype.oss oss-parent @@ -10,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.0-SNAPSHOT + 1.7.0-RC1 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and @@ -389,12 +388,9 @@ - - - + + + From 47dd1ec5e0557e5fbe0f6d73bc74d07b1754262a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 21 Dec 2011 10:46:10 -0500 Subject: [PATCH 0046/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9e4a759db0..84c5ef2a1b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.0-RC1 + 1.7.0-RC2-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 92c223584ba1b761970e900c453fb6be35521dc2 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 21 Dec 2011 14:03:08 -0800 Subject: [PATCH 0047/2844] Add DefaultWebSocketListener to make custom listener implementations easier to write. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 5 + .../providers/netty/NettyWebSocket.java | 5 + .../websocket/DefaultWebSocketListener.java | 132 ++++++++++++++++++ .../ning/http/client/websocket/WebSocket.java | 7 + 4 files changed, 149 insertions(+) create mode 100644 src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 7ec1490ff6..a96977764f 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2566,6 +2566,11 @@ public WebSocket addMessageListener(WebSocketListener l) { return this; } + @Override + public boolean isOpen() { + return gWebSocket.isConnected(); + } + @Override public void close() { gWebSocket.close(); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 8957776f0d..386829d4d1 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -53,6 +53,11 @@ public WebSocket addMessageListener(WebSocketListener l) { return this; } + @Override + public boolean isOpen() { + return channel.isOpen(); + } + @Override public void close() { onClose(); diff --git a/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java b/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java new file mode 100644 index 0000000000..d22610db56 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java @@ -0,0 +1,132 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.ning.http.client.websocket; + +/** + * Default WebSocketListener implementation. Most methods are no-ops. This + * allows for quick override customization without clutter of methods that the + * developer isn't interested in dealing with. + * + * @since 1.7.0 + */ +public class DefaultWebSocketListener implements WebSocketByteListener, WebSocketTextListener, WebSocketPingListener, WebSocketPongListener { + + protected WebSocket webSocket; + + // -------------------------------------- Methods from WebSocketByteListener + + /** + * {@inheritDoc} + */ + @Override + public void onMessage(byte[] message) { + } + + /** + * {@inheritDoc} + */ + @Override + public void onFragment(byte[] fragment, boolean last) { + } + + + // -------------------------------------- Methods from WebSocketPingListener + + /** + * {@inheritDoc} + */ + @Override + public void onPing(byte[] message) { + } + + + // -------------------------------------- Methods from WebSocketPongListener + + /** + * {@inheritDoc} + */ + @Override + public void onPong(byte[] message) { + } + + + // -------------------------------------- Methods from WebSocketTextListener + + + /** + * {@inheritDoc} + */ + @Override + public void onMessage(String message) { + } + + /** + * {@inheritDoc} + */ + @Override + public void onFragment(String fragment, boolean last) { + } + + + // ------------------------------------------ Methods from WebSocketListener + + /** + * {@inheritDoc} + */ + @Override + public void onOpen(WebSocket websocket) { + this.webSocket = websocket; + } + + /** + * {@inheritDoc} + */ + @Override + public void onClose(WebSocket websocket) { + this.webSocket = null; + } + + /** + * {@inheritDoc} + */ + @Override + public void onError(Throwable t) { + } +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index ee5ad42a29..4ee82e4102 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -38,6 +38,13 @@ public interface WebSocket { */ WebSocket addMessageListener(WebSocketListener l); + /** + * Returns true if the WebSocket is open/connected. + * + * @return true if the WebSocket is open/connected. + */ + boolean isOpen(); + /** * Close the WebSocket. */ From f3928febc678739650dc054f61fbd08b268f524b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 21 Dec 2011 14:03:08 -0800 Subject: [PATCH 0048/2844] Add DefaultWebSocketListener to make custom listener implementations easier to write. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 5 + .../providers/netty/NettyWebSocket.java | 5 + .../websocket/DefaultWebSocketListener.java | 132 ++++++++++++++++++ .../ning/http/client/websocket/WebSocket.java | 7 + 4 files changed, 149 insertions(+) create mode 100644 src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 7ec1490ff6..a96977764f 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2566,6 +2566,11 @@ public WebSocket addMessageListener(WebSocketListener l) { return this; } + @Override + public boolean isOpen() { + return gWebSocket.isConnected(); + } + @Override public void close() { gWebSocket.close(); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 8957776f0d..386829d4d1 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -53,6 +53,11 @@ public WebSocket addMessageListener(WebSocketListener l) { return this; } + @Override + public boolean isOpen() { + return channel.isOpen(); + } + @Override public void close() { onClose(); diff --git a/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java b/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java new file mode 100644 index 0000000000..d22610db56 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java @@ -0,0 +1,132 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.ning.http.client.websocket; + +/** + * Default WebSocketListener implementation. Most methods are no-ops. This + * allows for quick override customization without clutter of methods that the + * developer isn't interested in dealing with. + * + * @since 1.7.0 + */ +public class DefaultWebSocketListener implements WebSocketByteListener, WebSocketTextListener, WebSocketPingListener, WebSocketPongListener { + + protected WebSocket webSocket; + + // -------------------------------------- Methods from WebSocketByteListener + + /** + * {@inheritDoc} + */ + @Override + public void onMessage(byte[] message) { + } + + /** + * {@inheritDoc} + */ + @Override + public void onFragment(byte[] fragment, boolean last) { + } + + + // -------------------------------------- Methods from WebSocketPingListener + + /** + * {@inheritDoc} + */ + @Override + public void onPing(byte[] message) { + } + + + // -------------------------------------- Methods from WebSocketPongListener + + /** + * {@inheritDoc} + */ + @Override + public void onPong(byte[] message) { + } + + + // -------------------------------------- Methods from WebSocketTextListener + + + /** + * {@inheritDoc} + */ + @Override + public void onMessage(String message) { + } + + /** + * {@inheritDoc} + */ + @Override + public void onFragment(String fragment, boolean last) { + } + + + // ------------------------------------------ Methods from WebSocketListener + + /** + * {@inheritDoc} + */ + @Override + public void onOpen(WebSocket websocket) { + this.webSocket = websocket; + } + + /** + * {@inheritDoc} + */ + @Override + public void onClose(WebSocket websocket) { + this.webSocket = null; + } + + /** + * {@inheritDoc} + */ + @Override + public void onError(Throwable t) { + } +} diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index ee5ad42a29..4ee82e4102 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -38,6 +38,13 @@ public interface WebSocket { */ WebSocket addMessageListener(WebSocketListener l); + /** + * Returns true if the WebSocket is open/connected. + * + * @return true if the WebSocket is open/connected. + */ + boolean isOpen(); + /** * Close the WebSocket. */ From 3c88433159d9272f49d6bc571ff03cfb3a1c1229 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 9 Jan 2012 14:02:22 -0500 Subject: [PATCH 0049/2844] Fix broken build --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 84c5ef2a1b..3bb69334a8 100644 --- a/pom.xml +++ b/pom.xml @@ -415,6 +415,7 @@ **/Response$ **/NettyResponseFuture **/**ResponseBodyPart + **/**WebSocket From 61d0cff133d18fd11c5da74c4ad486e6e6b538f8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 9 Jan 2012 13:13:24 -0800 Subject: [PATCH 0050/2844] Fix WS timeout. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index a96977764f..0d6d649047 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -306,7 +306,7 @@ protected ListenableFuture execute(final Connection c, } - protected void initializeTransport(AsyncHttpClientConfig clientConfig) { + protected void initializeTransport(final AsyncHttpClientConfig clientConfig) { final FilterChainBuilder fcb = FilterChainBuilder.stateless(); fcb.add(new AsyncHttpClientTransportFilter()); @@ -326,6 +326,9 @@ public long getTimeout(FilterChainContext ctx) { final HttpTransactionContext context = GrizzlyAsyncHttpProvider.this.getHttpTransactionContext(ctx.getConnection()); if (context != null) { + if (context.isWSRequest) { + return clientConfig.getWebSocketIdleTimeoutInMs(); + } final PerRequestConfig config = context.request.getPerRequestConfig(); if (config != null) { final long timeout = config.getRequestTimeoutInMs(); From eb4c2fa65f9fafefda0bdc6169b2074ec8ccac97 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 9 Jan 2012 17:09:20 -0500 Subject: [PATCH 0051/2844] Fix timeout issue with WebSocket when the server close the connection --- .../netty/NettyAsyncHttpProvider.java | 7 ++++- .../client/websocket/AbstractBasicTest.java | 6 +++- .../client/websocket/TextMessageTest.java | 30 +++++++++++++++++++ ...eText.java => GrizzlyByteMessageTest.java} | 2 +- ...eText.java => GrizzlyTextMessageTest.java} | 2 +- ...ageText.java => NettyByteMessageTest.java} | 4 +-- ...ageText.java => NettyTextMessageTest.java} | 5 ++-- 7 files changed, 47 insertions(+), 9 deletions(-) rename src/test/java/com/ning/http/client/websocket/grizzly/{GrizzlyByteMessageText.java => GrizzlyByteMessageTest.java} (95%) rename src/test/java/com/ning/http/client/websocket/grizzly/{GrizzlyTextMessageText.java => GrizzlyTextMessageTest.java} (95%) rename src/test/java/com/ning/http/client/websocket/netty/{NettyTextMessageText.java => NettyByteMessageTest.java} (90%) rename src/test/java/com/ning/http/client/websocket/netty/{NettyByteMessageText.java => NettyTextMessageTest.java} (86%) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 12cc315fdd..6b1963072e 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -947,7 +947,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand ChannelFuture channelFuture; ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? webSocketBootstrap : (useSSl ? secureBootstrap : plainBootstrap); - bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); + //bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); // Do no enable this with win. if (System.getProperty("os.name").toLowerCase().indexOf("win") == -1) { @@ -1039,6 +1039,7 @@ private void finishChannel(final ChannelHandlerContext ctx) { log.debug("Closing Channel {} ", ctx.getChannel()); + try { ctx.getChannel().close(); } catch (Throwable t) { @@ -1284,6 +1285,7 @@ private void abort(NettyResponseFuture future, Throwable t) { log.debug("Aborting Future {}\n", future); log.debug(t.getMessage(), t); } + future.abort(t); } @@ -1342,6 +1344,9 @@ public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws } } + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.onClose(ctx, e); + if (future != null && !future.isDone() && !future.isCancelled()) { if (!remotelyClosed(ctx.getChannel(), future)) { abort(future, new IOException("Remotely Closed " + ctx.getChannel())); diff --git a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java index 7959eabe2d..2566240fe7 100644 --- a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java +++ b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java @@ -35,6 +35,10 @@ public abstract class AbstractBasicTest extends Server { public abstract class WebSocketHandler extends HandlerWrapper implements WebSocketFactory.Acceptor { private final WebSocketFactory _webSocketFactory = new WebSocketFactory(this, 32 * 1024); + public WebSocketHandler(){ + _webSocketFactory.setMaxIdleTime(10000); + } + public WebSocketFactory getWebSocketFactory() { return _webSocketFactory; } @@ -83,7 +87,7 @@ protected String getTargetUrl() { @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - port1 = 8080; + port1 = findFreePort(); _connector = new SelectChannelConnector(); _connector.setPort(port1); diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 9494896bdc..458844dfcf 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -99,6 +99,36 @@ public void onError(Throwable t) { assertEquals(text.get(), "OnOpen"); } + @Test(timeOut = 60000) + public void onTimeoutCloseTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnClose"); + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "OnClose"); + } + @Test(timeOut = 60000) public void onClose() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java rename to src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java index 38f597e866..fd6e3d3170 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java @@ -18,7 +18,7 @@ import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; -public class GrizzlyByteMessageText extends ByteMessageTest { +public class GrizzlyByteMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { if (config == null) { diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java rename to src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java index ccce7a2f4d..9a2df62a44 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java @@ -18,7 +18,7 @@ import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; -public class GrizzlyTextMessageText extends ByteMessageTest { +public class GrizzlyTextMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { if (config == null) { diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java similarity index 90% rename from src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java rename to src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java index 564c681fa6..1e2ff5bf8d 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java @@ -15,9 +15,9 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.websocket.ByteMessageTest; +import com.ning.http.client.websocket.TextMessageTest; -public class NettyTextMessageText extends ByteMessageTest { +public class NettyByteMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java similarity index 86% rename from src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java rename to src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java index f81b70614c..a2720e8b93 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java @@ -15,10 +15,9 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.async.ZeroCopyFileTest; -import com.ning.http.client.websocket.ByteMessageTest; +import com.ning.http.client.websocket.TextMessageTest; -public class NettyByteMessageText extends ByteMessageTest { +public class NettyTextMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); From f30cf91c3c8ff83b5182a75c5fcbcf9c074478a3 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 9 Jan 2012 17:10:39 -0500 Subject: [PATCH 0052/2844] Oups fix unwanted commit --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 6b1963072e..32f9ffee4f 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -947,7 +947,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand ChannelFuture channelFuture; ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? webSocketBootstrap : (useSSl ? secureBootstrap : plainBootstrap); - //bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); + bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); // Do no enable this with win. if (System.getProperty("os.name").toLowerCase().indexOf("win") == -1) { From b4616f2b8a46b003d139628279a8caf633536580 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 9 Jan 2012 13:13:24 -0800 Subject: [PATCH 0053/2844] Fix WS timeout. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index a96977764f..0d6d649047 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -306,7 +306,7 @@ protected ListenableFuture execute(final Connection c, } - protected void initializeTransport(AsyncHttpClientConfig clientConfig) { + protected void initializeTransport(final AsyncHttpClientConfig clientConfig) { final FilterChainBuilder fcb = FilterChainBuilder.stateless(); fcb.add(new AsyncHttpClientTransportFilter()); @@ -326,6 +326,9 @@ public long getTimeout(FilterChainContext ctx) { final HttpTransactionContext context = GrizzlyAsyncHttpProvider.this.getHttpTransactionContext(ctx.getConnection()); if (context != null) { + if (context.isWSRequest) { + return clientConfig.getWebSocketIdleTimeoutInMs(); + } final PerRequestConfig config = context.request.getPerRequestConfig(); if (config != null) { final long timeout = config.getRequestTimeoutInMs(); From 2516ba70ed2075d5bbca497af871b3681a103403 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 9 Jan 2012 14:02:22 -0500 Subject: [PATCH 0054/2844] Fix broken build --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 84c5ef2a1b..3bb69334a8 100644 --- a/pom.xml +++ b/pom.xml @@ -415,6 +415,7 @@ **/Response$ **/NettyResponseFuture **/**ResponseBodyPart + **/**WebSocket From 43c9fbdc51f115280ed2ef9650e265a349854c82 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 9 Jan 2012 17:09:20 -0500 Subject: [PATCH 0055/2844] Fix timeout issue with WebSocket when the server close the connection --- .../netty/NettyAsyncHttpProvider.java | 7 ++++- .../client/websocket/AbstractBasicTest.java | 6 +++- .../client/websocket/TextMessageTest.java | 30 +++++++++++++++++++ ...eText.java => GrizzlyByteMessageTest.java} | 2 +- ...eText.java => GrizzlyTextMessageTest.java} | 2 +- ...ageText.java => NettyByteMessageTest.java} | 4 +-- ...ageText.java => NettyTextMessageTest.java} | 5 ++-- 7 files changed, 47 insertions(+), 9 deletions(-) rename src/test/java/com/ning/http/client/websocket/grizzly/{GrizzlyByteMessageText.java => GrizzlyByteMessageTest.java} (95%) rename src/test/java/com/ning/http/client/websocket/grizzly/{GrizzlyTextMessageText.java => GrizzlyTextMessageTest.java} (95%) rename src/test/java/com/ning/http/client/websocket/netty/{NettyTextMessageText.java => NettyByteMessageTest.java} (90%) rename src/test/java/com/ning/http/client/websocket/netty/{NettyByteMessageText.java => NettyTextMessageTest.java} (86%) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 12cc315fdd..6b1963072e 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -947,7 +947,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand ChannelFuture channelFuture; ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? webSocketBootstrap : (useSSl ? secureBootstrap : plainBootstrap); - bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); + //bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); // Do no enable this with win. if (System.getProperty("os.name").toLowerCase().indexOf("win") == -1) { @@ -1039,6 +1039,7 @@ private void finishChannel(final ChannelHandlerContext ctx) { log.debug("Closing Channel {} ", ctx.getChannel()); + try { ctx.getChannel().close(); } catch (Throwable t) { @@ -1284,6 +1285,7 @@ private void abort(NettyResponseFuture future, Throwable t) { log.debug("Aborting Future {}\n", future); log.debug(t.getMessage(), t); } + future.abort(t); } @@ -1342,6 +1344,9 @@ public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws } } + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.onClose(ctx, e); + if (future != null && !future.isDone() && !future.isCancelled()) { if (!remotelyClosed(ctx.getChannel(), future)) { abort(future, new IOException("Remotely Closed " + ctx.getChannel())); diff --git a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java index 7959eabe2d..2566240fe7 100644 --- a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java +++ b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java @@ -35,6 +35,10 @@ public abstract class AbstractBasicTest extends Server { public abstract class WebSocketHandler extends HandlerWrapper implements WebSocketFactory.Acceptor { private final WebSocketFactory _webSocketFactory = new WebSocketFactory(this, 32 * 1024); + public WebSocketHandler(){ + _webSocketFactory.setMaxIdleTime(10000); + } + public WebSocketFactory getWebSocketFactory() { return _webSocketFactory; } @@ -83,7 +87,7 @@ protected String getTargetUrl() { @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - port1 = 8080; + port1 = findFreePort(); _connector = new SelectChannelConnector(); _connector.setPort(port1); diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 9494896bdc..458844dfcf 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -99,6 +99,36 @@ public void onError(Throwable t) { assertEquals(text.get(), "OnOpen"); } + @Test(timeOut = 60000) + public void onTimeoutCloseTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnClose"); + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "OnClose"); + } + @Test(timeOut = 60000) public void onClose() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java rename to src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java index 38f597e866..fd6e3d3170 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java @@ -18,7 +18,7 @@ import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; -public class GrizzlyByteMessageText extends ByteMessageTest { +public class GrizzlyByteMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { if (config == null) { diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java rename to src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java index ccce7a2f4d..9a2df62a44 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java @@ -18,7 +18,7 @@ import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; -public class GrizzlyTextMessageText extends ByteMessageTest { +public class GrizzlyTextMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { if (config == null) { diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java similarity index 90% rename from src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java rename to src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java index 564c681fa6..1e2ff5bf8d 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java @@ -15,9 +15,9 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.websocket.ByteMessageTest; +import com.ning.http.client.websocket.TextMessageTest; -public class NettyTextMessageText extends ByteMessageTest { +public class NettyByteMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java similarity index 86% rename from src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java rename to src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java index f81b70614c..a2720e8b93 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageText.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java @@ -15,10 +15,9 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.async.ZeroCopyFileTest; -import com.ning.http.client.websocket.ByteMessageTest; +import com.ning.http.client.websocket.TextMessageTest; -public class NettyByteMessageText extends ByteMessageTest { +public class NettyTextMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); From 32c7e80647f06f869ee521b12481faa57482c1b3 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 9 Jan 2012 17:10:39 -0500 Subject: [PATCH 0056/2844] Oups fix unwanted commit --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 6b1963072e..32f9ffee4f 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -947,7 +947,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand ChannelFuture channelFuture; ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? webSocketBootstrap : (useSSl ? secureBootstrap : plainBootstrap); - //bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); + bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); // Do no enable this with win. if (System.getProperty("os.name").toLowerCase().indexOf("win") == -1) { From 3c1e8ae9e834a2d2e470a2130f2f490315b57537 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 10 Jan 2012 17:00:50 -0800 Subject: [PATCH 0057/2844] Add: - streaming support - the ability to send pings and pongs Tests to come in another commit. --- pom.xml | 2 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 34 +++++++++++++ .../providers/netty/NettyWebSocket.java | 38 +++++++++++++- .../ning/http/client/websocket/WebSocket.java | 51 ++++++++++++++++++- 4 files changed, 121 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 3bb69334a8..6e5790fd3f 100644 --- a/pom.xml +++ b/pom.xml @@ -447,7 +447,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2 + 2.2.1 true diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 0d6d649047..ddc22cbd27 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2557,12 +2557,46 @@ public WebSocket sendMessage(byte[] message) { return this; } + @Override + public WebSocket stream(byte[] fragment, boolean last) { + if (fragment != null && fragment.length > 0) { + gWebSocket.stream(last, fragment, 0, fragment.length); + } + return this; + } + + @Override + public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { + if (fragment != null && fragment.length > 0) { + gWebSocket.stream(last, fragment, offset, len); + } + return this; + } + @Override public WebSocket sendTextMessage(String message) { gWebSocket.send(message); return this; } + @Override + public WebSocket streamText(String fragment, boolean last) { + gWebSocket.stream(last, fragment); + return this; + } + + @Override + public WebSocket sendPing(byte[] payload) { + gWebSocket.sendPing(payload); + return this; + } + + @Override + public WebSocket sendPong(byte[] payload) { + gWebSocket.sendPong(payload); + return this; + } + @Override public WebSocket addMessageListener(WebSocketListener l) { gWebSocket.add(new AHCWebSocketListenerAdapter(l, this)); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 386829d4d1..3b0a90408d 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -13,15 +13,15 @@ package com.ning.http.client.providers.netty; import com.ning.http.client.providers.netty.netty4.BinaryWebSocketFrame; +import com.ning.http.client.providers.netty.netty4.PingWebSocketFrame; +import com.ning.http.client.providers.netty.netty4.PongWebSocketFrame; import com.ning.http.client.providers.netty.netty4.TextWebSocketFrame; import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketTextListener; -import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; -import java.io.UnsupportedEncodingException; import java.util.concurrent.ConcurrentLinkedQueue; import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; @@ -41,12 +41,46 @@ public WebSocket sendMessage(byte[] message) { return this; } + @Override + public WebSocket stream(byte[] fragment, boolean last) { + if (fragment != null && fragment.length > 0) { + channel.write(new BinaryWebSocketFrame(last, 0, wrappedBuffer(fragment))); + } + return this; + } + + @Override + public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { + if (fragment != null && fragment.length > 0) { + channel.write(new BinaryWebSocketFrame(last, 0, wrappedBuffer(fragment, offset, len))); + } + return this; + } + @Override public WebSocket sendTextMessage(String message) { channel.write(new TextWebSocketFrame(message)); return this; } + @Override + public WebSocket streamText(String fragment, boolean last) { + channel.write(new TextWebSocketFrame(last, 0, fragment)); + return this; + } + + @Override + public WebSocket sendPing(byte[] payload) { + channel.write(new PingWebSocketFrame(wrappedBuffer(payload))); + return this; + } + + @Override + public WebSocket sendPong(byte[] payload) { + channel.write(new PongWebSocketFrame(wrappedBuffer(payload))); + return this; + } + @Override public WebSocket addMessageListener(WebSocketListener l) { listeners.add(l); diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index 4ee82e4102..2e51cf8a21 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -18,12 +18,33 @@ public interface WebSocket { /** - * Sen a byte message. + * Send a byte message. * @param message a byte message * @return this */ WebSocket sendMessage(byte[] message); + /** + * Allows streaming of multiple binary fragments. + * + * @param fragment binary fragment. + * @param last flag indicating whether or not this is the last fragment. + * + * @return this. + */ + WebSocket stream(byte[] fragment, boolean last); + + /** + * Allows streaming of multiple binary fragments. + * + * @param fragment binary fragment. + * @param offset starting offset. + * @param len length. + * @param last flag indicating whether or not this is the last fragment. + * @return + */ + WebSocket stream(byte[] fragment, int offset, int len, boolean last); + /** * Send a text message * @param message a text message @@ -31,6 +52,34 @@ public interface WebSocket { */ WebSocket sendTextMessage(String message); + /** + * Allows streaming of multiple text fragments. + * + * @param fragment text fragment. + * @param last flag indicating whether or not this is the last fragment. + * @return this. + */ + WebSocket streamText(String fragment, boolean last); + + /** + * Send a ping with an optional payload + * (limited to 125 bytes or less). + * + * @param payload the ping payload. + * + * @return this. + */ + WebSocket sendPing(byte[] payload); + + /** + * Send a ping with an optional payload + * (limited to 125 bytes or less). + * + * @param payload the pong payload. + * @return this. + */ + WebSocket sendPong(byte[] payload); + /** * Add a {@link WebSocketListener} * @param l a {@link WebSocketListener} From 2faa0d8e1861829a296aaaf3f1451fee392af117 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 10 Jan 2012 21:56:28 -0800 Subject: [PATCH 0058/2844] Add basic tests for fragment support. Fix netty ByteMessage test extension class. --- .../client/websocket/ByteMessageTest.java | 120 ++++++++++++------ .../client/websocket/TextMessageTest.java | 44 +++++++ .../websocket/netty/NettyByteMessageTest.java | 4 +- 3 files changed, 129 insertions(+), 39 deletions(-) diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index 82469205bf..397420065e 100644 --- a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -14,12 +14,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyWebSocket; import org.testng.annotations.Test; import javax.servlet.http.HttpServletRequest; import java.io.IOException; -import java.util.Arrays; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; @@ -34,6 +32,7 @@ private final class EchoByteWebSocket implements org.eclipse.jetty.websocket.Web @Override public void onOpen(Connection connection) { this.connection = connection; + connection.setMaxBinaryMessageSize(1000); } @Override @@ -156,48 +155,95 @@ public void onFragment(byte[] fragment, boolean last) { @Test public void echoOnOpenMessagesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(2); - final AtomicReference text = new AtomicReference(null); + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(null); - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - @Override - public void onOpen(WebSocket websocket) { - websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); - } + @Override + public void onOpen(WebSocket websocket) { + websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); + } - @Override - public void onClose(WebSocket websocket) { - latch.countDown(); - } + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } - @Override - public void onMessage(byte[] message) { - if (text.get() == null) { - text.set(message); - } else { - byte[] n = new byte[text.get().length + message.length]; - System.arraycopy(text.get(), 0, n, 0, text.get().length); - System.arraycopy(message, 0, n, text.get().length, message.length); - text.set(n); + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); } - latch.countDown(); - } - @Override - public void onFragment(byte[] fragment, boolean last) { - } - }).build()).get(); + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); - latch.await(); - assertEquals(text.get(), "ECHOECHO".getBytes()); + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); + } + + @Test + public void echoFragments() throws Exception { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(null); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { + } + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); + } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); + websocket.stream("ECHO".getBytes(), false); + websocket.stream("ECHO".getBytes(), true); + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); } } diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 458844dfcf..59286eeb76 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -32,6 +32,7 @@ private final class EchoTextWebSocket implements org.eclipse.jetty.websocket.Web @Override public void onOpen(Connection connection) { this.connection = connection; + connection.setMaxTextMessageSize(1000); } @Override @@ -310,4 +311,47 @@ public void onError(Throwable t) { latch.await(); assertEquals(text.get(), "ECHOECHO"); } + + @Test(timeOut = 60000) + public void echoFragments() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(message); + latch.countDown(); + } + + @Override + public void onFragment(String fragment, boolean last) { + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.streamText("ECHO", false); + websocket.streamText("ECHO", true); + + latch.await(); + assertEquals(text.get(), "ECHOECHO"); + } + } diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java index 1e2ff5bf8d..1a25c5fdd8 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java @@ -15,9 +15,9 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.websocket.TextMessageTest; +import com.ning.http.client.websocket.ByteMessageTest; -public class NettyByteMessageTest extends TextMessageTest { +public class NettyByteMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); From 320453496ab41c6da450fe4d4ac85d4c56441b7e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 11 Jan 2012 11:28:25 -0800 Subject: [PATCH 0059/2844] WS streaming feature restricted to Grizzly provider for the time being. --- .../http/client/providers/netty/NettyWebSocket.java | 13 +++---------- .../ning/http/client/websocket/ByteMessageTest.java | 2 +- .../ning/http/client/websocket/TextMessageTest.java | 2 +- .../websocket/grizzly/GrizzlyByteMessageTest.java | 7 +++++++ .../websocket/grizzly/GrizzlyTextMessageTest.java | 7 +++++++ 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 3b0a90408d..45b52766fc 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -43,18 +43,12 @@ public WebSocket sendMessage(byte[] message) { @Override public WebSocket stream(byte[] fragment, boolean last) { - if (fragment != null && fragment.length > 0) { - channel.write(new BinaryWebSocketFrame(last, 0, wrappedBuffer(fragment))); - } - return this; + throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } @Override public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { - if (fragment != null && fragment.length > 0) { - channel.write(new BinaryWebSocketFrame(last, 0, wrappedBuffer(fragment, offset, len))); - } - return this; + throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } @Override @@ -65,8 +59,7 @@ public WebSocket sendTextMessage(String message) { @Override public WebSocket streamText(String fragment, boolean last) { - channel.write(new TextWebSocketFrame(last, 0, fragment)); - return this; + throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } @Override diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index 397420065e..2e170c1fbe 100644 --- a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -200,7 +200,7 @@ public void onFragment(byte[] fragment, boolean last) { assertEquals(text.get(), "ECHOECHO".getBytes()); } - @Test + public void echoFragments() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); final CountDownLatch latch = new CountDownLatch(1); diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 59286eeb76..9b3750c6a4 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -312,7 +312,7 @@ public void onError(Throwable t) { assertEquals(text.get(), "ECHOECHO"); } - @Test(timeOut = 60000) + public void echoFragments() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); final CountDownLatch latch = new CountDownLatch(1); diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java index fd6e3d3170..dbf4029996 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java @@ -17,6 +17,7 @@ import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; +import org.testng.annotations.Test; public class GrizzlyByteMessageTest extends ByteMessageTest { @Override @@ -26,4 +27,10 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); } + + @Test(timeOut = 60000) + @Override + public void echoFragments() throws Exception { + super.echoFragments(); + } } diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java index 9a2df62a44..fb4e7f797a 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java @@ -17,6 +17,7 @@ import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; +import org.testng.annotations.Test; public class GrizzlyTextMessageTest extends ByteMessageTest { @Override @@ -26,4 +27,10 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); } + + @Test(timeOut = 60000) + @Override + public void echoFragments() throws Exception { + super.echoFragments(); //To change body of overridden methods use File | Settings | File Templates. + } } From 718751e1ccdd7aee93d8e57ff41e2b01d54d201d Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 11 Jan 2012 15:26:37 -0500 Subject: [PATCH 0060/2844] [maven-release-plugin] prepare release async-http-client-1.7.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6e5790fd3f..df9fb20da0 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.0-RC2-SNAPSHOT + 1.7.0 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From a69bf5c8222d7f55f2736524e1a44e465aaba6d1 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 11 Jan 2012 15:26:41 -0500 Subject: [PATCH 0061/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df9fb20da0..4f773a4e40 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.0 + 1.7.1-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From ffe26a147e7abf6cc455c03a94071cebe08009d9 Mon Sep 17 00:00:00 2001 From: Gail Hernandez Date: Fri, 13 Jan 2012 08:44:45 -0800 Subject: [PATCH 0062/2844] On the Mac this call fails every other call. The 1 second wait cause the upload to take a long time and time out. Decreasing the wait time increases the upload speed. --- src/main/java/com/ning/http/multipart/MultipartBody.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/multipart/MultipartBody.java b/src/main/java/com/ning/http/multipart/MultipartBody.java index 0964ba95f7..40ac12f743 100644 --- a/src/main/java/com/ning/http/multipart/MultipartBody.java +++ b/src/main/java/com/ning/http/multipart/MultipartBody.java @@ -458,7 +458,7 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw if (nWrite == 0) { logger.info("Waiting for writing..."); try { - fc.wait(1000); + fc.wait(50); } catch (InterruptedException e) { logger.trace(e.getMessage(), e); } From db8e48cd6345eea8bfc25fe7d765cbdf5ce8b515 Mon Sep 17 00:00:00 2001 From: Gail Hernandez Date: Mon, 16 Jan 2012 14:18:52 -0800 Subject: [PATCH 0063/2844] Listener to hear when file stalls on upload. --- .../com/ning/http/multipart/FilePart.java | 10 +++ .../http/multipart/FilePartStallHandler.java | 62 +++++++++++++++++++ .../multipart/FileUploadStalledException.java | 23 +++++++ .../ning/http/multipart/MultipartBody.java | 19 +++++- 4 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/ning/http/multipart/FilePartStallHandler.java create mode 100644 src/main/java/com/ning/http/multipart/FileUploadStalledException.java diff --git a/src/main/java/com/ning/http/multipart/FilePart.java b/src/main/java/com/ning/http/multipart/FilePart.java index 1f25bb9ce0..5548085f08 100644 --- a/src/main/java/com/ning/http/multipart/FilePart.java +++ b/src/main/java/com/ning/http/multipart/FilePart.java @@ -202,6 +202,14 @@ protected void sendData(OutputStream out) throws IOException { } } + public void setStalledTime(long ms) { + _stalledTime = ms; + } + + public long getStalledTime() { + return _stalledTime; + } + /** * Returns the source of the file part. * @@ -221,4 +229,6 @@ protected long lengthOfData() throws IOException { return source.getLength(); } + private long _stalledTime = -1; + } diff --git a/src/main/java/com/ning/http/multipart/FilePartStallHandler.java b/src/main/java/com/ning/http/multipart/FilePartStallHandler.java new file mode 100644 index 0000000000..2e02ef262e --- /dev/null +++ b/src/main/java/com/ning/http/multipart/FilePartStallHandler.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package com.ning.http.multipart; + +import java.util.Timer; +import java.util.TimerTask; + +/** + * @author Gail Hernandez + */ +public class FilePartStallHandler extends TimerTask { + public FilePartStallHandler(long waitTime, FilePart filePart) { + _waitTime = waitTime; + _failed = false; + _written = false; + } + + public void completed() { + if(_waitTime > 0) { + _timer.cancel(); + } + } + + public boolean isFailed() { + return _failed; + } + + public void run() { + if(!_written) { + _failed = true; + _timer.cancel(); + } + _written = false; + } + + public void start() { + if(_waitTime > 0) { + _timer = new Timer(); + _timer.scheduleAtFixedRate(this, _waitTime, _waitTime); + } + } + + public void writeHappened() { + _written = true; + } + + private long _waitTime; + private Timer _timer; + private boolean _failed; + private boolean _written; +} diff --git a/src/main/java/com/ning/http/multipart/FileUploadStalledException.java b/src/main/java/com/ning/http/multipart/FileUploadStalledException.java new file mode 100644 index 0000000000..11a7748a2d --- /dev/null +++ b/src/main/java/com/ning/http/multipart/FileUploadStalledException.java @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package com.ning.http.multipart; + +import java.io.IOException; + +/** + * @author Gail Hernandez + */ +public class FileUploadStalledException extends IOException { + +} diff --git a/src/main/java/com/ning/http/multipart/MultipartBody.java b/src/main/java/com/ning/http/multipart/MultipartBody.java index 40ac12f743..73a836452e 100644 --- a/src/main/java/com/ning/http/multipart/MultipartBody.java +++ b/src/main/java/com/ning/http/multipart/MultipartBody.java @@ -13,6 +13,7 @@ package com.ning.http.multipart; import com.ning.http.client.RandomAccessBody; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -434,7 +435,11 @@ private ByteArrayOutputStream generateFileStart(FilePart filePart) } private long handleFilePart(WritableByteChannel target, FilePart filePart) throws IOException { - + FilePartStallHandler handler = new FilePartStallHandler( + filePart.getStalledTime(), filePart); + + handler.start(); + if (FilePartSource.class.isAssignableFrom(filePart.getSource().getClass())) { int length = 0; @@ -453,8 +458,13 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw long nWrite = 0; synchronized (fc) { while (fileLength != l) { + if(handler.isFailed()) { + logger.debug("Stalled error"); + throw new FileUploadStalledException(); + } try { nWrite = fc.transferTo(fileLength, l, target); + if (nWrite == 0) { logger.info("Waiting for writing..."); try { @@ -463,6 +473,9 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw logger.trace(e.getMessage(), e); } } + else { + handler.writeHappened(); + } } catch (IOException ex) { String message = ex.getMessage(); @@ -482,6 +495,8 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw fileLength += nWrite; } } + handler.completed(); + fc.close(); length += handleFileEnd(target, filePart); @@ -541,7 +556,7 @@ private long handleMultiPart(WritableByteChannel target, Part currentPart) throw return handleStringPart(target, (StringPart) currentPart); } else if (currentPart.getClass().equals(FilePart.class)) { FilePart filePart = (FilePart) currentPart; - + return handleFilePart(target, filePart); } return 0; From 0debb0fca092909b24beba9585b17bc14b755143 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 20 Jan 2012 09:19:26 -0500 Subject: [PATCH 0064/2844] Add Netty 3.3.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4f773a4e40..3292784ea6 100644 --- a/pom.xml +++ b/pom.xml @@ -59,9 +59,9 @@ - org.jboss.netty + io.netty netty - 3.2.7.Final + 3.3.0.Final javax.servlet From e8cb8f98e5e44060ca88b95243d9bbcf7372692b Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 24 Jan 2012 14:20:41 -0500 Subject: [PATCH 0065/2844] Get rid of the Netty WebSocket classes as they are now part of the 3.3 distribution --- .../netty/NettyAsyncHttpProvider.java | 6 +- .../providers/netty/NettyWebSocket.java | 8 +- .../netty/netty4/BinaryWebSocketFrame.java | 80 ---- .../netty/netty4/CloseWebSocketFrame.java | 63 --- .../netty4/ContinuationWebSocketFrame.java | 156 ------- .../netty/netty4/PingWebSocketFrame.java | 79 ---- .../netty/netty4/PongWebSocketFrame.java | 78 ---- .../netty/netty4/TextWebSocketFrame.java | 140 ------- .../providers/netty/netty4/UTF8Exception.java | 47 --- .../providers/netty/netty4/UTF8Output.java | 89 ---- .../netty/netty4/WebSocket08FrameDecoder.java | 384 ------------------ .../netty/netty4/WebSocket08FrameEncoder.java | 186 --------- .../netty/netty4/WebSocketFrame.java | 92 ----- .../netty/netty4/WebSocketFrameType.java | 37 -- 14 files changed, 7 insertions(+), 1438 deletions(-) delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java delete mode 100644 src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 32f9ffee4f..d85d7bfb51 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -46,9 +46,6 @@ import com.ning.http.client.ntlm.NTLMEngine; import com.ning.http.client.ntlm.NTLMEngineException; import com.ning.http.client.providers.netty.spnego.SpnegoEngine; -import com.ning.http.client.providers.netty.netty4.WebSocket08FrameDecoder; -import com.ning.http.client.providers.netty.netty4.WebSocket08FrameEncoder; -import com.ning.http.client.providers.netty.netty4.WebSocketFrame; import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartBody; import com.ning.http.multipart.MultipartRequestEntity; @@ -94,6 +91,9 @@ import org.jboss.netty.handler.codec.http.HttpResponse; import org.jboss.netty.handler.codec.http.HttpResponseDecoder; import org.jboss.netty.handler.codec.http.HttpVersion; +import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; +import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; +import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame; import org.jboss.netty.handler.ssl.SslHandler; import org.jboss.netty.handler.stream.ChunkedFile; import org.jboss.netty.handler.stream.ChunkedWriteHandler; diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 45b52766fc..89e5541285 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -12,15 +12,15 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.providers.netty.netty4.BinaryWebSocketFrame; -import com.ning.http.client.providers.netty.netty4.PingWebSocketFrame; -import com.ning.http.client.providers.netty.netty4.PongWebSocketFrame; -import com.ning.http.client.providers.netty.netty4.TextWebSocketFrame; import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketTextListener; import org.jboss.netty.channel.Channel; +import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.PingWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; import java.util.concurrent.ConcurrentLinkedQueue; diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java deleted file mode 100644 index 8a5f2bf533..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/BinaryWebSocketFrame.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; - -/** - * Web Socket frame containing binary data - * - * @author Vibul Imtarnasan - */ -public class BinaryWebSocketFrame extends WebSocketFrame { - - /** - * Creates a new empty binary frame. - */ - public BinaryWebSocketFrame() { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } - - /** - * Creates a new binary frame with the specified binary data. The final - * fragment flag is set to true. - * - * @param binaryData - * the content of the frame. - */ - public BinaryWebSocketFrame(ChannelBuffer binaryData) { - this.setBinaryData(binaryData); - } - - /** - * Creates a new binary frame with the specified binary data and the final - * fragment flag. - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param binaryData - * the content of the frame. - */ - public BinaryWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setBinaryData(binaryData); - } - - @Override - public String toString() { - return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; - } - -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java deleted file mode 100644 index de7a180116..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/CloseWebSocketFrame.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffers; - -/** - * Web Socket Frame for closing the connection - * - * @author Vibul Imtarnasan - */ -public class CloseWebSocketFrame extends WebSocketFrame { - - /** - * Creates a new empty close frame. - */ - public CloseWebSocketFrame() { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } - - /** - * Creates a new close frame - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - */ - public CloseWebSocketFrame(boolean finalFragment, int rsv) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - } - - @Override - public String toString() { - return getClass().getSimpleName(); - } -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java deleted file mode 100644 index 041cfac01b..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/ContinuationWebSocketFrame.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.util.CharsetUtil; - -/** - * Web Socket continuation frame containing continuation text or binary data. - * This is used for fragmented messages where the contents of a messages is - * contained more than 1 frame. - * - * @author Vibul Imtarnasan - */ -public class ContinuationWebSocketFrame extends WebSocketFrame { - - private String aggregatedText = null; - - /** - * Creates a new empty continuation frame. - */ - public ContinuationWebSocketFrame() { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } - - /** - * Creates a new continuation frame with the specified binary data. The - * final fragment flag is set to true. - * - * @param binaryData - * the content of the frame. - */ - public ContinuationWebSocketFrame(ChannelBuffer binaryData) { - this.setBinaryData(binaryData); - } - - /** - * Creates a new continuation frame with the specified binary data - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param binaryData - * the content of the frame. - */ - public ContinuationWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setBinaryData(binaryData); - } - - /** - * Creates a new continuation frame with the specified binary data - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param binaryData - * the content of the frame. - * @param aggregatedText - * Aggregated text set by decoder on the final continuation frame - * of a fragmented text message - */ - public ContinuationWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData, String aggregatedText) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setBinaryData(binaryData); - this.aggregatedText = aggregatedText; - } - - /** - * Creates a new continuation frame with the specified text data - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param text - * text content of the frame. - */ - public ContinuationWebSocketFrame(boolean finalFragment, int rsv, String text) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setText(text); - } - - /** - * Returns the text data in this frame - */ - public String getText() { - if (this.getBinaryData() == null) { - return null; - } - return this.getBinaryData().toString(CharsetUtil.UTF_8); - } - - /** - * Sets the string for this frame - * - * @param text - * text to store - */ - public void setText(String text) { - if (text == null || text.equalsIgnoreCase("")) { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } else { - this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); - } - } - - @Override - public String toString() { - return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; - } - - /** - * Aggregated text returned by decoder on the final continuation frame of a - * fragmented text message - */ - public String getAggregatedText() { - return aggregatedText; - } - - public void setAggregatedText(String aggregatedText) { - this.aggregatedText = aggregatedText; - } - -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java deleted file mode 100644 index 04acbe8e9b..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/PingWebSocketFrame.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; - -/** - * Web Socket frame containing binary data - * - * @author Vibul Imtarnasan - */ -public class PingWebSocketFrame extends WebSocketFrame { - - /** - * Creates a new empty ping frame. - */ - public PingWebSocketFrame() { - this.setFinalFragment(true); - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } - - /** - * Creates a new ping frame with the specified binary data. - * - * @param binaryData - * the content of the frame. - */ - public PingWebSocketFrame(ChannelBuffer binaryData) { - this.setBinaryData(binaryData); - } - - /** - * Creates a new ping frame with the specified binary data - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param binaryData - * the content of the frame. - */ - public PingWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setBinaryData(binaryData); - } - - @Override - public String toString() { - return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; - } - -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java deleted file mode 100644 index f754a2c88a..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/PongWebSocketFrame.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; - -/** - * Web Socket frame containing binary data - * - * @author Vibul Imtarnasan - */ -public class PongWebSocketFrame extends WebSocketFrame { - - /** - * Creates a new empty pong frame. - */ - public PongWebSocketFrame() { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } - - /** - * Creates a new pong frame with the specified binary data. - * - * @param binaryData - * the content of the frame. - */ - public PongWebSocketFrame(ChannelBuffer binaryData) { - this.setBinaryData(binaryData); - } - - /** - * Creates a new pong frame with the specified binary data - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param binaryData - * the content of the frame. - */ - public PongWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setBinaryData(binaryData); - } - - @Override - public String toString() { - return getClass().getSimpleName() + "(data: " + getBinaryData() + ')'; - } - -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java deleted file mode 100644 index 9af42897c6..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/TextWebSocketFrame.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.util.CharsetUtil; - -/** - * Web Socket text frame with assumed UTF-8 encoding - * - * @author Vibul Imtarnasan - * - */ -public class TextWebSocketFrame extends WebSocketFrame { - - /** - * Creates a new empty text frame. - */ - public TextWebSocketFrame() { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } - - /** - * Creates a new text frame with the specified text string. The final - * fragment flag is set to true. - * - * @param text - * String to put in the frame - */ - public TextWebSocketFrame(String text) { - if (text == null || text.equalsIgnoreCase("")) { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } else { - this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); - } - } - - /** - * Creates a new text frame with the specified binary data. The final - * fragment flag is set to true. - * - * @param binaryData - * the content of the frame. Must be UTF-8 encoded - */ - public TextWebSocketFrame(ChannelBuffer binaryData) { - this.setBinaryData(binaryData); - } - - /** - * Creates a new text frame with the specified text string. The final - * fragment flag is set to true. - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param text - * String to put in the frame - */ - public TextWebSocketFrame(boolean finalFragment, int rsv, String text) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - if (text == null || text.equalsIgnoreCase("")) { - this.setBinaryData(ChannelBuffers.EMPTY_BUFFER); - } else { - this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); - } - } - - /** - * Creates a new text frame with the specified binary data. The final - * fragment flag is set to true. - * - * @param finalFragment - * flag indicating if this frame is the final fragment - * @param rsv - * reserved bits used for protocol extensions - * @param binaryData - * the content of the frame. Must be UTF-8 encoded - */ - public TextWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData) { - this.setFinalFragment(finalFragment); - this.setRsv(rsv); - this.setBinaryData(binaryData); - } - - /** - * Returns the text data in this frame - */ - public String getText() { - if (this.getBinaryData() == null) { - return null; - } - return this.getBinaryData().toString(CharsetUtil.UTF_8); - } - - /** - * Sets the string for this frame - * - * @param text - * text to store - */ - public void setText(String text) { - if (text == null) { - throw new NullPointerException("text"); - } - this.setBinaryData(ChannelBuffers.copiedBuffer(text, CharsetUtil.UTF_8)); - } - - @Override - public String toString() { - return getClass().getSimpleName() + "(text: " + getText() + ')'; - } -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java deleted file mode 100644 index eabd3cb49e..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Exception.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Adaptation of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ - * - * Copyright (c) 2008-2009 Bjoern Hoehrmann - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated - * documentation files (the "Software"), to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and - * to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -package com.ning.http.client.providers.netty.netty4; - -/** - * Invalid UTF8 bytes encountered - * - * @author Bjoern Hoehrmann - * @author https://github.com/joewalnes/webbit - * @author Vibul Imtarnasan - */ -public class UTF8Exception extends RuntimeException { - private static final long serialVersionUID = 1L; - - public UTF8Exception(String reason) { - super(reason); - } -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java b/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java deleted file mode 100644 index c2c5971040..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/UTF8Output.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Adaptation of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ - * - * Copyright (c) 2008-2009 Bjoern Hoehrmann - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated - * documentation files (the "Software"), to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and - * to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -package com.ning.http.client.providers.netty.netty4; - -/** - * Checks UTF8 bytes for validity before converting it into a string - * - * @author Bjoern Hoehrmann - * @author https://github.com/joewalnes/webbit - * @author Vibul Imtarnasan - */ -public class UTF8Output { - private static final int UTF8_ACCEPT = 0; - private static final int UTF8_REJECT = 12; - - private static final byte[] TYPES = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 11, 6, 6, 6, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 }; - - private static final byte[] STATES = { 0, 12, 24, 36, 60, 96, 84, 12, 12, 12, 48, 72, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 0, 12, 12, 12, 24, 12, 12, 12, 12, 12, 24, 12, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 24, 12, 12, 12, - 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 12, 12, 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 36, 12, 36, 12, 12, 12, 36, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 }; - - private int state = UTF8_ACCEPT; - private int codep = 0; - - private final StringBuilder stringBuilder; - - public UTF8Output(byte[] bytes) { - stringBuilder = new StringBuilder(bytes.length); - write(bytes); - } - - public void write(byte[] bytes) { - for (byte b : bytes) { - write(b); - } - } - - public void write(int b) { - byte type = TYPES[b & 0xFF]; - - codep = (state != UTF8_ACCEPT) ? (b & 0x3f) | (codep << 6) : (0xff >> type) & (b); - - state = STATES[state + type]; - - if (state == UTF8_ACCEPT) { - stringBuilder.append((char) codep); - } else if (state == UTF8_REJECT) { - throw new UTF8Exception("bytes are not UTF-8"); - } - } - - @Override - public String toString() { - if (state != UTF8_ACCEPT) { - throw new UTF8Exception("bytes are not UTF-8"); - } - return stringBuilder.toString(); - } -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java deleted file mode 100644 index fa59f866af..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameDecoder.java +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -// (BSD License: http://www.opensource.org/licenses/bsd-license) -// -// Copyright (c) 2011, Joe Walnes and contributors -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the -// following conditions are met: -// -// * Redistributions of source code must retain the above -// copyright notice, this list of conditions and the -// following disclaimer. -// -// * 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. -// -// * Neither the name of the Webbit nor the names of -// its contributors may be used to endorse or promote products -// derived from this software without specific prior written -// permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR -// 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 OF SUCH DAMAGE. - -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFutureListener; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.handler.codec.frame.CorruptedFrameException; -import org.jboss.netty.handler.codec.frame.TooLongFrameException; -import org.jboss.netty.handler.codec.replay.ReplayingDecoder; -import org.jboss.netty.logging.InternalLogger; -import org.jboss.netty.logging.InternalLoggerFactory; - -/** - * Decodes a web socket frame from wire protocol version 8 format. This code was - * forked from webbit and - * modified. - * - * @author Aslak Hellesøy - * @author Vibul Imtarnasan - */ -public class WebSocket08FrameDecoder extends ReplayingDecoder { - - private static final InternalLogger logger = InternalLoggerFactory.getInstance(WebSocket08FrameDecoder.class); - - private static final byte OPCODE_CONT = 0x0; - private static final byte OPCODE_TEXT = 0x1; - private static final byte OPCODE_BINARY = 0x2; - private static final byte OPCODE_CLOSE = 0x8; - private static final byte OPCODE_PING = 0x9; - private static final byte OPCODE_PONG = 0xA; - - private UTF8Output fragmentedFramesText = null; - private int fragmentedFramesCount = 0; - - private boolean frameFinalFlag; - private int frameRsv; - private int frameOpcode; - private long framePayloadLength; - private ChannelBuffer framePayload = null; - private int framePayloadBytesRead = 0; - private ChannelBuffer maskingKey; - - private boolean allowExtensions = false; - private boolean maskedPayload = false; - private boolean receivedClosingHandshake = false; - - public enum State { - FRAME_START, MASKING_KEY, PAYLOAD, CORRUPT - } - - /** - * Constructor - * - * @param maskedPayload - * Web socket servers must set this to true processed incoming - * masked payload. Client implementations must set this to false. - * @param allowExtensions - * Flag to allow reserved extension bits to be used or not - */ - public WebSocket08FrameDecoder(boolean maskedPayload, boolean allowExtensions) { - super(State.FRAME_START); - this.maskedPayload = maskedPayload; - this.allowExtensions = allowExtensions; - } - - @Override - protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, State state) throws Exception { - - // Discard all data received if closing handshake was received before. - if (receivedClosingHandshake) { - buffer.skipBytes(actualReadableBytes()); - return null; - } - - switch (state) { - case FRAME_START: - framePayloadBytesRead = 0; - framePayloadLength = -1; - framePayload = null; - - // FIN, RSV, OPCODE - byte b = buffer.readByte(); - frameFinalFlag = (b & 0x80) != 0; - frameRsv = (b & 0x70) >> 4; - frameOpcode = (b & 0x0F); - - logger.debug("Decoding WebSocket Frame opCode=" + frameOpcode); - - // MASK, PAYLOAD LEN 1 - b = buffer.readByte(); - boolean frameMasked = (b & 0x80) != 0; - int framePayloadLen1 = (b & 0x7F); - - if (frameRsv != 0 && !this.allowExtensions) { - protocolViolation(channel, "RSV != 0 and no extension negotiated, RSV:" + frameRsv); - return null; - } - - if (this.maskedPayload && !frameMasked) { - protocolViolation(channel, "unmasked client to server frame"); - return null; - } - if (frameOpcode > 7) { // control frame (have MSB in opcode set) - - // control frames MUST NOT be fragmented - if (!frameFinalFlag) { - protocolViolation(channel, "fragmented control frame"); - return null; - } - - // control frames MUST have payload 125 octets or less - if (framePayloadLen1 > 125) { - protocolViolation(channel, "control frame with payload length > 125 octets"); - return null; - } - - // check for reserved control frame opcodes - if (!(frameOpcode == OPCODE_CLOSE || frameOpcode == OPCODE_PING || frameOpcode == OPCODE_PONG)) { - protocolViolation(channel, "control frame using reserved opcode " + frameOpcode); - return null; - } - - // close frame : if there is a body, the first two bytes of the - // body MUST be a 2-byte - // unsigned integer (in network byte order) representing a - // status code - if (frameOpcode == 8 && framePayloadLen1 == 1) { - protocolViolation(channel, "received close control frame with payload len 1"); - return null; - } - } else { // data frame - // check for reserved data frame opcodes - if (!(frameOpcode == OPCODE_CONT || frameOpcode == OPCODE_TEXT || frameOpcode == OPCODE_BINARY)) { - protocolViolation(channel, "data frame using reserved opcode " + frameOpcode); - return null; - } - - // check opcode vs message fragmentation state 1/2 - if (fragmentedFramesCount == 0 && frameOpcode == OPCODE_CONT) { - protocolViolation(channel, "received continuation data frame outside fragmented message"); - return null; - } - - // check opcode vs message fragmentation state 2/2 - if (fragmentedFramesCount != 0 && frameOpcode != OPCODE_CONT && frameOpcode != OPCODE_PING) { - protocolViolation(channel, "received non-continuation data frame while inside fragmented message"); - return null; - } - } - - if (framePayloadLen1 == 126) { - framePayloadLength = buffer.readUnsignedShort(); - if (framePayloadLength < 126) { - protocolViolation(channel, "invalid data frame length (not using minimal length encoding)"); - return null; - } - } else if (framePayloadLen1 == 127) { - framePayloadLength = buffer.readLong(); - // TODO: check if it's bigger than 0x7FFFFFFFFFFFFFFF, Maybe - // just check if it's negative? - - if (framePayloadLength < 65536) { - protocolViolation(channel, "invalid data frame length (not using minimal length encoding)"); - return null; - } - } else { - framePayloadLength = framePayloadLen1; - } - - // logger.debug("Frame length=" + framePayloadLength); - checkpoint(State.MASKING_KEY); - case MASKING_KEY: - if (this.maskedPayload) { - maskingKey = buffer.readBytes(4); - } - checkpoint(State.PAYLOAD); - case PAYLOAD: - // Some times, the payload may not be delivered in 1 nice packet - // We need to accumulate the data until we have it all - int rbytes = actualReadableBytes(); - ChannelBuffer payloadBuffer = null; - - int willHaveReadByteCount = framePayloadBytesRead + rbytes; - // logger.debug("Frame rbytes=" + rbytes + " willHaveReadByteCount=" - // + willHaveReadByteCount + " framePayloadLength=" + - // framePayloadLength); - if (willHaveReadByteCount == framePayloadLength) { - // We have all our content so proceed to process - payloadBuffer = buffer.readBytes(rbytes); - } else if (willHaveReadByteCount < framePayloadLength) { - // We don't have all our content so accumulate payload. - // Returning null means we will get called back - payloadBuffer = buffer.readBytes(rbytes); - if (framePayload == null) { - framePayload = channel.getConfig().getBufferFactory().getBuffer(toFrameLength(framePayloadLength)); - } - framePayload.writeBytes(payloadBuffer); - framePayloadBytesRead = framePayloadBytesRead + rbytes; - - // Return null to wait for more bytes to arrive - return null; - } else if (willHaveReadByteCount > framePayloadLength) { - // We have more than what we need so read up to the end of frame - // Leave the remainder in the buffer for next frame - payloadBuffer = buffer.readBytes(toFrameLength(framePayloadLength - framePayloadBytesRead)); - } - - // Now we have all the data, the next checkpoint must be the next - // frame - checkpoint(State.FRAME_START); - - // Take the data that we have in this packet - if (framePayload == null) { - framePayload = payloadBuffer; - } else { - framePayload.writeBytes(payloadBuffer); - } - - // Unmask data if needed - if (this.maskedPayload) { - unmask(framePayload); - } - - // Processing for fragmented messages - String aggregatedText = null; - if (frameFinalFlag) { - // Final frame of the sequence. Apparently ping frames are - // allowed in the middle of a fragmented message - if (frameOpcode != OPCODE_PING) { - fragmentedFramesCount = 0; - - // Check text for UTF8 correctness - if (frameOpcode == OPCODE_TEXT || fragmentedFramesText != null) { - // Check UTF-8 correctness for this payload - checkUTF8String(channel, framePayload.array()); - - // This does a second check to make sure UTF-8 - // correctness for entire text message - aggregatedText = fragmentedFramesText.toString(); - - fragmentedFramesText = null; - } - } - } else { - // Not final frame so we can expect more frames in the - // fragmented sequence - if (fragmentedFramesCount == 0) { - // First text or binary frame for a fragmented set - fragmentedFramesText = null; - if (frameOpcode == OPCODE_TEXT) { - checkUTF8String(channel, framePayload.array()); - } - } else { - // Subsequent frames - only check if init frame is text - if (fragmentedFramesText != null) { - checkUTF8String(channel, framePayload.array()); - } - } - - // Increment counter - fragmentedFramesCount++; - } - - // Return the frame - if (frameOpcode == OPCODE_TEXT) { - return new TextWebSocketFrame(frameFinalFlag, frameRsv, framePayload); - } else if (frameOpcode == OPCODE_BINARY) { - return new BinaryWebSocketFrame(frameFinalFlag, frameRsv, framePayload); - } else if (frameOpcode == OPCODE_PING) { - return new PingWebSocketFrame(frameFinalFlag, frameRsv, framePayload); - } else if (frameOpcode == OPCODE_PONG) { - return new PongWebSocketFrame(frameFinalFlag, frameRsv, framePayload); - } else if (frameOpcode == OPCODE_CONT) { - return new ContinuationWebSocketFrame(frameFinalFlag, frameRsv, framePayload, aggregatedText); - } else if (frameOpcode == OPCODE_CLOSE) { - this.receivedClosingHandshake = true; - return new CloseWebSocketFrame(frameFinalFlag, frameRsv); - } else { - throw new UnsupportedOperationException("Cannot decode web socket frame with opcode: " + frameOpcode); - } - case CORRUPT: - // If we don't keep reading Netty will throw an exception saying - // we can't return null if no bytes read and state not changed. - buffer.readByte(); - return null; - default: - throw new Error("Shouldn't reach here."); - } - } - - private void unmask(ChannelBuffer frame) { - byte[] bytes = frame.array(); - for (int i = 0; i < bytes.length; i++) { - frame.setByte(i, frame.getByte(i) ^ maskingKey.getByte(i % 4)); - } - } - - private void protocolViolation(Channel channel, String reason) throws CorruptedFrameException { - checkpoint(State.CORRUPT); - if (channel.isConnected()) { - channel.write(ChannelBuffers.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE); - channel.close().awaitUninterruptibly(); - } - throw new CorruptedFrameException(reason); - } - - private int toFrameLength(long l) throws TooLongFrameException { - if (l > Integer.MAX_VALUE) { - throw new TooLongFrameException("Length:" + l); - } else { - return (int) l; - } - } - - private void checkUTF8String(Channel channel, byte[] bytes) throws CorruptedFrameException { - try { - // StringBuilder sb = new StringBuilder("UTF8 " + bytes.length + - // " bytes: "); - // for (byte b : bytes) { - // sb.append(Integer.toHexString(b)).append(" "); - // } - // logger.debug(sb.toString()); - - if (fragmentedFramesText == null) { - fragmentedFramesText = new UTF8Output(bytes); - } else { - fragmentedFramesText.write(bytes); - } - } catch (UTF8Exception ex) { - protocolViolation(channel, "invalid UTF-8 bytes"); - } - } -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java deleted file mode 100644 index 4b95354af6..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocket08FrameEncoder.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -// (BSD License: http://www.opensource.org/licenses/bsd-license) -// -// Copyright (c) 2011, Joe Walnes and contributors -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or -// without modification, are permitted provided that the -// following conditions are met: -// -// * Redistributions of source code must retain the above -// copyright notice, this list of conditions and the -// following disclaimer. -// -// * 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. -// -// * Neither the name of the Webbit nor the names of -// its contributors may be used to endorse or promote products -// derived from this software without specific prior written -// permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -// CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR -// 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 OF SUCH DAMAGE. - -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.handler.codec.frame.TooLongFrameException; -import org.jboss.netty.handler.codec.oneone.OneToOneEncoder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.nio.ByteBuffer; - -/** - *

- * Encodes a web socket frame into wire protocol version 8 format. This code was - * forked from webbit and - * modified. - *

- * - * @author Aslak Hellesøy - * @author Vibul Imtarnasan - */ -public class WebSocket08FrameEncoder extends OneToOneEncoder { - - private static final Logger logger = LoggerFactory.getLogger(WebSocket08FrameEncoder.class); - - private static final byte OPCODE_CONT = 0x0; - private static final byte OPCODE_TEXT = 0x1; - private static final byte OPCODE_BINARY = 0x2; - private static final byte OPCODE_CLOSE = 0x8; - private static final byte OPCODE_PING = 0x9; - private static final byte OPCODE_PONG = 0xA; - - private boolean maskPayload = false; - - /** - * Constructor - * - * @param maskPayload - * Web socket clients must set this to true to mask payload. - * Server implementations must set this to false. - */ - public WebSocket08FrameEncoder(boolean maskPayload) { - this.maskPayload = maskPayload; - } - - @Override - protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception { - - byte[] mask = null; - - if (msg instanceof WebSocketFrame) { - WebSocketFrame frame = (WebSocketFrame) msg; - ChannelBuffer data = frame.getBinaryData(); - if (data == null) { - data = ChannelBuffers.EMPTY_BUFFER; - } - - byte opcode; - if (frame instanceof TextWebSocketFrame) { - opcode = OPCODE_TEXT; - } else if (frame instanceof PingWebSocketFrame) { - opcode = OPCODE_PING; - } else if (frame instanceof PongWebSocketFrame) { - opcode = OPCODE_PONG; - } else if (frame instanceof CloseWebSocketFrame) { - opcode = OPCODE_CLOSE; - } else if (frame instanceof BinaryWebSocketFrame) { - opcode = OPCODE_BINARY; - } else if (frame instanceof ContinuationWebSocketFrame) { - opcode = OPCODE_CONT; - } else { - throw new UnsupportedOperationException("Cannot encode frame of type: " + frame.getClass().getName()); - } - - int length = data.readableBytes(); - - logger.debug("Encoding WebSocket Frame opCode=" + opcode + " length=" + length); - - int b0 = 0; - if (frame.isFinalFragment()) { - b0 |= (1 << 7); - } - b0 |= (frame.getRsv() % 8) << 4; - b0 |= opcode % 128; - - ChannelBuffer header; - ChannelBuffer body; - - if (opcode == OPCODE_PING && length > 125) { - throw new TooLongFrameException("invalid payload for PING (payload length must be <= 125, was " + length); - } - - int maskLength = this.maskPayload ? 4 : 0; - if (length <= 125) { - header = ChannelBuffers.buffer(2 + maskLength); - header.writeByte(b0); - byte b = (byte) (this.maskPayload ? (0x80 | (byte) length) : (byte) length); - header.writeByte(b); - } else if (length <= 0xFFFF) { - header = ChannelBuffers.buffer(4 + maskLength); - header.writeByte(b0); - header.writeByte(this.maskPayload ? (0xFE) : 126); - header.writeByte((length >>> 8) & 0xFF); - header.writeByte((length) & 0xFF); - } else { - header = ChannelBuffers.buffer(10 + maskLength); - header.writeByte(b0); - header.writeByte(this.maskPayload ? (0xFF) : 127); - header.writeLong(length); - } - - // Write payload - if (this.maskPayload) { - Integer random = (int) (Math.random() * Integer.MAX_VALUE); - mask = ByteBuffer.allocate(4).putInt(random).array(); - header.writeBytes(mask); - - body = ChannelBuffers.buffer(length); - int counter = 0; - while (data.readableBytes() > 0) { - byte byteData = data.readByte(); - body.writeByte(byteData ^ mask[+counter++ % 4]); - } - } else { - body = data; - } - return ChannelBuffers.wrappedBuffer(header, body); - } - - // If not websocket, then just return the message - return msg; - } - -} \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java deleted file mode 100644 index a6c3f90f49..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrame.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -import org.jboss.netty.buffer.ChannelBuffer; - -/** - * Base class for web socket frames - * - * @author The Netty Project - */ -public abstract class WebSocketFrame { - - /** - * Flag to indicate if this frame is the final fragment in a message. The - * first fragment (frame) may also be the final fragment. - */ - private boolean finalFragment = true; - - /** - * RSV1, RSV2, RSV3 used for extensions - */ - private int rsv = 0; - - /** - * Contents of this frame - */ - private ChannelBuffer binaryData; - - /** - * Returns binary data - */ - public ChannelBuffer getBinaryData() { - return binaryData; - } - - /** - * Sets the binary data for this frame - */ - public void setBinaryData(ChannelBuffer binaryData) { - this.binaryData = binaryData; - } - - /** - * Flag to indicate if this frame is the final fragment in a message. The - * first fragment (frame) may also be the final fragment. - */ - public boolean isFinalFragment() { - return finalFragment; - } - - public void setFinalFragment(boolean finalFragment) { - this.finalFragment = finalFragment; - } - - /** - * Bits used for extensions to the standard. - */ - public int getRsv() { - return rsv; - } - - public void setRsv(int rsv) { - this.rsv = rsv; - } - -} diff --git a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java b/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java deleted file mode 100644 index 449497aec6..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/netty4/WebSocketFrameType.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Red Hat, Inc. - * - * Red Hat licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty.netty4; - -/** - * Type of web socket frames - * - * @author The Netty Project - */ -public enum WebSocketFrameType { - TEXT, BINARY, PING, PONG, CLOSE, CONTINUATION -} From bc856b13f216b720a658a179ee15e31d85b616c7 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 24 Jan 2012 14:27:17 -0500 Subject: [PATCH 0066/2844] Fix copyright, exclude netty4 --- pom.xml | 1 + .../client/AsyncHttpClientConfigBean.java | 2 +- .../http/client/AsyncHttpProviderConfig.java | 2 +- src/main/java/com/ning/http/client/Body.java | 2 +- .../com/ning/http/client/BodyConsumer.java | 2 +- .../client/BodyDeferringAsyncHandler.java | 2 +- .../com/ning/http/client/BodyGenerator.java | 2 +- .../http/client/ProgressAsyncHandler.java | 2 +- .../ning/http/client/RandomAccessBody.java | 2 +- .../http/client/ResumableBodyConsumer.java | 2 +- .../ning/http/client/ThrowableHandler.java | 2 +- .../com/ning/http/client/UpgradeHandler.java | 2 +- .../consumers/AppendableBodyConsumer.java | 2 +- .../consumers/ByteBufferBodyConsumer.java | 2 +- .../client/consumers/FileBodyConsumer.java | 2 +- .../consumers/OutputStreamBodyConsumer.java | 2 +- .../ResumableRandomAccessFileListener.java | 2 +- .../client/extra/ThrottleRequestFilter.java | 2 +- .../http/client/filter/FilterContext.java | 2 +- .../http/client/filter/FilterException.java | 2 +- .../http/client/filter/IOExceptionFilter.java | 2 +- .../http/client/filter/RequestFilter.java | 2 +- .../http/client/filter/ResponseFilter.java | 2 +- .../generators/ByteArrayBodyGenerator.java | 2 +- .../client/generators/FileBodyGenerator.java | 2 +- .../generators/InputStreamBodyGenerator.java | 2 +- .../listenable/AbstractListenableFuture.java | 2 +- .../http/client/listenable/ExecutionList.java | 2 +- .../listener/TransferCompletionHandler.java | 2 +- .../client/listener/TransferListener.java | 2 +- .../com/ning/http/client/ntlm/NTLMEngine.java | 2 +- .../http/client/ntlm/NTLMEngineException.java | 2 +- .../apache/ApacheAsyncHttpProvider.java | 2 +- .../apache/ApacheAsyncHttpProviderConfig.java | 2 +- .../providers/apache/ApacheResponse.java | 2 +- .../apache/ApacheResponseBodyPart.java | 2 +- .../apache/ApacheResponseFuture.java | 2 +- .../apache/ApacheResponseHeaders.java | 2 +- .../apache/ApacheResponseStatus.java | 2 +- .../grizzly/FeedableBodyGenerator.java | 2 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 2 +- .../GrizzlyAsyncHttpProviderConfig.java | 2 +- .../grizzly/GrizzlyConnectionsPool.java | 2 +- .../providers/grizzly/GrizzlyResponse.java | 2 +- .../grizzly/GrizzlyResponseBodyPart.java | 2 +- .../grizzly/GrizzlyResponseFuture.java | 2 +- .../grizzly/GrizzlyResponseHeaders.java | 2 +- .../grizzly/GrizzlyResponseStatus.java | 2 +- .../grizzly/TransportCustomizer.java | 2 +- .../providers/jdk/JDKAsyncHttpProvider.java | 2 +- .../jdk/JDKAsyncHttpProviderConfig.java | 2 +- .../providers/jdk/JDKDelegateFuture.java | 2 +- .../http/client/providers/jdk/JDKFuture.java | 2 +- .../client/providers/jdk/JDKResponse.java | 2 +- .../providers/jdk/ResponseBodyPart.java | 2 +- .../client/providers/jdk/ResponseHeaders.java | 2 +- .../client/providers/jdk/ResponseStatus.java | 2 +- .../providers/netty/BodyChunkedInput.java | 2 +- .../providers/netty/BodyFileRegion.java | 2 +- .../providers/netty/NettyConnectionsPool.java | 2 +- .../providers/netty/NettyWebSocket.java | 2 +- .../http/client/providers/netty/Protocol.java | 2 +- .../client/providers/netty/WebSocketUtil.java | 2 +- .../providers/netty/spnego/SpnegoEngine.java | 2 +- .../netty/spnego/SpnegoTokenGenerator.java | 2 +- .../PropertiesBasedResumableProcessor.java | 2 +- .../resumable/ResumableAsyncHandler.java | 2 +- .../resumable/ResumableIOExceptionFilter.java | 2 +- .../client/resumable/ResumableListener.java | 2 +- .../simple/SimpleAHCTransferListener.java | 2 +- .../webdav/WebDavCompletionHandlerBase.java | 2 +- .../http/client/webdav/WebDavResponse.java | 2 +- .../websocket/DefaultWebSocketListener.java | 2 +- .../ning/http/client/websocket/WebSocket.java | 2 +- .../websocket/WebSocketByteListener.java | 2 +- .../client/websocket/WebSocketListener.java | 2 +- .../websocket/WebSocketPingListener.java | 2 +- .../websocket/WebSocketPongListener.java | 2 +- .../websocket/WebSocketTextListener.java | 2 +- .../websocket/WebSocketUpgradeHandler.java | 2 +- .../http/multipart/FilePartStallHandler.java | 2 +- .../multipart/FileUploadStalledException.java | 25 +++++++++---------- .../ning/http/multipart/MultipartBody.java | 2 +- .../http/util/AllowAllHostnameVerifier.java | 2 +- .../http/util/AsyncHttpProviderUtils.java | 2 +- .../ning/http/util/AuthenticatorUtils.java | 2 +- src/main/java/com/ning/http/util/Base64.java | 2 +- .../ning/http/util/CleanupChannelGroup.java | 2 +- .../java/com/ning/http/util/DateUtil.java | 2 +- .../java/com/ning/http/util/ProxyUtils.java | 2 +- .../java/com/ning/http/client/RealmTest.java | 2 +- .../http/client/async/AuthTimeoutTest.java | 2 +- .../async/BodyDeferringAsyncHandlerTest.java | 2 +- .../client/async/ByteBufferCapacityTest.java | 2 +- .../ning/http/client/async/ChunkingTest.java | 2 +- .../http/client/async/DigestAuthTest.java | 2 +- .../client/async/FilePartLargeFileTest.java | 2 +- .../ning/http/client/async/FilterTest.java | 2 +- .../client/async/HostnameVerifierTest.java | 2 +- .../client/async/ListenableFutureTest.java | 2 +- .../client/async/MultipartUploadTest.java | 2 +- .../http/client/async/MultipleHeaderTest.java | 2 +- .../async/NonAsciiContentLengthTest.java | 2 +- .../client/async/ProxyyTunnellingTest.java | 2 +- .../http/client/async/PutLargeFileTest.java | 2 +- .../client/async/RetryNonBlockingIssue.java | 2 +- .../http/client/async/RetryRequestTest.java | 2 +- .../SimpleAsyncClientErrorBehaviourTest.java | 2 +- .../async/SimpleAsyncHttpClientTest.java | 2 +- .../client/async/TransferListenerTest.java | 2 +- .../http/client/async/WebDavBasicTest.java | 2 +- .../http/client/async/ZeroCopyFileTest.java | 2 +- .../GrizzlyAsyncProviderBasicTest.java | 2 +- .../GrizzlyAsyncStreamHandlerTest.java | 2 +- .../GrizzlyAsyncStreamLifecycleTest.java | 2 +- .../async/grizzly/GrizzlyAuthTimeoutTest.java | 2 +- .../async/grizzly/GrizzlyBasicAuthTest.java | 2 +- .../async/grizzly/GrizzlyBasicHttpsTest.java | 2 +- .../async/grizzly/GrizzlyBodyChunkTest.java | 2 +- .../GrizzlyBodyDeferringAsyncHandlerTest.java | 2 +- .../GrizzlyByteBufferCapacityTest.java | 2 +- .../async/grizzly/GrizzlyChunkingTest.java | 2 +- .../grizzly/GrizzlyComplexClientTest.java | 2 +- .../grizzly/GrizzlyConnectionPoolTest.java | 2 +- .../async/grizzly/GrizzlyDigestAuthTest.java | 2 +- .../async/grizzly/GrizzlyEmptyBodyTest.java | 2 +- .../grizzly/GrizzlyErrorResponseTest.java | 2 +- .../grizzly/GrizzlyExpectContinue100Test.java | 2 +- .../async/grizzly/GrizzlyFilterTest.java | 2 +- .../grizzly/GrizzlyFollowingThreadTest.java | 2 +- .../async/grizzly/GrizzlyHead302Test.java | 2 +- .../GrizzlyHttpToHttpsRedirectTest.java | 2 +- .../grizzly/GrizzlyIdleStateHandlerTest.java | 2 +- .../async/grizzly/GrizzlyInputStreamTest.java | 2 +- .../grizzly/GrizzlyListenableFutureTest.java | 2 +- .../GrizzlyMaxConnectionsInThreadsTest.java | 2 +- .../GrizzlyMaxTotalConnectionTest.java | 2 +- .../grizzly/GrizzlyMultipleHeaderTest.java | 2 +- .../grizzly/GrizzlyNoNullResponseTest.java | 2 +- .../GrizzlyNonAsciiContentLengthTest.java | 2 +- .../grizzly/GrizzlyParamEncodingTest.java | 2 +- .../GrizzlyPerRequestRelative302Test.java | 2 +- .../grizzly/GrizzlyPerRequestTimeoutTest.java | 2 +- .../async/grizzly/GrizzlyPostWithQSTest.java | 2 +- .../async/grizzly/GrizzlyProxyTest.java | 2 +- .../grizzly/GrizzlyProxyTunnelingTest.java | 2 +- .../grizzly/GrizzlyPutLargeFileTest.java | 2 +- .../grizzly/GrizzlyQueryParametersTest.java | 2 +- .../async/grizzly/GrizzlyRC10KTest.java | 2 +- .../GrizzlyRedirectConnectionUsageTest.java | 2 +- .../async/grizzly/GrizzlyRelative302Test.java | 2 +- .../async/grizzly/GrizzlyRemoteSiteTest.java | 2 +- .../grizzly/GrizzlyRetryRequestTest.java | 2 +- .../GrizzlySimpleAsyncHttpClientTest.java | 2 +- .../grizzly/GrizzlyTransferListenerTest.java | 2 +- .../netty/NettyAsyncHttpProviderTest.java | 2 +- .../netty/NettyAsyncProviderBasicTest.java | 2 +- .../netty/NettyAsyncStreamHandlerTest.java | 2 +- .../netty/NettyAsyncStreamLifecycleTest.java | 2 +- .../async/netty/NettyAuthTimeoutTest.java | 2 +- .../async/netty/NettyBasicAuthTest.java | 2 +- .../async/netty/NettyBasicHttpsTest.java | 2 +- .../async/netty/NettyBodyChunkTest.java | 2 +- .../NettyBodyDeferringAsyncHandlerTest.java | 2 +- .../netty/NettyByteBufferCapacityTest.java | 2 +- .../async/netty/NettyComplexClientTest.java | 2 +- .../async/netty/NettyConnectionPoolTest.java | 2 +- .../async/netty/NettyDigestAuthTest.java | 2 +- .../async/netty/NettyEmptyBodyTest.java | 2 +- .../async/netty/NettyErrorResponseTest.java | 2 +- .../netty/NettyExpect100ContinueTest.java | 2 +- .../netty/NettyFilePartLargeFileTest.java | 2 +- .../client/async/netty/NettyFilterTest.java | 2 +- .../async/netty/NettyFollowingThreadTest.java | 2 +- .../client/async/netty/NettyHead302Test.java | 2 +- .../netty/NettyHostnameVerifierTest.java | 2 +- .../netty/NettyHttpToHttpsRedirectTest.java | 2 +- .../netty/NettyIdleStateHandlerTest.java | 2 +- .../async/netty/NettyInputStreamTest.java | 2 +- .../netty/NettyListenableFutureTest.java | 2 +- .../netty/NettyMaxConnectionsInThreads.java | 2 +- .../netty/NettyMaxTotalConnectionTest.java | 2 +- .../async/netty/NettyMultipartUploadTest.java | 2 +- .../async/netty/NettyMultipleHeaderTest.java | 2 +- .../async/netty/NettyNoNullResponseTest.java | 2 +- .../netty/NettyNonAsciiContentLengthTest.java | 2 +- .../async/netty/NettyParamEncodingTest.java | 2 +- .../netty/NettyPerRequestRelative302Test.java | 2 +- .../netty/NettyPerRequestTimeoutTest.java | 2 +- .../async/netty/NettyPostWithQSTest.java | 2 +- .../client/async/netty/NettyProxyTest.java | 2 +- .../async/netty/NettyProxyTunnellingTest.java | 2 +- .../async/netty/NettyPutLargeFileTest.java | 2 +- .../async/netty/NettyQueryParametersTest.java | 2 +- .../client/async/netty/NettyRC10KTest.java | 2 +- .../NettyRedirectConnectionUsageTest.java | 2 +- .../async/netty/NettyRelative302Test.java | 2 +- .../netty/NettySimpleAsyncHttpClientTest.java | 2 +- .../netty/NettyTransferListenerTest.java | 2 +- .../async/netty/NettyWebDavBasicTest.java | 2 +- .../async/netty/NettyZeroCopyFileTest.java | 2 +- .../netty/NettyAsyncResponseTest.java | 4 +-- .../client/websocket/AbstractBasicTest.java | 2 +- .../client/websocket/ByteMessageTest.java | 2 +- .../client/websocket/TextMessageTest.java | 2 +- .../grizzly/GrizzlyByteMessageTest.java | 2 +- .../grizzly/GrizzlyTextMessageTest.java | 2 +- .../websocket/netty/NettyByteMessageTest.java | 2 +- .../websocket/netty/NettyTextMessageTest.java | 2 +- .../com/ning/http/util/ProxyUtilsTest.java | 2 +- 210 files changed, 222 insertions(+), 222 deletions(-) diff --git a/pom.xml b/pom.xml index 3292784ea6..644423ab6e 100644 --- a/pom.xml +++ b/pom.xml @@ -402,6 +402,7 @@ 2.3 + **/netty4/** **/NettyAsyncHttpProvider$* **/AsyncHandler$STATE **/ProxyServer$Protocol diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java index 71557fb82f..0924d4d760 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java index ef39303e88..ea5e0f8911 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java +++ b/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/Body.java b/src/main/java/com/ning/http/client/Body.java index 8daea656ce..309fbec5ae 100644 --- a/src/main/java/com/ning/http/client/Body.java +++ b/src/main/java/com/ning/http/client/Body.java @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. +* Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/BodyConsumer.java b/src/main/java/com/ning/http/client/BodyConsumer.java index 25fd2a9a17..b092ec1210 100644 --- a/src/main/java/com/ning/http/client/BodyConsumer.java +++ b/src/main/java/com/ning/http/client/BodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java b/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java index e309578181..3171d78aab 100644 --- a/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java +++ b/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/BodyGenerator.java b/src/main/java/com/ning/http/client/BodyGenerator.java index 38c0302137..35fe386282 100644 --- a/src/main/java/com/ning/http/client/BodyGenerator.java +++ b/src/main/java/com/ning/http/client/BodyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/ProgressAsyncHandler.java b/src/main/java/com/ning/http/client/ProgressAsyncHandler.java index 9879c2a77c..3c0363d8f0 100644 --- a/src/main/java/com/ning/http/client/ProgressAsyncHandler.java +++ b/src/main/java/com/ning/http/client/ProgressAsyncHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/RandomAccessBody.java b/src/main/java/com/ning/http/client/RandomAccessBody.java index beba1ecfeb..c4ee2f2332 100644 --- a/src/main/java/com/ning/http/client/RandomAccessBody.java +++ b/src/main/java/com/ning/http/client/RandomAccessBody.java @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. +* Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/ResumableBodyConsumer.java b/src/main/java/com/ning/http/client/ResumableBodyConsumer.java index b9d83085d0..018bd648e4 100644 --- a/src/main/java/com/ning/http/client/ResumableBodyConsumer.java +++ b/src/main/java/com/ning/http/client/ResumableBodyConsumer.java @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. +* Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/ThrowableHandler.java b/src/main/java/com/ning/http/client/ThrowableHandler.java index 16a8c5c50f..5f017fd4b7 100644 --- a/src/main/java/com/ning/http/client/ThrowableHandler.java +++ b/src/main/java/com/ning/http/client/ThrowableHandler.java @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. +* Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/UpgradeHandler.java b/src/main/java/com/ning/http/client/UpgradeHandler.java index 0ca0cc53a2..889c4895e1 100644 --- a/src/main/java/com/ning/http/client/UpgradeHandler.java +++ b/src/main/java/com/ning/http/client/UpgradeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java index 0d624972ce..ef04f9b8da 100644 --- a/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java +++ b/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java index cb631d48a9..e1d07bbaa4 100644 --- a/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java +++ b/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java index c99800571f..ad8b7e288f 100644 --- a/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java +++ b/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java b/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java index 8ea18560a9..d1e806ca43 100644 --- a/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java +++ b/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java index 5d1c43a0f8..042baf1552 100644 --- a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java +++ b/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java b/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java index 7e72eb5554..6289d2f284 100644 --- a/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java +++ b/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/filter/FilterContext.java b/src/main/java/com/ning/http/client/filter/FilterContext.java index 0c69bc6ee0..a7a60d25f5 100644 --- a/src/main/java/com/ning/http/client/filter/FilterContext.java +++ b/src/main/java/com/ning/http/client/filter/FilterContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/filter/FilterException.java b/src/main/java/com/ning/http/client/filter/FilterException.java index bae54084c5..c8e68ee731 100644 --- a/src/main/java/com/ning/http/client/filter/FilterException.java +++ b/src/main/java/com/ning/http/client/filter/FilterException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java b/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java index 79640d2a69..59f5cdc6f0 100644 --- a/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java +++ b/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/filter/RequestFilter.java b/src/main/java/com/ning/http/client/filter/RequestFilter.java index ac39ec778e..31d0749b9b 100644 --- a/src/main/java/com/ning/http/client/filter/RequestFilter.java +++ b/src/main/java/com/ning/http/client/filter/RequestFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/filter/ResponseFilter.java b/src/main/java/com/ning/http/client/filter/ResponseFilter.java index c3194f0cff..3175dfe399 100644 --- a/src/main/java/com/ning/http/client/filter/ResponseFilter.java +++ b/src/main/java/com/ning/http/client/filter/ResponseFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java b/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java index 3a95c2ca59..48cc2ae2d2 100644 --- a/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java +++ b/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java b/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java index 3b4ecfec27..c1ff9ef88a 100644 --- a/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java +++ b/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java b/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java index 2672041da0..12660ca438 100644 --- a/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java +++ b/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java b/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java index ab5319e1b7..a0f9575e6a 100644 --- a/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java +++ b/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/listenable/ExecutionList.java b/src/main/java/com/ning/http/client/listenable/ExecutionList.java index bae201d3c4..84d9bef13a 100644 --- a/src/main/java/com/ning/http/client/listenable/ExecutionList.java +++ b/src/main/java/com/ning/http/client/listenable/ExecutionList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java b/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java index 5c15ad917f..6d71cbd238 100644 --- a/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java +++ b/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/listener/TransferListener.java b/src/main/java/com/ning/http/client/listener/TransferListener.java index baa34694d0..580c3cba53 100644 --- a/src/main/java/com/ning/http/client/listener/TransferListener.java +++ b/src/main/java/com/ning/http/client/listener/TransferListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java index 1d532f3575..a56c9bf141 100644 --- a/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java +++ b/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java b/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java index 10bd175c4b..d1c557520a 100644 --- a/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java +++ b/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index eefe045888..b96b66fdf6 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java index 8deefaa567..8b2aee6d07 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index 5d4a44fae3..b6e63db99d 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java index af6c74f0dd..c66823baeb 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java index 2d3fa0960d..0b8abff3e9 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java index eb80723226..1940f4c971 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java index 6d3341c359..64702c75a8 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java index 7a2601c0ee..4e509964db 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index ddc22cbd27..afbaa6f14f 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java index 667a24fcdb..70b7425391 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index 94f5a6bf6c..e3478e5769 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 564a6d7e51..8d803efff4 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java index 3a49792eee..4692cfe071 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java index b1da7b6f9e..239b677206 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java index 9dc197563a..03e175f1ab 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java index 8ba3c23fd1..9146fba8d8 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java b/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java index 8c673c3add..504fcc42dd 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 490cee3429..37c8af7748 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java index 4eeb70b2e7..2a8a0561f8 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java index f8d54cc586..9553e02152 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java index d62159f407..4666459dc9 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index 31781bf33e..197fe7d59c 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java index 75115d70a4..7fd42649b1 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java index 5c7288be67..c4f3fe4865 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java +++ b/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java index 253808bed0..7f27e2dc5d 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java +++ b/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java index bc3f7b0f62..9ea1de6609 100644 --- a/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java +++ b/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java b/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java index cf38394b8d..9679ba43f1 100644 --- a/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java +++ b/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index 1db07ab66f..18e582774a 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 89e5541285..4768120804 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/Protocol.java b/src/main/java/com/ning/http/client/providers/netty/Protocol.java index 718cd20305..3e8e9862c4 100644 --- a/src/main/java/com/ning/http/client/providers/netty/Protocol.java +++ b/src/main/java/com/ning/http/client/providers/netty/Protocol.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java index 0e9cf3501f..c2a452e66f 100644 --- a/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java +++ b/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java index 13307f538f..ef777569a5 100644 --- a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java +++ b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java index 60ade09246..1eca8af21a 100644 --- a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java +++ b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java b/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java index 0eba5b8824..efb6dea06b 100644 --- a/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java +++ b/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java b/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java index 829c2adc3b..51d60ccf99 100644 --- a/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java +++ b/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java b/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java index c7e5e386d5..7e2bd1d254 100644 --- a/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java +++ b/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/resumable/ResumableListener.java b/src/main/java/com/ning/http/client/resumable/ResumableListener.java index e2c6acc532..0b55ac2257 100644 --- a/src/main/java/com/ning/http/client/resumable/ResumableListener.java +++ b/src/main/java/com/ning/http/client/resumable/ResumableListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java b/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java index 7b6fdd881f..39d780c32f 100644 --- a/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java +++ b/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java @@ -1,7 +1,7 @@ package com.ning.http.client.simple; /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java b/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java index db5fc3e797..d0a483db6d 100644 --- a/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java +++ b/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/webdav/WebDavResponse.java b/src/main/java/com/ning/http/client/webdav/WebDavResponse.java index 08dd890204..c77cee0320 100644 --- a/src/main/java/com/ning/http/client/webdav/WebDavResponse.java +++ b/src/main/java/com/ning/http/client/webdav/WebDavResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java b/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java index d22610db56..4db626b0d6 100644 --- a/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java +++ b/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index 2e51cf8a21..4572da89df 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java index cd75be791a..e4f9362f1a 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java index 6149aeffca..e193254cc4 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java index adc3f82833..5980c67b9e 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java index 6f398ce0ff..559abc97b3 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java index ae8a2e6fdc..1b56319a85 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index b5a0e4ef64..5ce822d9e3 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/multipart/FilePartStallHandler.java b/src/main/java/com/ning/http/multipart/FilePartStallHandler.java index 2e02ef262e..46c19d9db7 100644 --- a/src/main/java/com/ning/http/multipart/FilePartStallHandler.java +++ b/src/main/java/com/ning/http/multipart/FilePartStallHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. + * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free diff --git a/src/main/java/com/ning/http/multipart/FileUploadStalledException.java b/src/main/java/com/ning/http/multipart/FileUploadStalledException.java index 11a7748a2d..6549929868 100644 --- a/src/main/java/com/ning/http/multipart/FileUploadStalledException.java +++ b/src/main/java/com/ning/http/multipart/FileUploadStalledException.java @@ -1,16 +1,15 @@ -/** - * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ +/* +* Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. +* +* This program is licensed to you under the Apache License Version 2.0, +* and you may not use this file except in compliance with the Apache License Version 2.0. +* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the Apache License Version 2.0 is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. +*/ package com.ning.http.multipart; import java.io.IOException; diff --git a/src/main/java/com/ning/http/multipart/MultipartBody.java b/src/main/java/com/ning/http/multipart/MultipartBody.java index 73a836452e..88ee5da2ea 100644 --- a/src/main/java/com/ning/http/multipart/MultipartBody.java +++ b/src/main/java/com/ning/http/multipart/MultipartBody.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java b/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java index 655f7e99a8..0223cc1ee6 100644 --- a/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java +++ b/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 13d4484e2b..1e3ee79c79 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/src/main/java/com/ning/http/util/AuthenticatorUtils.java index d98e916577..c1220f256e 100644 --- a/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/src/main/java/com/ning/http/util/AuthenticatorUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/Base64.java b/src/main/java/com/ning/http/util/Base64.java index 519e2c9b44..fe5d54829e 100644 --- a/src/main/java/com/ning/http/util/Base64.java +++ b/src/main/java/com/ning/http/util/Base64.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/CleanupChannelGroup.java b/src/main/java/com/ning/http/util/CleanupChannelGroup.java index 23ecc2f30b..d0ea020cb0 100644 --- a/src/main/java/com/ning/http/util/CleanupChannelGroup.java +++ b/src/main/java/com/ning/http/util/CleanupChannelGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/DateUtil.java b/src/main/java/com/ning/http/util/DateUtil.java index 6f84ed735d..54def8d8c1 100644 --- a/src/main/java/com/ning/http/util/DateUtil.java +++ b/src/main/java/com/ning/http/util/DateUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/main/java/com/ning/http/util/ProxyUtils.java b/src/main/java/com/ning/http/util/ProxyUtils.java index ffdf74c759..a3bd9f58e4 100644 --- a/src/main/java/com/ning/http/util/ProxyUtils.java +++ b/src/main/java/com/ning/http/util/ProxyUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/RealmTest.java b/src/test/java/com/ning/http/client/RealmTest.java index abb31118d0..f1aac2fcf9 100644 --- a/src/test/java/com/ning/http/client/RealmTest.java +++ b/src/test/java/com/ning/http/client/RealmTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java index eda2991303..37b83eff80 100644 --- a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java b/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java index c7f851e745..48e1836a65 100644 --- a/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java index 150853e0fd..ea8e7134fb 100644 --- a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java +++ b/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/ChunkingTest.java b/src/test/java/com/ning/http/client/async/ChunkingTest.java index 8539158181..1860da24d1 100644 --- a/src/test/java/com/ning/http/client/async/ChunkingTest.java +++ b/src/test/java/com/ning/http/client/async/ChunkingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/src/test/java/com/ning/http/client/async/DigestAuthTest.java index 6471174c1e..293139e107 100644 --- a/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/src/test/java/com/ning/http/client/async/DigestAuthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java index b4dce7619c..87dd3aa377 100644 --- a/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java +++ b/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/FilterTest.java b/src/test/java/com/ning/http/client/async/FilterTest.java index 774732a367..e31d1e5376 100644 --- a/src/test/java/com/ning/http/client/async/FilterTest.java +++ b/src/test/java/com/ning/http/client/async/FilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java index a46ed34002..e2bff473b1 100644 --- a/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java +++ b/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/ListenableFutureTest.java b/src/test/java/com/ning/http/client/async/ListenableFutureTest.java index 57aa61feb2..6de42566a9 100644 --- a/src/test/java/com/ning/http/client/async/ListenableFutureTest.java +++ b/src/test/java/com/ning/http/client/async/ListenableFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/src/test/java/com/ning/http/client/async/MultipartUploadTest.java index b97c9bd0cd..580af9ba03 100644 --- a/src/test/java/com/ning/http/client/async/MultipartUploadTest.java +++ b/src/test/java/com/ning/http/client/async/MultipartUploadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java b/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java index 6fb9efd170..6bf0b416b9 100644 --- a/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java +++ b/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java index 895117a3ed..80acc7942f 100644 --- a/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java +++ b/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java index 1459a9c6f3..b006395cfe 100644 --- a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java +++ b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/src/test/java/com/ning/http/client/async/PutLargeFileTest.java index e96efc252f..27cc6b61f6 100644 --- a/src/test/java/com/ning/http/client/async/PutLargeFileTest.java +++ b/src/test/java/com/ning/http/client/async/PutLargeFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java b/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java index 92f7a3698f..247fe8c2a3 100644 --- a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java +++ b/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/RetryRequestTest.java b/src/test/java/com/ning/http/client/async/RetryRequestTest.java index f865ddd8e9..3cd92523ba 100644 --- a/src/test/java/com/ning/http/client/async/RetryRequestTest.java +++ b/src/test/java/com/ning/http/client/async/RetryRequestTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java b/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java index 1dd4984e54..4206f6b96d 100644 --- a/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java index cc3da14d16..2a6cfcfd15 100644 --- a/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java +++ b/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/TransferListenerTest.java b/src/test/java/com/ning/http/client/async/TransferListenerTest.java index 8aae83563e..e2b80690c7 100644 --- a/src/test/java/com/ning/http/client/async/TransferListenerTest.java +++ b/src/test/java/com/ning/http/client/async/TransferListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/WebDavBasicTest.java b/src/test/java/com/ning/http/client/async/WebDavBasicTest.java index c7baf67574..77b69dcf67 100644 --- a/src/test/java/com/ning/http/client/async/WebDavBasicTest.java +++ b/src/test/java/com/ning/http/client/async/WebDavBasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java index 16069a1249..64efdb4c29 100644 --- a/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java +++ b/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java index aabccc9349..c718e2e031 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java index 0f800f7a94..c9bb4de004 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java index 69b84d13a6..b2d376d690 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java index aa49cde597..c0224564ca 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java index 7263c1a262..4f0dc2634e 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java index 14e56cc88e..d5e27c68f2 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java index 292f0616b5..643628e64f 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java index ac41c4c5e9..889f49ad89 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java index ce2bc93761..b875ce10f4 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java index fe44f75490..153f80c80b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java index 517080b8dc..0b8b4a9d18 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java index 5781f71391..37395056c1 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java index e48c8a3f7d..95f2f8879a 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java index 7e3409a13e..a6a88a4239 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java index 8ac2278662..33c0ff2e7b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java index ceb40ac188..09307e7185 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java index 44623d580d..19a7d7ce21 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java index 36ca50d05f..9835a67d79 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java index 6406477174..a84023b1a2 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java index 08177f52bc..c6ea5c47d5 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java index f7ed178daf..1096adab69 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java index 75ab07a221..6702035939 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java index c70f5c9ab6..285e612721 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java index 04186b69df..d9a95eace4 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java index e28c96d3dd..eeb1c08bf4 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java index e9e69bcd05..9635878ac9 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java index ac5ca1c844..2c4fac2577 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java index 404671e54e..9ab8b96c3b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java index 3ddf79b4e7..98fe02b2e7 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java index b9ab0556e7..e52d331e14 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java index 3df98af9f7..0a7a16eb7e 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java index beac579806..d9dd8b19b9 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java index 9745c1df90..1bfbc7f472 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java index 119d658a8d..9033261a2c 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java index ba20bbc479..c26efc51fc 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java index 5d4cbdc0c1..8ee03ce466 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java index 540c5a0528..837b10c43a 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java index 036220c4ad..5397cf5fa1 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java index eed2a41fc2..684f758353 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java index cf546ef415..23b8b217bb 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java index 8ea61004dc..20b7cca957 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java index 2740b809e7..34709e2d62 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java index 53bf07412c..90181ac0a5 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java index 2370ebb289..0ee45a5752 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java index 3d1e451b1d..4292c85f6f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java index 3a2d7b0bb1..7319d3209d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java index 25bc1bdcba..fe1fc56293 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java b/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java index 50ec091a9a..e99c586fd1 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java index 5d18861e39..0dc441b15d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java index 5a3d623b76..1b205a900e 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java index 0d3f43eace..7f06d611cb 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java index 9d659d1023..8e71e559fb 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java index ca2d231985..0d1d9ef43b 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java b/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java index 42a2954e4f..bc13266c08 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java b/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java index 912ed49019..3c1720e2cc 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java b/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java index 9fd26edc02..78f5b31da2 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java b/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java index 4e01cc7bc5..d054056481 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java b/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java index af04a58956..80bcdc71ac 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java b/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java index b87f67aa3c..6da18e7800 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java b/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java index 67b4cf1e6d..108c6ef4e5 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java b/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java index 10df06ff04..df3b65a952 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java b/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java index 8572882ad7..0a8ee879e6 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java b/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java index 9e6d2c08c0..b6e319f9fe 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java b/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java index 92f88a613d..d3897390db 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java b/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java index 032db03de0..ca7d73917c 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java index 0359fe5859..45d927879f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java b/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java index 4ea74233f4..4d894bb6d5 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java b/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java index bd0c8b1753..3d4208736b 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java b/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java index 2fce9bc17f..c0caf08e8f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010-2011 Sonatype, Inc. + * Copyright (c) 2010-2012 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accompanies this distribution. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java b/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java index 8578972239..6ebfc78c37 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java b/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java index 16d253a9b6..1219230844 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java b/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java index 0e34c8edbe..044b66c7e2 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java b/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java index 607e01ba1a..ae74b2a27d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java b/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java index 79224a9eff..227dc1b7e9 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java b/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java index 6c62b16934..4af58fb989 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java b/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java index a2ce16d5ed..0c941b7cde 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java index 0eea9612cd..6b74df734b 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java index eca03b4a7f..40ea0a09c6 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java b/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java index 0b2d440a4f..2a3326320a 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java b/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java index 741be79330..b0a8f6fa1d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java index f8b494f574..e2deb01594 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java b/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java index d6eff9a333..fcbf8e4708 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java b/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java index cd989aaaca..e230b74d3d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java b/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java index 5fa88d9d85..201b13e28a 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java b/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java index 9aa74f1ede..ab0c059d55 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java b/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java index 757ad583d3..249e0ebbdf 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java b/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java index 927ff7e29d..7a08f95eef 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java b/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java index 3dee697940..73edd30f95 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java b/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java index eb47fe624d..c1cc524802 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java index c6a92f8c6a..c49eee8dc2 100644 --- a/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -34,7 +34,7 @@ public class NettyAsyncResponseTest { @Test(groups = "standalone") public void testCookieParseExpires() { - // e.g. "Sun, 06-Feb-2011 03:45:24 GMT"; + // e.g. "Sun, 06-Feb-2012 03:45:24 GMT"; SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); diff --git a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java index 2566240fe7..a3bf5a6382 100644 --- a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java +++ b/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index 2e170c1fbe..0566cd9ad4 100644 --- a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 9b3750c6a4..fcc6cf9d65 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java index dbf4029996..5497ba0e6e 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java index fb4e7f797a..bef60cb991 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java index 1a25c5fdd8..23e01d43c3 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java index a2720e8b93..2a34358dfb 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/src/test/java/com/ning/http/util/ProxyUtilsTest.java b/src/test/java/com/ning/http/util/ProxyUtilsTest.java index 3f681bace6..1ccd206a80 100644 --- a/src/test/java/com/ning/http/util/ProxyUtilsTest.java +++ b/src/test/java/com/ning/http/util/ProxyUtilsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. From 1217e1719f9947544c33e17643e9b2b4bd51796d Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 24 Jan 2012 14:33:59 -0500 Subject: [PATCH 0067/2844] Fix license --- .../http/multipart/FilePartStallHandler.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/ning/http/multipart/FilePartStallHandler.java b/src/main/java/com/ning/http/multipart/FilePartStallHandler.java index 46c19d9db7..460aea8b6c 100644 --- a/src/main/java/com/ning/http/multipart/FilePartStallHandler.java +++ b/src/main/java/com/ning/http/multipart/FilePartStallHandler.java @@ -1,15 +1,14 @@ -/** - * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ package com.ning.http.multipart; From 5e3844a2cc53435ea138dab94bddfd78d8cb6916 Mon Sep 17 00:00:00 2001 From: Phil Kulak Date: Tue, 24 Jan 2012 15:19:00 -0800 Subject: [PATCH 0068/2844] Deal with bogus character sets in the content type, ie: "charset=". --- src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 1e3ee79c79..f5b593cde6 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -432,7 +432,7 @@ public static String parseCharset(String contentType) { for (String part : contentType.split(";")) { if (part.trim().startsWith("charset=")) { String[] val = part.split("="); - if (val[1] != null) { + if (val[1].length > 1) { return val[1].trim(); } } From ad9d355760141bb98219c85d1df3ac611398f59b Mon Sep 17 00:00:00 2001 From: Phil Kulak Date: Tue, 24 Jan 2012 17:17:20 -0800 Subject: [PATCH 0069/2844] This fixes a bug I _just_ introduced with my last pull request. --- src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index f5b593cde6..06354b406e 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -432,7 +432,7 @@ public static String parseCharset(String contentType) { for (String part : contentType.split(";")) { if (part.trim().startsWith("charset=")) { String[] val = part.split("="); - if (val[1].length > 1) { + if (val.length > 1) { return val[1].trim(); } } From a0a41356636e8eaa000be51518b547382ab38aa5 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 30 Jan 2012 18:30:45 -0500 Subject: [PATCH 0070/2844] Fix for #45 [websocket] NPE when connection fail to connect --- .../websocket/WebSocketUpgradeHandler.java | 2 +- .../client/websocket/TextMessageTest.java | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index 5ce822d9e3..defc138ead 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -106,7 +106,7 @@ public final void onSuccess(WebSocket webSocket) { @Override public final void onFailure(Throwable t) { for (WebSocketListener w : l) { - if (!ok.get()) { + if (!ok.get() && webSocket != null) { webSocket.addMessageListener(w); } w.onError(t); diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index fcc6cf9d65..769d2ff3f7 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -22,6 +22,8 @@ import java.util.concurrent.atomic.AtomicReference; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; public abstract class TextMessageTest extends AbstractBasicTest { @@ -100,6 +102,36 @@ public void onError(Throwable t) { assertEquals(text.get(), "OnOpen"); } + @Test(timeOut = 60000) + public void onEmptyListenerTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + + WebSocket websocket = null; + try { + websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().build()).get(); + } catch (Throwable t) { + fail(); + } + assertTrue(websocket != null); + } + + @Test(timeOut = 60000) + public void onFailureTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = null; + Throwable t = null; + try { + websocket = c.prepareGet("ws://abcdefg") + .execute(new WebSocketUpgradeHandler.Builder().build()).get(); + } catch (Throwable t2) { + t = t2; + } + assertTrue(t != null); + } + @Test(timeOut = 60000) public void onTimeoutCloseTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); From 02374c2b540fcf9962baafdb79dbbe6ae7d5fa5a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 31 Jan 2012 14:08:46 -0500 Subject: [PATCH 0071/2844] Update with latest version and WebSocket new API --- README | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/README b/README index 5761034fc3..3904859aa2 100644 --- a/README +++ b/README @@ -8,25 +8,17 @@ Javadoc: http://sonatype.github.com/async-http-client/apidocs/index.html Getting started: http://is.gd/kexrN (PDF) http://is.gd/ja6My (HTML) -Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: - - - Sonatype - Sonatype Release - http://oss.sonatype.org/content/repositories/releases - - -and then define the dependency as: +Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: com.ning async-http-client - 1.6.2 + 1.7.0 You can also download the artifact - http://oss.sonatype.org/content/repositories/releases + http://search.maven.org Then in your code you can simply do: @@ -125,12 +117,35 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron String bodyResponse = f.get(); - Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); +Async Http Client also support WebSocket by simply doing: + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + } + + @Override + public void onOpen(WebSocket websocket) { + websocket.sendTextMessage("...").sendBinaryMessage("..."); + } + + @Override + public void onClose(.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + } + }).build()).get(); + The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of Netty (http://www.jboss.org/netty), the Java NIO Client Server Socket Framework from JBoss, but the library exposes a configurable provider SPI which allows to easily plug in other frameworks. Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group From 7c191873ee4f4db80008527ed742aa9f498a7b27 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 31 Jan 2012 14:12:18 -0500 Subject: [PATCH 0072/2844] Try to fix the ugly font/size --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 3904859aa2..becedca271 100644 --- a/README +++ b/README @@ -1,9 +1,10 @@ + + Async Http Client Copyright 2010 Ning Inc DESCRIPTION ----------- -Issue tracker: https://issues.sonatype.org/browse/AHC Javadoc: http://sonatype.github.com/async-http-client/apidocs/index.html Getting started: http://is.gd/kexrN (PDF) http://is.gd/ja6My (HTML) From 5731824869f95d5272fca357b3637dab7b9118da Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 31 Jan 2012 14:13:00 -0500 Subject: [PATCH 0073/2844] Doesn't work --- README | 2 -- 1 file changed, 2 deletions(-) diff --git a/README b/README index becedca271..9e81d898f7 100644 --- a/README +++ b/README @@ -1,5 +1,3 @@ - - Async Http Client Copyright 2010 Ning Inc From 98ed0a415f460c3d0f97a7c9a4cd0325cae6cff5 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 31 Jan 2012 14:15:47 -0500 Subject: [PATCH 0074/2844] Fix for #46 [ResponseFilter] Must be able to replace AsyncHandler from a ResponseFilter, Fix for #47 [WebSocket] Add support for ResponseFilter --- .../netty/NettyAsyncHttpProvider.java | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index d85d7bfb51..f9e356e450 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1943,7 +1943,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws } HttpRequest nettyRequest = future.getNettyRequest(); - AsyncHandler handler = future.getAsyncHandler(); + AsyncHandler handler = future.getAsyncHandler(); Request request = future.getRequest(); HttpResponse response = null; try { @@ -1964,7 +1964,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { try { fc = asyncFilter.filter(fc); @@ -1976,6 +1976,10 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws } } + // The handler may have been wrapped. + handler = fc.getAsyncHandler(); + future.setAsyncHandler(handler); + // The request has changed if (fc.replayRequest()) { replayRequest(future, fc, response, ctx); @@ -2220,12 +2224,35 @@ private final class WebSocketProtocol implements Protocol { @Override public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { - final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); - NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); + Request request = future.getRequest(); if (e.getMessage() instanceof HttpResponse) { HttpResponse response = (HttpResponse) e.getMessage(); + + HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(h).request(request).responseStatus(s).build(); + for (ResponseFilter asyncFilter : config.getResponseFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + abort(future, efe); + } + } + + // The handler may have been wrapped. + future.setAsyncHandler(fc.getAsyncHandler()); + + // The request has changed + if (fc.replayRequest()) { + replayRequest(future, fc, response, ctx); + return; + } + final org.jboss.netty.handler.codec.http.HttpResponseStatus status = new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); @@ -2233,7 +2260,7 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; final boolean validConnection = response.getHeader(HttpHeaders.Names.CONNECTION).equals(HttpHeaders.Values.UPGRADE); - HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; if (!validStatus || !validUpgrade || !validConnection || !statusReceived) { From fff33b35171d7b66688b3cc371f2fe5eca64478f Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 31 Jan 2012 16:01:08 -0500 Subject: [PATCH 0075/2844] Add a section on grizzly provider --- README | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README b/README index 9e81d898f7..b0b69ef4c2 100644 --- a/README +++ b/README @@ -99,7 +99,7 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { builder.append(new String(bodyPart.getBodyPartBytes())); - return STATE.CONTINU + return STATE.CONTINUE } @Override @@ -145,7 +145,10 @@ Async Http Client also support WebSocket by simply doing: } }).build()).get(); -The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of Netty (http://www.jboss.org/netty), the Java NIO Client Server Socket Framework from JBoss, but the library exposes a configurable provider SPI which allows to easily plug in other frameworks. +The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of Netty (http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like Grizzly (http://grizzly.java.net) + + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); + AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group From 46e592e1cab92eabf74b10476a7eda64a019a86e Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 3 Feb 2012 10:04:39 -0500 Subject: [PATCH 0076/2844] Fix possible NPE --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index f9e356e450..f19c3b8cce 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2258,7 +2258,8 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { final boolean validStatus = response.getStatus().equals(status); final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; - final boolean validConnection = response.getHeader(HttpHeaders.Names.CONNECTION).equals(HttpHeaders.Values.UPGRADE); + String c = response.getHeader(HttpHeaders.Names.CONNECTION); + final boolean validConnection = c == null ? false : c.equals(HttpHeaders.Values.UPGRADE); s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; From 10c56d531c2e4241c627558c413c51236a9293b5 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 6 Feb 2012 12:09:29 -0500 Subject: [PATCH 0077/2844] Fix for #49 [websocket] API shoud be using the same name --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 +- .../com/ning/http/client/providers/netty/NettyWebSocket.java | 2 +- src/main/java/com/ning/http/client/websocket/WebSocket.java | 2 +- .../ning/http/client/websocket/WebSocketUpgradeHandler.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index afbaa6f14f..6963d6a2f7 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2598,7 +2598,7 @@ public WebSocket sendPong(byte[] payload) { } @Override - public WebSocket addMessageListener(WebSocketListener l) { + public WebSocket addWebSocketListener(WebSocketListener l) { gWebSocket.add(new AHCWebSocketListenerAdapter(l, this)); return this; } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 4768120804..77c6e3acd6 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -75,7 +75,7 @@ public WebSocket sendPong(byte[] payload) { } @Override - public WebSocket addMessageListener(WebSocketListener l) { + public WebSocket addWebSocketListener(WebSocketListener l) { listeners.add(l); return this; } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index 4572da89df..4608f47d94 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -85,7 +85,7 @@ public interface WebSocket { * @param l a {@link WebSocketListener} * @return this */ - WebSocket addMessageListener(WebSocketListener l); + WebSocket addWebSocketListener(WebSocketListener l); /** * Returns true if the WebSocket is open/connected. diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index defc138ead..4c8c2dde09 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -94,7 +94,7 @@ public final WebSocket onCompleted() throws Exception { public final void onSuccess(WebSocket webSocket) { this.webSocket = webSocket; for (WebSocketListener w : l) { - webSocket.addMessageListener(w); + webSocket.addWebSocketListener(w); w.onOpen(webSocket); } ok.set(true); @@ -107,7 +107,7 @@ public final void onSuccess(WebSocket webSocket) { public final void onFailure(Throwable t) { for (WebSocketListener w : l) { if (!ok.get() && webSocket != null) { - webSocket.addMessageListener(w); + webSocket.addWebSocketListener(w); } w.onError(t); } From e55ec610fef66f294debda92250f79276c8f8379 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 7 Feb 2012 09:11:38 -0500 Subject: [PATCH 0078/2844] Fix for #51 Bump Netty version to 3.3.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 644423ab6e..2698b14509 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ io.netty netty - 3.3.0.Final + 3.3.1.Final javax.servlet From 2e3ea67104b03a7117ec6c5ee1503e59819a59f7 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 9 Feb 2012 10:29:34 -0500 Subject: [PATCH 0079/2844] Disable this test for now as it fail inconsistently --- .../client/resumable/PropertiesBasedResumableProcesserTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java b/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java index e9969a599b..41d0d68947 100644 --- a/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java +++ b/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java @@ -23,7 +23,7 @@ * @author Benjamin Hanzelmann */ public class PropertiesBasedResumableProcesserTest { - @Test + @Test (enabled = false) public void testSaveLoad() throws Exception { PropertiesBasedResumableProcessor p = new PropertiesBasedResumableProcessor(); From 6b63346931e0c3ebab2d4a9b7a11c2ff68321450 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 9 Feb 2012 10:42:08 -0500 Subject: [PATCH 0080/2844] Fix for #52 AsyncHttpProviderUtils.contentToString corrupts strings with multibyte encoding (like utf-8) --- .../java/com/ning/http/util/AsyncHttpProviderUtils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 06354b406e..0a6759c678 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -182,11 +182,7 @@ public final static String getAuthority(URI uri) { } public final static String contentToString(Collection bodyParts, String charset) throws UnsupportedEncodingException { - StringBuilder b = new StringBuilder(); - for (HttpResponseBodyPart bp : bodyParts) { - b.append(new String(bp.getBodyPartBytes(), charset)); - } - return b.toString(); + return new String(contentToByte(bodyParts), charset); } public final static byte[] contentToByte(Collection bodyParts) throws UnsupportedEncodingException { From 5088be6055367590c9e921d03475c441bf08da43 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 17 Feb 2012 09:24:45 -0800 Subject: [PATCH 0081/2844] Set target to 1.5. --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2698b14509..2fe53688e5 100644 --- a/pom.xml +++ b/pom.xml @@ -441,8 +441,7 @@ asdfasfd/** asdfasdf/** asdfasdf - 1.6 - 1.6 + 1.5 From d8d26ae9888a94d3af8d1e5440207ef7f75eae54 Mon Sep 17 00:00:00 2001 From: Hubert Iwaniuk Date: Mon, 20 Feb 2012 23:36:20 +0100 Subject: [PATCH 0082/2844] Deprecated PerRequestConfig. --- src/main/java/com/ning/http/client/PerRequestConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/ning/http/client/PerRequestConfig.java b/src/main/java/com/ning/http/client/PerRequestConfig.java index a6622b8774..9f0d84395d 100644 --- a/src/main/java/com/ning/http/client/PerRequestConfig.java +++ b/src/main/java/com/ning/http/client/PerRequestConfig.java @@ -19,6 +19,7 @@ * Per request configuration. * * @author Hubert Iwaniuk + * @deprecated Per request properties are set on request directly or via builder. This class will be gone in next major release. */ public class PerRequestConfig { private final ProxyServer proxyServer; From a3b69e75d1daf9e8b1e2b62a9fa86bc30314f59a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 20 Feb 2012 19:42:45 -0500 Subject: [PATCH 0083/2844] [maven-release-plugin] prepare release async-http-client-1.7.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2fe53688e5..d07c2199b8 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.1-SNAPSHOT + 1.7.1 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 559d05f0c6ada6ec45431fc0194cbec81e7553df Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 20 Feb 2012 19:42:49 -0500 Subject: [PATCH 0084/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d07c2199b8..56d478c7b7 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.1 + 1.8.0-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From bbe560930dad1371092f09d60fa394c924259f7f Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 22 Feb 2012 09:55:43 -0500 Subject: [PATCH 0085/2844] Fix for #57 Add support for ResponseHeaders in ResponseFilter --- .../http/client/filter/FilterContext.java | 95 +++++-------------- .../grizzly/GrizzlyAsyncHttpProvider.java | 8 +- .../netty/NettyAsyncHttpProvider.java | 21 +++- .../ning/http/client/async/FilterTest.java | 43 ++++++++- 4 files changed, 86 insertions(+), 81 deletions(-) diff --git a/src/main/java/com/ning/http/client/filter/FilterContext.java b/src/main/java/com/ning/http/client/filter/FilterContext.java index a7a60d25f5..91aeee1c6a 100644 --- a/src/main/java/com/ning/http/client/filter/FilterContext.java +++ b/src/main/java/com/ning/http/client/filter/FilterContext.java @@ -13,6 +13,7 @@ package com.ning.http.client.filter; import com.ning.http.client.AsyncHandler; +import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Request; @@ -32,67 +33,15 @@ */ public class FilterContext { - private final AsyncHandler asyncHandler; - private final Request request; - private final HttpResponseStatus responseStatus; - private final boolean replayRequest; - private final IOException ioException; + private final FilterContextBuilder b; /** * Create a new {@link FilterContext} * - * @param asyncHandler an {@link AsyncHandler} - * @param request a {@link Request} - * @deprecated use {@link FilterContextBuilder} instead + * @param b a {@link FilterContextBuilder} */ - public FilterContext(AsyncHandler asyncHandler, Request request) { - this(asyncHandler, request, null, false, null); - } - - /** - * Create a new {@link FilterContext} - * - * @param asyncHandler an {@link AsyncHandler} - * @param request a {@link Request} - * @param ioException an {@link IOException} - * @deprecated use {@link FilterContextBuilder} instead - */ - public FilterContext(AsyncHandler asyncHandler, Request request, IOException ioException) { - this(asyncHandler, request, null, false, ioException); - } - - /** - * Create a new {@link FilterContext} - * - * @param asyncHandler an {@link AsyncHandler} - * @param request a {@link Request} - * @param responseStatus a {@link HttpResponseStatus} - * @deprecated use {@link FilterContextBuilder} instead - */ - public FilterContext(AsyncHandler asyncHandler, Request request, HttpResponseStatus responseStatus) { - this(asyncHandler, request, responseStatus, false, null); - - } - - private FilterContext(AsyncHandler asyncHandler, Request request, HttpResponseStatus responseStatus, - boolean replayRequest, IOException ioException) { - this.asyncHandler = asyncHandler; - this.request = request; - this.responseStatus = responseStatus; - this.replayRequest = replayRequest; - this.ioException = ioException; - } - - /** - * Create a new {@link FilterContext} - * - * @param asyncHandler an {@link AsyncHandler} - * @param request a {@link Request} - * @param replayRequest true if the current response processing needs to be interrupted, and a new {@link Request} be processed. - * @deprecated use {@link FilterContextBuilder} instead - */ - public FilterContext(AsyncHandler asyncHandler, Request request, boolean replayRequest) { - this(asyncHandler, request, null, replayRequest, null); + private FilterContext(FilterContextBuilder b) { + this.b = b; } /** @@ -101,7 +50,7 @@ public FilterContext(AsyncHandler asyncHandler, Request request, boolean repl * @return the original or decorated {@link AsyncHandler} */ public AsyncHandler getAsyncHandler() { - return asyncHandler; + return b.asyncHandler; } /** @@ -110,7 +59,7 @@ public AsyncHandler getAsyncHandler() { * @return the original or decorated {@link Request} */ public Request getRequest() { - return request; + return b.request; } /** @@ -119,7 +68,15 @@ public Request getRequest() { * @return the unprocessed response's {@link HttpResponseStatus} */ public HttpResponseStatus getResponseStatus() { - return responseStatus; + return b.responseStatus; + } + + /** + * Return the response {@link HttpResponseHeaders} + * @return + */ + public HttpResponseHeaders getResponseHeaders() { + return b.headers; } /** @@ -128,7 +85,7 @@ public HttpResponseStatus getResponseStatus() { * @return true if the current response's processing needs to be interrupted and a new {@link Request} be executed. */ public boolean replayRequest() { - return replayRequest; + return b.replayRequest; } /** @@ -137,7 +94,7 @@ public boolean replayRequest() { * @return the {@link IOException} */ public IOException getIOException() { - return ioException; + return b.ioException; } public static class FilterContextBuilder { @@ -146,6 +103,7 @@ public static class FilterContextBuilder { private HttpResponseStatus responseStatus = null; private boolean replayRequest = false; private IOException ioException = null; + private HttpResponseHeaders headers; public FilterContextBuilder() { } @@ -176,17 +134,14 @@ public FilterContextBuilder request(Request request) { return this; } - public HttpResponseStatus getResponseStatus() { - return responseStatus; - } - public FilterContextBuilder responseStatus(HttpResponseStatus responseStatus) { this.responseStatus = responseStatus; return this; } - public boolean replayRequest() { - return replayRequest; + public FilterContextBuilder responseHeaders(HttpResponseHeaders headers) { + this.headers = headers; + return this; } public FilterContextBuilder replayRequest(boolean replayRequest) { @@ -194,17 +149,13 @@ public FilterContextBuilder replayRequest(boolean replayRequest) { return this; } - public IOException getIoException() { - return ioException; - } - public FilterContextBuilder ioException(IOException ioException) { this.ioException = ioException; return this; } public FilterContext build() { - return new FilterContext(asyncHandler, request, responseStatus, replayRequest, ioException); + return new FilterContext(this); } } diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 6963d6a2f7..d6abf2ed33 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1234,9 +1234,13 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, provider.getHttpTransactionContext(ctx.getConnection()); final AsyncHandler handler = context.handler; final List filters = context.provider.clientConfig.getResponseFilters(); + final GrizzlyResponseHeaders responseHeaders = new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, + null, + provider); if (!filters.isEmpty()) { FilterContext fc = new FilterContext.FilterContextBuilder() .asyncHandler(handler).request(context.request) + .responseHeaders(responseHeaders) .responseStatus(context.responseStatus).build(); try { for (final ResponseFilter f : filters) { @@ -1287,9 +1291,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, boolean upgrade = context.currentState == AsyncHandler.STATE.UPGRADE; try { context.currentState = handler.onHeadersReceived( - new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, - null, - provider)); + responseHeaders); } catch (Exception e) { httpHeader.setSkipRemainder(true); context.abort(e); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index f19c3b8cce..68d5118dc8 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1964,7 +1964,14 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).build(); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); + FilterContext fc = new FilterContext.FilterContextBuilder() + .asyncHandler(handler) + .request(request) + .responseStatus(status) + .responseHeaders(responseHeaders) + .build(); + for (ResponseFilter asyncFilter : config.getResponseFilters()) { try { fc = asyncFilter.filter(fc); @@ -2159,7 +2166,7 @@ public Object call() throws Exception { if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { finishUpdate(future, ctx, response.isChunked()); return; - } else if (updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this))) { + } else if (updateHeadersAndInterrupt(handler, responseHeaders)) { finishUpdate(future, ctx, response.isChunked()); return; } else if (!response.isChunked()) { @@ -2232,7 +2239,13 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpResponse response = (HttpResponse) e.getMessage(); HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(h).request(request).responseStatus(s).build(); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); + FilterContext fc = new FilterContext.FilterContextBuilder() + .asyncHandler(h) + .request(request) + .responseStatus(s) + .responseHeaders(responseHeaders) + .build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { try { fc = asyncFilter.filter(fc); @@ -2276,7 +2289,7 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { ctx.getPipeline().replace("ws-decoder", "ws-decoder", new WebSocket08FrameDecoder(false, false)); ctx.getPipeline().replace("ws-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); - if (h.onHeadersReceived(new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this)) == STATE.CONTINUE) { + if (h.onHeadersReceived(responseHeaders) == STATE.CONTINUE) { h.onSuccess(new NettyWebSocket(ctx.getChannel())); } future.done(null); diff --git a/src/test/java/com/ning/http/client/async/FilterTest.java b/src/test/java/com/ning/http/client/async/FilterTest.java index e31d1e5376..6932087dac 100644 --- a/src/test/java/com/ning/http/client/async/FilterTest.java +++ b/src/test/java/com/ning/http/client/async/FilterTest.java @@ -156,7 +156,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException { if (replay.getAndSet(false)) { Request request = new RequestBuilder(ctx.getRequest()).addHeader("X-Replay", "true").build(); - return new FilterContext(ctx.getAsyncHandler(), request, true); + return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); } return ctx; } @@ -188,7 +188,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException { if (ctx.getResponseStatus() != null && ctx.getResponseStatus().getStatusCode() == 200 && replay.getAndSet(false)) { Request request = new RequestBuilder(ctx.getRequest()).addHeader("X-Replay", "true").build(); - return new FilterContext(ctx.getAsyncHandler(), request, true); + return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); } return ctx; } @@ -208,4 +208,43 @@ public FilterContext filter(FilterContext ctx) throws FilterException { } c.close(); } + + @Test(groups = {"standalone", "default_provider"}) + public void replayHeaderResponseFilterTest() throws Throwable { + AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); + final AtomicBoolean replay = new AtomicBoolean(true); + + b.addResponseFilter(new ResponseFilter() { + + public FilterContext filter(FilterContext ctx) throws FilterException { + + if (ctx.getResponseHeaders() != null + && ctx.getResponseHeaders().getHeaders().getFirstValue("Ping").equals("Pong") + && replay.getAndSet(false)) { + + Request request = new RequestBuilder(ctx.getRequest()).addHeader("Ping", "Pong").build(); + return new FilterContext.FilterContextBuilder() + .asyncHandler(ctx.getAsyncHandler()) + .request(request) + .replayRequest(true) + .build(); + } + return ctx; + } + + }); + AsyncHttpClient c = getAsyncHttpClient(b.build()); + + try { + Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong") + .execute().get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("Ping"), "Pong"); + } catch (IOException ex) { + fail("Should have timed out"); + } + c.close(); + } } From 1ae49b7b187aa94da01f9b6b4939ebbe793c5449 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 22 Feb 2012 10:10:28 -0500 Subject: [PATCH 0086/2844] Fix build --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56d478c7b7..5c6f4c591e 100644 --- a/pom.xml +++ b/pom.xml @@ -402,7 +402,6 @@ 2.3 - **/netty4/** **/NettyAsyncHttpProvider$* **/AsyncHandler$STATE **/ProxyServer$Protocol @@ -414,6 +413,7 @@ **/RequestBuilderBase **/Response **/Response$ + **/FilterContext **/NettyResponseFuture **/**ResponseBodyPart **/**WebSocket From 5623847f53366c297247f4bfe4d60c7f1508209f Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 22 Feb 2012 16:27:42 -0500 Subject: [PATCH 0087/2844] Fix typo --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 68d5118dc8..6a7af99702 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -192,7 +192,7 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { e = Executors.newCachedThreadPool(); } int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); - log.debug("Number of application's worked threads is {}", numWorkers); + log.debug("Number of application's worker threads is {}", numWorkers); socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); } plainBootstrap = new ClientBootstrap(socketChannelFactory); From f470f1465dc103ede6c1003f4b475be14250c500 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 23 Feb 2012 08:37:28 -0500 Subject: [PATCH 0088/2844] Upgrade Jetty --- pom.xml | 10 +++++----- .../ning/http/client/async/ProxyyTunnellingTest.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 5c6f4c591e..308d8d59ed 100644 --- a/pom.xml +++ b/pom.xml @@ -111,31 +111,31 @@ org.eclipse.jetty jetty-server - 8.1.0.RC1 + 8.1.1.v20120215 test org.eclipse.jetty jetty-servlet - 8.1.0.RC1 + 8.1.1.v20120215 test org.eclipse.jetty jetty-websocket - 8.1.0.RC1 + 8.1.1.v20120215 test org.eclipse.jetty jetty-servlets - 8.1.0.RC1 + 8.1.1.v20120215 test org.eclipse.jetty jetty-security - 8.1.0.RC1 + 8.1.1.v20120215 test diff --git a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java index b006395cfe..f1dd8a631b 100644 --- a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java +++ b/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java @@ -111,7 +111,7 @@ public Response onCompleted(Response response) throws Exception { }); Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(8.1.0.RC1)"); + assertEquals(r.getHeader("server"), "Jetty(8.1.1.v20120215)"); asyncHttpClient.close(); } @@ -142,7 +142,7 @@ public Response onCompleted(Response response) throws Exception { }); Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(8.1.0.RC1)"); + assertEquals(r.getHeader("server"), "Jetty(8.1.1.v20120215)"); asyncHttpClient.close(); } @@ -162,7 +162,7 @@ public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, Response r = client.get().get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(8.1.0.RC1)"); + assertEquals(r.getHeader("server"), "Jetty(8.1.1.v20120215)"); client.close(); } From 23c77dddd4afd8a2da883c773a2d5d678b3e997e Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 23 Feb 2012 11:47:50 -0500 Subject: [PATCH 0089/2844] Use Markdown properly --- README => README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) rename README => README.md (93%) diff --git a/README b/README.md similarity index 93% rename from README rename to README.md index b0b69ef4c2..3f494cda59 100644 --- a/README +++ b/README.md @@ -1,11 +1,7 @@ Async Http Client -Copyright 2010 Ning Inc +----------------- -DESCRIPTION ------------ -Javadoc: http://sonatype.github.com/async-http-client/apidocs/index.html -Getting started: http://is.gd/kexrN (PDF) - http://is.gd/ja6My (HTML) +Getting started [PDF](http://is.gd/kexrN) [HTML](http://is.gd/ja6My) Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: @@ -17,9 +13,9 @@ Async Http Client library purpose is to allow Java applications to easily execut You can also download the artifact - http://search.maven.org + [Maven Search](http://search.maven.org) -Then in your code you can simply do: +Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async-http-client/apidocs/index.html)) import com.ning.http.client.*; import java.util.concurrent.Future; @@ -152,5 +148,7 @@ The library uses Java non blocking I/O for supporting asynchronous operations. T Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group - http://groups.google.com/group/asynchttpclient + [Google Group](http://groups.google.com/group/asynchttpclient) + +or follow us on [Twitter](http://twitter.com/jfarcand) From 2eaa0e5c1df1512b3a3b49077c28bd7d0c1ea1b4 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 23 Feb 2012 11:49:03 -0500 Subject: [PATCH 0090/2844] Cosmetic --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f494cda59..7145102738 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Async Http Client also support WebSocket by simply doing: } }).build()).get(); -The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of Netty (http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like Grizzly (http://grizzly.java.net) +The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of [Netty](http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like [Grizzly](http://grizzly.java.net) AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); From c3ec1d60d3a9405c2493d0afbf051c38b6ed2075 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 23 Feb 2012 11:50:12 -0500 Subject: [PATCH 0091/2844] Cosmetic --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7145102738..db141b7134 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,8 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); + AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() + .setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); Async Http Client also support WebSocket by simply doing: From ef39cbfec7c160c0e6cb9b54604918f5c1e79d85 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 12:05:23 +0100 Subject: [PATCH 0092/2844] updated maven javadoc plugin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 308d8d59ed..a736991eac 100644 --- a/pom.xml +++ b/pom.xml @@ -343,7 +343,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.7 + 2. true 1.6 From bd26601c485df62ba97ec0b47f83fb5ee1fc7b2e Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 12:43:17 +0100 Subject: [PATCH 0093/2844] started adding maven generated documentation --- src/site/apt/request.apt | 48 ++++++++++++++++++++++++++++++++++++++ src/site/site.xml | 48 ++++++++++++++++++++++++++++++++++++++ src/site/xdoc/index.xml.vm | 28 ++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 src/site/apt/request.apt create mode 100644 src/site/site.xml create mode 100644 src/site/xdoc/index.xml.vm diff --git a/src/site/apt/request.apt b/src/site/apt/request.apt new file mode 100644 index 0000000000..a424828166 --- /dev/null +++ b/src/site/apt/request.apt @@ -0,0 +1,48 @@ + ------ + Async Http Client - Executing request + ------ + Jeanfrancois Arcand + ------ + 2012 + +Executing request synchronously or asynchronously. + + The first thing to decide when using the library is if your application can handle asynchronous response or not. + If not, the library has been designed using the Future API, hence you can always execute synchronous call by blocking + on the <<>> method: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +Response response = client.prepareGet(("http://sonatype.com").execute().get(); ++-----+ + + The above means the request will block until the full Response has been received. It also made your application's + blocking, waiting for the response to comes back. This could be potentially an issue to block for every request, + specially when doing <<>> or <<>> operations where you don't necessarily need to wait for the response. + A simple way consist of not calling the <<>> + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +Response response = client.preparePut(("http://sonatype.com/myFile.avi").execute(); ++-----+ + + A better way than above would consist of using an AsyncHandler. The AynchHandler API is fairly simple and just + consists of 5 methods to implements: + ++-----+ +public interface AsyncHandler { + void onThrowable(Throwable t); + + STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) + throws Exception; + + STATE onStatusReceived(HttpResponseStatus responseStatus) + throws Exception; + + STATE onHeadersReceived(HttpResponseHeaders headers) + throws Exception; + + T onCompleted() throws Exception; +} ++-----+ + \ No newline at end of file diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 0000000000..583808e8b4 --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,48 @@ + + + + + org.apache.maven.skins + maven-fluido-skin + 1.1 + + + + + true + false + + jfarcand + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/site/xdoc/index.xml.vm b/src/site/xdoc/index.xml.vm new file mode 100644 index 0000000000..6860f4dd76 --- /dev/null +++ b/src/site/xdoc/index.xml.vm @@ -0,0 +1,28 @@ + + + + + Async Http Client - Home + Jeanfrancois Arcand + + + +
+

Welcome to the Async Http Client!

+

The Async Http Client library purpose is to allow Java applications to + easily execute HTTP requests and asynchronously process the HTTP responses. + The library also supports the WebSocket Protocol.

+
+ +
+

The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add + this dependency:

+ + ${project.groupId} + ${project.artifactId} + ${project.version} +]]> +
+ +
From 53de63d29df10e2935a46a81719bc4226d43f1f1 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 12:43:28 +0100 Subject: [PATCH 0094/2844] added site related tools --- pom.xml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a736991eac..f2200d4c2b 100644 --- a/pom.xml +++ b/pom.xml @@ -198,6 +198,21 @@ wagon-ssh-external 1.0-beta-6 + + org.apache.maven.scm + maven-scm-provider-gitexe + 1.6 + + + org.apache.maven.scm + maven-scm-manager-plexus + 1.6 + + + org.kathrynhuxtable.maven.wagon + wagon-gitsite + 0.3.1 + install @@ -340,10 +355,15 @@ + + org.apache.maven.plugins + maven-site-plugin + 3.0 + org.apache.maven.plugins maven-javadoc-plugin - 2. + 2.8.1 true 1.6 @@ -526,6 +546,10 @@ sonatype-nexus-snapshots ${distMgmtSnapshotsUrl} + + github + gitsite:git@github.com/sonatype/async-http-client.git + http://oss.sonatype.org/content/repositories/snapshots From fae8368bdc539761adb20d3b013c24961c53b86e Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 13:00:03 +0100 Subject: [PATCH 0095/2844] completed introduction guide --- src/site/apt/request.apt | 134 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 1 deletion(-) diff --git a/src/site/apt/request.apt b/src/site/apt/request.apt index a424828166..09e6e358d4 100644 --- a/src/site/apt/request.apt +++ b/src/site/apt/request.apt @@ -45,4 +45,136 @@ public interface AsyncHandler { T onCompleted() throws Exception; } +-----+ - \ No newline at end of file + +* Creating a Request object + + The AsynHttpClient uses the builder pattern when it is time to create Request object. The simplest way consist of: + ++-----+ +RequestBuilder builder = new RequestBuilder("PUT"); +Request request = builder..setUrl("http://") + .addHeader("name", "value") + .setBody(new File("myUpload.avi")) + .build(); +AsyncHttpClient client = new AsyncHttpClient(); +client.execute(request, new AsyncHandler<...>() { +..... +} ); ++-----+ + + If you need to work with File, the library supports the {{{./zero-bytes-copy.html}zero copy in memory concept}}, + e.g the File can be uploaded or downloaded without loading its associated bytes in memory, preventing out of memory + errors in case you need to upload or download many large files. Although the library support the following: + ++-----+ +Request request = builder.setUrl("http://") + .addHeader("name", "value") + .setBody(myInputStream)) + .build(); ++-----+ + + it is discouraged to use <<>> as the library will need to buffer bytes in memory in order to determine + the length of the stream, and instead highly recommended to either use a File or the <<>> API to avoid + loading unnecessary bytes in memory: + ++-----+ +public interface BodyGenerator { + Body createBody() throws IOException; +} ++-----+ + + where a Body is defined as: + ++-----+ +public interface Body { + long getContentLength(); + + long read(ByteBuffer buffer) + throws IOException; + + void close() throws IOException; +} ++-----+ + + This way the library will never read unnecessary bytes in memory, which could significantly improve the performance + your application. + + The <<>> can also be used to create per <<>> configuration, + like setting a Proxy or request timeout: + ++-----+ +PerRequestConfig requestConfig = new PerRequestConfig(); +requestConfig.setRequestTimeoutInMs(5 * 1000); +requestConfig.setProxy(new ProxyServer(...)); +Future responseFuture = client.prepareGet("http://").setPerRequestConfig(requestConfig).execute(); ++-----+ + +* Creating a Response object + + The AsyncHandler is typed, e.g you can return any object from the <<>>. One useful object + of the library is the <<>> object and it's associate builder. You can incrementally create a <<>> + object using the <<>> method: + ++-----+ +MyAsyncHandler asyncHandler = new MyAsyncHanfler() { + private final Response.ResponseBuilder builder = new Response.ResponseBuilder(); + + public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { + builder.accumulate(content); + return STATE.CONTINUE; + } + + public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { + builder.accumulate(status); + return STATE.CONTINUE; + } + + public STATE onHeadersReceived(final HttpResponseHeaders headers) throws Exception { + builder.accumulate(headers); + return STATE.CONTINUE; + } + + public Response onCompleted() throws Exception { + return builder.build(); + } + +} + +Response response = client.prepareGet("http://sonatype.com").execute(asyncHandler).get(); ++-----+ + + One thing to consider when creating a <<>> object is the size of the response body. By default, + a <<>> object will accumulate all response's bytes in memory, and that could potentially create an out of + memory error. If you are planning to use the API for downloading large files, it is not recommended to accumulate + bytes in memory and instead flush the bytes on disk as soon as they are available. Note that you can still use the + <<>> object, except you don't accumulate the response's bytes as demonstrated below: + ++-----+ +MyAsyncHandler asyncHandler = new MyAsyncHanfler() { + private final Response.ResponseBuilder builder = new Response.ResponseBuilder(); + + public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { + content.write(myOutputStream); + return STATE.CONTINUE; + } + + public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { + builder.accumulate(status); return STATE.CONTINUE; + } + + public STATE onHeadersReceived(final HttpResponseHeaders headers) throws Exception { + builder.accumulate(headers); + return STATE.CONTINUE; + } + + public Response onCompleted() throws Exception { + return builder.build(); + } + +} + +Response response = client.prepareGet("http://sonatype.com").execute(asyncHandler).get(); ++-----+ + + Note that in the above scenario invoking <<>> or <<>> will + return an <<>> because the body wasn't accumulated by the <<>> object. From 2cce2c7669245c6749e59e91f45883dff2b46cc1 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 13:06:14 +0100 Subject: [PATCH 0096/2844] added the configuration section --- src/site/apt/configuring.apt | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/site/apt/configuring.apt diff --git a/src/site/apt/configuring.apt b/src/site/apt/configuring.apt new file mode 100644 index 0000000000..6eecccc888 --- /dev/null +++ b/src/site/apt/configuring.apt @@ -0,0 +1,50 @@ + ------ + Async Http Client - Configuring the AsyncHttpClient + ------ + Jeanfrancois Arcand + ------ + 2012 + +Configuring the AsyncHttpClient. + + You can configure the <<>> class using the <<>>'s Builder: + ++-----+ +Builder builder = new AsyncHttpClientConfig.Builder(); +builder.setCompressionEnabled(true) + .setAllowPoolingConnection(true) + .setRequestTimesout(30000) + .build(); + +AsyncHttpClient client = new AsyncHttpClient(builder.build()); ++-----+ + + You can set the ExecutorServices as well if you don't want to use the default, which is a cached threads pool: + ++-----+ +Builder builder = new AsyncHttpClientConfig.Builder(); +builder.setExecutorService(myOwnThreadPool); +AsyncHttpClient client = new AsyncHttpClient(builder.build()); ++-----+ + + You can also configure the connection pool the library is using and implement your own polling strategy: + ++-----+ +Builder builder = new AsyncHttpClientConfig.Builder(); +builder.setConnectionsPool(new ConnectionsPoo() { + public boolean offer(U uri, V connection) {...} + + public V poll(U uri) {...} + + public boolean removeAll(V connection) {...} + + public boolean canCacheConnection() {...} + + public void destroy() {...} +}); +AsyncHttpClient client = new AsyncHttpClient(builder.build()); ++-----+ + + It is recommended to use the default connections pool for performance reason, but you are always free to design a better one. + + You can also set the SSL information, Filters, etc. Those topics will be covered inside their own section. From 8ddbfd833f795e7759395ea7c101b5379d5ac96a Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 13:09:28 +0100 Subject: [PATCH 0097/2844] added SSL section --- src/site/apt/ssl.apt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/site/apt/ssl.apt diff --git a/src/site/apt/ssl.apt b/src/site/apt/ssl.apt new file mode 100644 index 0000000000..9c7e5db94e --- /dev/null +++ b/src/site/apt/ssl.apt @@ -0,0 +1,40 @@ + ------ + Async Http Client - Configuring SSL + ------ + Jeanfrancois Arcand + ------ + 2012 + +Configuring SSL + + Configuring the library to support SSL is simple. By default you don't have to configure anything if you don't need to use your own certificates etc. + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +Response response = client.prepareGet(("https://sonatype.com").execute().get(); ++-----+ + + The library will detect it's an SSL request and appropriately locate the key store, trust store etc. + If you need to configure those objects, all you need to do is to create an <<>> and set it using the + <<>>'s Builder as showed below: + ++-----+ +InputStream keyStoreStream = .... +char[] keyStorePassword = "changeit".toCharArray(); +KeyStore ks = KeyStore.getInstance("JKS"); +ks.load(keyStoreStream, keyStorePassword); + +char[] certificatePassword = "changeit".toCharArray(); +KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); +kmf.init(ks, certificatePassword); + +KeyManager[] keyManagers = kmf.getKeyManagers(); +TrustManager[] trustManagers = new TrustManager[]{DUMMY_TRUST_MANAGER}; +SecureRandom secureRandom = new SecureRandom(); + +SSLContext sslContext = SSLContext.getInstance("TLS"); +sslContext.init(keyManagers, trustManagers, secureRandom); +Builder builder = new AsyncHttpClientConfig.Builder(); +builder.setSSLContext(myOwnThreadPool); +AsyncHttpClient client = new AsyncHttpClient(builder.build()); ++-----+ From fb8c7969fce104ad7b3cf6e3ceeae0de87dbe6f7 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 13:26:16 +0100 Subject: [PATCH 0098/2844] added filters section --- src/site/apt/filters.apt | 151 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 src/site/apt/filters.apt diff --git a/src/site/apt/filters.apt b/src/site/apt/filters.apt new file mode 100644 index 0000000000..797b071e1b --- /dev/null +++ b/src/site/apt/filters.apt @@ -0,0 +1,151 @@ + ------ + Async Http Client - Using Filters + ------ + Jeanfrancois Arcand + ------ + 2012 + +Using Filters + + The library supports three types of <<>> who can intercept, transform, decorate and replay transactions: + <<>>, <<>> and <<>>. + +* Request Filter + + Request Filters are useful if you need to manipulate the Request or AsyncHandler object before the request is made. As an example, you can throttle requests using the following RequestFilter implementation: + ++-----+ +public class ThrottleRequestFilter implements RequestFilter { + private final int maxConnections; + private final Semaphore available; + private final int maxWait; + + public ThrottleRequestFilter(int maxConnections) { + this.maxConnections = maxConnections; + this.maxWait = Integer.MAX_VALUE; + available = new Semaphore(maxConnections, true); + } + + public ThrottleRequestFilter(int maxConnections, int maxWait) { + this.maxConnections = maxConnections; + this.maxWait = maxWait; + available = new Semaphore(maxConnections, true); + } + + public FilterContext filter(FilterContext ctx) throws FilterException { + try { + if (!available.tryAcquire(maxWait, TimeUnit.MILLISECONDS)) + throw new FilterException(String.format("No slot available for Request %s with AsyncHandler %s", + ctx.getRequest(), + ctx.getAsyncHandler())); + } + } catch (InterruptedException e) { + throw new FilterException( String.format("Interrupted Request %s with AsyncHandler %s", + ctx.getRequest(), + ctx.getAsyncHandler())); + } + + return new FilterContext(new AsyncHandlerWrapper(ctx.getAsyncHandler()), ctx.getRequest()); + } + +} + +private class AsyncHandlerWrapper implements AsyncHandler { + private final AsyncHandler asyncHandler; + + public AsyncHandlerWrapper(AsyncHandler asyncHandler) { + this.asyncHandler = asyncHandler; + } + + public void onThrowable(Throwable t) { + asyncHandler.onThrowable(t); + } + + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + return asyncHandler.onBodyPartReceived(bodyPart); + } + + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + return asyncHandler.onStatusReceived(responseStatus); + } + + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + return asyncHandler.onHeadersReceived(headers); } + + public T onCompleted() throws Exception { + available.release(); + return asyncHandler.onCompleted(); + } +} ++-----+ + + In the above, we decorate the original <<>> and use semaphore to throttle requests. + To add <<>>, all you need to do is to configure it on the <<>>: + ++-----+ +AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); +b.addRequestFilter(new ThrottleRequestFilter(100)); +AsyncHttpClient c = new AsyncHttpClient(b.build()); ++-----+ + + * Response Filter + + Like with <<>>, you can also filter the <<>>'s bytes before an <<>> gets called. + <<>> are always invoked before the library executes the logic for authentication, proxy challenging, + redirection etc. That means an application can takes control of those operations at any moment using a <<>>. + + As an example, the following <<>> redirect request from <<>> to <<>> in case + <<<.ca>>> is not responding: + ++-----+ +AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); +b.addResponseFilter(new ResponseFilter() { + public FilterContext filter(FilterContext ctx) throws FilterException { + if (ctx.getResponseStatus().getStatusCode() == 503) { + return new FilterContext.FilterContextBuilder(ctx) + .request(new RequestBuilder("GET") + .setUrl("http://google.com").build()) + .build(); + } + } +}); +AsyncHttpClient c = new AsyncHttpClient(b.build()); ++-----+ + +* IOException Filter + + The AsyncHttpClient library support <<>> that can be used to replay a request in case server a + server goes down or unresponsive, a network outage occurs, or nay kind of I/O abnormal situation. + + In those cases, the library will catch the <<>> and delegate the <<>> handling to the <<>>. + + As an example, the following filter will resume an interrupted download instead of restarting downloading the file + from the beginning: + ++-----+ +AsyncHttpClient c = new AsyncHttpClient( + new AsyncHttpClientConfig.Builder() + .addIOExceptionFilter(new ResumableIOExceptionFilter()).build()); + +Response r = c.prepareGet("http://host:port/LargeFile.avi").execute(new AsyncHandler(){...}).get(); ++-----+ + + The <<>> is defined as + ++-----+ +public class ResumableIOExceptionFilter implements IOExceptionFilter { + public FilterContext filter(FilterContext ctx) throws FilterException { + if (ctx.getIOException() != null ) { + Request request = new RequestBuilder(ctx.getRequest()).setRangeOffset(file.length()); + return new FilterContext.FilterContextBuilder(ctx) + .request(request) + .replayRequest(true) + .build(); + } + return ctx; + } +} ++-----+ + +In the above we just catch any <<>> and replay the request using the <<>> header to tell the remote +server to restart sending bytes at that position. This way we don't need to re download the entire file. From 05b77cb5e0e9ac01c08be646d00f3e287fbc4533 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 13:33:51 +0100 Subject: [PATCH 0099/2844] added the Uploading file page --- src/site/apt/upload.apt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/site/apt/upload.apt diff --git a/src/site/apt/upload.apt b/src/site/apt/upload.apt new file mode 100644 index 0000000000..65da26e440 --- /dev/null +++ b/src/site/apt/upload.apt @@ -0,0 +1,32 @@ + ------ + Async Http Client - Uploading file: Progress Listener + ------ + Jeanfrancois Arcand + ------ + 2012 + +Uploading file: Progress Listener + + When uploading bytes, an application might need to take some action depending on where the upload status is. + + The AsyncHttpClient library support a special <<>> called <<>> that can be used to + track the upload operation: + ++-----+ +public interface ProgressAsyncHandler extends AsyncHandler { + STATE onHeaderWriteCompleted(); + STATE onContentWriteCompleted(); + STATE onContentWriteProgress(long amount, long current, long total); +} ++-----+ + + The methods are called in the following order: + + * <<>>: invoked when the headers has been flushed to the remote server + + * <<>>: as soon as some response's body bytes are written. Might be invoked many times. + + * <<>>: invoked when the response has been sent or aborted. + + + Like with <<>>, you can always always abort the processing at any moment in the upload process. From 1ee6f5b17953d5c78121af1d9f92e3aee5611c70 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 13:37:13 +0100 Subject: [PATCH 0100/2844] added the authentication page --- src/site/apt/auth.apt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/site/apt/auth.apt diff --git a/src/site/apt/auth.apt b/src/site/apt/auth.apt new file mode 100644 index 0000000000..567830b3a6 --- /dev/null +++ b/src/site/apt/auth.apt @@ -0,0 +1,39 @@ + ------ + Async Http Client - Configuring Authentication: BASIC, DIGEST or NTLM + ------ + Jeanfrancois Arcand + ------ + 2012 + +Configuring Authentication: BASIC, DIGEST or NTLM + + Configuring authentication with AsyncHttpClient is simple. You can configure it at the <<>> level using the + <<>>: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +Realm realm = new Realm.RealmBuilder() + .setPrincipal(user) + .setPassword(admin) + .setUsePreemptiveAuth(true) + .setScheme(AuthScheme.BASIC) + .build(); +client.prepareGet("http://...").setRealm(realm).execute(); ++-----+ + + You can also set the realm at the AsyncHttpClientConfig level: + ++-----+ +Builder builder = new AsyncHttpClientConfig.Builder(); +Realm realm = new Realm.RealmBuilder() + .setPrincipal(user) + .setPassword(admin) + .setUsePreemptiveAuth(true) + .setScheme(AuthScheme.BASIC) + .build(); +builder.setRealm(realm).build(); +AsyncHttpClient client = new AsyncHttpClient(builder.build()); ++-----+ + + The authentication type supported are <<>>, <<>> and <<>>. You can also customize your own + authentication mechanism by using the Response Filter. From b23502829ca680d1b4e5b24534b15d4d9067a444 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 14:23:33 +0100 Subject: [PATCH 0101/2844] added the proxy page --- src/site/apt/proxy.apt | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/site/apt/proxy.apt diff --git a/src/site/apt/proxy.apt b/src/site/apt/proxy.apt new file mode 100644 index 0000000000..d62a0ebb48 --- /dev/null +++ b/src/site/apt/proxy.apt @@ -0,0 +1,63 @@ + ------ + Async Http Client - Configuring a Proxy + ------ + Jeanfrancois Arcand + ------ + 2012 + +Configuring a Proxy + + The AsyncHttpClient library supports proxy, proxy authentication and proxy tunneling. + Just need to create a <<>> instance: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +Future f = client.prepareGet("http://....) + .setProxyServer(new ProxyServer("127.0.0.1", 8080)) + .execute(); ++-----+ + + If you need to use an SSL tunnel, all you need to do is: + ++-----+ +ProxyServer ps = new ProxyServer(ProxyServer.Protocol.HTTPS, "127.0.0.1", 8080); +AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); +RequestBuilder rb = new RequestBuilder("GET") + .setProxyServer(ps) + .setUrl("https://twitpic.com:443"); +Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { + @Override + public void onThrowable(Throwable t) {} + + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } + +}); +Response r = responseFuture.get(); ++-----+ + + You can also set the authentication token on the <<>> instance: + ++-----+ +ProxyServer ps = new ProxyServer(ProxyServer.Protocol.HTTPS, "127.0.0.1", 8080, "admin", "password"); +AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); +RequestBuilder rb = new RequestBuilder("GET") + .setProxyServer(ps) + .setUrl("https://twitpic.com:443"); +Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { + @Override + public void onThrowable(Throwable t) {} + + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } + +}); +Response r = responseFuture.get(); ++-----+ + + You can also set the <<>> at the <<>> level. In that case, all request will share + the same proxy information. From 5fd5faf1954f23aea576d9d1da43fa6943309005 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 14:29:37 +0100 Subject: [PATCH 0102/2844] added the providers page --- src/site/apt/providers.apt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/site/apt/providers.apt diff --git a/src/site/apt/providers.apt b/src/site/apt/providers.apt new file mode 100644 index 0000000000..1ececa1037 --- /dev/null +++ b/src/site/apt/providers.apt @@ -0,0 +1,38 @@ + ------ + Async Http Client - Switching Provider + ------ + Jeanfrancois Arcand + ------ + 2012 + +Switching Provider + + By default, the <<>> is using the powerful {{{http://netty.io/}Netty}}'s framework as the + HTTP processor. There might be environment where you can't use Netty. Fortunately, the <<>> library + supports two other http runtime: the <<>>, which build around the <<>>, and + <<>> which build on top of the + {{{http://hc.apache.org/httpcomponents-client-ga/index.html}Apache HttpClient}}. + + To change provider, all you need to do is: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(new ApacheAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); ++-----+ + + Same for the JDK: + ++-----+ +AsyncHttpclient client = new AsyncHttpClient(new JDKAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); ++-----+ + + Also every <<>> can be configured with their native functionality. + + As an example, you can switch the <<>> to use blocking I/O instead of NIO: + ++-----+ +NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); +config.setProperty(NettyAsyncHttpProviderConfig.USE_BLOCKING_IO, "true"); + +AsyncHttpClientConfig c = new AsyncHttpClientConfig().setAsyncHttpClientProviderConfig(config).build(); +AsyncHttpClient client = new AsyncHttpClient(new NettyAsyncHttpProvider(config)); ++-----+ From 103d0d2f8a2b06d0364bb1920e2080fa8a6d90c0 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 14:32:15 +0100 Subject: [PATCH 0103/2844] aded webdav page --- src/site/apt/webdav.apt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/site/apt/webdav.apt diff --git a/src/site/apt/webdav.apt b/src/site/apt/webdav.apt new file mode 100644 index 0000000000..e20d3fa2b7 --- /dev/null +++ b/src/site/apt/webdav.apt @@ -0,0 +1,25 @@ + ------ + Async Http Client - Using the WebDav protocol + ------ + Jeanfrancois Arcand + ------ + 2012 + +Using the WebDav protocol + + The <<>> has build in support for the WebDav protocol. The API can be used the same way normal HTTP + request are made, and everything discussed in this documentation works with WebDAV as well: + ++-----+ +AsyncHttpClient c = new AsyncHttpClient(); +Request mkcolRequest = new RequestBuilder("MKCOL").setUrl("http://host:port/folder1").build(); +Response response = c.executeRequest(mkcolRequest).get(); ++-----+ + + or + ++-----+ +AsyncHttpClient c = new AsyncHttpClient(); +Request propFindRequest = new RequestBuilder("PROPFIND").setUrl("http://host:port).build(); +Response response = c.executeRequest(propFindRequest, new AsyncHandler(){...}).get(); ++-----+ From 3374f1845b7f120a8706d91ccd8bdb1e0acecba9 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 14:39:40 +0100 Subject: [PATCH 0104/2844] added Resumable Dowload page --- src/site/apt/resumable-download.apt | 75 +++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/site/apt/resumable-download.apt diff --git a/src/site/apt/resumable-download.apt b/src/site/apt/resumable-download.apt new file mode 100644 index 0000000000..22ba329a9e --- /dev/null +++ b/src/site/apt/resumable-download.apt @@ -0,0 +1,75 @@ + ------ + Async Http Client - Resumable Dowload + ------ + Jeanfrancois Arcand + ------ + 2012 + +Uploading file: Progress Listener + + The AsyncHttpClient supports resumable download in two different scenarios: + + * <<>>: If an <<>> occurs (for whatever reason), you can configure the library to restart + the download automatically without having to restart the download from the beginning. + + * <<>>: If your application or the JVM goes down during a file download, the library can also restart the + download automatically when the same download is requested. + + + You can configure the <<>> Library to survive <<> using the <<>>: + ++-----+ +AsyncHttpClient c = new AsyncHttpClient(new AsyncHttpClientConfig.Builder() + .addIOExceptionFilter(new ResumableIOExceptionFilter()).build()); +ResumableAsyncHandler a = new ResumableAsyncHandler(new ResumableRandomAccessFileListener()); +a.setResumableListener(new ResumableRandomAccessFileListener(new RandomAccessFile("file.avi", "rw"))); +Response r = c.prepareGet("http://host:port/file.avi").execute(a).get(); ++-----+ + + If you need something more high level and configurable, you can use a <<>>, and or implement + a <<>>: + ++-----+ +AsyncHttpClient c = new AsyncHttpClient(); +ResumableAsyncHandler a = new ResumableAsyncHandler(new PropertiesBasedResumableProcessor()); +a.setResumableListener(new ResumableRandomAccessFileListener(new RandomAccessFile("file.avi", "rw"))); +Response r = c.prepareGet( "http://localhost:8081/file.AVI" ).execute( a ).get(); ++-----+ + + You can also simply use a <<>> (or use the <<>>, + which does what's described below): + ++-----+ +public interface ResumableListener { + public void onBytesReceived(ByteBuffer byteBuffer) throws IOException; + + public void onAllBytesReceived(); + + public long length(); +} ++-----+ + + As simple as: + ++-----+ +AsyncHttpClient c = new AsyncHttpClient(); +final RandomAccessFile file = new RandomAccessFile("file.avi", "rw"); +ResumableAsyncHandler a = new ResumableAsyncHandler(); +a.setResumableListener(new ResumableListener() { + + public void onBytesReceived(ByteBuffer byteBuffer) throws IOException { + file.seek(file.length()); + file.write(byteBuffer.array()); + } + + public void onAllBytesReceived() { + file.close(); + } + + public long length() { + return file.length(); + } + +}); +Response r = c.prepareGet( "http://localhost:8081/file.AVI" ).execute( a ).get(); ++-----+ From cbb571651386808d047cc079853ff8e2482a79b2 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 14:42:45 +0100 Subject: [PATCH 0105/2844] added TransferListener page --- src/site/apt/transfer-listener.apt | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/site/apt/transfer-listener.apt diff --git a/src/site/apt/transfer-listener.apt b/src/site/apt/transfer-listener.apt new file mode 100644 index 0000000000..399ea96492 --- /dev/null +++ b/src/site/apt/transfer-listener.apt @@ -0,0 +1,34 @@ + ------ + Async Http Client - TransferListener + ------ + Jeanfrancois Arcand + ------ + 2012 + +TransferListener + + In some scenario an application may need to manipulate the received bytes in more than one place, e.g. saves the bytes + on disk but also accumulate it for checksum checking later. In that case, instead of using an <<>> and + mixes logic inside an <<>>, it is recommended to use the <<>> + simple API: + ++-----+ +public interface TransferListener { + public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers); + public void onResponseHeadersReceived (FluentCaseInsensitiveStringsMap headers); + public void onBytesReceived(ByteBuffer buffer) throws IOException; + public void onBytesSent(ByteBuffer buffer); + public void onRequestResponseCompleted(); + public void onThrowable(Throwable t); +} ++-----+ + + All you need to do in that case is to create a <<>> and add as many <<>> + as you need: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +TransferCompletionHandler tl = new TransferCompletionHandler(); +tl.addTransferListener(new TransferListener(){...}); +Response response = httpClient.prepareGet("http://...").execute(tl).get(); ++-----+ From d135bd36cd02fb19e729ff9bbe2c068733068f64 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 18:07:57 +0100 Subject: [PATCH 0106/2844] added Zero Bytes Copy page --- src/site/apt/zero-bytes-copy.apt | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/site/apt/zero-bytes-copy.apt diff --git a/src/site/apt/zero-bytes-copy.apt b/src/site/apt/zero-bytes-copy.apt new file mode 100644 index 0000000000..7b58469fbe --- /dev/null +++ b/src/site/apt/zero-bytes-copy.apt @@ -0,0 +1,45 @@ + ------ + Async Http Client - Zero Bytes Copy + ------ + Jeanfrancois Arcand + ------ + 2012 + +Zero Bytes Copy + + When uploading or downloading bytes, it is important to try to avoid buffering bytes in memory. + +* Upload + + On the upload side, the mechanism is enabled by default when setting the <<>>'s body to a File: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +File file = new File("file.avi"); +Future f = client.preparePut("http://localhost").setBody(file).execute(); ++-----+ + + If you can't use a File, the recommended way is to use a <<>>. It is strongly recommended to avoid + using <<>> as the library will unfortunately buffer the entire content in memory in order to set the + <<>>, which can cause out of memory error. + +* Download + + On the download side, you can use the <<>> to avoid loading bytes in memory and + unnecessary copy: + ++-----+ +AsyncHttpClient client = new AsyncHttpClient(); +File tmp = new File("zeroCopy.txt"); +final FileOutputStream stream = new FileOutputStream(tmp); +Future f = client.prepareGet("http://localhost/largefile.avi").execute(new AsyncHandler() { + public void onThrowable(Throwable t) { } + + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + bodyPart.writeTo(stream); + return STATE.CONTINUE; + } + +{ .... } }); +Response resp = f.get(); ++-----+ From eb48ad526bfe319837f3dca3abb4f2329aa0a14c Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 18:11:09 +0100 Subject: [PATCH 0107/2844] added performances page --- src/site/apt/performances.apt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/site/apt/performances.apt diff --git a/src/site/apt/performances.apt b/src/site/apt/performances.apt new file mode 100644 index 0000000000..6d26b77af0 --- /dev/null +++ b/src/site/apt/performances.apt @@ -0,0 +1,22 @@ + ------ + Async Http Client - Limiting the number of connections to improve raw performance + ------ + Jeanfrancois Arcand + ------ + 2012 + +Limiting the number of connections to improve raw performance + + By default the library uses a connection pool and re-use connections as needed. It is important to not let the + connection pool grow too large as it takes resources in memory. One way consist of setting the maximum number of + connection per host or in total: + ++-----+ +AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder() + .setMaximumConnectionsPerHost(10) + .setMaximumConnectionsTotal(100) + .build(); +AsyncHttpClient c = new AsyncHttpClient(config); ++-----+ + + There is no magic number, so you will need to try it and decide which one gives the best result. From d4592c216d1a24440945af25108276c16bcea08d Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 18:13:16 +0100 Subject: [PATCH 0108/2844] added oauth page --- src/site/apt/oauth.apt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/site/apt/oauth.apt diff --git a/src/site/apt/oauth.apt b/src/site/apt/oauth.apt new file mode 100644 index 0000000000..fb8e9bab22 --- /dev/null +++ b/src/site/apt/oauth.apt @@ -0,0 +1,26 @@ + ------ + Async Http Client - Using OAuth + ------ + Jeanfrancois Arcand + ------ + 2012 + +Using OAuth + + You can use the library to pull data from any OAuth site (like Twitter). This is as simple as: + ++-----+ +private static final String CONSUMER_KEY = "dpf43f3p2l4k3l03"; +private static final String CONSUMER_SECRET = "kd94hf93k423k f44"; +public static final String TOKEN_KEY = "nnch734d00sl2jdk"; +public static final String TOKEN_SECRET = "pfkkdhi9sl3r4s00"; +public static final String NONCE = "kllo9940pd9333jh"; +final static long TIMESTAMP = 1191242096; + +public void oAuth() { +ConsumerKey consumer = new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET); +RequestToken user = new RequestToken(TOKEN_KEY, TOKEN_SECRET); +OAuthSignatureCalculator calc = new OAuthSignatureCalculator(consumer, user); +AsyncHttpClient client = new AsyncHttpClient(); +Response response = client.prepareGet("http://...").setSignatureCalculator(calc).execute().get(); ++-----+ From b83b467d2b04d5855550447876b6ca919a4eeae9 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 18:13:45 +0100 Subject: [PATCH 0109/2844] shorter page links --- src/site/site.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/site/site.xml b/src/site/site.xml index 583808e8b4..1602c44f3f 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -30,8 +30,8 @@ - - + + @@ -45,4 +45,3 @@ - From 813a9bd72dd000afa4ba7f3bbc1f51694a63440d Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 18:14:25 +0100 Subject: [PATCH 0110/2844] dropped M$/pdf doc --- docs/AHCQuickStartGuide.docx | Bin 105084 -> 0 bytes docs/AHCQuickStartGuide.pdf | Bin 175257 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/AHCQuickStartGuide.docx delete mode 100644 docs/AHCQuickStartGuide.pdf diff --git a/docs/AHCQuickStartGuide.docx b/docs/AHCQuickStartGuide.docx deleted file mode 100644 index 84a60f71ff877fee70ee11777a23f83d1ba674b9..0000000000000000000000000000000000000000 GIT binary patch literal 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gM6fWauT0#-GQ7e%H33<18t9|8#!6GQ12%6ndb z>`z`00Mn>2UJy{e?oT`j2ywo=|7^<(z94%54}wY$0^)_C&;!GHe-?oIgB}D5%m_*! z2ngh2A3)VORG9*8FN_xg{aM)V&prV4LzO)Q3IQVQe~t|TRNF(<4G1t^RQUlc1E(Hp zTVO*#fdP0BRGy*0E`{1J6wuuZFfihRo&tCmbO?G;pMkv&a(-t2Ap_u0KQGhwCkzVQ ziJ-#Zh>QHed6B5{gCdcL3-l163%Um2q3Qt$sKs|-ox?y#Fsck-z=}haJq&oM=K>xW z#Dh9-FbMMeocLqBFfbUfb5LLqBm`AfFevE4z5&!0Jb%&T4|)g)6m_oy!GQTdT{AEk zu<@d_g#or0Dlc#l?}a&n!FVsM1px2D9Kk`rgrM{R=lOYF|G_g*lo6;R`R6zQybJ3W z4v78&e=uMxztHxg4#8o7;-lihcmU%QrC(q>MU@L22EDMa!GYmk7#nbYpz??KmwgCO z-3x0Uz`L+#1CaB(;y+}C04#Gz; z*)PZsfC2Bt{n-Z+FkevT2+4y)-Pgb%1Q>OG&ta%G0|0{p&dMKs0I>77lTcv15Z()T zyf9Q<0|RF$>N+}yq3R1@Zh$V(&n*Ct7uBu<%o2b@6#jU4VdoV;&%b`ze}D}F zDBA@XaEM-jAusd+g#xD!3LXGMT_1ow1iL^F3Ih}nr7au^20{gY@&^a@5){1$79bRL ztpczMItiS$P*nTs9EN%x0kEG{SpSd Date: Tue, 28 Feb 2012 18:21:09 +0100 Subject: [PATCH 0111/2844] added javadoc reports --- pom.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pom.xml b/pom.xml index f2200d4c2b..070b471663 100644 --- a/pom.xml +++ b/pom.xml @@ -451,6 +451,25 @@ + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8.1 + + true + 1.6 + UTF-8 + 1g + + http://java.sun.com/javase/6/docs/api/ + + ${javadoc.package.exclude} + + + + grizzly From 7c91e4d85db546a1bd5bcff170188dcdc1d84bd7 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 18:22:12 +0100 Subject: [PATCH 0112/2844] added myself in the contributors list --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 070b471663..b0eba4237d 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,12 @@ Hubert Iwaniuk + + + Simone Tripodi + simonetripodi@apache.org + + Apache License 2.0 From fdb4cba67008cf438d986e74801bd5320265459f Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 22:31:38 +0100 Subject: [PATCH 0113/2844] first spike of CookieJar --- .../client/cookiejar/AbstractCookieJar.java | 59 +++++++++++++ .../cookiejar/AbstractCookieJarFilter.java | 15 ++++ .../cookiejar/CookieJarRequestFilter.java | 58 +++++++++++++ .../cookiejar/CookieJarResponseFilter.java | 54 ++++++++++++ .../client/cookiejar/InMemoryCookieJar.java | 85 +++++++++++++++++++ 5 files changed, 271 insertions(+) create mode 100644 src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java create mode 100644 src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java create mode 100644 src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java create mode 100644 src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java create mode 100644 src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java new file mode 100644 index 0000000000..01f7d318c3 --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java @@ -0,0 +1,59 @@ +package com.ning.http.client.cookiejar; + +import java.util.Collection; + +import com.ning.http.client.Cookie; +import com.ning.http.client.filter.RequestFilter; +import com.ning.http.client.filter.ResponseFilter; + +public abstract class AbstractCookieJar +{ + + private final RequestFilter requestFilter = new CookieJarRequestFilter( this ); + + private final ResponseFilter responseFilter = new CookieJarResponseFilter( this ); + + public final RequestFilter getRequestFilter() + { + return requestFilter; + } + + public final ResponseFilter getResponseFilter() + { + return responseFilter; + } + + protected final void store( String host, Cookie cookie ) + throws Exception + { + persist( host, cookie ); + + String domain = cookie.getDomain(); + if ( !host.equals( domain ) ) + { + persist( domain, cookie ); + } + } + + protected abstract void persist( String host, Cookie cookie ) + throws Exception; + + protected abstract Collection retrieve( String host ) + throws Exception; + + protected final void delete( String host, Cookie cookie ) + throws Exception + { + remove( host, cookie ); + + String domain = cookie.getDomain(); + if ( !host.equals( domain ) ) + { + remove( domain, cookie ); + } + } + + protected abstract void remove( String host, Cookie cookie ) + throws Exception; + +} diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java new file mode 100644 index 0000000000..92d99da2e6 --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java @@ -0,0 +1,15 @@ +package com.ning.http.client.cookiejar; + +abstract class AbstractCookieJarFilter +{ + + protected static final String HOST = "Host"; + + protected final AbstractCookieJar cookieJar; + + public AbstractCookieJarFilter(AbstractCookieJar cookieJar) + { + this.cookieJar = cookieJar; + } + +} diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java b/src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java new file mode 100644 index 0000000000..f8610a9aed --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java @@ -0,0 +1,58 @@ +package com.ning.http.client.cookiejar; + +import static java.lang.String.format; + +import java.util.Collection; + +import com.ning.http.client.Cookie; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.filter.FilterContext; +import com.ning.http.client.filter.FilterException; +import com.ning.http.client.filter.RequestFilter; + +final class CookieJarRequestFilter + extends AbstractCookieJarFilter + implements RequestFilter +{ + + public CookieJarRequestFilter(AbstractCookieJar cookieJar) + { + super( cookieJar ); + } + + @SuppressWarnings( "rawtypes" ) + public final FilterContext filter( FilterContext ctx ) + throws FilterException + { + String domain = ""; + + Collection cookies = null; + try + { + cookies = cookieJar.retrieve( domain ); + } + catch ( Exception e ) + { + throw new FilterException( format( "Impossible to retrieve cookies from domain %s: %s", + domain, e.getMessage() ), + e ); + } + + if ( cookies == null || cookies.isEmpty() ) + { + return ctx; + } + + final RequestBuilder requestBuilder = new RequestBuilder( ctx.getRequest() ); + + for ( Cookie cookie : cookies ) + { + requestBuilder.addCookie( cookie ); + } + + return new FilterContext.FilterContextBuilder( ctx ) + .request( requestBuilder.build() ) + .build(); + } + +} diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java b/src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java new file mode 100644 index 0000000000..bc1511a5b4 --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java @@ -0,0 +1,54 @@ +package com.ning.http.client.cookiejar; + +import static java.lang.String.format; +import static com.ning.http.util.AsyncHttpProviderUtils.parseCookie; + +import java.util.List; + +import com.ning.http.client.Cookie; +import com.ning.http.client.filter.FilterContext; +import com.ning.http.client.filter.FilterException; +import com.ning.http.client.filter.ResponseFilter; + +final class CookieJarResponseFilter + extends AbstractCookieJarFilter + implements ResponseFilter +{ + + private static final String SET_COOKIE = "Set-Cookie"; + + public CookieJarResponseFilter(AbstractCookieJar cookieJar) + { + super( cookieJar ); + } + + @SuppressWarnings( "rawtypes" ) + public FilterContext filter( FilterContext ctx ) + throws FilterException + { + final List cookiesString = ctx.getResponseHeaders().getHeaders().get( SET_COOKIE ); + + if ( cookiesString != null && !cookiesString.isEmpty() ) + { + String host = ctx.getRequest().getHeaders().getFirstValue( HOST ); + + for ( String cookieValue : cookiesString ) + { + Cookie currentCookie = parseCookie( cookieValue ); + + try + { + cookieJar.store( host, currentCookie ); + } + catch ( Exception e ) + { + throw new FilterException( format( "Impossible to store cookie %s: %s", cookieValue, e.getMessage() ), + e ); + } + } + } + + return ctx; + } + +} diff --git a/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java new file mode 100644 index 0000000000..d7c2935fae --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java @@ -0,0 +1,85 @@ +package com.ning.http.client.cookiejar; + +import java.util.Collection; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import com.ning.http.client.Cookie; + +public final class InMemoryCookieJar + extends AbstractCookieJar +{ + + private final ConcurrentMap> cookiesRegistry = + new ConcurrentHashMap>(); + + private final Lock lock = new ReentrantLock(); + + @Override + protected void persist( String host, Cookie cookie ) + throws Exception + { + lock.lock(); + + try + { + ConcurrentMap domainCookies = cookiesRegistry.get( host ); + if ( domainCookies == null ) + { + // create the index and store it + domainCookies = new ConcurrentHashMap(); + cookiesRegistry.put( host, domainCookies ); + } + + domainCookies.put( cookie.getName(), cookie ); + } + finally + { + lock.unlock(); + } + } + + @Override + protected Collection retrieve( String host ) + throws Exception + { + lock.lock(); + + try + { + ConcurrentMap hostCookies = cookiesRegistry.get( host ); + if ( hostCookies != null ) + { + return hostCookies.values(); + } + return null; + } + finally + { + lock.unlock(); + } + } + + @Override + protected void remove( String host, Cookie cookie ) + throws Exception + { + lock.lock(); + + try + { + ConcurrentMap hostCookies = cookiesRegistry.get( host ); + if ( hostCookies != null ) + { + hostCookies.remove( cookie.getName() ); + } + } + finally + { + lock.unlock(); + } + } + +} From 4ee3fb19786041db5d550edea6948b5302b46213 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 22:36:57 +0100 Subject: [PATCH 0114/2844] extracted the CookieJar interface --- .../http/client/cookiejar/AbstractCookieJar.java | 1 + .../com/ning/http/client/cookiejar/CookieJar.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/main/java/com/ning/http/client/cookiejar/CookieJar.java diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java index 01f7d318c3..37790d6be5 100644 --- a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java +++ b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java @@ -7,6 +7,7 @@ import com.ning.http.client.filter.ResponseFilter; public abstract class AbstractCookieJar + implements CookieJar { private final RequestFilter requestFilter = new CookieJarRequestFilter( this ); diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJar.java b/src/main/java/com/ning/http/client/cookiejar/CookieJar.java new file mode 100644 index 0000000000..5ae6328067 --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/CookieJar.java @@ -0,0 +1,13 @@ +package com.ning.http.client.cookiejar; + +import com.ning.http.client.filter.RequestFilter; +import com.ning.http.client.filter.ResponseFilter; + +public interface CookieJar +{ + + RequestFilter getRequestFilter(); + + ResponseFilter getResponseFilter(); + +} From c34e1a25d5617e2d332d13f07a75322ac4471e41 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 22:43:15 +0100 Subject: [PATCH 0115/2844] initial import of CookieJar testcase structure --- .../cookiejar/AbstractCookieJarTestCase.java | 34 +++++++++++++++++++ .../cookiejar/InMemoryCookieJarTestcase.java | 13 +++++++ 2 files changed, 47 insertions(+) create mode 100644 src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java create mode 100644 src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java diff --git a/src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java b/src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java new file mode 100644 index 0000000000..cbb35eafb8 --- /dev/null +++ b/src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java @@ -0,0 +1,34 @@ +package com.ning.http.client.cookiejar; + +import static org.testng.Assert.assertNotNull; + +import org.testng.annotations.AfterSuite; +import org.testng.annotations.BeforeSuite; +import org.testng.annotations.Test; + +abstract class AbstractCookieJarTestCase +{ + + private CookieJar cookieJar; + + @BeforeSuite + public final void setUp() + { + cookieJar = createCookieJar(); + } + + protected abstract CookieJar createCookieJar(); + + @AfterSuite + public final void tearDown() + { + cookieJar = null; + } + + @Test + public void myCharmingCookieJarTest() + { + assertNotNull( cookieJar ); + } + +} diff --git a/src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java b/src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java new file mode 100644 index 0000000000..962d6cfbad --- /dev/null +++ b/src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java @@ -0,0 +1,13 @@ +package com.ning.http.client.cookiejar; + +public final class InMemoryCookieJarTestcase + extends AbstractCookieJarTestCase +{ + + @Override + protected CookieJar createCookieJar() + { + return new InMemoryCookieJar(); + } + +} From 43ca9e65552691f20e9c7b3b17ef19b803a46108 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 23:05:09 +0100 Subject: [PATCH 0116/2844] added the scheduler for deletion --- .../client/cookiejar/AbstractCookieJar.java | 25 ++++++++++-- .../cookiejar/DeleteCookieTimerTask.java | 38 +++++++++++++++++++ 2 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java index 37790d6be5..f25af1aa16 100644 --- a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java +++ b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java @@ -1,6 +1,7 @@ package com.ning.http.client.cookiejar; import java.util.Collection; +import java.util.Timer; import com.ning.http.client.Cookie; import com.ning.http.client.filter.RequestFilter; @@ -10,10 +11,14 @@ public abstract class AbstractCookieJar implements CookieJar { + private static final int MILLISENCONDS_IN_SECOND = 1000; + private final RequestFilter requestFilter = new CookieJarRequestFilter( this ); private final ResponseFilter responseFilter = new CookieJarResponseFilter( this ); + private final Timer timer = new Timer( true ); + public final RequestFilter getRequestFilter() { return requestFilter; @@ -24,15 +29,27 @@ public final ResponseFilter getResponseFilter() return responseFilter; } - protected final void store( String host, Cookie cookie ) + final void store( String host, Cookie cookie ) throws Exception { - persist( host, cookie ); + storeAndSchedule( host, cookie ); String domain = cookie.getDomain(); if ( !host.equals( domain ) ) { - persist( domain, cookie ); + storeAndSchedule( domain, cookie ); + } + } + + private void storeAndSchedule( String host, Cookie cookie ) + throws Exception + { + persist( host, cookie ); + + if ( cookie.getMaxAge() > 0 ) // otherwise will be just deleted + { + long delay = cookie.getMaxAge() * MILLISENCONDS_IN_SECOND; + timer.schedule( new DeleteCookieTimerTask( this, host, cookie ), delay ); } } @@ -42,7 +59,7 @@ protected abstract void persist( String host, Cookie cookie ) protected abstract Collection retrieve( String host ) throws Exception; - protected final void delete( String host, Cookie cookie ) + final void delete( String host, Cookie cookie ) throws Exception { remove( host, cookie ); diff --git a/src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java b/src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java new file mode 100644 index 0000000000..179b842afd --- /dev/null +++ b/src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java @@ -0,0 +1,38 @@ +package com.ning.http.client.cookiejar; + +import java.util.TimerTask; + +import com.ning.http.client.Cookie; + +final class DeleteCookieTimerTask + extends TimerTask +{ + + private final AbstractCookieJar cookieJar; + + private final String host; + + private final Cookie cookie; + + public DeleteCookieTimerTask( AbstractCookieJar cookieJar, String host, Cookie cookie ) + { + this.cookieJar = cookieJar; + this.host = host; + this.cookie = cookie; + } + + @Override + public void run() + { + try + { + cookieJar.remove( host, cookie ); + } + catch ( Exception e ) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + +} From 8d4239d6be02a204d9e682a6c57589fdedb064bc Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Tue, 28 Feb 2012 23:08:15 +0100 Subject: [PATCH 0117/2844] extracted cookie persistence methods and imported in the CookieJar interface --- .../http/client/cookiejar/AbstractCookieJar.java | 10 ---------- .../com/ning/http/client/cookiejar/CookieJar.java | 12 ++++++++++++ .../http/client/cookiejar/InMemoryCookieJar.java | 9 +++------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java index f25af1aa16..b0285879d6 100644 --- a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java +++ b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java @@ -1,6 +1,5 @@ package com.ning.http.client.cookiejar; -import java.util.Collection; import java.util.Timer; import com.ning.http.client.Cookie; @@ -53,12 +52,6 @@ private void storeAndSchedule( String host, Cookie cookie ) } } - protected abstract void persist( String host, Cookie cookie ) - throws Exception; - - protected abstract Collection retrieve( String host ) - throws Exception; - final void delete( String host, Cookie cookie ) throws Exception { @@ -71,7 +64,4 @@ final void delete( String host, Cookie cookie ) } } - protected abstract void remove( String host, Cookie cookie ) - throws Exception; - } diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJar.java b/src/main/java/com/ning/http/client/cookiejar/CookieJar.java index 5ae6328067..5efd833a2d 100644 --- a/src/main/java/com/ning/http/client/cookiejar/CookieJar.java +++ b/src/main/java/com/ning/http/client/cookiejar/CookieJar.java @@ -1,5 +1,8 @@ package com.ning.http.client.cookiejar; +import java.util.Collection; + +import com.ning.http.client.Cookie; import com.ning.http.client.filter.RequestFilter; import com.ning.http.client.filter.ResponseFilter; @@ -10,4 +13,13 @@ public interface CookieJar ResponseFilter getResponseFilter(); + void persist( String host, Cookie cookie ) + throws Exception; + + Collection retrieve( String host ) + throws Exception; + + void remove( String host, Cookie cookie ) + throws Exception; + } diff --git a/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java index d7c2935fae..f5513a1c46 100644 --- a/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java +++ b/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java @@ -17,8 +17,7 @@ public final class InMemoryCookieJar private final Lock lock = new ReentrantLock(); - @Override - protected void persist( String host, Cookie cookie ) + public void persist( String host, Cookie cookie ) throws Exception { lock.lock(); @@ -41,8 +40,7 @@ protected void persist( String host, Cookie cookie ) } } - @Override - protected Collection retrieve( String host ) + public Collection retrieve( String host ) throws Exception { lock.lock(); @@ -62,8 +60,7 @@ protected Collection retrieve( String host ) } } - @Override - protected void remove( String host, Cookie cookie ) + public void remove( String host, Cookie cookie ) throws Exception { lock.lock(); From d509ba103b1c477e62a5a2e4ffe4dcc629d8ac45 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Wed, 29 Feb 2012 08:52:14 +0100 Subject: [PATCH 0118/2844] removed the cookiejar prototype --- .../client/cookiejar/AbstractCookieJar.java | 67 --------------- .../cookiejar/AbstractCookieJarFilter.java | 15 ---- .../ning/http/client/cookiejar/CookieJar.java | 25 ------ .../cookiejar/CookieJarRequestFilter.java | 58 ------------- .../cookiejar/CookieJarResponseFilter.java | 54 ------------ .../cookiejar/DeleteCookieTimerTask.java | 38 --------- .../client/cookiejar/InMemoryCookieJar.java | 82 ------------------- .../cookiejar/AbstractCookieJarTestCase.java | 34 -------- .../cookiejar/InMemoryCookieJarTestcase.java | 13 --- 9 files changed, 386 deletions(-) delete mode 100644 src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java delete mode 100644 src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java delete mode 100644 src/main/java/com/ning/http/client/cookiejar/CookieJar.java delete mode 100644 src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java delete mode 100644 src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java delete mode 100644 src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java delete mode 100644 src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java delete mode 100644 src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java delete mode 100644 src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java deleted file mode 100644 index b0285879d6..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJar.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.ning.http.client.cookiejar; - -import java.util.Timer; - -import com.ning.http.client.Cookie; -import com.ning.http.client.filter.RequestFilter; -import com.ning.http.client.filter.ResponseFilter; - -public abstract class AbstractCookieJar - implements CookieJar -{ - - private static final int MILLISENCONDS_IN_SECOND = 1000; - - private final RequestFilter requestFilter = new CookieJarRequestFilter( this ); - - private final ResponseFilter responseFilter = new CookieJarResponseFilter( this ); - - private final Timer timer = new Timer( true ); - - public final RequestFilter getRequestFilter() - { - return requestFilter; - } - - public final ResponseFilter getResponseFilter() - { - return responseFilter; - } - - final void store( String host, Cookie cookie ) - throws Exception - { - storeAndSchedule( host, cookie ); - - String domain = cookie.getDomain(); - if ( !host.equals( domain ) ) - { - storeAndSchedule( domain, cookie ); - } - } - - private void storeAndSchedule( String host, Cookie cookie ) - throws Exception - { - persist( host, cookie ); - - if ( cookie.getMaxAge() > 0 ) // otherwise will be just deleted - { - long delay = cookie.getMaxAge() * MILLISENCONDS_IN_SECOND; - timer.schedule( new DeleteCookieTimerTask( this, host, cookie ), delay ); - } - } - - final void delete( String host, Cookie cookie ) - throws Exception - { - remove( host, cookie ); - - String domain = cookie.getDomain(); - if ( !host.equals( domain ) ) - { - remove( domain, cookie ); - } - } - -} diff --git a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java b/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java deleted file mode 100644 index 92d99da2e6..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/AbstractCookieJarFilter.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.ning.http.client.cookiejar; - -abstract class AbstractCookieJarFilter -{ - - protected static final String HOST = "Host"; - - protected final AbstractCookieJar cookieJar; - - public AbstractCookieJarFilter(AbstractCookieJar cookieJar) - { - this.cookieJar = cookieJar; - } - -} diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJar.java b/src/main/java/com/ning/http/client/cookiejar/CookieJar.java deleted file mode 100644 index 5efd833a2d..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/CookieJar.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.ning.http.client.cookiejar; - -import java.util.Collection; - -import com.ning.http.client.Cookie; -import com.ning.http.client.filter.RequestFilter; -import com.ning.http.client.filter.ResponseFilter; - -public interface CookieJar -{ - - RequestFilter getRequestFilter(); - - ResponseFilter getResponseFilter(); - - void persist( String host, Cookie cookie ) - throws Exception; - - Collection retrieve( String host ) - throws Exception; - - void remove( String host, Cookie cookie ) - throws Exception; - -} diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java b/src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java deleted file mode 100644 index f8610a9aed..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/CookieJarRequestFilter.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.ning.http.client.cookiejar; - -import static java.lang.String.format; - -import java.util.Collection; - -import com.ning.http.client.Cookie; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.RequestFilter; - -final class CookieJarRequestFilter - extends AbstractCookieJarFilter - implements RequestFilter -{ - - public CookieJarRequestFilter(AbstractCookieJar cookieJar) - { - super( cookieJar ); - } - - @SuppressWarnings( "rawtypes" ) - public final FilterContext filter( FilterContext ctx ) - throws FilterException - { - String domain = ""; - - Collection cookies = null; - try - { - cookies = cookieJar.retrieve( domain ); - } - catch ( Exception e ) - { - throw new FilterException( format( "Impossible to retrieve cookies from domain %s: %s", - domain, e.getMessage() ), - e ); - } - - if ( cookies == null || cookies.isEmpty() ) - { - return ctx; - } - - final RequestBuilder requestBuilder = new RequestBuilder( ctx.getRequest() ); - - for ( Cookie cookie : cookies ) - { - requestBuilder.addCookie( cookie ); - } - - return new FilterContext.FilterContextBuilder( ctx ) - .request( requestBuilder.build() ) - .build(); - } - -} diff --git a/src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java b/src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java deleted file mode 100644 index bc1511a5b4..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/CookieJarResponseFilter.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.ning.http.client.cookiejar; - -import static java.lang.String.format; -import static com.ning.http.util.AsyncHttpProviderUtils.parseCookie; - -import java.util.List; - -import com.ning.http.client.Cookie; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.ResponseFilter; - -final class CookieJarResponseFilter - extends AbstractCookieJarFilter - implements ResponseFilter -{ - - private static final String SET_COOKIE = "Set-Cookie"; - - public CookieJarResponseFilter(AbstractCookieJar cookieJar) - { - super( cookieJar ); - } - - @SuppressWarnings( "rawtypes" ) - public FilterContext filter( FilterContext ctx ) - throws FilterException - { - final List cookiesString = ctx.getResponseHeaders().getHeaders().get( SET_COOKIE ); - - if ( cookiesString != null && !cookiesString.isEmpty() ) - { - String host = ctx.getRequest().getHeaders().getFirstValue( HOST ); - - for ( String cookieValue : cookiesString ) - { - Cookie currentCookie = parseCookie( cookieValue ); - - try - { - cookieJar.store( host, currentCookie ); - } - catch ( Exception e ) - { - throw new FilterException( format( "Impossible to store cookie %s: %s", cookieValue, e.getMessage() ), - e ); - } - } - } - - return ctx; - } - -} diff --git a/src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java b/src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java deleted file mode 100644 index 179b842afd..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/DeleteCookieTimerTask.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.ning.http.client.cookiejar; - -import java.util.TimerTask; - -import com.ning.http.client.Cookie; - -final class DeleteCookieTimerTask - extends TimerTask -{ - - private final AbstractCookieJar cookieJar; - - private final String host; - - private final Cookie cookie; - - public DeleteCookieTimerTask( AbstractCookieJar cookieJar, String host, Cookie cookie ) - { - this.cookieJar = cookieJar; - this.host = host; - this.cookie = cookie; - } - - @Override - public void run() - { - try - { - cookieJar.remove( host, cookie ); - } - catch ( Exception e ) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - -} diff --git a/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java b/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java deleted file mode 100644 index f5513a1c46..0000000000 --- a/src/main/java/com/ning/http/client/cookiejar/InMemoryCookieJar.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.ning.http.client.cookiejar; - -import java.util.Collection; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -import com.ning.http.client.Cookie; - -public final class InMemoryCookieJar - extends AbstractCookieJar -{ - - private final ConcurrentMap> cookiesRegistry = - new ConcurrentHashMap>(); - - private final Lock lock = new ReentrantLock(); - - public void persist( String host, Cookie cookie ) - throws Exception - { - lock.lock(); - - try - { - ConcurrentMap domainCookies = cookiesRegistry.get( host ); - if ( domainCookies == null ) - { - // create the index and store it - domainCookies = new ConcurrentHashMap(); - cookiesRegistry.put( host, domainCookies ); - } - - domainCookies.put( cookie.getName(), cookie ); - } - finally - { - lock.unlock(); - } - } - - public Collection retrieve( String host ) - throws Exception - { - lock.lock(); - - try - { - ConcurrentMap hostCookies = cookiesRegistry.get( host ); - if ( hostCookies != null ) - { - return hostCookies.values(); - } - return null; - } - finally - { - lock.unlock(); - } - } - - public void remove( String host, Cookie cookie ) - throws Exception - { - lock.lock(); - - try - { - ConcurrentMap hostCookies = cookiesRegistry.get( host ); - if ( hostCookies != null ) - { - hostCookies.remove( cookie.getName() ); - } - } - finally - { - lock.unlock(); - } - } - -} diff --git a/src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java b/src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java deleted file mode 100644 index cbb35eafb8..0000000000 --- a/src/test/java/com/ning/http/client/cookiejar/AbstractCookieJarTestCase.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.ning.http.client.cookiejar; - -import static org.testng.Assert.assertNotNull; - -import org.testng.annotations.AfterSuite; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; - -abstract class AbstractCookieJarTestCase -{ - - private CookieJar cookieJar; - - @BeforeSuite - public final void setUp() - { - cookieJar = createCookieJar(); - } - - protected abstract CookieJar createCookieJar(); - - @AfterSuite - public final void tearDown() - { - cookieJar = null; - } - - @Test - public void myCharmingCookieJarTest() - { - assertNotNull( cookieJar ); - } - -} diff --git a/src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java b/src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java deleted file mode 100644 index 962d6cfbad..0000000000 --- a/src/test/java/com/ning/http/client/cookiejar/InMemoryCookieJarTestcase.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.ning.http.client.cookiejar; - -public final class InMemoryCookieJarTestcase - extends AbstractCookieJarTestCase -{ - - @Override - protected CookieJar createCookieJar() - { - return new InMemoryCookieJar(); - } - -} From 976795dc8f21b9888fda67ef22c0c57b94a8b382 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Wed, 29 Feb 2012 09:09:12 +0100 Subject: [PATCH 0119/2844] updated surefire version, added reports - they will be shown in the site --- pom.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0eba4237d..7dd9ee6619 100644 --- a/pom.xml +++ b/pom.xml @@ -241,7 +241,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.8.1 + ${surefire.version} ${surefire.redirectTestOutputToFile} @@ -474,6 +474,11 @@ ${javadoc.package.exclude} + + org.apache.maven.plugins + maven-surefire-report-plugin + ${surefire.version} + @@ -584,6 +589,7 @@ com.ning.http.client.providers.grizzly 1.5 1.5 + 2.12 From b8dd1c9e81afd7fedaa7697f71ca5df85fe17434 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 29 Feb 2012 12:08:13 -0800 Subject: [PATCH 0120/2844] Fix markdown --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db141b7134..9231cfa00d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Async Http Client library purpose is to allow Java applications to easily execut You can also download the artifact - [Maven Search](http://search.maven.org) +[Maven Search](http://search.maven.org) Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async-http-client/apidocs/index.html)) @@ -149,7 +149,7 @@ The library uses Java non blocking I/O for supporting asynchronous operations. T Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group - [Google Group](http://groups.google.com/group/asynchttpclient) +[Google Group](http://groups.google.com/group/asynchttpclient) or follow us on [Twitter](http://twitter.com/jfarcand) From 0aeb18a97002b88e64d6b5b8db4af346c6d25fa0 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Thu, 1 Mar 2012 11:26:45 +0100 Subject: [PATCH 0121/2844] use Doclava (aka Droiddoc) doclet to render AHC javadoc --- pom.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pom.xml b/pom.xml index 7dd9ee6619..d2ffa7db3a 100644 --- a/pom.xml +++ b/pom.xml @@ -472,7 +472,28 @@ http://java.sun.com/javase/6/docs/api/ ${javadoc.package.exclude} + ${sun.boot.class.path} + com.google.doclava.Doclava + false + -J-Xmx1024m + + com.google.doclava + doclava + 1.0.3 + + + -hdf project.name "${project.name} ${project.version}" + -d ${project.reporting.outputDirectory}/apidocs + + + + default + + javadoc + + + org.apache.maven.plugins From 962297ec883c563b9e1d725c1e568fc2ad970503 Mon Sep 17 00:00:00 2001 From: simonetripodi Date: Thu, 1 Mar 2012 15:01:27 +0100 Subject: [PATCH 0122/2844] included project ML --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index d2ffa7db3a..e1287dfb2c 100644 --- a/pom.xml +++ b/pom.xml @@ -25,6 +25,15 @@ jira https://issues.sonatype.org/browse/AHC + + + asynchttpclient + http://groups.google.com/group/asynchttpclient/topics + http://groups.google.com/group/asynchttpclient/subscribe + http://groups.google.com/group/asynchttpclient/subscribe + asynchttpclient@googlegroups.com + + 2.0.9 From 9d922ad6ac44a2acffaba635f0011ffa5357efab Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 7 Mar 2012 09:33:49 -0800 Subject: [PATCH 0123/2844] Fix for https://github.com/sonatype/async-http-client/issues/59 (Following redirects, AHC uses the original request method). --- .../http/client/AsyncHttpClientConfig.java | 42 +++- .../grizzly/GrizzlyAsyncHttpProvider.java | 18 +- .../grizzly/GrizzlyResponseStatus.java | 12 +- .../netty/NettyAsyncHttpProvider.java | 11 +- .../client/async/PostRedirectGetTest.java | 221 ++++++++++++++++++ .../grizzly/GrizzlyPostRedirectGetTest.java | 30 +++ .../async/netty/NettyPostRedirectGetTest.java | 28 +++ 7 files changed, 350 insertions(+), 12 deletions(-) create mode 100644 src/test/java/com/ning/http/client/async/PostRedirectGetTest.java create mode 100644 src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java create mode 100644 src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 4086cc8e76..b3fb5bac1c 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -83,6 +83,7 @@ public class AsyncHttpClientConfig { protected boolean removeQueryParamOnRedirect; protected HostnameVerifier hostnameVerifier; protected int ioThreadMultiplier; + protected boolean strict302Handling; protected AsyncHttpClientConfig() { } @@ -115,7 +116,8 @@ private AsyncHttpClientConfig(int maxTotalConnections, boolean useRawUrl, boolean removeQueryParamOnRedirect, HostnameVerifier hostnameVerifier, - int ioThreadMultiplier) { + int ioThreadMultiplier, + boolean strict302Handling) { this.maxTotalConnections = maxTotalConnections; this.maxConnectionPerHost = maxConnectionPerHost; @@ -144,6 +146,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.removeQueryParamOnRedirect = removeQueryParamOnRedirect; this.hostnameVerifier = hostnameVerifier; this.ioThreadMultiplier = ioThreadMultiplier; + this.strict302Handling = strict302Handling; if (applicationThreadPool == null) { this.applicationThreadPool = Executors.newCachedThreadPool(); @@ -456,6 +459,23 @@ public int getIoThreadMultiplier() { return ioThreadMultiplier; } + /** + *

+ * In the case of a POST/Redirect/Get scenario where the server uses a 302 + * for the redirect, should AHC respond to the redirect with a GET or + * whatever the original method was. Unless configured otherwise, + * for a 302, AHC, will use a GET for this case. + *

+ * + * @return true if string 302 handling is to be used, + * otherwise false. + * + * @since 1.7.2 + */ + public boolean isStrict302Handling() { + return strict302Handling; + } + /** * Builder for an {@link AsyncHttpClient} */ @@ -503,6 +523,7 @@ public Thread newThread(Runnable r) { private boolean removeQueryParamOnRedirect = true; private HostnameVerifier hostnameVerifier = new AllowAllHostnameVerifier(); private int ioThreadMultiplier = 2; + private boolean strict302Handling; public Builder() { } @@ -920,6 +941,21 @@ public Builder setHostnameVerifier(HostnameVerifier hostnameVerifier) { return this; } + /** + * Configures this AHC instance to be strict in it's handling of 302 redirects + * in a POST/Redirect/GET situation. + * + * @param strict302Handling strict handling + * + * @return this + * + * @since 1.7.2 + */ + public Builder setStrict302Handling(final boolean strict302Handling) { + this.strict302Handling = strict302Handling; + return this; + } + /** * Create a config builder with values taken from the given prototype configuration. * @@ -961,6 +997,7 @@ public Builder(AsyncHttpClientConfig prototype) { allowSslConnectionPool = prototype.getAllowPoolingConnection(); removeQueryParamOnRedirect = prototype.isRemoveQueryParamOnRedirect(); hostnameVerifier = prototype.getHostnameVerifier(); + strict302Handling = prototype.isStrict302Handling(); } /** @@ -1007,7 +1044,8 @@ public AsyncHttpClientConfig build() { useRawUrl, removeQueryParamOnRedirect, hostnameVerifier, - ioThreadMultiplier); + ioThreadMultiplier, + strict302Handling); } } } diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index d6abf2ed33..073165fe98 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1406,6 +1406,7 @@ private static boolean isRedirect(final int status) { return HttpStatus.MOVED_PERMANENTLY_301.statusMatches(status) || HttpStatus.FOUND_302.statusMatches(status) + || HttpStatus.SEE_OTHER_303.statusMatches(status) || HttpStatus.TEMPORARY_REDIRECT_307.statusMatches(status); } @@ -1538,7 +1539,8 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, if (!uri.toString().equalsIgnoreCase(orig.toString())) { requestToSend = newRequest(uri, responsePacket, - httpTransactionContext); + httpTransactionContext, + sendAsGet(responsePacket, httpTransactionContext)); } else { httpTransactionContext.statusHandler = null; httpTransactionContext.invocationStatus = InvocationStatus.CONTINUE; @@ -1585,6 +1587,14 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, // ------------------------------------------------- Private Methods + private boolean sendAsGet(final HttpResponsePacket response, + final HttpTransactionContext ctx) { + final int statusCode = response.getStatus(); + return !(statusCode < 302 || statusCode > 303) + && !(statusCode == 302 + && ctx.provider.clientConfig.isStrict302Handling()); + } + private boolean switchingSchemes(final URI oldUri, final URI newUri) { @@ -1609,9 +1619,13 @@ private void notifySchemeSwitch(final FilterChainContext ctx, private static Request newRequest(final URI uri, final HttpResponsePacket response, - final HttpTransactionContext ctx) { + final HttpTransactionContext ctx, + boolean asGet) { final RequestBuilder builder = new RequestBuilder(ctx.request); + if (asGet) { + builder.setMethod("GET"); + } builder.setUrl(uri.toString()); if (ctx.provider.clientConfig.isRemoveQueryParamOnRedirect()) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java index 9146fba8d8..2f25d35d6c 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java @@ -49,7 +49,7 @@ public GrizzlyResponseStatus(final HttpResponsePacket response, /** - * @{inheritDoc} + * {@inheritDoc} */ @Override public int getStatusCode() { @@ -60,7 +60,7 @@ public int getStatusCode() { /** - * @{inheritDoc} + * {@inheritDoc} */ @Override public String getStatusText() { @@ -71,7 +71,7 @@ public String getStatusText() { /** - * @{inheritDoc} + * {@inheritDoc} */ @Override public String getProtocolName() { @@ -82,7 +82,7 @@ public String getProtocolName() { /** - * @{inheritDoc} + * {@inheritDoc} */ @Override public int getProtocolMajorVersion() { @@ -93,7 +93,7 @@ public int getProtocolMajorVersion() { /** - * @{inheritDoc} + * {@inheritDoc} */ @Override public int getProtocolMinorVersion() { @@ -104,7 +104,7 @@ public int getProtocolMinorVersion() { /** - * @{inheritDoc} + * {@inheritDoc} */ @Override public String getProtocolText() { diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 6a7af99702..0645598419 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2107,7 +2107,10 @@ public Object call() throws Exception { } boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 307)) { + if (redirectEnabled && (statusCode == 302 + || statusCode == 301 + || statusCode == 303 + || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { // We must allow 401 handling again. @@ -2116,12 +2119,16 @@ public Object call() throws Exception { String location = response.getHeader(HttpHeaders.Names.LOCATION); URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); - if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { final RequestBuilder nBuilder = stripQueryString ? new RequestBuilder(future.getRequest()).setQueryParameters(null) : new RequestBuilder(future.getRequest()); + if (!(statusCode < 302 || statusCode > 303) + && !(statusCode == 302 + && config.isStrict302Handling())) { + nBuilder.setMethod("GET"); + } final URI initialConnectionUri = future.getURI(); final boolean initialConnectionKeepAlive = future.getKeepAlive(); future.setURI(uri); diff --git a/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java b/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java new file mode 100644 index 0000000000..658673384b --- /dev/null +++ b/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.async; + +import com.ning.http.client.AsyncCompletionHandler; +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.Request; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.filter.FilterContext; +import com.ning.http.client.filter.FilterException; +import com.ning.http.client.filter.ResponseFilter; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.Assert; +import org.testng.annotations.Test; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicInteger; + +public abstract class PostRedirectGetTest extends AbstractBasicTest { + + + // ------------------------------------------------------ Test Configuration + + + @Override + public AbstractHandler configureHandler() throws Exception { + return new PostRedirectGetHandler(); + } + + // ------------------------------------------------------------ Test Methods + + @Test(groups = {"standalone", "post_redirect_get"}) + public void postRedirectGet302Test() throws Exception { + doTestPositive(302); + } + + @Test(groups = {"standalone", "post_redirect_get"}) + public void postRedirectGet302StrictTest() throws Exception { + doTestNegative(302, true); + } + + @Test(groups = {"standalone", "post_redirect_get"}) + public void postRedirectGet303Test() throws Exception { + doTestPositive(303); + } + + @Test(groups = {"standalone", "post_redirect_get"}) + public void postRedirectGet301Test() throws Exception { + doTestNegative(301, false); + } + + @Test(groups = {"standalone", "post_redirect_get"}) + public void postRedirectGet307Test() throws Exception { + doTestNegative(307, false); + } + + + // --------------------------------------------------------- Private Methods + + + private void doTestNegative(final int status, boolean strict) throws Exception { + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true). + setStrict302Handling(strict). + addResponseFilter(new ResponseFilter() { + @Override + public FilterContext filter(FilterContext ctx) throws FilterException { + // pass on the x-expect-get and remove the x-redirect + // headers if found in the response + ctx.getResponseHeaders().getHeaders().get("x-expect-post"); + ctx.getRequest().getHeaders().add("x-expect-post", "true"); + ctx.getRequest().getHeaders().remove("x-redirect"); + return ctx; + } + }).build()); + Request request = new RequestBuilder("POST").setUrl(getTargetUrl()) + .addParameter("q", "a b") + .addHeader("x-redirect", +status + "@" + "http://localhost:" + port1 + "/foo/bar/baz") + .addHeader("x-negative", "true") + .build(); + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + + @Override + public Integer onCompleted(Response response) throws Exception { + return response.getStatusCode(); + } + + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } + + }); + int statusCode = responseFuture.get(); + Assert.assertEquals(statusCode, 200); + p.close(); + } + + + private void doTestPositive(final int status) throws Exception { + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true). + addResponseFilter(new ResponseFilter() { + @Override + public FilterContext filter(FilterContext ctx) throws FilterException { + // pass on the x-expect-get and remove the x-redirect + // headers if found in the response + ctx.getResponseHeaders().getHeaders().get("x-expect-get"); + ctx.getRequest().getHeaders().add("x-expect-get", "true"); + ctx.getRequest().getHeaders().remove("x-redirect"); + return ctx; + } + }).build()); + Request request = new RequestBuilder("POST").setUrl(getTargetUrl()) + .addParameter("q", "a b") + .addHeader("x-redirect", +status + "@" + "http://localhost:" + port1 + "/foo/bar/baz") + .build(); + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + + @Override + public Integer onCompleted(Response response) throws Exception { + return response.getStatusCode(); + } + + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } + + }); + int statusCode = responseFuture.get(); + Assert.assertEquals(statusCode, 200); + p.close(); + } + + + // ---------------------------------------------------------- Nested Classes + + + public static class PostRedirectGetHandler extends AbstractHandler { + + final AtomicInteger counter = new AtomicInteger(); + + /* @Override */ + public void handle(String pathInContext, + org.eclipse.jetty.server.Request request, + HttpServletRequest httpRequest, + HttpServletResponse httpResponse) throws IOException, ServletException { + + final boolean expectGet = (httpRequest.getHeader("x-expect-get") != null); + final boolean expectPost = (httpRequest.getHeader("x-expect-post") != null); + if (expectGet) { + final String method = request.getMethod(); + if (!"GET".equals(method)) { + httpResponse.sendError(500, "Incorrect method. Expected GET, received " + method); + return; + } + httpResponse.setStatus(200); + httpResponse.getOutputStream().write("OK".getBytes()); + httpResponse.getOutputStream().flush(); + return; + } else if (expectPost) { + final String method = request.getMethod(); + if (!"POST".equals(method)) { + httpResponse.sendError(500, "Incorrect method. Expected POST, received " + method); + return; + } + httpResponse.setStatus(200); + httpResponse.getOutputStream().write("OK".getBytes()); + httpResponse.getOutputStream().flush(); + return; + } + + String header = httpRequest.getHeader("x-redirect"); + if (header != null) { + // format for header is | + String[] parts = header.split("@"); + int redirectCode; + try { + redirectCode = Integer.parseInt(parts[0]); + } catch (Exception ex) { + ex.printStackTrace(); + httpResponse.sendError(500, "Unable to parse redirect code"); + return; + } + httpResponse.setStatus(redirectCode); + if (httpRequest.getHeader("x-negative") == null) { + httpResponse.addHeader("x-expect-get", "true"); + } else { + httpResponse.addHeader("x-expect-post", "true"); + } + httpResponse.setContentLength(0); + httpResponse.addHeader("Location", parts[1] + counter.getAndIncrement()); + httpResponse.getOutputStream().flush(); + return; + } + + + httpResponse.sendError(500); + httpResponse.getOutputStream().flush(); + httpResponse.getOutputStream().close(); + } + } +} diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java new file mode 100644 index 0000000000..54a6c78c24 --- /dev/null +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.async.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PostRedirectGetTest; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; + +public class GrizzlyPostRedirectGetTest extends PostRedirectGetTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } +} diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java b/src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java new file mode 100644 index 0000000000..da85212abf --- /dev/null +++ b/src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.async.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PostRedirectGetTest; +import com.ning.http.client.async.ProviderUtil; + +public class NettyPostRedirectGetTest extends PostRedirectGetTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } + +} From fda1596ff5e272fd40eed616817b612befafb5ca Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 7 Mar 2012 14:13:31 -0800 Subject: [PATCH 0124/2844] Incremental fix for #63. Ensure Grizzly provider doesn't cause a timeout when dealing with an authorization response with no provided realm. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 073165fe98..4b1a655aba 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1432,7 +1432,6 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, final HttpTransactionContext httpTransactionContext, final FilterChainContext ctx) { - responsePacket.setSkipRemainder(true); // ignore the remainder of the response final String auth = responsePacket.getHeader(Header.WWWAuthenticate); if (auth == null) { throw new IllegalStateException("401 response received, but no WWW-Authenticate header was present"); @@ -1446,6 +1445,9 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, httpTransactionContext.invocationStatus = InvocationStatus.STOP; return true; } + + responsePacket.setSkipRemainder(true); // ignore the remainder of the response + final Request req = httpTransactionContext.request; realm = new Realm.RealmBuilder().clone(realm) .setScheme(realm.getAuthScheme()) From c0f338cdaaf118323f1f44835652c15e8480ee2a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 8 Mar 2012 10:49:54 -0800 Subject: [PATCH 0125/2844] Removed, what appeared to be, a reduntant block of code. The builder is already configured using the existing request. If this block executes, it pushes the same url that the request already has. Removing the block resolves issue #62. Existing tests continue to pass. Reviewed by JFA. --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 0645598419..a8caedb850 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1998,9 +1998,9 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); final RequestBuilder builder = new RequestBuilder(future.getRequest()); - if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { - builder.setUrl(future.getURI().toString()); - } + //if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { + // builder.setUrl(future.getURI().toString()); + //} if (statusCode == 401 && wwwAuth.size() > 0 From 15f06763403bb6638925cc6a1259f812f1cdc309 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 13 Mar 2012 17:37:40 -0400 Subject: [PATCH 0126/2844] on bad websocket upgrade, include the bad status code in the exception "Illegal Upgrade protocol" isn't very clear that the problem is 1) a bad status or 2) what the bad status was. --- .../com/ning/http/client/websocket/WebSocketUpgradeHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index 4c8c2dde09..9854486400 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -64,7 +64,7 @@ public final STATE onStatusReceived(HttpResponseStatus responseStatus) throws Ex if (responseStatus.getStatusCode() == 101) { return STATE.UPGRADE; } else { - throw new IllegalStateException("Invalid Upgrade protocol"); + throw new IllegalStateException("Invalid upgrade protocol, status should be 101 but was " + responseStatus.getStatusCode()); } } From 7dd3680b08968eac3f7dd47f77e1252bad548fc1 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 16 Mar 2012 13:51:29 -0400 Subject: [PATCH 0127/2844] Point to the new documentation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9231cfa00d..f1ddffd87a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Async Http Client ----------------- -Getting started [PDF](http://is.gd/kexrN) [HTML](http://is.gd/ja6My) +Getting started [HTML](http://sonatype.github.com/async-http-client/) [PDF](http://is.gd/kexrN) Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: @@ -115,7 +115,7 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() - .setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); + S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); Async Http Client also support WebSocket by simply doing: From 6c31b8d13583165eade445f7418c4f2455e4c76c Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 16 Mar 2012 14:52:35 -0700 Subject: [PATCH 0128/2844] Fix for #65 - Grizzly AHC provider test: testPutLargeFile(com.ning.http.client.async.grizzly.GrizzlyPutLargeFileTest): randomly times out. --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 4b1a655aba..fda7320686 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -400,7 +400,7 @@ public void onTimeout(Connection connection) { doDefaultTransportConfig(); } fcb.add(new WebSocketFilter()); - + clientTransport.getAsyncQueueIO().getWriter().setMaxPendingBytesPerConnection(-1); clientTransport.setProcessor(fcb.build()); } From 9e5e4ec85cbf088675c566120308f900ef24c243 Mon Sep 17 00:00:00 2001 From: Basil James Whitehouse III Date: Mon, 19 Mar 2012 15:44:04 -0300 Subject: [PATCH 0129/2844] Fix typo in docs. --- src/site/apt/zero-bytes-copy.apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/apt/zero-bytes-copy.apt b/src/site/apt/zero-bytes-copy.apt index 7b58469fbe..0d16cd7683 100644 --- a/src/site/apt/zero-bytes-copy.apt +++ b/src/site/apt/zero-bytes-copy.apt @@ -21,7 +21,7 @@ Future f = client.preparePut("http://localhost").setBody(file).execute(); If you can't use a File, the recommended way is to use a <<>>. It is strongly recommended to avoid using <<>> as the library will unfortunately buffer the entire content in memory in order to set the - <<>>, which can cause out of memory error. + <<>>, which can cause out of memory error. * Download From d7a1f8ee4f7f182702ce2c74a0a4cfa0ba16f5b8 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Thu, 22 Mar 2012 17:44:37 -0600 Subject: [PATCH 0130/2844] Fix large payload bugs in ByteArrayBodyGenerator. Fixes three bugs exposed when a ByteArrayBodyGenerator is used to pass a POST body to the AsyncHttpProvider that is larger than the AsyncHttpProvider's BodyChunkedInput buffer size. Found when using the Netty provider to pass a 50k+ POST body. A read from a ByteBody having more content than the buffer could hold would return a full read buffer but incorrectly compute the internal pointer for the remaining content by subtracting the read length from the total content size rather than adding it to the current read position. A subsequent read from the same ByteBody would result in a java.lang.IndexOutOfBoundsException due to improperly passing the total length of the current body as the length argument to ByteBuffer.put() rather than the number of bytes to read from the offset. ByteArrayBodyGenerator.ByteBody also incorrectly implemented the Body interface by returning the total body length for each non-EOF read rather than the actual number of bytes read. All three of these bugs would not be seen unless the body size was greater than the capacity of a single buffer. --- .../generators/ByteArrayBodyGenerator.java | 10 ++- .../ByteArrayBodyGeneratorTest.java | 78 +++++++++++++++++++ 2 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java diff --git a/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java b/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java index 48cc2ae2d2..c56893d0a1 100644 --- a/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java +++ b/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java @@ -43,14 +43,16 @@ public long read(ByteBuffer byteBuffer) throws IOException { return -1; } - if (bytes.length - lastPosition <= byteBuffer.capacity()) { - byteBuffer.put(bytes, lastPosition, bytes.length); + final int remaining = bytes.length - lastPosition; + if (remaining <= byteBuffer.capacity()) { + byteBuffer.put(bytes, lastPosition, remaining); eof = true; + return remaining; } else { byteBuffer.put(bytes, lastPosition, byteBuffer.capacity()); - lastPosition = bytes.length - byteBuffer.capacity(); + lastPosition = lastPosition + byteBuffer.capacity(); + return byteBuffer.capacity(); } - return bytes.length; } public void close() throws IOException { diff --git a/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java b/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java new file mode 100644 index 0000000000..a2c3937839 --- /dev/null +++ b/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.generators; + +import com.ning.http.client.Body; + +import org.testng.annotations.Test; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Random; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +/** + * @author Bryan Davis bpd@keynetics.com + */ +public class ByteArrayBodyGeneratorTest { + + private final Random random = new Random(); + private final int chunkSize = 1024 * 8; + + @Test(groups = "standalone") + public void testSingleRead() throws IOException { + final int srcArraySize = chunkSize - 1; + final byte[] srcArray = new byte[srcArraySize]; + random.nextBytes(srcArray); + + final ByteArrayBodyGenerator babGen = + new ByteArrayBodyGenerator(srcArray); + final Body body = babGen.createBody(); + + final ByteBuffer chunkBuffer = ByteBuffer.allocate(chunkSize); + + // should take 1 read to get through the srcArray + assertEquals(body.read(chunkBuffer), srcArraySize); + assertEquals(chunkBuffer.position(), srcArraySize, "bytes read"); + chunkBuffer.clear(); + + assertEquals(body.read(chunkBuffer), -1, "body at EOF"); + } + + @Test(groups = "standalone") + public void testMultipleReads() throws IOException { + final int srcArraySize = (3 * chunkSize) + 42; + final byte[] srcArray = new byte[srcArraySize]; + random.nextBytes(srcArray); + + final ByteArrayBodyGenerator babGen = + new ByteArrayBodyGenerator(srcArray); + final Body body = babGen.createBody(); + + final ByteBuffer chunkBuffer = ByteBuffer.allocate(chunkSize); + + int reads = 0; + int bytesRead = 0; + while (body.read(chunkBuffer) != -1) { + reads += 1; + bytesRead += chunkBuffer.position(); + chunkBuffer.clear(); + } + assertEquals(reads, 4, "reads to drain generator"); + assertEquals(bytesRead, srcArraySize, "bytes read"); + } + +} From 2834887c27b7e30a9f8efae087a21df69583e042 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 23 Mar 2012 11:32:03 -0400 Subject: [PATCH 0131/2844] Fix for #66 com.ning.http.util.SslUtils provoke NPE --- src/main/java/com/ning/http/util/SslUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/util/SslUtils.java b/src/main/java/com/ning/http/util/SslUtils.java index 2a54b44de6..dc5f2643e8 100644 --- a/src/main/java/com/ning/http/util/SslUtils.java +++ b/src/main/java/com/ning/http/util/SslUtils.java @@ -106,7 +106,7 @@ static class LooseTrustManager public static final LooseTrustManager INSTANCE = new LooseTrustManager(); public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return null; + return new java.security.cert.X509Certificate[0]; } public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) { From e05801732e1a3bf27fedc8f58d87198df8463cc1 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 26 Mar 2012 16:07:28 -0400 Subject: [PATCH 0132/2844] Fix for #69 [websocket] [netty] WebSocket#onError never called --- .../providers/netty/NettyAsyncHttpProvider.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index a8caedb850..e5174cff5c 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1507,11 +1507,12 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) log.error(t.getMessage(), t); } } - closeChannel(ctx); - ctx.sendUpstream(e); Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); p.onError(ctx, e); + + closeChannel(ctx); + ctx.sendUpstream(e); } protected static boolean abortOnConnectCloseException(Throwable cause) { @@ -2125,8 +2126,8 @@ public Object call() throws Exception { : new RequestBuilder(future.getRequest()); if (!(statusCode < 302 || statusCode > 303) - && !(statusCode == 302 - && config.isStrict302Handling())) { + && !(statusCode == 302 + && config.isStrict302Handling())) { nBuilder.setMethod("GET"); } final URI initialConnectionUri = future.getURI(); @@ -2337,7 +2338,7 @@ public void setContent(ChannelBuffer content) { @Override public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { try { - log.trace("onError {}", e); + log.warn("onError {}", e); if (!NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { return; } From 07d2fa30b21094a12ed1e5a1c5e3cd200911ce6e Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 29 Mar 2012 16:31:30 +0200 Subject: [PATCH 0133/2844] Fix for #70 --- .../com/ning/http/util/AsyncHttpProviderUtils.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 0a6759c678..d313f5e724 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -460,7 +460,7 @@ public static Cookie parseCookie(String value) { // favor 'max-age' field over 'expires' if (!maxAgeSet && "max-age".equalsIgnoreCase(f[0])) { try { - maxAge = Integer.valueOf(removeQuote(f[1])); + maxAge = Math.max(Integer.valueOf(removeQuote(f[1])), 0); } catch (NumberFormatException e1) { // ignore failure to parse -> treat as session cookie // invalidate a previously parsed expires-field @@ -469,11 +469,11 @@ public static Cookie parseCookie(String value) { maxAgeSet = true; } else if (!maxAgeSet && !expiresSet && "expires".equalsIgnoreCase(f[0])) { try { - maxAge = convertExpireField(f[1]); + maxAge = Math.max(convertExpireField(f[1]), 0); } catch (Exception e) { // original behavior, is this correct at all (expires field with max-age semantics)? try { - maxAge = Integer.valueOf(f[1]); + maxAge = Math.max(Integer.valueOf(f[1]), 0); } catch (NumberFormatException e1) { // ignore failure to parse -> treat as session cookie } @@ -487,10 +487,6 @@ public static Cookie parseCookie(String value) { } } - if (maxAge < -1) { - maxAge = -1; - } - return new Cookie(domain, cookieName, cookieValue, path, maxAge, secure); } From 29d812e53c49ed5d486e1ac75cf0ca8c9f49ba8b Mon Sep 17 00:00:00 2001 From: Shaw Terwilliger Date: Sat, 31 Mar 2012 13:59:58 -0400 Subject: [PATCH 0134/2844] Fixed ApacheResponse.getResponseBodyAsStream() to return all the bytes in the body ApacheResponse.getResponseBodyAsStream() was returning an InputStream that only provided bytes from the first body part. Pulled JDKResponse's ByteArrayCollectionInputStream into its own class, HttpResponseBodyPartsInputStream, so it could be shared with ApacheResponse. --- .../HttpResponseBodyPartsInputStream.java | 63 +++++++++++++++++++ .../providers/apache/ApacheResponse.java | 3 +- .../client/providers/jdk/JDKResponse.java | 47 +------------- 3 files changed, 67 insertions(+), 46 deletions(-) create mode 100644 src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java diff --git a/src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java b/src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java new file mode 100644 index 0000000000..1f6667cd2b --- /dev/null +++ b/src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package com.ning.http.client; + +import java.io.IOException; +import java.io.InputStream; + +/** + * An {@link InputStream} that reads all the elements in an array of {@link HttpResponseBodyPart}s. + */ +public class HttpResponseBodyPartsInputStream extends InputStream { + + private final HttpResponseBodyPart[] parts; + + private int currentPos = 0; + private int bytePos = -1; + private byte[] active; + private int available = 0; + + public HttpResponseBodyPartsInputStream(HttpResponseBodyPart[] parts) { + this.parts = parts; + active = parts[0].getBodyPartBytes(); + computeLength(parts); + } + + private void computeLength(HttpResponseBodyPart[] parts) { + if (available == 0) { + for (HttpResponseBodyPart p : parts) { + available += p.getBodyPartBytes().length; + } + } + } + + @Override + public int available() throws IOException { + return available; + } + + @Override + public int read() throws IOException { + if (++bytePos >= active.length) { + // No more bytes, so step to the next array. + if (++currentPos >= parts.length) { + return -1; + } + + bytePos = 0; + active = parts[currentPos].getBodyPartBytes(); + } + + return active[bytePos] & 0xFF; + } +} \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index b6e63db99d..9516f89ee4 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -15,6 +15,7 @@ import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseBodyPartsInputStream; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Response; @@ -91,7 +92,7 @@ public String getResponseBody(String charset) throws IOException { /* @Override */ public InputStream getResponseBodyAsStream() throws IOException { if (bodyParts.size() > 0) { - return new ByteArrayInputStream(bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()])[0].getBodyPartBytes()); + return new HttpResponseBodyPartsInputStream(bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()])); } else { return new ByteArrayInputStream("".getBytes()); } diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index 197fe7d59c..f1fd4d2ce1 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -15,6 +15,7 @@ import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseBodyPartsInputStream; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Response; @@ -102,56 +103,12 @@ public InputStream getResponseBodyAsStream() throws IOException { } if (bodyParts.size() > 0) { - return new ByteArrayCollectionInputStream(bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()])); + return new HttpResponseBodyPartsInputStream(bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()])); } else { return new ByteArrayInputStream("".getBytes()); } } - private static class ByteArrayCollectionInputStream extends InputStream { - - private final HttpResponseBodyPart[] parts; - - private int currentPos = 0; - private int bytePos = -1; - private byte[] active; - private int available = 0; - - public ByteArrayCollectionInputStream(HttpResponseBodyPart[] parts) { - this.parts = parts; - active = parts[0].getBodyPartBytes(); - computeLength(parts); - } - - private void computeLength(HttpResponseBodyPart[] parts) { - if (available == 0) { - for (HttpResponseBodyPart p : parts) { - available += p.getBodyPartBytes().length; - } - } - } - - @Override - public int available() throws IOException { - return available; - } - - @Override - public int read() throws IOException { - if (++bytePos >= active.length) { - // No more bytes, so step to the next array. - if (++currentPos >= parts.length) { - return -1; - } - - bytePos = 0; - active = parts[currentPos].getBodyPartBytes(); - } - - return active[bytePos] & 0xFF; - } - } - /* @Override */ public String getResponseBodyExcerpt(int maxLength) throws IOException { From 76b5120f48e6a529c21521b0c585a90348cf151c Mon Sep 17 00:00:00 2001 From: micpe083 Date: Tue, 3 Apr 2012 00:26:06 +0100 Subject: [PATCH 0135/2844] Fix for; [WebSocket] SSL connection not supported with netty provider https://github.com/sonatype/async-http-client/issues/75 --- .../netty/NettyAsyncHttpProvider.java | 55 ++++++++++++++++--- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index e5174cff5c..3dee606329 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -140,10 +140,12 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme private final static String HTTPS = "https"; private final static String HTTP = "http"; private static final String WEBSOCKET = "ws"; + private static final String WEBSOCKET_SSL = "wss"; private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); private final ClientBootstrap plainBootstrap; private final ClientBootstrap secureBootstrap; private final ClientBootstrap webSocketBootstrap; + private final ClientBootstrap secureWebSocketBootstrap; private final static int MAX_BUFFERED_BYTES = 8192; private final AsyncHttpClientConfig config; private final AtomicBoolean isClose = new AtomicBoolean(false); @@ -198,6 +200,7 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { plainBootstrap = new ClientBootstrap(socketChannelFactory); secureBootstrap = new ClientBootstrap(socketChannelFactory); webSocketBootstrap = new ClientBootstrap(socketChannelFactory); + secureWebSocketBootstrap = new ClientBootstrap(socketChannelFactory); configureNetty(); this.config = config; @@ -305,9 +308,30 @@ public ChannelPipeline getPipeline() throws Exception { } }); + secureWebSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + + try { + pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); + } catch (Throwable ex) { + abort(cl.future(), ex); + } + + pipeline.addLast("ws-decoder", new HttpResponseDecoder()); + pipeline.addLast("ws-encoder", new HttpRequestEncoder()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + + return pipeline; + } + }); + if (asyncHttpProviderConfig != null) { for (Entry entry : asyncHttpProviderConfig.propertiesSet()) { secureBootstrap.setOption(entry.getKey(), entry.getValue()); + secureWebSocketBootstrap.setOption(entry.getKey(), entry.getValue()); } } } @@ -344,7 +368,7 @@ private Channel verifyChannelPipeline(Channel channel, String scheme) throws IOE channel.getPipeline().remove(SSL_HANDLER); } else if (channel.getPipeline().get(HTTP_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { return channel; - } else if (channel.getPipeline().get(SSL_HANDLER) == null && HTTPS.equalsIgnoreCase(scheme)) { + } else if (channel.getPipeline().get(SSL_HANDLER) == null && isSecure(scheme)) { channel.getPipeline().addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); } return channel; @@ -508,7 +532,7 @@ protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Re boolean allowConnect, ChannelBuffer buffer) throws IOException { String method = request.getMethod(); - if (allowConnect && (isProxyServer(config, request) && HTTPS.equalsIgnoreCase(uri.getScheme()))) { + if (allowConnect && (isProxyServer(config, request) && isSecure(uri))) { method = HttpMethod.CONNECT.toString(); } return construct(config, request, new HttpMethod(method), uri, buffer); @@ -542,7 +566,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path.toString()); } - boolean webSocket = uri.getScheme().equalsIgnoreCase(WEBSOCKET); + boolean webSocket = isWebSocket(uri); if (webSocket) { nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); @@ -762,7 +786,8 @@ private static HttpRequest construct(AsyncHttpClientConfig config, /** * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. */ - if (uri.toString().startsWith(HTTPS)) { + + if (isSecure(uri)) { ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); mre.writeRequest(new ChannelBufferOutputStream(b)); nettyRequest.setContent(b); @@ -810,6 +835,7 @@ public void close() { plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); webSocketBootstrap.releaseExternalResources(); + secureWebSocketBootstrap.releaseExternalResources(); } catch (Throwable t) { log.warn("Unexpected error on close", t); } @@ -872,7 +898,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand bufferedBytes = f.getNettyRequest().getContent(); } - boolean useSSl = uri.getScheme().compareToIgnoreCase(HTTPS) == 0 && proxyServer == null; + boolean useSSl = isSecure(uri) && proxyServer == null; if (channel != null && channel.isOpen() && channel.isConnected()) { HttpRequest nettyRequest = buildRequest(config, request, uri, f == null ? false : f.isConnectAllowed(), bufferedBytes); @@ -946,7 +972,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } ChannelFuture channelFuture; - ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? webSocketBootstrap : (useSSl ? secureBootstrap : plainBootstrap); + ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); // Do no enable this with win. @@ -1294,7 +1320,7 @@ private void upgradeProtocol(ChannelPipeline p, String scheme) throws IOExceptio p.remove(HTTP_HANDLER); } - if (scheme.startsWith(HTTPS)) { + if (isSecure(scheme)) { if (p.get(SSL_HANDLER) == null) { p.addFirst(HTTP_HANDLER, new HttpClientCodec()); p.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); @@ -2372,5 +2398,20 @@ public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { } } } + + private static boolean isWebSocket(URI uri) + { + return WEBSOCKET.equalsIgnoreCase(uri.getScheme()) || WEBSOCKET_SSL.equalsIgnoreCase(uri.getScheme()); + } + + private static boolean isSecure(String scheme) + { + return HTTPS.equalsIgnoreCase(scheme) || WEBSOCKET_SSL.equalsIgnoreCase(scheme); + } + + private static boolean isSecure(URI uri) + { + return isSecure(uri.getScheme()); + } } From c8a4c5825451a8d6042d327771e55ac12b7603df Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 2 Apr 2012 20:11:11 -0400 Subject: [PATCH 0136/2844] Cosmetic, fix braket --- .../providers/netty/NettyAsyncHttpProvider.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 3dee606329..421c5a2b30 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -786,7 +786,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, /** * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. */ - + if (isSecure(uri)) { ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); mre.writeRequest(new ChannelBufferOutputStream(b)); @@ -2399,19 +2399,16 @@ public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { } } - private static boolean isWebSocket(URI uri) - { + private static boolean isWebSocket(URI uri) { return WEBSOCKET.equalsIgnoreCase(uri.getScheme()) || WEBSOCKET_SSL.equalsIgnoreCase(uri.getScheme()); } - private static boolean isSecure(String scheme) - { - return HTTPS.equalsIgnoreCase(scheme) || WEBSOCKET_SSL.equalsIgnoreCase(scheme); + private static boolean isSecure(String scheme) { + return HTTPS.equalsIgnoreCase(scheme) || WEBSOCKET_SSL.equalsIgnoreCase(scheme); } - private static boolean isSecure(URI uri) - { - return isSecure(uri.getScheme()); + private static boolean isSecure(URI uri) { + return isSecure(uri.getScheme()); } } From 33d4e30f0c524097380733e5a8278ba585f3647d Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Tue, 3 Apr 2012 14:48:31 -0300 Subject: [PATCH 0137/2844] Add color --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f1ddffd87a..7f5669f8b7 100644 --- a/README.md +++ b/README.md @@ -16,16 +16,16 @@ You can also download the artifact [Maven Search](http://search.maven.org) Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async-http-client/apidocs/index.html)) - +```java import com.ning.http.client.*; import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); Future f = asyncHttpClient.prepareGet("http://www.ning.com/ ").execute(); Response r = f.get(); - +``` You can also accomplish asynchronous operation without using a Future if you want to receive and process the response in your handler: - +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -44,9 +44,9 @@ You can also accomplish asynchronous operation without using a Future if you wan // Something wrong happened. } }); - +``` You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response - +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -66,9 +66,9 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron }); int statuѕCode = f.get(); - +``` You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back: - +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -111,15 +111,15 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron }); String bodyResponse = f.get(); - +``` Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: - +```java AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); - +``` Async Http Client also support WebSocket by simply doing: - +```java WebSocket websocket = c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { @@ -141,12 +141,12 @@ Async Http Client also support WebSocket by simply doing: public void onError(Throwable t) { } }).build()).get(); - +``` The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of [Netty](http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like [Grizzly](http://grizzly.java.net) - +```java AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); - +``` Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group [Google Group](http://groups.google.com/group/asynchttpclient) From c1579e7f73403a563ba69b5afd19425eac4860f0 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Wed, 4 Apr 2012 15:03:41 -0300 Subject: [PATCH 0138/2844] Bump version, try to make coloring code working --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f5669f8b7..449802791b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.0 + 1.7.1 You can also download the artifact @@ -17,6 +17,7 @@ You can also download the artifact Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async-http-client/apidocs/index.html)) ```java + import com.ning.http.client.*; import java.util.concurrent.Future; @@ -26,6 +27,7 @@ Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async- ``` You can also accomplish asynchronous operation without using a Future if you want to receive and process the response in your handler: ```java + import com.ning.http.client.*; import java.util.concurrent.Future; @@ -47,6 +49,7 @@ You can also accomplish asynchronous operation without using a Future if you wan ``` You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response ```java + import com.ning.http.client.*; import java.util.concurrent.Future; @@ -69,6 +72,7 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron ``` You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back: ```java + import com.ning.http.client.*; import java.util.concurrent.Future; @@ -114,12 +118,14 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron ``` Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: ```java + AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); ``` Async Http Client also support WebSocket by simply doing: ```java + WebSocket websocket = c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { @@ -144,6 +150,7 @@ Async Http Client also support WebSocket by simply doing: ``` The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of [Netty](http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like [Grizzly](http://grizzly.java.net) ```java + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); ``` From 42658d17bb76c0d176a7051e6d070e1f89901521 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 14:00:50 -0400 Subject: [PATCH 0139/2844] With WebSocket, this annoying message is always displayed. Turn the log level to debug --- src/main/java/com/ning/http/client/AsyncHttpClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/src/main/java/com/ning/http/client/AsyncHttpClient.java index 1433805bb3..4de9819011 100755 --- a/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -369,7 +369,7 @@ public void close() { protected void finalize() throws Throwable { try { if (!isClosed.get()) { - logger.warn("AsyncHttpClient.close() hasn't been invoked, which may produce file descriptor leaks"); + logger.debug("AsyncHttpClient.close() hasn't been invoked, which may produce file descriptor leaks"); } } finally { super.finalize(); From a265f5f12493117ef6313679a520f899788d6e3b Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 14:37:47 -0400 Subject: [PATCH 0140/2844] Fix for #68 deadlock in 1.7.0. Also commented out annotation that fail to build with JDK 1.5 --- .../netty/NettyAsyncHttpProvider.java | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 421c5a2b30..68baa381e9 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -513,7 +513,7 @@ public void operationComplete(ChannelFuture cf) { future.touch(); int delay = requestTimeout(config, future.getRequest().getPerRequestConfig()); if (delay != -1 && !future.isDone() && !future.isCancelled()) { - ReaperFuture reaperFuture = new ReaperFuture(channel, future); + ReaperFuture reaperFuture = new ReaperFuture(future); Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, delay, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); @@ -1721,11 +1721,9 @@ public void operationProgressed(ChannelFuture cf, long amount, long current, lon */ private final class ReaperFuture implements Future, Runnable { private Future scheduledFuture; - private Channel channel; private NettyResponseFuture nettyResponseFuture; - public ReaperFuture(Channel channel, NettyResponseFuture nettyResponseFuture) { - this.channel = channel; + public ReaperFuture(NettyResponseFuture nettyResponseFuture) { this.nettyResponseFuture = nettyResponseFuture; } @@ -1736,40 +1734,37 @@ public void setScheduledFuture(Future scheduledFuture) { /** * @Override */ - public synchronized boolean cancel(boolean mayInterruptIfRunning) { - //cleanup references to allow gc to reclaim memory independently - //of this Future lifecycle - this.channel = null; - this.nettyResponseFuture = null; - return this.scheduledFuture.cancel(mayInterruptIfRunning); + public boolean cancel(boolean mayInterruptIfRunning) { + nettyResponseFuture = null; + return scheduledFuture.cancel(mayInterruptIfRunning); } /** * @Override */ public Object get() throws InterruptedException, ExecutionException { - return this.scheduledFuture.get(); + return scheduledFuture.get(); } /** * @Override */ public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { - return this.scheduledFuture.get(timeout, unit); + return scheduledFuture.get(timeout, unit); } /** * @Override */ public boolean isCancelled() { - return this.scheduledFuture.isCancelled(); + return scheduledFuture.isCancelled(); } /** * @Override */ public boolean isDone() { - return this.scheduledFuture.isDone(); + return scheduledFuture.isDone(); } /** @@ -1781,23 +1776,22 @@ public synchronized void run() { return; } - if (this.nettyResponseFuture != null && this.nettyResponseFuture.hasExpired() - && !this.nettyResponseFuture.isDone() && !this.nettyResponseFuture.isCancelled()) { - log.debug("Request Timeout expired for {}\n", this.nettyResponseFuture); + if (nettyResponseFuture != null && nettyResponseFuture.hasExpired() + && !nettyResponseFuture.isDone() && !nettyResponseFuture.isCancelled()) { + log.debug("Request Timeout expired for {}\n", nettyResponseFuture); int requestTimeout = config.getRequestTimeoutInMs(); - PerRequestConfig p = this.nettyResponseFuture.getRequest().getPerRequestConfig(); + PerRequestConfig p = nettyResponseFuture.getRequest().getPerRequestConfig(); if (p != null && p.getRequestTimeoutInMs() != -1) { requestTimeout = p.getRequestTimeoutInMs(); } - abort(this.nettyResponseFuture, new TimeoutException(String.format("No response received after %s", requestTimeout))); + abort(nettyResponseFuture, new TimeoutException(String.format("No response received after %s", requestTimeout))); - this.nettyResponseFuture = null; - this.channel = null; + nettyResponseFuture = null; } - if (this.nettyResponseFuture == null || this.nettyResponseFuture.isDone() || this.nettyResponseFuture.isCancelled()) { + if (nettyResponseFuture == null || nettyResponseFuture.isDone() || nettyResponseFuture.isCancelled()) { cancel(true); } } @@ -1958,7 +1952,7 @@ private static final boolean validateWebSocketRequest(Request request, AsyncHand } private final class HttpProtocol implements Protocol { - @Override + // @Override public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); future.touch(); @@ -2252,18 +2246,18 @@ public Object call() throws Exception { } } - @Override + // @Override public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { } - @Override + // @Override public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { } } private final class WebSocketProtocol implements Protocol { - @Override + // @Override public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); @@ -2288,7 +2282,8 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { } } catch (FilterException efe) { abort(future, efe); - } + } // @Override + } // The handler may have been wrapped. @@ -2333,17 +2328,17 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpChunk webSocketChunk = new HttpChunk() { private ChannelBuffer content; - @Override + // @Override public boolean isLast() { return false; } - @Override + // @Override public ChannelBuffer getContent() { return content; } - @Override + // @Override public void setContent(ChannelBuffer content) { this.content = content; } @@ -2361,7 +2356,7 @@ public void setContent(ChannelBuffer content) { } } - @Override + //@Override public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { try { log.warn("onError {}", e); @@ -2380,7 +2375,7 @@ public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { } } - @Override + //@Override public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { log.trace("onClose {}", e); if (!NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { From 29177e374ed01ebdc8dc8483a9852e320f753efa Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Apr 2012 22:21:29 +0300 Subject: [PATCH 0141/2844] Fix coloration --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 449802791b..d333ef1a6e 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,21 @@ Getting started [HTML](http://sonatype.github.com/async-http-client/) [PDF](http Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: +```xml com.ning async-http-client 1.7.1 +``` You can also download the artifact [Maven Search](http://search.maven.org) Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async-http-client/apidocs/index.html)) -```java +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -25,9 +27,10 @@ Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async- Future f = asyncHttpClient.prepareGet("http://www.ning.com/ ").execute(); Response r = f.get(); ``` + You can also accomplish asynchronous operation without using a Future if you want to receive and process the response in your handler: -```java +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -47,9 +50,10 @@ You can also accomplish asynchronous operation without using a Future if you wan } }); ``` + You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response -```java +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -70,9 +74,10 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron int statuѕCode = f.get(); ``` + You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back: -```java +```java import com.ning.http.client.*; import java.util.concurrent.Future; @@ -116,16 +121,19 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron String bodyResponse = f.get(); ``` + Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: + ```java AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); ``` + Async Http Client also support WebSocket by simply doing: -```java +```java WebSocket websocket = c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { @@ -148,12 +156,14 @@ Async Http Client also support WebSocket by simply doing: } }).build()).get(); ``` + The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of [Netty](http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like [Grizzly](http://grizzly.java.net) -```java +```java AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); ``` + Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group [Google Group](http://groups.google.com/group/asynchttpclient) From 360a0d081ea76cc755a91cd447bb0fa1d1fd4ebd Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 4 Apr 2012 12:24:53 -0700 Subject: [PATCH 0142/2844] Update to latest Grizzly release. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1287dfb2c..dffaa6a519 100644 --- a/pom.xml +++ b/pom.xml @@ -527,7 +527,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.1 + 2.2.4 true From 91c0bb5fdfb8274e19748bcbfdd2b87e2d74b123 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 15:32:55 -0400 Subject: [PATCH 0143/2844] Fix regression caused by #76 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 68baa381e9..704e257d1f 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2116,7 +2116,7 @@ public Object call() throws Exception { try { log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - upgradeProtocol(ctx.getChannel().getPipeline(), request.getUrl()); + upgradeProtocol(ctx.getChannel().getPipeline(), URI.create(request.getUrl()).getScheme()); } catch (Throwable ex) { abort(future, ex); } From 93e6e7825852355e1a07c06ec5284b22e1042bbc Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 19:53:58 -0400 Subject: [PATCH 0144/2844] [maven-release-plugin] prepare release async-http-client-1.7.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dffaa6a519..6cc3e3c31a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.8.0-SNAPSHOT + 1.7.2 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 4fd4db211ee1b6c55905895ba15fe7ec7b812f5e Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 19:54:04 -0400 Subject: [PATCH 0145/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6cc3e3c31a..dffaa6a519 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.2 + 1.8.0-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 1a784552b36718b459d4b0b8ad0681bf2555ded8 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Thu, 5 Apr 2012 15:18:44 -0300 Subject: [PATCH 0146/2844] Cosmetic --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d333ef1a6e..b42a56874f 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,8 @@ Async Http Client also support WebSocket by simply doing: ```java WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener( + new WebSocketTextListener() { @Override public void onMessage(String message) { From 41a6480ffadf7fb1bb699513c531b00d328cb994 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Thu, 5 Apr 2012 15:19:22 -0300 Subject: [PATCH 0147/2844] Another cosmetic changes --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b42a56874f..c4990168aa 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,8 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - Future f = asyncHttpClient.prepareGet("http://www.ning.com/ ").execute(new AsyncCompletionHandler(){ + Future f = asyncHttpClient.prepareGet("http://www.ning.com/ ").execute( + new AsyncCompletionHandler(){ @Override public Integer onCompleted(Response response) throws Exception{ From d2c9646689cefdf998953c1dc45fa7a4f19e2c12 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 9 Apr 2012 08:40:42 -0700 Subject: [PATCH 0148/2844] It seems Tomcat 7.0.27 will set that transfer-encoding to chunked when upgrading the protocol for websocket support. Working around this case by disabling chunk support on this request/response if the upgrade was successful. Resolution confirmed by reporter. --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index fda7320686..db7d59d900 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1299,6 +1299,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } if (upgrade) { try { + httpHeader.setChunked(false); context.protocolHandler.setConnection(ctx.getConnection()); DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); ws.onConnect(); From 9c0d3ea85d0e2239069a6b465e3a1425bdfca5c4 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 19:53:58 -0400 Subject: [PATCH 0149/2844] [maven-release-plugin] prepare release async-http-client-1.7.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dffaa6a519..6cc3e3c31a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.8.0-SNAPSHOT + 1.7.2 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 78ba3214c50284cd708f69295dd18f50a9ed2b46 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 4 Apr 2012 19:54:04 -0400 Subject: [PATCH 0150/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6cc3e3c31a..dffaa6a519 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.2 + 1.8.0-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 210c6668115d1f41f2baf2257530c5c59b7a5f8a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 10 Apr 2012 08:32:26 -0400 Subject: [PATCH 0151/2844] Fix for #79 Why is the WebSocket-Version hardcoded? --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 704e257d1f..3d8cf88a67 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -572,7 +572,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); nettyRequest.addHeader("Sec-WebSocket-Origin", "http://" + uri.getHost()); nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); - nettyRequest.addHeader("Sec-WebSocket-Version", "8"); + nettyRequest.addHeader("Sec-WebSocket-Version", "13"); } if (host != null) { @@ -831,11 +831,11 @@ public void close() { config.executorService().shutdown(); config.reaper().shutdown(); - socketChannelFactory.releaseExternalResources(); plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); webSocketBootstrap.releaseExternalResources(); secureWebSocketBootstrap.releaseExternalResources(); + socketChannelFactory.releaseExternalResources(); } catch (Throwable t) { log.warn("Unexpected error on close", t); } From 1b9208d2244a9481da024db4f7121be50d30a2c9 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 10 Apr 2012 08:35:13 -0400 Subject: [PATCH 0152/2844] This fix wasn't suppored to go in --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 3d8cf88a67..0632333751 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -831,11 +831,11 @@ public void close() { config.executorService().shutdown(); config.reaper().shutdown(); + socketChannelFactory.releaseExternalResources(); plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); webSocketBootstrap.releaseExternalResources(); secureWebSocketBootstrap.releaseExternalResources(); - socketChannelFactory.releaseExternalResources(); } catch (Throwable t) { log.warn("Unexpected error on close", t); } From c078345aeeaf6f06a75f70b07c8c9bf7444f59a3 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 10 Apr 2012 13:39:14 -0400 Subject: [PATCH 0153/2844] Do not invoke the callback if we don't get any binary --- .../providers/netty/NettyAsyncHttpProvider.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 0632333751..2dc0343cbf 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2344,13 +2344,15 @@ public void setContent(ChannelBuffer content) { } }; - webSocketChunk.setContent(ChannelBuffers.wrappedBuffer(frame.getBinaryData())); - ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, webSocketChunk, true); - h.onBodyPartReceived(rp); - - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - webSocket.onMessage(rp.getBodyPartBytes()); - webSocket.onTextMessage(frame.getBinaryData().toString("UTF-8")); + if (frame.getBinaryData() != null) { + webSocketChunk.setContent(ChannelBuffers.wrappedBuffer(frame.getBinaryData())); + ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, webSocketChunk, true); + h.onBodyPartReceived(rp); + + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + webSocket.onMessage(rp.getBodyPartBytes()); + webSocket.onTextMessage(frame.getBinaryData().toString("UTF-8")); + } } else { log.error("Invalid attachment {}", ctx.getAttachment()); } From e52fd078228b084044941aca4fcd8deec365f126 Mon Sep 17 00:00:00 2001 From: Robert Macaulay Date: Wed, 11 Apr 2012 22:46:52 -0500 Subject: [PATCH 0154/2844] Added localAddress for request object --- src/main/java/com/ning/http/client/Request.java | 2 ++ .../providers/netty/NettyAsyncHttpProvider.java | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/Request.java b/src/main/java/com/ning/http/client/Request.java index 52ef0cbb72..55b7a3b694 100644 --- a/src/main/java/com/ning/http/client/Request.java +++ b/src/main/java/com/ning/http/client/Request.java @@ -73,6 +73,8 @@ public static interface EntityWriter { */ public InetAddress getInetAddress(); + public InetAddress getLocalAddress(); + /** * Return the undecoded url * diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 2dc0343cbf..7a0641f562 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -981,12 +981,18 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } try { + InetSocketAddress remoteAddress = null; if (request.getInetAddress() != null) { - channelFuture = bootstrap.connect(new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri))); + remoteAddress= new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); } else if (proxyServer == null || avoidProxy) { - channelFuture = bootstrap.connect(new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri))); + remoteAddress= new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); } else { - channelFuture = bootstrap.connect(new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort())); + remoteAddress= new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); + } + if(request.getLocalAddress() != null){ + channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); + }else{ + channelFuture = bootstrap.connect(remoteAddress); } } catch (Throwable t) { if (acquiredConnection) { From 46b5cb61c92795a2cabe71ef6523c39542b62483 Mon Sep 17 00:00:00 2001 From: Robert Macaulay Date: Wed, 11 Apr 2012 22:59:17 -0500 Subject: [PATCH 0155/2844] Commit the unsved file in Eclipse. tabs to spaces --- src/main/java/com/ning/http/client/Request.java | 2 +- .../java/com/ning/http/client/RequestBuilderBase.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/Request.java b/src/main/java/com/ning/http/client/Request.java index 55b7a3b694..10576405bb 100644 --- a/src/main/java/com/ning/http/client/Request.java +++ b/src/main/java/com/ning/http/client/Request.java @@ -73,7 +73,7 @@ public static interface EntityWriter { */ public InetAddress getInetAddress(); - public InetAddress getLocalAddress(); + public InetAddress getLocalAddress(); /** * Return the undecoded url diff --git a/src/main/java/com/ning/http/client/RequestBuilderBase.java b/src/main/java/com/ning/http/client/RequestBuilderBase.java index aef61c55ba..9cc5ec40e0 100644 --- a/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -46,6 +46,7 @@ private static final class RequestImpl implements Request { private String method; private String url = null; private InetAddress address = null; + private InetAddress localAddress = null; private FluentCaseInsensitiveStringsMap headers = new FluentCaseInsensitiveStringsMap(); private Collection cookies = new ArrayList(); private byte[] byteData; @@ -77,6 +78,7 @@ public RequestImpl(Request prototype) { int pos = prototype.getUrl().indexOf("?"); this.url = pos > 0 ? prototype.getUrl().substring(0, pos) : prototype.getUrl(); this.address = prototype.getInetAddress(); + this.localAddress = prototype.getLocalAddress(); this.headers = new FluentCaseInsensitiveStringsMap(prototype.getHeaders()); this.cookies = new ArrayList(prototype.getCookies()); this.byteData = prototype.getByteData(); @@ -120,6 +122,10 @@ public InetAddress getInetAddress() { return address; } + public InetAddress getLocalAddress() { + return localAddress; + } + private String toUrl(boolean encode) { if (url == null) { @@ -327,6 +333,11 @@ public T setInetAddress(InetAddress address) { request.address = address; return derived.cast(this); } + + public T setLocalInetAddress(InetAddress address) { + request.localAddress = address; + return derived.cast(this); + } private String buildUrl(String url) { URI uri = URI.create(url); From 019171872de37fdadf89bbecb15d8fd6dc81c6c5 Mon Sep 17 00:00:00 2001 From: Robert Macaulay Date: Thu, 12 Apr 2012 11:07:33 -0500 Subject: [PATCH 0156/2844] Set the localAddress more consistently --- .../client/providers/apache/ApacheAsyncHttpProvider.java | 4 ++++ .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index b96b66fdf6..78abf16415 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -47,6 +47,7 @@ import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.Header; +import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethodBase; import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; @@ -351,6 +352,9 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I ProxyHost proxyHost = proxyServer == null ? null : new ProxyHost(proxyServer.getHost(), proxyServer.getPort()); client.getHostConfiguration().setProxyHost(proxyHost); } + if(request.getLocalAddress()!=null) { + client.getHostConfiguration().setLocalAddress(request.getLocalAddress()); + } method.setFollowRedirects(false); if ((request.getCookies() != null) && !request.getCookies().isEmpty()) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index db7d59d900..2bc680b250 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2292,8 +2292,13 @@ void doAsyncConnect(final String url, } String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); - connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, requestFuture, connectHandler)); + if(request.getLocalAddress()!=null) { + connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), new InetSocketAddress(request.getLocalAddress(), 0), + createConnectionCompletionHandler(request, requestFuture, connectHandler)); + } else { + connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), + createConnectionCompletionHandler(request, requestFuture, connectHandler)); + } } From 25132373dc179df25691571b6c6eb8929331815c Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 12:37:27 -0400 Subject: [PATCH 0157/2844] Fix for #81 Upgrade to Netty 3.4.0.Final --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dffaa6a519..44d8772407 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ io.netty netty - 3.3.1.Final + 3.4.0.Final javax.servlet From 06c70ad231d7a691266ba4ebf058575814818ee3 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 12:59:04 -0400 Subject: [PATCH 0158/2844] Fix for #79 Why is the WebSocket-Version hardcoded? --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 2dc0343cbf..65c5d33feb 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2301,7 +2301,11 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { final boolean validStatus = response.getStatus().equals(status); final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; String c = response.getHeader(HttpHeaders.Names.CONNECTION); - final boolean validConnection = c == null ? false : c.equals(HttpHeaders.Values.UPGRADE); + if (c == null) { + c = response.getHeader("connection"); + } + + final boolean validConnection = c == null ? false : c.equalsIgnoreCase(HttpHeaders.Values.UPGRADE); s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; From a593230069b90d1ea80d2f39b7588df1eb960b01 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 13:09:18 -0400 Subject: [PATCH 0159/2844] Fix for #82 [websocket] Wrong origin header ("Sec-WebSocket-Origin") --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 65c5d33feb..5515fb3689 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -570,7 +570,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, if (webSocket) { nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); - nettyRequest.addHeader("Sec-WebSocket-Origin", "http://" + uri.getHost()); + nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" + uri.getPort()); nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); nettyRequest.addHeader("Sec-WebSocket-Version", "13"); } From 0f52d9794ff731163d62b556bddafa60b1cb312f Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 13:35:55 -0400 Subject: [PATCH 0160/2844] Cosmetic, re-arrange the last patch --- .../providers/netty/NettyAsyncHttpProvider.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 3d0b5795ae..0a9dd62071 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -981,19 +981,18 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } try { - InetSocketAddress remoteAddress = null; + InetSocketAddress remoteAddress; if (request.getInetAddress() != null) { - remoteAddress= new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); + remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); } else if (proxyServer == null || avoidProxy) { - remoteAddress= new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); + remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); + } else if(request.getLocalAddress() != null) { + remoteAddress = new InetSocketAddress(request.getLocalAddress(), 0); } else { - remoteAddress= new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); - } - if(request.getLocalAddress() != null){ - channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); - }else{ - channelFuture = bootstrap.connect(remoteAddress); + remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); } + + channelFuture = bootstrap.connect(remoteAddress); } catch (Throwable t) { if (acquiredConnection) { freeConnections.release(); From 0f46d1e81191b298e4e89d4db86b97ecd7812280 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 16:16:18 -0400 Subject: [PATCH 0161/2844] Shield AHC from Netty 3.4.0.Final new behavior. I will rollback to 3.3.1 for the 1.7.3 release to make sure no regression gets in, but just in case someone is using 3.4.0.Final, at least shield from that chnages --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 0a9dd62071..22a016a405 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -75,6 +75,7 @@ import org.jboss.netty.channel.socket.ClientSocketChannelFactory; import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory; +import org.jboss.netty.handler.codec.PrematureChannelClosureException; import org.jboss.netty.handler.codec.http.CookieEncoder; import org.jboss.netty.handler.codec.http.DefaultCookie; import org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer; @@ -1482,6 +1483,10 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) Throwable cause = e.getCause(); NettyResponseFuture future = null; + if (e.getCause() != null && e.getCause().getClass().isAssignableFrom(PrematureChannelClosureException.class)) { + return; + } + if (log.isDebugEnabled()) { log.debug("Unexpected I/O exception on channel {}", channel, cause); } From 0097d1e15c64d3f5209c4afd8eef576014b46337 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 16:17:27 -0400 Subject: [PATCH 0162/2844] Rollback fix for #81 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 44d8772407..dffaa6a519 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ io.netty netty - 3.4.0.Final + 3.3.1.Final javax.servlet From e9c2d23e87aa861e820e1d10a996fe16a51d4760 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 16:19:12 -0400 Subject: [PATCH 0163/2844] Use a String to avoid missing class --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 22a016a405..f33c1e0703 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1483,9 +1483,14 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) Throwable cause = e.getCause(); NettyResponseFuture future = null; + /** Issue 81 if (e.getCause() != null && e.getCause().getClass().isAssignableFrom(PrematureChannelClosureException.class)) { return; } + */ + if (e.getCause() != null && e.getCause().getClass().getSimpleName().equals("PrematureChannelClosureException")) { + return; + } if (log.isDebugEnabled()) { log.debug("Unexpected I/O exception on channel {}", channel, cause); From 2b92f28a7086aada1e37655b8b1a0d0a1900a4d8 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 16:19:49 -0400 Subject: [PATCH 0164/2844] Fix build --- .../ning/http/client/providers/netty/NettyAsyncHttpProvider.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index f33c1e0703..7f85704a13 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -75,7 +75,6 @@ import org.jboss.netty.channel.socket.ClientSocketChannelFactory; import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory; -import org.jboss.netty.handler.codec.PrematureChannelClosureException; import org.jboss.netty.handler.codec.http.CookieEncoder; import org.jboss.netty.handler.codec.http.DefaultCookie; import org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer; From 341cdddf06711e889c3f673750e854e2d87b8c94 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 13 Apr 2012 13:56:47 -0700 Subject: [PATCH 0165/2844] Integrate Grizzly 2.2.5 to resolve #82. --- pom.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dffaa6a519..3996fcec9f 100644 --- a/pom.xml +++ b/pom.xml @@ -527,7 +527,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.4 + 2.2.5 true @@ -611,6 +611,12 @@ gitsite:git@github.com/sonatype/async-http-client.git + + + maven.java.net + https://maven.java.net/content/repositories/releases + + http://oss.sonatype.org/content/repositories/snapshots true From b3f31680df15eef867f876ea95f911da806799b0 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 17:06:00 -0400 Subject: [PATCH 0166/2844] [maven-release-plugin] prepare release async-http-client-1.7.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3996fcec9f..a61e3551ae 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.8.0-SNAPSHOT + 1.7.3 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 7c9606215402e00a04a6916b55ec8bf4f9160c6e Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 13 Apr 2012 17:06:06 -0400 Subject: [PATCH 0167/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a61e3551ae..3996fcec9f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.3 + 1.8.0-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 72ec15c149dfee3217b6dc62b13a1cacc5e18135 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 17 Apr 2012 16:35:39 -0400 Subject: [PATCH 0168/2844] Incremental fix for #84 [websocket] Allow removing listener --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 6 ++++++ .../ning/http/client/providers/netty/NettyWebSocket.java | 7 +++++++ .../java/com/ning/http/client/websocket/WebSocket.java | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 2bc680b250..5b0e253d6e 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2627,6 +2627,12 @@ public WebSocket addWebSocketListener(WebSocketListener l) { return this; } + @Override + public WebSocket removeWebSocketListener(WebSocketListener l) { + gWebSocket.remove(new AHCWebSocketListenerAdapter(l, this)); + return this; + } + @Override public boolean isOpen() { return gWebSocket.isConnected(); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 77c6e3acd6..c00e3bc39c 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -80,6 +80,12 @@ public WebSocket addWebSocketListener(WebSocketListener l) { return this; } + @Override + public WebSocket removeWebSocketListener(WebSocketListener l) { + listeners.remove(l); + return this; + } + @Override public boolean isOpen() { return channel.isOpen(); @@ -87,6 +93,7 @@ public boolean isOpen() { @Override public void close() { + listeners.clear(); onClose(); channel.close(); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index 4608f47d94..fe6f8b2e09 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -87,6 +87,13 @@ public interface WebSocket { */ WebSocket addWebSocketListener(WebSocketListener l); + /** + * Add a {@link WebSocketListener} + * @param l a {@link WebSocketListener} + * @return this + */ + WebSocket removeWebSocketListener(WebSocketListener l); + /** * Returns true if the WebSocket is open/connected. * From e82658814c315004abeddea3b9edd7c2b4d9be32 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 17 Apr 2012 13:38:25 -0700 Subject: [PATCH 0169/2844] Incremental fix for #84. Add equals/hashcode for listener adapter. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 5b0e253d6e..57c44828d0 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2715,6 +2715,27 @@ public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byt } } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + AHCWebSocketListenerAdapter that = (AHCWebSocketListenerAdapter) o; + + if (ahcListener != null ? !ahcListener.equals(that.ahcListener) : that.ahcListener != null) + return false; + if (webSocket != null ? !webSocket.equals(that.webSocket) : that.webSocket != null) + return false; + + return true; + } + + @Override + public int hashCode() { + int result = ahcListener != null ? ahcListener.hashCode() : 0; + result = 31 * result + (webSocket != null ? webSocket.hashCode() : 0); + return result; + } } // END AHCWebSocketListenerAdapter } From a0e30d8acb15b978c5dde3c3c98c4c5f5dfacc41 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 18 Apr 2012 11:03:58 -0400 Subject: [PATCH 0170/2844] CMake sure listeners are cleaned after events are pushed --- .../com/ning/http/client/providers/netty/NettyWebSocket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index c00e3bc39c..84b76942fd 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -93,8 +93,8 @@ public boolean isOpen() { @Override public void close() { - listeners.clear(); onClose(); + listeners.clear(); channel.close(); } From d371dd9ef563791b492aaf784e9fbd17c50e3a57 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 18 Apr 2012 12:58:04 -0400 Subject: [PATCH 0171/2844] Fix for #85 AsyncHttpClient should allow asynchronous close operation --- .../java/com/ning/http/client/AsyncHttpClient.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/src/main/java/com/ning/http/client/AsyncHttpClient.java index 4de9819011..90c6d5f2fc 100755 --- a/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -365,6 +365,19 @@ public void close() { isClosed.set(true); } + /** + * Asynchronous close the {@link AsyncHttpProvider} by spawning a thread and avoid blocking. + */ + public void closeAsynchronously() { + config.applicationThreadPool.submit(new Runnable() { + + public void run() { + httpProvider.close(); + isClosed.set(true); + } + }); + } + @Override protected void finalize() throws Throwable { try { From 0de073a807b16ec146cadaf7ab5e1dd686680e25 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 18 Apr 2012 13:55:35 -0400 Subject: [PATCH 0172/2844] Prevent NPE --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 7f85704a13..39cbfadf42 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2380,7 +2380,7 @@ public void setContent(ChannelBuffer content) { public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { try { log.warn("onError {}", e); - if (!NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { + if (ctx.getAttachment() == null || !NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { return; } @@ -2398,7 +2398,7 @@ public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { //@Override public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { log.trace("onClose {}", e); - if (!NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { + if (ctx.getAttachment() == null || !NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { return; } From 4cbe9905caf2a626e0ca2beadb3296c10fb55453 Mon Sep 17 00:00:00 2001 From: Gerd Riesselmann Date: Sun, 22 Apr 2012 22:51:19 +0300 Subject: [PATCH 0173/2844] Handle charsets that are quoted as if they were not (trim them). I encountered some sites that have charset="utf-8" instead of charset=utf-8 and can not access their content. All browsers however accept the charset. Testcases: 1.) parseCharset("\"utf-8\"") == "utf-8" 2.) parseCharset("'utf-8'") == "utf-8" --- .../java/com/ning/http/util/AsyncHttpProviderUtils.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index d313f5e724..3857b42c38 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -429,7 +429,14 @@ public static String parseCharset(String contentType) { if (part.trim().startsWith("charset=")) { String[] val = part.split("="); if (val.length > 1) { - return val[1].trim(); + String charset = val[1].trim(); + // Quite a lot of sites have charset="CHARSET", + // e.g. charset="utf-8". Note the quotes. This is + // not correct, but client should be able to handle + // it (all browsers do, Apache HTTP Client and Grizzly + // strip it by default) + // This is a poor man's trim("\"").trim("'") + return charset.replaceAll("\"", "").replaceAll("'", "") } } } From 7f221907c4f063f878844c9ff4cab341549514cb Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 10:12:21 -0400 Subject: [PATCH 0174/2844] Fix build --- src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 3857b42c38..a7c5281159 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -436,7 +436,7 @@ public static String parseCharset(String contentType) { // it (all browsers do, Apache HTTP Client and Grizzly // strip it by default) // This is a poor man's trim("\"").trim("'") - return charset.replaceAll("\"", "").replaceAll("'", "") + return charset.replaceAll("\"", "").replaceAll("'", ""); } } } From 26ba9f57c05016152f8ec7ccb9b113463bcd4835 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Mon, 23 Apr 2012 12:08:52 -0300 Subject: [PATCH 0175/2844] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4990168aa..3cc4386773 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.1 + 1.7.3 ``` From 43be7e238c9c1527247e8371668bab99ab3981ce Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 11:10:09 -0400 Subject: [PATCH 0176/2844] Fix for #81 Upgrade to Netty 3.4.1.Final --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3996fcec9f..c2b7c75d51 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ io.netty netty - 3.3.1.Final + 3.4.1.Final javax.servlet From ec09eca81cca832471945ac77ec5897fbce5c905 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 11:38:25 -0400 Subject: [PATCH 0177/2844] Fix for #91 [websocket] Add support a new Close Listener with code & reason --- .../netty/NettyAsyncHttpProvider.java | 10 ++ .../providers/netty/NettyWebSocket.java | 35 ++++++- .../client/websocket/WebSocketListener.java | 3 + .../NettyCloseCodeReasonMessageTest.java | 91 +++++++++++++++++++ 4 files changed, 134 insertions(+), 5 deletions(-) create mode 100644 src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 39cbfadf42..4e6bd94961 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -91,6 +91,7 @@ import org.jboss.netty.handler.codec.http.HttpResponse; import org.jboss.netty.handler.codec.http.HttpResponseDecoder; import org.jboss.netty.handler.codec.http.HttpVersion; +import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame; @@ -2370,6 +2371,15 @@ public void setContent(ChannelBuffer content) { NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); webSocket.onMessage(rp.getBodyPartBytes()); webSocket.onTextMessage(frame.getBinaryData().toString("UTF-8")); + + if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { + try { + webSocket.onClose(CloseWebSocketFrame.class.cast(frame).getStatusCode(), CloseWebSocketFrame.class.cast(frame).getReasonText()); + } catch (Throwable t) { + // Swallow any exception that may comes from a Netty version released before 3.4.0 + log.trace("", t); + } + } } } else { log.error("Invalid attachment {}", ctx.getAttachment()); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 84b76942fd..61c77e0fb0 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -14,6 +14,7 @@ import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; +import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketTextListener; import org.jboss.netty.channel.Channel; @@ -21,12 +22,15 @@ import org.jboss.netty.handler.codec.http.websocketx.PingWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.concurrent.ConcurrentLinkedQueue; import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; public class NettyWebSocket implements WebSocket { + private final static Logger logger = LoggerFactory.getLogger(NettyWebSocket.class); private final Channel channel; private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); @@ -67,7 +71,7 @@ public WebSocket sendPing(byte[] payload) { channel.write(new PingWebSocketFrame(wrappedBuffer(payload))); return this; } - + @Override public WebSocket sendPong(byte[] payload) { channel.write(new PongWebSocketFrame(wrappedBuffer(payload))); @@ -101,7 +105,11 @@ public void close() { protected void onMessage(byte[] message) { for (WebSocketListener l : listeners) { if (WebSocketByteListener.class.isAssignableFrom(l.getClass())) { - WebSocketByteListener.class.cast(l).onMessage(message); + try { + WebSocketByteListener.class.cast(l).onMessage(message); + } catch (Exception ex) { + l.onError(ex); + } } } } @@ -109,20 +117,37 @@ protected void onMessage(byte[] message) { protected void onTextMessage(String message) { for (WebSocketListener l : listeners) { if (WebSocketTextListener.class.isAssignableFrom(l.getClass())) { - WebSocketTextListener.class.cast(l).onMessage(message); + try { + WebSocketTextListener.class.cast(l).onMessage(message); + } catch (Exception ex) { + l.onError(ex); + } } } } protected void onError(Throwable t) { for (WebSocketListener l : listeners) { - l.onError(t); + try { + l.onError(t); + } catch (Throwable t2) { + logger.error("", t2); + } + } } protected void onClose() { + onClose(1000, "Normal closure; the connection successfully completed whatever purpose for which it was created."); + } + + protected void onClose(int code, String reason) { for (WebSocketListener l : listeners) { - l.onClose(this); + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(l.getClass())) { + WebSocketCloseCodeReasonListener.class.cast(l).onClose(this, code, reason); + } else { + l.onClose(this); + } } } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java index e193254cc4..360f66cf21 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketListener.java @@ -19,18 +19,21 @@ public interface WebSocketListener { /** * Invoked when the {@link WebSocket} is open. + * * @param websocket */ void onOpen(WebSocket websocket); /** * Invoked when the {@link WebSocket} is close. + * * @param websocket */ void onClose(WebSocket websocket); /** * Invoked when the {@link WebSocket} is open. + * * @param t a {@link Throwable} */ void onError(Throwable t); diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java new file mode 100644 index 0000000000..e077a392a7 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.websocket.TextMessageTest; +import com.ning.http.client.websocket.WebSocket; +import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; +import com.ning.http.client.websocket.WebSocketListener; +import com.ning.http.client.websocket.WebSocketUpgradeHandler; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +import static org.testng.Assert.assertEquals; + +public class NettyCloseCodeReasonMessageTest extends NettyTextMessageTest { + + @Test(timeOut = 60000) + public void onCloseWithCode() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); + + websocket.close(); + + latch.await(); + assertEquals(text.get(), "1000-Normal closure; the connection successfully completed whatever purpose for which it was created."); + } + + @Test(timeOut = 60000) + public void onCloseWithCodeServerClose() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); + + latch.await(); + assertEquals(text.get(), "1000-Idle for 10022ms > 10000ms"); + } + + public final static class Listener implements WebSocketListener, WebSocketCloseCodeReasonListener { + + final CountDownLatch latch; + final AtomicReference text; + + public Listener(CountDownLatch latch, AtomicReference text) { + this.latch = latch; + this.text = text; + } + + //@Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + //@Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + } + + public void onClose(WebSocket websocket, int code, String reason) { + text.set(code + "-" + reason); + latch.countDown(); + } + + //@Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + } +} From 7fa598bad03a10a943badb9a32a4a2d351c91728 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 11:38:47 -0400 Subject: [PATCH 0178/2844] Add a test for #91 --- .../WebSocketCloseCodeReasonListener.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java new file mode 100644 index 0000000000..85141f45e3 --- /dev/null +++ b/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket; + +/** + * Extend the normal close listener with one that support the WebSocket's code and reason. + * @See http://tools.ietf.org/html/rfc6455#section-5.5.1 + * + * NOTE: This listener is currently only supported by the NettyAsyncHttpProvider + * + */ +public interface WebSocketCloseCodeReasonListener { + + /** + * Invoked when the {@link WebSocket} is close. + * + * @param websocket + */ + void onClose(WebSocket websocket, int code, String reason); +} From 3a494e5e5b6e245fa028bd4e29da4328b9b6711a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 12:21:44 -0400 Subject: [PATCH 0179/2844] make the test more robust --- .../websocket/netty/NettyCloseCodeReasonMessageTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java index e077a392a7..18a2ab2aa2 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java @@ -28,6 +28,7 @@ import java.util.concurrent.atomic.AtomicReference; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; public class NettyCloseCodeReasonMessageTest extends NettyTextMessageTest { @@ -56,7 +57,7 @@ public void onCloseWithCodeServerClose() throws Throwable { .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); latch.await(); - assertEquals(text.get(), "1000-Idle for 10022ms > 10000ms"); + assertTrue(text.get().startsWith("1000-Idle")); } public final static class Listener implements WebSocketListener, WebSocketCloseCodeReasonListener { From 66a9a6ce4ba8cfdc218b4b87c2293cf62ea40325 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 23 Apr 2012 09:38:33 -0700 Subject: [PATCH 0180/2844] Fix the Grizzly side of #91. - re-worked tests a bit. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 9 ++- .../WebSocketCloseCodeReasonListener.java | 3 - ...t.java => CloseCodeReasonMessageTest.java} | 15 +++-- .../client/websocket/TextMessageTest.java | 5 +- .../GrizzlyCloseCodeReasonMsgTest.java | 63 +++++++++++++++++++ .../netty/NettyCloseCodeReasonMsgTest.java | 54 ++++++++++++++++ 6 files changed, 137 insertions(+), 12 deletions(-) rename src/test/java/com/ning/http/client/websocket/{netty/NettyCloseCodeReasonMessageTest.java => CloseCodeReasonMessageTest.java} (85%) create mode 100644 src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 57c44828d0..ef4d8f24e8 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -40,6 +40,7 @@ import com.ning.http.client.listener.TransferCompletionHandler; import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; +import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketPingListener; import com.ning.http.client.websocket.WebSocketPongListener; @@ -104,6 +105,7 @@ import org.glassfish.grizzly.websockets.Version; import org.glassfish.grizzly.websockets.WebSocketEngine; import org.glassfish.grizzly.websockets.WebSocketFilter; +import org.glassfish.grizzly.websockets.draft06.ClosingFrame; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -2665,7 +2667,12 @@ private static final class AHCWebSocketListenerAdapter implements org.glassfish. @Override public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataFrame dataFrame) { - ahcListener.onClose(webSocket); + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(ahcListener.getClass())) { + ClosingFrame cf = ClosingFrame.class.cast(dataFrame); + WebSocketCloseCodeReasonListener.class.cast(ahcListener).onClose(webSocket, cf.getCode(), cf.getReason()); + } else { + ahcListener.onClose(webSocket); + } } @Override diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java index 85141f45e3..e3213916bc 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java @@ -15,9 +15,6 @@ /** * Extend the normal close listener with one that support the WebSocket's code and reason. * @See http://tools.ietf.org/html/rfc6455#section-5.5.1 - * - * NOTE: This listener is currently only supported by the NettyAsyncHttpProvider - * */ public interface WebSocketCloseCodeReasonListener { diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java b/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java similarity index 85% rename from src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java rename to src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java index 18a2ab2aa2..9329973e03 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.netty; +package com.ning.http.client.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; @@ -20,6 +20,7 @@ import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketUpgradeHandler; +import com.ning.http.client.websocket.netty.NettyTextMessageTest; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -30,7 +31,7 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; -public class NettyCloseCodeReasonMessageTest extends NettyTextMessageTest { +public abstract class CloseCodeReasonMessageTest extends TextMessageTest { @Test(timeOut = 60000) public void onCloseWithCode() throws Throwable { @@ -44,7 +45,7 @@ public void onCloseWithCode() throws Throwable { websocket.close(); latch.await(); - assertEquals(text.get(), "1000-Normal closure; the connection successfully completed whatever purpose for which it was created."); + assertTrue(text.get().startsWith("1000")); } @Test(timeOut = 60000) @@ -57,7 +58,13 @@ public void onCloseWithCodeServerClose() throws Throwable { .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); latch.await(); - assertTrue(text.get().startsWith("1000-Idle")); + final String[] parts = text.get().split(" "); + assertEquals(parts.length, 5); + assertEquals(parts[0], "1000-Idle"); + assertEquals(parts[1], "for"); + assertTrue(Integer.parseInt(parts[2].substring(0, parts[2].indexOf('m'))) > 10000); + assertEquals(parts[3], ">"); + assertEquals(parts[4], "10000ms"); } public final static class Listener implements WebSocketListener, WebSocketCloseCodeReasonListener { diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 769d2ff3f7..4a8d409dbc 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -66,10 +66,7 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque }; } - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return null; //To change body of implemented methods use File | Settings | File Templates. - } + @Test(timeOut = 60000) public void onOpen() throws Throwable { diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java new file mode 100644 index 0000000000..230bcfa0aa --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java @@ -0,0 +1,63 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.ning.http.client.websocket.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.websocket.CloseCodeReasonMessageTest; +import org.testng.annotations.Test; + +public class GrizzlyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } + + @Override + @Test + public void onCloseWithCode() throws Throwable { + super.onCloseWithCode(); //To change body of overridden methods use File | Settings | File Templates. + } +} diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java new file mode 100644 index 0000000000..59d3b45276 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java @@ -0,0 +1,54 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.ning.http.client.websocket.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.websocket.CloseCodeReasonMessageTest; + +public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } + +} From d266d78330e4e395e7160f19ce72dd842336fe76 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 23 Apr 2012 09:49:34 -0700 Subject: [PATCH 0181/2844] Fix license. --- .../GrizzlyCloseCodeReasonMsgTest.java | 44 ++++--------------- .../netty/NettyCloseCodeReasonMsgTest.java | 44 ++++--------------- 2 files changed, 18 insertions(+), 70 deletions(-) diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java index 230bcfa0aa..c767e55080 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java @@ -1,42 +1,16 @@ /* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ + package com.ning.http.client.websocket.grizzly; import com.ning.http.client.AsyncHttpClient; diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java index 59d3b45276..1f18760722 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java @@ -1,42 +1,16 @@ /* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ + package com.ning.http.client.websocket.netty; import com.ning.http.client.AsyncHttpClient; From 3679a321aee98d4beef6f0f59579ee9057c51a5e Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 16:22:41 -0400 Subject: [PATCH 0182/2844] More fix for #91 Make sure the close survives an error, make sure the close() is getting invoked --- .../ning/http/client/providers/netty/NettyWebSocket.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 61c77e0fb0..e4e1e5b9ff 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -143,10 +143,13 @@ protected void onClose() { protected void onClose(int code, String reason) { for (WebSocketListener l : listeners) { - if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(l.getClass())) { - WebSocketCloseCodeReasonListener.class.cast(l).onClose(this, code, reason); - } else { + try { + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(l.getClass())) { + WebSocketCloseCodeReasonListener.class.cast(l).onClose(this, code, reason); + } l.onClose(this); + } catch (Throwable t) { + l.onError(t); } } } From 03ee5b3e91ea1fa153bd104b58260b6de12b8fda Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 23 Apr 2012 13:29:58 -0700 Subject: [PATCH 0183/2844] Improved error handling. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 68 ++++++++++++++----- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index ef4d8f24e8..908c1f80f7 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2667,58 +2667,90 @@ private static final class AHCWebSocketListenerAdapter implements org.glassfish. @Override public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataFrame dataFrame) { - if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(ahcListener.getClass())) { - ClosingFrame cf = ClosingFrame.class.cast(dataFrame); - WebSocketCloseCodeReasonListener.class.cast(ahcListener).onClose(webSocket, cf.getCode(), cf.getReason()); - } else { - ahcListener.onClose(webSocket); + try { + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(ahcListener.getClass())) { + ClosingFrame cf = ClosingFrame.class.cast(dataFrame); + WebSocketCloseCodeReasonListener.class.cast(ahcListener).onClose(webSocket, cf.getCode(), cf.getReason()); + } else { + ahcListener.onClose(webSocket); + } + } catch (Throwable e) { + ahcListener.onError(e); } } @Override public void onConnect(org.glassfish.grizzly.websockets.WebSocket gWebSocket) { - ahcListener.onOpen(webSocket); + try { + ahcListener.onOpen(webSocket); + } catch (Throwable e) { + ahcListener.onError(e); + } } @Override public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, String s) { - if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketTextListener.class.cast(ahcListener).onMessage(s); + try { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onMessage(s); + } + } catch (Throwable e) { + ahcListener.onError(e); } } @Override public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketByteListener.class.cast(ahcListener).onMessage(bytes); + try { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onMessage(bytes); + } + } catch (Throwable e) { + ahcListener.onError(e); } } @Override public void onPing(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - if (WebSocketPingListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketPingListener.class.cast(ahcListener).onPing(bytes); + try { + if (WebSocketPingListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketPingListener.class.cast(ahcListener).onPing(bytes); + } + } catch (Throwable e) { + ahcListener.onError(e); } } @Override public void onPong(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - if (WebSocketPongListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketPongListener.class.cast(ahcListener).onPong(bytes); + try { + if (WebSocketPongListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketPongListener.class.cast(ahcListener).onPong(bytes); + } + } catch (Throwable e) { + ahcListener.onError(e); } } @Override public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean b) { - if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketTextListener.class.cast(ahcListener).onFragment(s, b); + try { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onFragment(s, b); + } + } catch (Throwable e) { + ahcListener.onError(e); } } @Override public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean b) { - if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, b); + try { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, b); + } + } catch (Throwable e) { + ahcListener.onError(e); } } From c184b8cc78265a8ecd8db901da48ae1ea4eebcdf Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 17:05:18 -0400 Subject: [PATCH 0184/2844] Make JDK 5 happy --- .../providers/netty/NettyWebSocket.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index e4e1e5b9ff..498e15ba12 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -39,63 +39,63 @@ public NettyWebSocket(Channel channel) { this.channel = channel; } - @Override + // @Override public WebSocket sendMessage(byte[] message) { channel.write(new BinaryWebSocketFrame(wrappedBuffer(message))); return this; } - @Override + // @Override public WebSocket stream(byte[] fragment, boolean last) { throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } - @Override + // @Override public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } - @Override + // @Override public WebSocket sendTextMessage(String message) { channel.write(new TextWebSocketFrame(message)); return this; } - @Override + // @Override public WebSocket streamText(String fragment, boolean last) { throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } - @Override + // @Override public WebSocket sendPing(byte[] payload) { channel.write(new PingWebSocketFrame(wrappedBuffer(payload))); return this; } - @Override + // @Override public WebSocket sendPong(byte[] payload) { channel.write(new PongWebSocketFrame(wrappedBuffer(payload))); return this; } - @Override + // @Override public WebSocket addWebSocketListener(WebSocketListener l) { listeners.add(l); return this; } - @Override + // @Override public WebSocket removeWebSocketListener(WebSocketListener l) { listeners.remove(l); return this; } - @Override + // @Override public boolean isOpen() { return channel.isOpen(); } - @Override + // @Override public void close() { onClose(); listeners.clear(); From 6c4a33c23ae3840a130dd905302917f76327be90 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 17:28:50 -0400 Subject: [PATCH 0185/2844] [maven-release-plugin] prepare release async-http-client-1.7.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2b7c75d51..f34546ace0 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.8.0-SNAPSHOT + 1.7.4 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 6f1b57ada050790d761a8bc5591558bc28163682 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 17:28:54 -0400 Subject: [PATCH 0186/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f34546ace0..c2b7c75d51 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.4 + 1.8.0-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 870c8dd65fa89d489f0f6d5eec6345f8c0e9ecce Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 17:51:44 -0400 Subject: [PATCH 0187/2844] Bump version, add WebSocket how to --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cc4386773..c571a3b3b5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Async Http Client ----------------- Getting started [HTML](http://sonatype.github.com/async-http-client/) [PDF](http://is.gd/kexrN) + [WebSockets only](http://jfarcand.wordpress.com/2011/12/21/writing-websocket-clients-using-asynchttpclient/) Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: @@ -9,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.3 + 1.7.4 ``` From bb2a7bb8873928fd1d67ef32da9934301d61b24f Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 23 Apr 2012 17:52:26 -0400 Subject: [PATCH 0188/2844] Bump version, add WebSocket how to --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c571a3b3b5..6b8cd9878b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Async Http Client ----------------- Getting started [HTML](http://sonatype.github.com/async-http-client/) [PDF](http://is.gd/kexrN) - [WebSockets only](http://jfarcand.wordpress.com/2011/12/21/writing-websocket-clients-using-asynchttpclient/) + With [WebSockets](http://jfarcand.wordpress.com/2011/12/21/writing-websocket-clients-using-asynchttpclient/) Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: From 86b19a5a39e3438a661d96dc15a1a712e716db16 Mon Sep 17 00:00:00 2001 From: fabienbancharel Date: Wed, 25 Apr 2012 19:55:06 +0300 Subject: [PATCH 0189/2844] For thread safety, define gssContext, token, negotiationOid as local variables instead of class attributes. (gssContext must not be thread safe as it makes NPE under load) --- .../client/providers/netty/spnego/SpnegoEngine.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java index ef777569a5..201061c317 100644 --- a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java +++ b/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java @@ -62,15 +62,6 @@ public class SpnegoEngine { private final SpnegoTokenGenerator spnegoGenerator; - private GSSContext gssContext = null; - - /** - * base64 decoded challenge * - */ - private byte[] token; - - private Oid negotiationOid = null; - public SpnegoEngine(final SpnegoTokenGenerator spnegoGenerator) { this.spnegoGenerator = spnegoGenerator; } @@ -80,6 +71,9 @@ public SpnegoEngine() { } public String generateToken(String server) throws Throwable { + GSSContext gssContext = null; + byte[] token = null; // base64 decoded challenge + Oid negotiationOid = null; try { log.debug("init {}", server); From 1bf36f444c0d7eb869e3f9e234bc84e1d6a4abb9 Mon Sep 17 00:00:00 2001 From: Robert Macaulay Date: Thu, 26 Apr 2012 10:39:31 -0500 Subject: [PATCH 0190/2844] Corrected localAddress logic --- .../client/providers/netty/NettyAsyncHttpProvider.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4e6bd94961..fa08b8995e 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -987,13 +987,16 @@ private ListenableFuture doConnect(final Request request, final AsyncHand remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); } else if (proxyServer == null || avoidProxy) { remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); - } else if(request.getLocalAddress() != null) { - remoteAddress = new InetSocketAddress(request.getLocalAddress(), 0); } else { remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); } - channelFuture = bootstrap.connect(remoteAddress); + if(request.getLocalAddress() != null){ + channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); + }else{ + channelFuture = bootstrap.connect(remoteAddress); + } + } catch (Throwable t) { if (acquiredConnection) { freeConnections.release(); From a93d61ef541ae0788a8597f2f850d2bb993ebc16 Mon Sep 17 00:00:00 2001 From: Robert Macaulay Date: Fri, 27 Apr 2012 10:50:36 -0500 Subject: [PATCH 0191/2844] Add suuport for old style of digest auth where qop is empty Fixed bug where entire url was being passed as a path to the md5 in netty --- src/main/java/com/ning/http/client/Realm.java | 15 +++- .../netty/NettyAsyncHttpProvider.java | 2 +- .../java/com/ning/http/client/RealmTest.java | 81 +++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/Realm.java b/src/main/java/com/ning/http/client/Realm.java index 07c84bfa3a..ffc174f882 100644 --- a/src/main/java/com/ning/http/client/Realm.java +++ b/src/main/java/com/ning/http/client/Realm.java @@ -524,12 +524,23 @@ private void newResponse() throws UnsupportedEncodingException { byte[] ha1 = md.digest(); md.reset(); + + //HA2 if qop is auth-int is methodName:url:md5(entityBody) md.update(new StringBuilder(methodName) .append(':') .append(uri).toString().getBytes("ISO-8859-1")); byte[] ha2 = md.digest(); - md.update(new StringBuilder(toBase16(ha1)) + if(qop==null || qop.equals("")) { + md.update(new StringBuilder(toBase16(ha1)) + .append(':') + .append(nonce) + .append(':') + .append(toBase16(ha2)).toString().getBytes("ISO-8859-1")); + + } else { + //qop ="auth" or "auth-int" + md.update(new StringBuilder(toBase16(ha1)) .append(':') .append(nonce) .append(':') @@ -540,6 +551,8 @@ private void newResponse() throws UnsupportedEncodingException { .append(qop) .append(':') .append(toBase16(ha2)).toString().getBytes("ISO-8859-1")); + } + byte[] digest = md.digest(); response = toHexString(digest); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index fa08b8995e..32e0748885 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2070,7 +2070,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws } final Realm nr = new Realm.RealmBuilder().clone(newRealm) - .setUri(request.getUrl()).build(); + .setUri(URI.create(request.getUrl()).getPath()).build(); log.debug("Sending authentication to {}", request.getUrl()); AsyncCallable ac = new AsyncCallable(future) { diff --git a/src/test/java/com/ning/http/client/RealmTest.java b/src/test/java/com/ning/http/client/RealmTest.java index f1aac2fcf9..6bd2a622b5 100644 --- a/src/test/java/com/ning/http/client/RealmTest.java +++ b/src/test/java/com/ning/http/client/RealmTest.java @@ -15,6 +15,9 @@ import com.ning.http.client.Realm.AuthScheme; import com.ning.http.client.Realm.RealmBuilder; import org.testng.Assert; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import org.testng.annotations.Test; public class RealmTest { @@ -36,4 +39,82 @@ public void testClone() { Assert.assertEquals( clone.getAlgorithm(), orig.getAlgorithm() ); Assert.assertEquals( clone.getAuthScheme(), orig.getAuthScheme() ); } + @Test(groups = "fast") + public void testOldDigestEmptyString() { + String qop=""; + testOldDigest(qop); + } + @Test(groups = "fast") + public void testOldDigestNull() { + String qop=null; + testOldDigest(qop); + } + + private void testOldDigest(String qop){ + String user="user"; + String pass="pass"; + String realm="realm"; + String nonce="nonce"; + String method="GET"; + String uri="/foo"; + RealmBuilder builder = new RealmBuilder(); + builder.setPrincipal( user ).setPassword( pass ); + builder.setNonce( nonce ); + builder.setUri( uri ); + builder.setMethodName(method); + builder.setRealmName( realm ); + builder.setQop(qop); + builder.setScheme( AuthScheme.DIGEST ); + Realm orig = builder.build(); + + String ha1=getMd5(user +":" + realm +":"+pass); + String ha2=getMd5(method +":"+ uri); + String expectedResponse=getMd5(ha1 +":" + nonce +":" + ha2); + + Assert.assertEquals(expectedResponse,orig.getResponse()); + } + + @Test(groups = "fast") + public void testStrongDigest() { + String user="user"; + String pass="pass"; + String realm="realm"; + String nonce="nonce"; + String method="GET"; + String uri="/foo"; + String qop="auth"; + RealmBuilder builder = new RealmBuilder(); + builder.setPrincipal( user ).setPassword( pass ); + builder.setNonce( nonce ); + builder.setUri( uri ); + builder.setMethodName(method); + builder.setRealmName( realm ); + builder.setQop(qop); + builder.setScheme( AuthScheme.DIGEST ); + Realm orig = builder.build(); + + String nc = orig.getNc(); + String cnonce = orig.getCnonce(); + String ha1=getMd5(user +":" + realm +":"+pass); + String ha2=getMd5(method +":"+ uri); + String expectedResponse=getMd5(ha1 +":" + nonce +":" + nc + ":" + cnonce +":" + qop + ":" + ha2); + + Assert.assertEquals(expectedResponse,orig.getResponse()); + } + + private String getMd5(String what){ + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + md.update(what.getBytes("ISO-8859-1")); + byte[] hash = md.digest(); + BigInteger bi = new BigInteger(1, hash); + String result = bi.toString(16); + if (result.length() % 2 != 0) { + return "0" + result; + } + return result; + } catch (Exception e) { + throw new RuntimeException(e); + } + } } From eb79dcb27a5c252e95cb1b5f680607dd0bc18a35 Mon Sep 17 00:00:00 2001 From: Joe Sullivan Date: Mon, 7 May 2012 13:36:53 -0700 Subject: [PATCH 0192/2844] Abort future on SSL host name verification failure, pass the requested url to verifier instead of reverse lookup by ip. --- .../providers/netty/NettyConnectListener.java | 10 ++-- .../client/async/HostnameVerifierTest.java | 47 +++++++++++++------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java b/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java index 301399c36e..68bb2b0c19 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java @@ -71,11 +71,11 @@ public final void operationComplete(ChannelFuture f) throws Exception { } HostnameVerifier v = config.getHostnameVerifier(); - if (sslHandler != null && !AllowAllHostnameVerifier.class.isAssignableFrom(v.getClass())) { - // TODO: channel.getRemoteAddress()).getHostName() is very expensive. Should cache the result. - if (!v.verify(InetSocketAddress.class.cast(channel.getRemoteAddress()).getHostName(), - sslHandler.getEngine().getSession())) { - throw new ConnectException("HostnameVerifier exception."); + if (sslHandler != null) { + if (!v.verify(future.getURI().getHost(), sslHandler.getEngine().getSession())) { + ConnectException exception = new ConnectException("HostnameVerifier exception."); + future.abort(exception); + throw exception; } } diff --git a/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java index e2bff473b1..bd0725c711 100644 --- a/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java +++ b/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java @@ -41,11 +41,13 @@ import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.Enumeration; +import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.fail; public abstract class HostnameVerifierTest extends AbstractBasicTest { @@ -219,9 +221,10 @@ public void negativeHostnameVerifierTest() throws Throwable { File file = new File(url.toURI()); try { - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); - } catch (ConnectException ex) { - assertEquals(ConnectException.class, ex.getClass()); + client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); } } @@ -236,15 +239,16 @@ public void remoteIDHostnameVerifierTest() throws Throwable { File file = new File(url.toURI()); try { - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); - } catch (ConnectException ex) { - assertEquals(ConnectException.class, ex.getClass()); + client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); } } @Test(groups = {"standalone", "default_provider"}) - public void remotePosHostnameVerifierTest() throws Throwable { - + public void remoteNegHostnameVerifierTest() throws Throwable { + // request is made to 127.0.0.1, but cert presented for localhost - this should fail final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext()).build()); ClassLoader cl = getClass().getClassLoader(); @@ -253,11 +257,28 @@ public void remotePosHostnameVerifierTest() throws Throwable { File file = new File(url.toURI()); try { - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); - } catch (ConnectException ex) { - assertEquals(ConnectException.class, ex.getClass()); + client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); } } + + @Test(groups = {"standalone", "default_provider"}) + public void remotePosHostnameVerifierTest() throws Throwable { + + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext()).build()); + + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + Response resp = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + } public static class PositiveHostVerifier implements HostnameVerifier { @@ -269,7 +290,7 @@ public boolean verify(String s, SSLSession sslSession) { public static class NegativeHostVerifier implements HostnameVerifier { public boolean verify(String s, SSLSession sslSession) { - return true; + return false; } } @@ -334,6 +355,4 @@ public void checkServerTrusted( } } }; - - } From b81fe77211c9cf64217f5491a3b8d9f9aa1b8433 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 9 May 2012 08:35:22 -0400 Subject: [PATCH 0193/2844] Bump Netty version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2b7c75d51..62957b8837 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ io.netty netty - 3.4.1.Final + 3.4.4.Final javax.servlet From cacd7266ea6c8e8059cbf529a7ec8e916d7f5145 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 9 May 2012 15:24:07 -0700 Subject: [PATCH 0194/2844] Trying to straighten out convoluted coalescing of byte arrays by Response implementations --- .../ning/http/client/AsyncHttpProvider.java | 4 +- .../http/client/HttpResponseBodyPart.java | 15 +++++ .../HttpResponseBodyPartsInputStream.java | 63 ------------------- .../java/com/ning/http/client/Response.java | 4 +- .../apache/ApacheAsyncHttpProvider.java | 4 +- .../providers/apache/ApacheResponse.java | 23 ++++--- .../apache/ApacheResponseBodyPart.java | 13 ++++ .../grizzly/GrizzlyAsyncHttpProvider.java | 4 +- .../providers/grizzly/GrizzlyResponse.java | 10 +-- .../grizzly/GrizzlyResponseBodyPart.java | 17 ++++- .../providers/jdk/JDKAsyncHttpProvider.java | 2 +- .../client/providers/jdk/JDKResponse.java | 18 ++---- .../providers/jdk/ResponseBodyPart.java | 12 ++++ .../netty/NettyAsyncHttpProvider.java | 6 +- .../client/providers/netty/NettyResponse.java | 20 +----- .../providers/netty/ResponseBodyPart.java | 23 +++++-- .../webdav/WebDavCompletionHandlerBase.java | 6 +- .../http/util/AsyncHttpProviderUtils.java | 57 +++++++++++------ 18 files changed, 152 insertions(+), 149 deletions(-) delete mode 100644 src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/src/main/java/com/ning/http/client/AsyncHttpProvider.java index 1689bc137e..039ffa4e97 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/AsyncHttpProvider.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.util.Collection; +import java.util.List; /** * Interface to be used when implementing custom asynchronous I/O HTTP client. @@ -48,6 +49,5 @@ public interface AsyncHttpProvider { */ public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, - Collection bodyParts); - + List bodyParts); } diff --git a/src/main/java/com/ning/http/client/HttpResponseBodyPart.java b/src/main/java/com/ning/http/client/HttpResponseBodyPart.java index ca73d4824b..63e98cc59c 100644 --- a/src/main/java/com/ning/http/client/HttpResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/HttpResponseBodyPart.java @@ -16,6 +16,7 @@ package com.ning.http.client; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.nio.ByteBuffer; @@ -29,6 +30,13 @@ public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider) { super(uri, provider); } + /** + * Return length of this part in bytes. + * + * @since 1.8.0 + */ + abstract public int length(); + /** * Return the response body's part bytes received. * @@ -36,6 +44,13 @@ public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider) { */ abstract public byte[] getBodyPartBytes(); + /** + * Method for accessing contents of this part via stream. + * + * @since 1.8.0 + */ + abstract public InputStream readBodyPartBytes(); + /** * Write the available bytes to the {@link java.io.OutputStream} * diff --git a/src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java b/src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java deleted file mode 100644 index 1f6667cd2b..0000000000 --- a/src/main/java/com/ning/http/client/HttpResponseBodyPartsInputStream.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package com.ning.http.client; - -import java.io.IOException; -import java.io.InputStream; - -/** - * An {@link InputStream} that reads all the elements in an array of {@link HttpResponseBodyPart}s. - */ -public class HttpResponseBodyPartsInputStream extends InputStream { - - private final HttpResponseBodyPart[] parts; - - private int currentPos = 0; - private int bytePos = -1; - private byte[] active; - private int available = 0; - - public HttpResponseBodyPartsInputStream(HttpResponseBodyPart[] parts) { - this.parts = parts; - active = parts[0].getBodyPartBytes(); - computeLength(parts); - } - - private void computeLength(HttpResponseBodyPart[] parts) { - if (available == 0) { - for (HttpResponseBodyPart p : parts) { - available += p.getBodyPartBytes().length; - } - } - } - - @Override - public int available() throws IOException { - return available; - } - - @Override - public int read() throws IOException { - if (++bytePos >= active.length) { - // No more bytes, so step to the next array. - if (++currentPos >= parts.length) { - return -1; - } - - bytePos = 0; - active = parts[currentPos].getBodyPartBytes(); - } - - return active[bytePos] & 0xFF; - } -} \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/Response.java b/src/main/java/com/ning/http/client/Response.java index 17da422110..54ddddf6bc 100644 --- a/src/main/java/com/ning/http/client/Response.java +++ b/src/main/java/com/ning/http/client/Response.java @@ -178,8 +178,8 @@ public interface Response { public static class ResponseBuilder { - private final Collection bodies = - Collections.synchronizedCollection(new ArrayList()); + private final List bodies = + Collections.synchronizedList(new ArrayList()); private HttpResponseStatus status; private HttpResponseHeaders headers; diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 78abf16415..1c98fb4e29 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -202,7 +202,7 @@ public ListenableFuture execute(Request request, AsyncHandler handler) } HttpMethodBase method = createMethod(httpClient, request); - ApacheResponseFuture f = new ApacheResponseFuture(handler, requestTimeout, request, method); + ApacheResponseFuture f = new ApacheResponseFuture(handler, requestTimeout, request, method); f.touch(); f.setInnerFuture(config.executorService().submit(new ApacheClientRunnable(request, handler, method, f, httpClient))); @@ -224,7 +224,7 @@ public void close() { } } - public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, Collection bodyParts) { + public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { return new ApacheResponse(status, headers, bodyParts); } diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index 9516f89ee4..f64620da3c 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -15,7 +15,6 @@ import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseBodyPartsInputStream; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Response; @@ -24,28 +23,28 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.SequenceInputStream; import java.net.MalformedURLException; import java.net.URI; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; - +import java.util.Vector; public class ApacheResponse implements Response { private final static String DEFAULT_CHARSET = "ISO-8859-1"; private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; private final URI uri; - private final Collection bodyParts; + private final List bodyParts; private final HttpResponseHeaders headers; private final HttpResponseStatus status; private final List cookies = new ArrayList(); public ApacheResponse(HttpResponseStatus status, HttpResponseHeaders headers, - Collection bodyParts) { + List bodyParts) { this.bodyParts = bodyParts; this.headers = headers; @@ -91,11 +90,17 @@ public String getResponseBody(String charset) throws IOException { /* @Override */ public InputStream getResponseBodyAsStream() throws IOException { - if (bodyParts.size() > 0) { - return new HttpResponseBodyPartsInputStream(bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()])); - } else { - return new ByteArrayInputStream("".getBytes()); + switch (bodyParts.size()) { + case 0: + return new ByteArrayInputStream(new byte[0]); + case 1: + return bodyParts.get(0).readBodyPartBytes(); + } + Vector streams = new Vector(bodyParts.size()); + for (HttpResponseBodyPart part : bodyParts) { + streams.add(part.readBodyPartBytes()); } + return new SequenceInputStream(streams.elements()); } /* @Override */ diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java index c66823baeb..de26208d12 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java @@ -15,7 +15,9 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.HttpResponseBodyPart; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.nio.ByteBuffer; @@ -40,10 +42,21 @@ public ApacheResponseBodyPart(URI uri, byte[] chunk, AsyncHttpProvider provider, * * @return the response body's part bytes received. */ + @Override public byte[] getBodyPartBytes() { return chunk; } + @Override + public InputStream readBodyPartBytes() { + return new ByteArrayInputStream(chunk); + } + + @Override + public int length() { + return chunk.length; + } + @Override public int writeTo(OutputStream outputStream) throws IOException { outputStream.write(chunk); diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 908c1f80f7..93a04e6d42 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -142,6 +142,7 @@ * @author The Grizzly Team * @since 1.7.0 */ +@SuppressWarnings("rawtypes") public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { private final static Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); @@ -270,7 +271,7 @@ public void close() { */ public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, - Collection bodyParts) { + List bodyParts) { return new GrizzlyResponse(status, headers, bodyParts); @@ -469,7 +470,6 @@ private void doDefaultTransportConfig() { } } - private CompletionHandler createWriteCompletionHandler(final GrizzlyResponseFuture future) { return new CompletionHandler() { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 8d803efff4..b0abdd0009 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -49,7 +49,7 @@ public class GrizzlyResponse implements Response { private final HttpResponseStatus status; private final HttpResponseHeaders headers; - private final Collection bodyParts; + private final List bodyParts; private final Buffer responseBody; private List cookies; @@ -60,7 +60,7 @@ public class GrizzlyResponse implements Response { public GrizzlyResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, - final Collection bodyParts) { + final List bodyParts) { this.status = status; this.headers = headers; @@ -170,7 +170,7 @@ public String getResponseBody() throws IOException { * {@inheritDoc} */ public byte[] getResponseBodyAsBytes() throws IOException { - + // !!! TODO: wrong, very wasteful return getResponseBody().getBytes(Charsets.DEFAULT_CHARACTER_ENCODING); } @@ -191,7 +191,7 @@ public URI getUri() throws MalformedURLException { */ public String getContentType() { - return headers.getHeaders().getFirstValue("Content-Type"); + return getHeader("Content-Type"); } @@ -328,7 +328,7 @@ private Charset getCharset(final String charset) { } - private boolean between(final int value, + private static boolean between(final int value, final int lowerBound, final int upperBound) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java index 4692cfe071..440a650b31 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java @@ -20,7 +20,9 @@ import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.http.HttpContent; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.nio.ByteBuffer; @@ -38,7 +40,7 @@ public class GrizzlyResponseBodyPart extends HttpResponseBodyPart { private final HttpContent content; - private final Connection connection; + private final Connection connection; private final AtomicReference contentBytes = new AtomicReference(); @@ -48,7 +50,7 @@ public class GrizzlyResponseBodyPart extends HttpResponseBodyPart { public GrizzlyResponseBodyPart(final HttpContent content, final URI uri, - final Connection connection, + final Connection connection, final AsyncHttpProvider provider) { super(uri, provider); this.content = content; @@ -65,7 +67,6 @@ public GrizzlyResponseBodyPart(final HttpContent content, */ @Override public byte[] getBodyPartBytes() { - byte[] bytes = contentBytes.get(); if (bytes != null) { return bytes; @@ -81,7 +82,17 @@ public byte[] getBodyPartBytes() { } + @Override + public InputStream readBodyPartBytes() { + return new ByteArrayInputStream(getBodyPartBytes()); + } + @Override + public int length() { + // this is ugly but... + return getBodyPartBytes().length; + } + /** * {@inheritDoc} */ diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 37c8af7748..510b794a1a 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -205,7 +205,7 @@ public void close() { isClose.set(true); } - public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, Collection bodyParts) { + public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { return new JDKResponse(status, headers, bodyParts); } diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index f1fd4d2ce1..0955b01aec 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -15,19 +15,16 @@ import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseBodyPartsInputStream; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Response; import com.ning.http.util.AsyncHttpProviderUtils; -import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; @@ -39,7 +36,7 @@ public class JDKResponse implements Response { private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; private final URI uri; - private final Collection bodyParts; + private final List bodyParts; private final HttpResponseHeaders headers; private final HttpResponseStatus status; private final List cookies = new ArrayList(); @@ -48,7 +45,7 @@ public class JDKResponse implements Response { public JDKResponse(HttpResponseStatus status, HttpResponseHeaders headers, - Collection bodyParts) { + List bodyParts) { this.bodyParts = bodyParts; this.headers = headers; @@ -92,21 +89,14 @@ public String getResponseBody(String charset) throws IOException { if (!contentComputed.get()) { content = AsyncHttpProviderUtils.contentToString(bodyParts, charset); + contentComputed.set(true); } return content; } /* @Override */ public InputStream getResponseBodyAsStream() throws IOException { - if (contentComputed.get()) { - return new ByteArrayInputStream(content.getBytes(DEFAULT_CHARSET)); - } - - if (bodyParts.size() > 0) { - return new HttpResponseBodyPartsInputStream(bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()])); - } else { - return new ByteArrayInputStream("".getBytes()); - } + return AsyncHttpProviderUtils.contentAsStream(bodyParts); } /* @Override */ diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java index 7fd42649b1..f745df343c 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java @@ -15,7 +15,9 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.HttpResponseBodyPart; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.nio.ByteBuffer; @@ -44,6 +46,16 @@ public byte[] getBodyPartBytes() { return chunk; } + @Override + public InputStream readBodyPartBytes() { + return new ByteArrayInputStream(chunk); + } + + @Override + public int length() { + return chunk.length; + } + @Override public int writeTo(OutputStream outputStream) throws IOException { outputStream.write(chunk); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index fa08b8995e..8595ac378d 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -515,7 +515,7 @@ public void operationComplete(ChannelFuture cf) { int delay = requestTimeout(config, future.getRequest().getPerRequestConfig()); if (delay != -1 && !future.isDone() && !future.isCancelled()) { ReaperFuture reaperFuture = new ReaperFuture(future); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, delay, TimeUnit.MILLISECONDS); + Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, delay, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); } @@ -846,7 +846,7 @@ public void close() { public Response prepareResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, - final Collection bodyParts) { + final List bodyParts) { return new NettyResponse(status, headers, bodyParts); } @@ -856,9 +856,11 @@ public ListenableFuture execute(Request request, final AsyncHandler as return doConnect(request, asyncHandler, null, true, executeConnectAsync, false); } + /* private void execute(final Request request, final NettyResponseFuture f, boolean useCache, boolean asyncConnect) throws IOException { doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, false); } + */ private void execute(final Request request, final NettyResponseFuture f, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, reclaimCache); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index 5af231d626..715f4bbfdf 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -22,16 +22,12 @@ import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Response; import com.ning.http.util.AsyncHttpProviderUtils; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBufferInputStream; -import org.jboss.netty.buffer.ChannelBuffers; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; @@ -44,14 +40,14 @@ public class NettyResponse implements Response { private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; private final URI uri; - private final Collection bodyParts; + private final List bodyParts; private final HttpResponseHeaders headers; private final HttpResponseStatus status; private final List cookies = new ArrayList(); public NettyResponse(HttpResponseStatus status, HttpResponseHeaders headers, - Collection bodyParts) { + List bodyParts) { this.status = status; this.headers = headers; @@ -96,17 +92,7 @@ public String getResponseBody(String charset) throws IOException { /* @Override */ public InputStream getResponseBodyAsStream() throws IOException { - ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); - for (HttpResponseBodyPart bp : bodyParts) { - // Ugly. TODO - // (1) We must remove the downcast, - // (2) we need a CompositeByteArrayInputStream to avoid - // copying the bytes. - if (bp.getClass().isAssignableFrom(ResponseBodyPart.class)) { - buf.writeBytes(bp.getBodyPartBytes()); - } - } - return new ChannelBufferInputStream(buf); + return AsyncHttpProviderUtils.contentAsStream(bodyParts); } /* @Override */ diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java index 8279c76d77..dc2e370e45 100644 --- a/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java @@ -21,7 +21,9 @@ import org.jboss.netty.handler.codec.http.HttpChunk; import org.jboss.netty.handler.codec.http.HttpResponse; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.net.URI; import java.nio.ByteBuffer; @@ -34,7 +36,7 @@ public class ResponseBodyPart extends HttpResponseBodyPart { private final HttpChunk chunk; private final HttpResponse response; - private final AtomicReference bytes = new AtomicReference(null); + private final AtomicReference bytes = new AtomicReference(null); private final boolean isLast; private boolean closeConnection = false; @@ -58,12 +60,12 @@ public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provid * @return the response body's part bytes received. */ public byte[] getBodyPartBytes() { - - if (bytes.get() != null) { - return bytes.get(); + byte[] bp = bytes.get(); + if (bp != null) { + return bp; } - ChannelBuffer b = chunk != null ? chunk.getContent() : response.getContent(); + ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); int read = b.readableBytes(); int index = b.readerIndex(); @@ -74,6 +76,17 @@ public byte[] getBodyPartBytes() { return bytes.get(); } + @Override + public InputStream readBodyPartBytes() { + return new ByteArrayInputStream(getBodyPartBytes()); + } + + @Override + public int length() { + // ugly... + return getBodyPartBytes().length; + } + public int writeTo(OutputStream outputStream) throws IOException { ChannelBuffer b = chunk != null ? chunk.getContent() : response.getContent(); int read = b.readableBytes(); diff --git a/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java b/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java index d0a483db6d..2d025825e6 100644 --- a/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java +++ b/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java @@ -32,8 +32,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; +import java.util.List; /** * Simple {@link AsyncHandler} that add support for WebDav's response manipulation. @@ -43,8 +43,8 @@ public abstract class WebDavCompletionHandlerBase implements AsyncHandler { private final Logger logger = LoggerFactory.getLogger(AsyncCompletionHandlerBase.class); - private final Collection bodies = - Collections.synchronizedCollection(new ArrayList()); + private final List bodies = + Collections.synchronizedList(new ArrayList()); private HttpResponseStatus status; private HttpResponseHeaders headers; diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index a7c5281159..a89adcec27 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -24,16 +24,20 @@ import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.multipart.PartSource; +import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import java.io.SequenceInputStream; import java.io.UnsupportedEncodingException; import java.net.URI; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Locale; +import java.util.Vector; /** * {@link com.ning.http.client.AsyncHttpProvider} common utilities. @@ -181,31 +185,46 @@ public final static String getAuthority(URI uri) { return url; } - public final static String contentToString(Collection bodyParts, String charset) throws UnsupportedEncodingException { + public final static String contentToString(List bodyParts, String charset) throws UnsupportedEncodingException { return new String(contentToByte(bodyParts), charset); } - public final static byte[] contentToByte(Collection bodyParts) throws UnsupportedEncodingException { - if (bodyParts.size() == 1) { - return bodyParts.iterator().next().getBodyPartBytes(); - - } else { - int size = 0; - for (HttpResponseBodyPart body : bodyParts) { - size += body.getBodyPartBytes().length; - } - byte[] bytes = new byte[size]; - int offset = 0; - for (HttpResponseBodyPart body : bodyParts) { - byte[] bodyBytes = body.getBodyPartBytes(); - System.arraycopy(bodyBytes, 0, bytes, offset, bodyBytes.length); - offset += bodyBytes.length; - } - - return bytes; + public final static byte[] contentToByte(List bodyParts) throws UnsupportedEncodingException { + final int partCount = bodyParts.size(); + if (partCount == 1) { + return bodyParts.get(0).getBodyPartBytes(); + } + int size = 0; + ArrayList chunks = new ArrayList(partCount); + for (HttpResponseBodyPart part : bodyParts) { + byte[] chunk = part.getBodyPartBytes(); + size += chunk.length; + chunks.add(chunk); } + byte[] bytes = new byte[size]; + int offset = 0; + for (byte[] chunk : chunks) { + System.arraycopy(chunk, 0, bytes, offset, chunk.length); + offset += chunk.length; + } + return bytes; } + public final static InputStream contentAsStream(List bodyParts) + { + switch (bodyParts.size()) { + case 0: + return new ByteArrayInputStream(new byte[0]); + case 1: + return bodyParts.get(0).readBodyPartBytes(); + } + Vector streams = new Vector(bodyParts.size()); + for (HttpResponseBodyPart part : bodyParts) { + streams.add(part.readBodyPartBytes()); + } + return new SequenceInputStream(streams.elements()); + } + public final static String getHost(URI uri) { String host = uri.getHost(); if (host == null) { From 64cdeb2b263e717486f3858c6ffcf1b33511e6a3 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 9 May 2012 18:55:32 -0400 Subject: [PATCH 0195/2844] Incremental fix for #102 [websocket] Support redirect --- .../netty/NettyAsyncHttpProvider.java | 144 ++++++++++-------- 1 file changed, 80 insertions(+), 64 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index fa08b8995e..28f66ae394 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1969,6 +1969,81 @@ private static final boolean validateWebSocketRequest(Request request, AsyncHand return true; } + private boolean redirect(Request request, + NettyResponseFuture future, + HttpResponse response, + final ChannelHandlerContext ctx) throws Exception { + + int statusCode = response.getStatus().getCode(); + boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); + if (redirectEnabled && (statusCode == 302 + || statusCode == 301 + || statusCode == 303 + || statusCode == 307)) { + + if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { + // We must allow 401 handling again. + future.getAndSetAuth(false); + + String location = response.getHeader(HttpHeaders.Names.LOCATION); + URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); + boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); + if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { + final RequestBuilder nBuilder = stripQueryString ? + new RequestBuilder(future.getRequest()).setQueryParameters(null) + : new RequestBuilder(future.getRequest()); + + if (!(statusCode < 302 || statusCode > 303) + && !(statusCode == 302 + && config.isStrict302Handling())) { + nBuilder.setMethod("GET"); + } + final URI initialConnectionUri = future.getURI(); + final boolean initialConnectionKeepAlive = future.getKeepAlive(); + future.setURI(uri); + String newUrl = uri.toString(); + if (future.getNettyRequest().getUri().startsWith(WEBSOCKET)) { + newUrl = newUrl.replace(HTTP, WEBSOCKET); + } + + log.debug("Redirecting to {}", newUrl); + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + AsyncCallable ac = new AsyncCallable(future) { + public Object call() throws Exception { + if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && + connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { + return null; + } + finishChannel(ctx); + return null; + } + }; + + if (response.isChunked()) { + // We must make sure there is no bytes left before executing the next request. + ctx.setAttachment(ac); + } else { + ac.call(); + } + nextRequest(nBuilder.setUrl(newUrl).build(), future); + return true; + } + } else { + throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); + } + } + return false; + } + private final class HttpProtocol implements Protocol { // @Override public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { @@ -2145,69 +2220,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == 302 - || statusCode == 301 - || statusCode == 303 - || statusCode == 307)) { - - if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { - // We must allow 401 handling again. - future.getAndSetAuth(false); - - String location = response.getHeader(HttpHeaders.Names.LOCATION); - URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); - boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); - if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { - final RequestBuilder nBuilder = stripQueryString ? - new RequestBuilder(future.getRequest()).setQueryParameters(null) - : new RequestBuilder(future.getRequest()); - - if (!(statusCode < 302 || statusCode > 303) - && !(statusCode == 302 - && config.isStrict302Handling())) { - nBuilder.setMethod("GET"); - } - final URI initialConnectionUri = future.getURI(); - final boolean initialConnectionKeepAlive = future.getKeepAlive(); - future.setURI(uri); - final String newUrl = uri.toString(); - - log.debug("Redirecting to {}", newUrl); - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); - } - - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); - } - - AsyncCallable ac = new AsyncCallable(future) { - public Object call() throws Exception { - if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && - connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { - return null; - } - finishChannel(ctx); - return null; - } - }; - - if (response.isChunked()) { - // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); - } else { - ac.call(); - } - nextRequest(nBuilder.setUrl(newUrl).build(), future); - return; - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } + if (redirect(request, future, response, ctx)) return; if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { finishUpdate(future, ctx, response.isChunked()); @@ -2300,7 +2313,7 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { } } catch (FilterException efe) { abort(future, efe); - } // @Override + } } @@ -2313,6 +2326,9 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { return; } + future.setHttpResponse(response); + if (redirect(request, future, response, ctx)) return; + final org.jboss.netty.handler.codec.http.HttpResponseStatus status = new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); From 4b2d2d53365cebb5b21102cbe9ea8199d3b82523 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Thu, 10 May 2012 11:40:34 -0700 Subject: [PATCH 0196/2844] Second part of cleanup, reducing code duplication --- .../java/com/ning/http/client/Response.java | 1 - .../http/client/providers/ResponseBase.java | 105 ++++++++++++++ .../providers/apache/ApacheResponse.java | 122 +--------------- .../providers/grizzly/GrizzlyResponse.java | 134 ++--------------- .../client/providers/jdk/JDKResponse.java | 136 +----------------- .../client/providers/netty/NettyResponse.java | 124 +--------------- .../http/util/AsyncHttpProviderUtils.java | 43 +++++- .../http/client/async/ZeroCopyFileTest.java | 4 +- 8 files changed, 171 insertions(+), 498 deletions(-) create mode 100644 src/main/java/com/ning/http/client/providers/ResponseBase.java diff --git a/src/main/java/com/ning/http/client/Response.java b/src/main/java/com/ning/http/client/Response.java index 54ddddf6bc..e245247cd3 100644 --- a/src/main/java/com/ning/http/client/Response.java +++ b/src/main/java/com/ning/http/client/Response.java @@ -21,7 +21,6 @@ import java.net.MalformedURLException; import java.net.URI; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/ning/http/client/providers/ResponseBase.java b/src/main/java/com/ning/http/client/providers/ResponseBase.java new file mode 100644 index 0000000000..72cca2d2cd --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -0,0 +1,105 @@ +package com.ning.http.client.providers; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.util.List; + +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.Response; +import com.ning.http.util.AsyncHttpProviderUtils; + +public abstract class ResponseBase implements Response +{ + protected final static String DEFAULT_CHARSET = "ISO-8859-1"; + protected final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; + + protected final List bodyParts; + protected final HttpResponseHeaders headers; + protected final HttpResponseStatus status; + + protected ResponseBase(HttpResponseStatus status, + HttpResponseHeaders headers, + List bodyParts) + { + this.bodyParts = bodyParts; + this.headers = headers; + this.status = status; + } + + /* @Override */ + public final int getStatusCode() { + return status.getStatusCode(); + } + + /* @Override */ + public final String getStatusText() { + return status.getStatusText(); + } + + + /* @Override */ + public final URI getUri() /*throws MalformedURLException*/ { + return status.getUrl(); + } + + /* @Override */ + public final String getContentType() { + return getHeader("Content-Type"); + } + + /* @Override */ + public final String getHeader(String name) { + return getHeaders().getFirstValue(name); + } + + /* @Override */ + public final List getHeaders(String name) { + return getHeaders().get(name); + } + + /* @Override */ + public final FluentCaseInsensitiveStringsMap getHeaders() { + if (headers == null) { + throw new IllegalStateException(HEADERS_NOT_COMPUTED); + } + return headers.getHeaders(); + } + + /* @Override */ + public final boolean isRedirected() { + return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); + } + + /* @Override */ + public byte[] getResponseBodyAsBytes() throws IOException { + return AsyncHttpProviderUtils.contentToBytes(bodyParts); + } + + /* @Override */ + public String getResponseBody() throws IOException { + return getResponseBody(DEFAULT_CHARSET); + } + + public String getResponseBody(String charset) throws IOException { + String contentType = getContentType(); + if (contentType != null && charset == null) { + charset = AsyncHttpProviderUtils.parseCharset(contentType); + } + + if (charset == null) { + charset = DEFAULT_CHARSET; + } + + return AsyncHttpProviderUtils.contentToString(bodyParts, charset); + } + + /* @Override */ + public InputStream getResponseBodyAsStream() throws IOException { + return AsyncHttpProviderUtils.contentAsStream(bodyParts); + } + +} diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index f64620da3c..2589cbfff2 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -13,94 +13,27 @@ package com.ning.http.client.providers.apache; import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +import com.ning.http.client.providers.ResponseBase; import com.ning.http.util.AsyncHttpProviderUtils; -import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.SequenceInputStream; -import java.net.MalformedURLException; -import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.Vector; -public class ApacheResponse implements Response { - private final static String DEFAULT_CHARSET = "ISO-8859-1"; +public class ApacheResponse extends ResponseBase { private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; - private final URI uri; - private final List bodyParts; - private final HttpResponseHeaders headers; - private final HttpResponseStatus status; private final List cookies = new ArrayList(); public ApacheResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { - - this.bodyParts = bodyParts; - this.headers = headers; - this.status = status; - - uri = this.status.getUrl(); - } - - /* @Override */ - - public int getStatusCode() { - return status.getStatusCode(); - } - - /* @Override */ - - public String getStatusText() { - return status.getStatusText(); - } - - /* @Override */ - public byte[] getResponseBodyAsBytes() throws IOException { - return AsyncHttpProviderUtils.contentToByte(bodyParts); - } - - /* @Override */ - public String getResponseBody() throws IOException { - return getResponseBody(DEFAULT_CHARSET); - } - - public String getResponseBody(String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - - return AsyncHttpProviderUtils.contentToString(bodyParts, charset); - } - - /* @Override */ - public InputStream getResponseBodyAsStream() throws IOException { - switch (bodyParts.size()) { - case 0: - return new ByteArrayInputStream(new byte[0]); - case 1: - return bodyParts.get(0).readBodyPartBytes(); - } - Vector streams = new Vector(bodyParts.size()); - for (HttpResponseBodyPart part : bodyParts) { - streams.add(part.readBodyPartBytes()); - } - return new SequenceInputStream(streams.elements()); + super(status, headers, bodyParts); } /* @Override */ @@ -126,55 +59,6 @@ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOExc } /* @Override */ - - public URI getUri() throws MalformedURLException { - return uri; - } - - /* @Override */ - - public String getContentType() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders().getFirstValue("Content-Type"); - } - - /* @Override */ - - public String getHeader(String name) { - if (headers == null) { - throw new IllegalStateException(); - } - return headers.getHeaders().getFirstValue(name); - } - - /* @Override */ - - public List getHeaders(String name) { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders().get(name); - } - - /* @Override */ - - public FluentCaseInsensitiveStringsMap getHeaders() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders(); - } - - /* @Override */ - - public boolean isRedirected() { - return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); - } - - /* @Override */ - public List getCookies() { if (headers == null) { throw new IllegalStateException(HEADERS_NOT_COMPUTED); diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index b0abdd0009..89a24e9b78 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -14,11 +14,10 @@ package com.ning.http.client.providers.grizzly; import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +import com.ning.http.client.providers.ResponseBase; import com.ning.http.util.AsyncHttpProviderUtils; import org.glassfish.grizzly.Buffer; @@ -30,11 +29,8 @@ import java.io.IOException; import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; import java.nio.charset.Charset; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; @@ -45,11 +41,7 @@ * @author The Grizzly Team * @since 1.7.0 */ -public class GrizzlyResponse implements Response { - - private final HttpResponseStatus status; - private final HttpResponseHeaders headers; - private final List bodyParts; +public class GrizzlyResponse extends ResponseBase { private final Buffer responseBody; private List cookies; @@ -61,58 +53,31 @@ public class GrizzlyResponse implements Response { public GrizzlyResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, final List bodyParts) { - - this.status = status; - this.headers = headers; - this.bodyParts = bodyParts; + super(status, headers, bodyParts); if (bodyParts != null && !bodyParts.isEmpty()) { - HttpResponseBodyPart[] parts = - bodyParts.toArray(new HttpResponseBodyPart[bodyParts.size()]); - if (parts.length == 1) { - responseBody = ((GrizzlyResponseBodyPart) parts[0]).getBodyBuffer(); + if (bodyParts.size() == 1) { + responseBody = ((GrizzlyResponseBodyPart) bodyParts.get(0)).getBodyBuffer(); } else { - final Buffer firstBuffer = ((GrizzlyResponseBodyPart) parts[0]).getBodyBuffer(); - final MemoryManager mm = MemoryManager.DEFAULT_MEMORY_MANAGER; + final Buffer firstBuffer = ((GrizzlyResponseBodyPart) bodyParts.get(0)).getBodyBuffer(); + final MemoryManager mm = MemoryManager.DEFAULT_MEMORY_MANAGER; Buffer constructedBodyBuffer = firstBuffer; - for (int i = 1, len = parts.length; i < len; i++) { + for (int i = 1, len = bodyParts.size(); i < len; i++) { constructedBodyBuffer = Buffers.appendBuffers(mm, constructedBodyBuffer, - ((GrizzlyResponseBodyPart) parts[i]).getBodyBuffer()); + ((GrizzlyResponseBodyPart) bodyParts.get(i)).getBodyBuffer()); } responseBody = constructedBodyBuffer; } } else { responseBody = Buffers.EMPTY_BUFFER; } - } // --------------------------------------------------- Methods from Response - - /** - * {@inheritDoc} - */ - public int getStatusCode() { - - return status.getStatusCode(); - - } - - - /** - * {@inheritDoc} - */ - public String getStatusText() { - - return status.getStatusText(); - - } - - /** * {@inheritDoc} */ @@ -165,77 +130,6 @@ public String getResponseBody() throws IOException { } - - /** - * {@inheritDoc} - */ - public byte[] getResponseBodyAsBytes() throws IOException { - // !!! TODO: wrong, very wasteful - return getResponseBody().getBytes(Charsets.DEFAULT_CHARACTER_ENCODING); - - } - - - /** - * {@inheritDoc} - */ - public URI getUri() throws MalformedURLException { - - return status.getUrl(); - - } - - - /** - * {@inheritDoc} - */ - public String getContentType() { - - return getHeader("Content-Type"); - - } - - - /** - * {@inheritDoc} - */ - public String getHeader(String name) { - - return headers.getHeaders().getFirstValue(name); - - } - - - /** - * {@inheritDoc} - */ - public List getHeaders(String name) { - - return headers.getHeaders().get(name); - - } - - - /** - * {@inheritDoc} - */ - public FluentCaseInsensitiveStringsMap getHeaders() { - - return headers.getHeaders(); - - } - - - /** - * {@inheritDoc} - */ - public boolean isRedirected() { - - return between(status.getStatusCode(), 300, 399); - - } - - /** * {@inheritDoc} */ @@ -326,14 +220,4 @@ private Charset getCharset(final String charset) { return Charsets.lookupCharset(charsetLocal); } - - - private static boolean between(final int value, - final int lowerBound, - final int upperBound) { - - return (value >= lowerBound && value <= upperBound); - - } - } diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index 0955b01aec..3475b6184f 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -17,86 +17,22 @@ import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +import com.ning.http.client.providers.ResponseBase; import com.ning.http.util.AsyncHttpProviderUtils; import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; - -public class JDKResponse implements Response { - private final static String DEFAULT_CHARSET = "ISO-8859-1"; - private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; - - private final URI uri; - private final List bodyParts; - private final HttpResponseHeaders headers; - private final HttpResponseStatus status; +public class JDKResponse extends ResponseBase { private final List cookies = new ArrayList(); - private AtomicBoolean contentComputed = new AtomicBoolean(false); - private String content; public JDKResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { - - this.bodyParts = bodyParts; - this.headers = headers; - this.status = status; - - uri = this.status.getUrl(); - } - - /* @Override */ - - public int getStatusCode() { - return status.getStatusCode(); - } - - /* @Override */ - - public String getStatusText() { - return status.getStatusText(); - } - - /* @Override */ - - public String getResponseBody() throws IOException { - return getResponseBody(DEFAULT_CHARSET); - } - - /* @Override */ - public byte[] getResponseBodyAsBytes() throws IOException { - return AsyncHttpProviderUtils.contentToByte(bodyParts); - } - - public String getResponseBody(String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - - if (!contentComputed.get()) { - content = AsyncHttpProviderUtils.contentToString(bodyParts, charset); - contentComputed.set(true); - } - return content; - } - - /* @Override */ - public InputStream getResponseBodyAsStream() throws IOException { - return AsyncHttpProviderUtils.contentAsStream(bodyParts); + super(status, headers, bodyParts); } /* @Override */ @@ -106,72 +42,12 @@ public String getResponseBodyExcerpt(int maxLength) throws IOException { } public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - - if (!contentComputed.get()) { - content = AsyncHttpProviderUtils.contentToString(bodyParts, charset == null ? DEFAULT_CHARSET : charset); - } - - return content.length() <= maxLength ? content : content.substring(0, maxLength); + // should be fine; except that it may split multi-byte chars (last char may become '?') + byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); + return new String(b, charset); } /* @Override */ - - public URI getUri() throws MalformedURLException { - return uri; - } - - /* @Override */ - - public String getContentType() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders().getFirstValue("Content-Type"); - } - - /* @Override */ - - public String getHeader(String name) { - if (headers == null) { - throw new IllegalStateException(); - } - return headers.getHeaders().getFirstValue(name); - } - - /* @Override */ - - public List getHeaders(String name) { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders().get(name); - } - - /* @Override */ - - public FluentCaseInsensitiveStringsMap getHeaders() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders(); - } - - /* @Override */ - - public boolean isRedirected() { - return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); - } - - /* @Override */ - public List getCookies() { if (headers == null) { throw new IllegalStateException(HEADERS_NOT_COMPUTED); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index 715f4bbfdf..348fe60279 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -16,17 +16,13 @@ package com.ning.http.client.providers.netty; import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +import com.ning.http.client.providers.ResponseBase; import com.ning.http.util.AsyncHttpProviderUtils; import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -35,132 +31,24 @@ /** * Wrapper around the {@link com.ning.http.client.Response} API. */ -public class NettyResponse implements Response { - private final static String DEFAULT_CHARSET = "ISO-8859-1"; - private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; - - private final URI uri; - private final List bodyParts; - private final HttpResponseHeaders headers; - private final HttpResponseStatus status; +public class NettyResponse extends ResponseBase { private final List cookies = new ArrayList(); public NettyResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { - - this.status = status; - this.headers = headers; - this.bodyParts = bodyParts; - uri = status.getUrl(); + super(status, headers, bodyParts); } /* @Override */ - - public int getStatusCode() { - return status.getStatusCode(); - } - - /* @Override */ - - public String getStatusText() { - return status.getStatusText(); - } - - /* @Override */ - public byte[] getResponseBodyAsBytes() throws IOException { - return AsyncHttpProviderUtils.contentToByte(bodyParts); - } - - /* @Override */ - public String getResponseBody() throws IOException { - return getResponseBody(null); - } - - public String getResponseBody(String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - - return AsyncHttpProviderUtils.contentToString(bodyParts, charset); - } - - /* @Override */ - public InputStream getResponseBodyAsStream() throws IOException { - return AsyncHttpProviderUtils.contentAsStream(bodyParts); - } - - /* @Override */ - public String getResponseBodyExcerpt(int maxLength) throws IOException { return getResponseBodyExcerpt(maxLength, null); } public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - - String response = AsyncHttpProviderUtils.contentToString(bodyParts, charset); - return response.length() <= maxLength ? response : response.substring(0, maxLength); - } - - /* @Override */ - - public URI getUri() throws MalformedURLException { - return uri; - } - - /* @Override */ - - public String getContentType() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders().getFirstValue("Content-Type"); - } - - /* @Override */ - - public String getHeader(String name) { - if (headers == null) { - throw new IllegalStateException(); - } - return headers.getHeaders().getFirstValue(name); - } - - /* @Override */ - - public List getHeaders(String name) { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders().get(name); - } - - /* @Override */ - - public FluentCaseInsensitiveStringsMap getHeaders() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders(); - } - - /* @Override */ - - public boolean isRedirected() { - return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); + // should be fine; except that it may split multi-byte chars (last char may become '?') + byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); + return new String(b, charset); } /* @Override */ diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index a89adcec27..44242e3306 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -45,6 +45,7 @@ * The cookies's handling code is from the Netty framework. */ public class AsyncHttpProviderUtils { + private final static byte[] NO_BYTES = new byte[0]; public final static String DEFAULT_CHARSET = "ISO-8859-1"; @@ -186,11 +187,14 @@ public final static String getAuthority(URI uri) { } public final static String contentToString(List bodyParts, String charset) throws UnsupportedEncodingException { - return new String(contentToByte(bodyParts), charset); + return new String(contentToBytes(bodyParts), charset); } - public final static byte[] contentToByte(List bodyParts) throws UnsupportedEncodingException { + public final static byte[] contentToBytes(List bodyParts) throws UnsupportedEncodingException { final int partCount = bodyParts.size(); + if (partCount == 0) { + return NO_BYTES; + } if (partCount == 1) { return bodyParts.get(0).getBodyPartBytes(); } @@ -210,11 +214,44 @@ public final static byte[] contentToByte(List bodyParts) t return bytes; } + public final static byte[] contentToBytes(List bodyParts, int maxLen) throws UnsupportedEncodingException { + final int partCount = bodyParts.size(); + if (partCount == 0) { + return NO_BYTES; + } + if (partCount == 1) { + byte[] chunk = bodyParts.get(0).getBodyPartBytes(); + if (chunk.length <= maxLen) { + return chunk; + } + byte[] result = new byte[maxLen]; + System.arraycopy(chunk, 0, result, 0, maxLen); + return result; + } + int size = 0; + byte[] result = new byte[maxLen]; + for (HttpResponseBodyPart part : bodyParts) { + byte[] chunk = part.getBodyPartBytes(); + int amount = Math.min(maxLen-size, chunk.length); + System.arraycopy(chunk, 0, result, size, amount); + size += amount; + if (size == maxLen) { + return result; + } + } + if (size < maxLen) { + byte[] old = result; + result = new byte[old.length]; + System.arraycopy(old, 0, result, 0, old.length); + } + return result; + } + public final static InputStream contentAsStream(List bodyParts) { switch (bodyParts.size()) { case 0: - return new ByteArrayInputStream(new byte[0]); + return new ByteArrayInputStream(NO_BYTES); case 1: return bodyParts.get(0).readBodyPartBytes(); } diff --git a/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java index 64efdb4c29..987e9d6c93 100644 --- a/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java +++ b/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java @@ -78,7 +78,7 @@ public void zeroCopyPostTest() throws IOException, ExecutionException, TimeoutEx final AtomicBoolean headerSent = new AtomicBoolean(false); final AtomicBoolean operationCompleted = new AtomicBoolean(false); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncCompletionHandler() { + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncCompletionHandler() { public STATE onHeaderWriteCompleted() { headerSent.set(true); @@ -91,7 +91,7 @@ public STATE onContentWriteCompleted() { } @Override - public Object onCompleted(Response response) throws Exception { + public Response onCompleted(Response response) throws Exception { return response; } }); From 269481802b1f0497315461a58be635ac8c630a63 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 10 May 2012 15:04:39 -0400 Subject: [PATCH 0197/2844] Fix wrong logic for redirecting websocket --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 39d45ae153..402c47bab1 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2004,7 +2004,7 @@ private boolean redirect(Request request, final boolean initialConnectionKeepAlive = future.getKeepAlive(); future.setURI(uri); String newUrl = uri.toString(); - if (future.getNettyRequest().getUri().startsWith(WEBSOCKET)) { + if (request.getUrl().startsWith(WEBSOCKET)) { newUrl = newUrl.replace(HTTP, WEBSOCKET); } From e113cef3bea75a8e61b0ecfda9fbdd88679c9a33 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 10 May 2012 11:06:14 -0700 Subject: [PATCH 0198/2844] Added test for #102. --- .../http/client/websocket/RedirectTest.java | 121 ++++++++++++++++++ .../client/websocket/TextMessageTest.java | 2 +- .../grizzly/GrizzlyRedirectTest.java | 30 +++++ .../websocket/netty/NettyRedirectTest.java | 27 ++++ 4 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/ning/http/client/websocket/RedirectTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java diff --git a/src/test/java/com/ning/http/client/websocket/RedirectTest.java b/src/test/java/com/ning/http/client/websocket/RedirectTest.java new file mode 100644 index 0000000000..97921a2dce --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/RedirectTest.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.websocket; + + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +import static org.testng.Assert.assertEquals; + +public abstract class RedirectTest extends AbstractBasicTest { + + protected int port2; + + // ------------------------------------------ Methods from AbstractBasicTest + + @BeforeClass + @Override + public void setUpGlobal() throws Exception { + port1 = findFreePort(); + + _connector = new SelectChannelConnector(); + _connector.setPort(port1); + + addConnector(_connector); + WebSocketHandler _wsHandler = getWebSocketHandler(); + + setHandler(_wsHandler); + + port2 = findFreePort(); + final SelectChannelConnector connector2 = new SelectChannelConnector(); + connector2.setPort(port2); + addConnector(connector2); + setHandler(new AbstractHandler() { + @Override + public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { + httpServletResponse.sendRedirect(getTargetUrl()); + } + }); + + start(); + log.info("Local HTTP server started successfully"); + } + + @Override + public WebSocketHandler getWebSocketHandler() { + return new WebSocketHandler() { + @Override + public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { + return new TextMessageTest.EchoTextWebSocket(); + } + }; + } + + // ------------------------------------------------------------ Test Methods + + @Test(timeOut = 60000) + public void testRedirectToWSResource() throws Exception { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + + latch.await(); + assertEquals(text.get(), "OnOpen"); + websocket.close(); + } + + + // --------------------------------------------------------- Private Methods + + + private String getRedirectURL() { + return String.format("ws://127.0.0.1:%d/", port2); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 4a8d409dbc..2b1b154770 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -27,7 +27,7 @@ public abstract class TextMessageTest extends AbstractBasicTest { - private final class EchoTextWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnTextMessage { + public static final class EchoTextWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnTextMessage { private Connection connection; diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java new file mode 100644 index 0000000000..2cdda3be98 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.websocket.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.websocket.RedirectTest; + +public class GrizzlyRedirectTest extends RedirectTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java new file mode 100644 index 0000000000..38963eb20c --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.websocket.RedirectTest; + +public class NettyRedirectTest extends RedirectTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } + +} From cda8924b0dbc9e06a0df4a54ca4b3f7c80202fe0 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 10 May 2012 12:18:29 -0700 Subject: [PATCH 0199/2844] Grizzly side of fix for #102. --- .../http/util/AsyncHttpProviderUtils.java | 7 +++-- .../http/client/websocket/RedirectTest.java | 27 ++++++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 44242e3306..f78a3cea9b 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -277,9 +277,12 @@ public final static URI getRedirectUri(URI uri, String location) { String scheme = newUri.getScheme(); - if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https")) { + if (scheme == null || !scheme.equalsIgnoreCase("http") + && !scheme.equalsIgnoreCase("https") + && !scheme.equals("ws") + && !scheme.equals("wss")) { throw new IllegalArgumentException("The URI scheme, of the URI " + newUri - + ", must be equal (ignoring case) to 'http' or 'https'"); + + ", must be equal (ignoring case) to 'ws, 'wss', 'http', or 'https'"); } return newUri; diff --git a/src/test/java/com/ning/http/client/websocket/RedirectTest.java b/src/test/java/com/ning/http/client/websocket/RedirectTest.java index 97921a2dce..25febcf53f 100644 --- a/src/test/java/com/ning/http/client/websocket/RedirectTest.java +++ b/src/test/java/com/ning/http/client/websocket/RedirectTest.java @@ -20,6 +20,7 @@ import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -48,20 +49,26 @@ public void setUpGlobal() throws Exception { _connector.setPort(port1); addConnector(_connector); - WebSocketHandler _wsHandler = getWebSocketHandler(); - setHandler(_wsHandler); + + port2 = findFreePort(); final SelectChannelConnector connector2 = new SelectChannelConnector(); connector2.setPort(port2); addConnector(connector2); - setHandler(new AbstractHandler() { - @Override - public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { - httpServletResponse.sendRedirect(getTargetUrl()); - } - }); + WebSocketHandler _wsHandler = getWebSocketHandler(); + HandlerList list = new HandlerList(); + list.addHandler(new AbstractHandler() { + @Override + public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { + if (request.getLocalPort() == port2) { + httpServletResponse.sendRedirect(getTargetUrl()); + } + } + }); + list.addHandler(_wsHandler); + setHandler(list); start(); log.info("Local HTTP server started successfully"); @@ -81,11 +88,11 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque @Test(timeOut = 60000) public void testRedirectToWSResource() throws Exception { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()) + WebSocket websocket = c.prepareGet(getRedirectURL()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override From 55ece6d2d6e7bf71cab33536a3b7ddce9b04eb07 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 10 May 2012 13:42:57 -0700 Subject: [PATCH 0200/2844] Summary of changes: - Slight modification of grizzly response refactoring. - return netty tests to running status. That said, build still fails due to clirr. --- .../http/client/providers/ResponseBase.java | 14 ++++++++++++++ .../providers/grizzly/GrizzlyResponse.java | 18 ++++++++++++++++-- .../grizzly/GrizzlyResponseBodyPart.java | 11 +++++------ .../client/providers/netty/NettyResponse.java | 3 +++ 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/ResponseBase.java b/src/main/java/com/ning/http/client/providers/ResponseBase.java index 72cca2d2cd..8457c240dd 100644 --- a/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -3,6 +3,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.nio.charset.Charset; import java.util.List; import com.ning.http.client.FluentCaseInsensitiveStringsMap; @@ -102,4 +103,17 @@ public InputStream getResponseBodyAsStream() throws IOException { return AsyncHttpProviderUtils.contentAsStream(bodyParts); } + protected String calculateCharset() { + String charset = null; + String contentType = getContentType(); + if (contentType != null) { + charset = AsyncHttpProviderUtils.parseCharset(contentType); + } + + if (charset == null) { + charset = DEFAULT_CHARSET; + } + return charset; + } + } diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 89a24e9b78..e9ba15fbb6 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -92,7 +92,9 @@ public InputStream getResponseBodyAsStream() throws IOException { * {@inheritDoc} */ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - + if (charset == null) { + charset = calculateCharset(); + } final int len = Math.min(responseBody.remaining(), maxLength); final int pos = responseBody.position(); return responseBody.toStringContent(getCharset(charset), pos, len + pos); @@ -110,12 +112,24 @@ public String getResponseBody(String charset) throws IOException { } + /** + * {@inheritDoc} + */ + @Override + public byte[] getResponseBodyAsBytes() throws IOException { + final byte[] responseBodyBytes = new byte[responseBody.remaining()]; + final int origPos = responseBody.position(); + responseBody.get(responseBodyBytes); + responseBody.position(origPos); + return responseBodyBytes; + } + + /** * {@inheritDoc} */ public String getResponseBodyExcerpt(int maxLength) throws IOException { - // TODO FIX NULL return getResponseBodyExcerpt(maxLength, null); } diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java index 440a650b31..02c9ec0a83 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java @@ -19,6 +19,7 @@ import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.utils.BufferInputStream; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -75,7 +76,6 @@ public byte[] getBodyPartBytes() { final int origPos = b.position(); bytes = new byte[b.remaining()]; b.get(bytes); - b.flip(); b.position(origPos); contentBytes.compareAndSet(null, bytes); return bytes; @@ -84,13 +84,12 @@ public byte[] getBodyPartBytes() { @Override public InputStream readBodyPartBytes() { - return new ByteArrayInputStream(getBodyPartBytes()); + return new BufferInputStream(content.getContent()); } @Override public int length() { - // this is ugly but... - return getBodyPartBytes().length; + return content.getContent().remaining(); } /** @@ -100,7 +99,7 @@ public int length() { public int writeTo(OutputStream outputStream) throws IOException { final byte[] bytes = getBodyPartBytes(); - outputStream.write(getBodyPartBytes()); + outputStream.write(bytes); return bytes.length; } @@ -112,7 +111,7 @@ public int writeTo(OutputStream outputStream) throws IOException { @Override public ByteBuffer getBodyByteBuffer() { - return ByteBuffer.wrap(getBodyPartBytes()); + return content.getContent().toByteBuffer(); } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index 348fe60279..78528280c8 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -47,6 +47,9 @@ public String getResponseBodyExcerpt(int maxLength) throws IOException { public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { // should be fine; except that it may split multi-byte chars (last char may become '?') + if (charset == null) { + charset = calculateCharset(); + } byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); return new String(b, charset); } From 951b1d88c98e908171aa5906002434e49a1e7dc8 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Thu, 10 May 2012 18:08:15 -0700 Subject: [PATCH 0201/2844] Fix an NPE wrt missing charset for netty --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 6 ------ .../com/ning/http/client/providers/netty/NettyResponse.java | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 8595ac378d..161c9ecbba 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -856,12 +856,6 @@ public ListenableFuture execute(Request request, final AsyncHandler as return doConnect(request, asyncHandler, null, true, executeConnectAsync, false); } - /* - private void execute(final Request request, final NettyResponseFuture f, boolean useCache, boolean asyncConnect) throws IOException { - doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, false); - } - */ - private void execute(final Request request, final NettyResponseFuture f, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, reclaimCache); } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index 348fe60279..554024d839 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -48,6 +48,9 @@ public String getResponseBodyExcerpt(int maxLength) throws IOException { public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { // should be fine; except that it may split multi-byte chars (last char may become '?') byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); + if (charset == null) { + charset = DEFAULT_CHARSET; + } return new String(b, charset); } From 9a0bca1e1b956abf2791932fe89e45055de3e71a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 11 May 2012 10:34:16 -0400 Subject: [PATCH 0202/2844] Comment out the plugin for now as no SNAPSHOT are produced --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 62957b8837..70da921089 100644 --- a/pom.xml +++ b/pom.xml @@ -431,6 +431,7 @@
+ From ca59da06986d1c81da7fc400a984d1160db3d52a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 11 May 2012 09:39:45 -0700 Subject: [PATCH 0203/2844] Remove redundant check. --- .../com/ning/http/client/providers/netty/NettyResponse.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index f050f59100..78528280c8 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -51,9 +51,6 @@ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOExc charset = calculateCharset(); } byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); - if (charset == null) { - charset = DEFAULT_CHARSET; - } return new String(b, charset); } From c2f2e54c08e816224019cfdf37df62de6befd7f9 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 14 May 2012 08:47:57 -0400 Subject: [PATCH 0204/2844] New 1.7.x release branch --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f34546ace0..35803d8120 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.4 + 1.7.5-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 1f7a4f6e6f11e779ed888331289892931c9ab603 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 14 May 2012 08:53:54 -0400 Subject: [PATCH 0205/2844] Bump to the latest Netty release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 35803d8120..908acfe312 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ io.netty netty - 3.4.1.Final + 3.4.4.Final javax.servlet From 9c22be1a8c9a82b50528ba07352a201573de0422 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 14 May 2012 09:14:57 -0400 Subject: [PATCH 0206/2844] Port fix for #102 [websocket] Support redirect --- .../netty/NettyAsyncHttpProvider.java | 153 ++++++++++-------- .../http/util/AsyncHttpProviderUtils.java | 7 +- .../client/websocket/TextMessageTest.java | 2 +- 3 files changed, 92 insertions(+), 70 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4e6bd94961..02b286d857 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -987,13 +987,16 @@ private ListenableFuture doConnect(final Request request, final AsyncHand remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); } else if (proxyServer == null || avoidProxy) { remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); - } else if(request.getLocalAddress() != null) { - remoteAddress = new InetSocketAddress(request.getLocalAddress(), 0); } else { remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); } - channelFuture = bootstrap.connect(remoteAddress); + if(request.getLocalAddress() != null){ + channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); + }else{ + channelFuture = bootstrap.connect(remoteAddress); + } + } catch (Throwable t) { if (acquiredConnection) { freeConnections.release(); @@ -1966,6 +1969,81 @@ private static final boolean validateWebSocketRequest(Request request, AsyncHand return true; } + private boolean redirect(Request request, + NettyResponseFuture future, + HttpResponse response, + final ChannelHandlerContext ctx) throws Exception { + + int statusCode = response.getStatus().getCode(); + boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); + if (redirectEnabled && (statusCode == 302 + || statusCode == 301 + || statusCode == 303 + || statusCode == 307)) { + + if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { + // We must allow 401 handling again. + future.getAndSetAuth(false); + + String location = response.getHeader(HttpHeaders.Names.LOCATION); + URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); + boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); + if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { + final RequestBuilder nBuilder = stripQueryString ? + new RequestBuilder(future.getRequest()).setQueryParameters(null) + : new RequestBuilder(future.getRequest()); + + if (!(statusCode < 302 || statusCode > 303) + && !(statusCode == 302 + && config.isStrict302Handling())) { + nBuilder.setMethod("GET"); + } + final URI initialConnectionUri = future.getURI(); + final boolean initialConnectionKeepAlive = future.getKeepAlive(); + future.setURI(uri); + String newUrl = uri.toString(); + if (request.getUrl().startsWith(WEBSOCKET)) { + newUrl = newUrl.replace(HTTP, WEBSOCKET); + } + + log.debug("Redirecting to {}", newUrl); + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + AsyncCallable ac = new AsyncCallable(future) { + public Object call() throws Exception { + if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && + connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { + return null; + } + finishChannel(ctx); + return null; + } + }; + + if (response.isChunked()) { + // We must make sure there is no bytes left before executing the next request. + ctx.setAttachment(ac); + } else { + ac.call(); + } + nextRequest(nBuilder.setUrl(newUrl).build(), future); + return true; + } + } else { + throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); + } + } + return false; + } + private final class HttpProtocol implements Protocol { // @Override public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { @@ -2142,69 +2220,7 @@ public Object call() throws Exception { return; } - boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == 302 - || statusCode == 301 - || statusCode == 303 - || statusCode == 307)) { - - if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { - // We must allow 401 handling again. - future.getAndSetAuth(false); - - String location = response.getHeader(HttpHeaders.Names.LOCATION); - URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); - boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); - if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { - final RequestBuilder nBuilder = stripQueryString ? - new RequestBuilder(future.getRequest()).setQueryParameters(null) - : new RequestBuilder(future.getRequest()); - - if (!(statusCode < 302 || statusCode > 303) - && !(statusCode == 302 - && config.isStrict302Handling())) { - nBuilder.setMethod("GET"); - } - final URI initialConnectionUri = future.getURI(); - final boolean initialConnectionKeepAlive = future.getKeepAlive(); - future.setURI(uri); - final String newUrl = uri.toString(); - - log.debug("Redirecting to {}", newUrl); - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); - } - - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); - } - - AsyncCallable ac = new AsyncCallable(future) { - public Object call() throws Exception { - if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && - connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { - return null; - } - finishChannel(ctx); - return null; - } - }; - - if (response.isChunked()) { - // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); - } else { - ac.call(); - } - nextRequest(nBuilder.setUrl(newUrl).build(), future); - return; - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } + if (redirect(request, future, response, ctx)) return; if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { finishUpdate(future, ctx, response.isChunked()); @@ -2297,7 +2313,7 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { } } catch (FilterException efe) { abort(future, efe); - } // @Override + } } @@ -2310,6 +2326,9 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { return; } + future.setHttpResponse(response); + if (redirect(request, future, response, ctx)) return; + final org.jboss.netty.handler.codec.http.HttpResponseStatus status = new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index a7c5281159..43d4aa9114 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -221,9 +221,12 @@ public final static URI getRedirectUri(URI uri, String location) { String scheme = newUri.getScheme(); - if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https")) { + if (scheme == null || !scheme.equalsIgnoreCase("http") + && !scheme.equalsIgnoreCase("https") + && !scheme.equals("ws") + && !scheme.equals("wss")) { throw new IllegalArgumentException("The URI scheme, of the URI " + newUri - + ", must be equal (ignoring case) to 'http' or 'https'"); + + ", must be equal (ignoring case) to 'ws, 'wss', 'http', or 'https'"); } return newUri; diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 4a8d409dbc..2b1b154770 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -27,7 +27,7 @@ public abstract class TextMessageTest extends AbstractBasicTest { - private final class EchoTextWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnTextMessage { + public static final class EchoTextWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnTextMessage { private Connection connection; From 5b4627360e6363c3646db4c4b3807056b9904475 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 14 May 2012 09:15:23 -0400 Subject: [PATCH 0207/2844] Port #102 tests --- .../http/client/websocket/RedirectTest.java | 128 ++++++++++++++++++ .../grizzly/GrizzlyRedirectTest.java | 30 ++++ .../websocket/netty/NettyRedirectTest.java | 27 ++++ 3 files changed, 185 insertions(+) create mode 100644 src/test/java/com/ning/http/client/websocket/RedirectTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java create mode 100644 src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java diff --git a/src/test/java/com/ning/http/client/websocket/RedirectTest.java b/src/test/java/com/ning/http/client/websocket/RedirectTest.java new file mode 100644 index 0000000000..25febcf53f --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/RedirectTest.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.websocket; + + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.server.handler.HandlerList; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +import static org.testng.Assert.assertEquals; + +public abstract class RedirectTest extends AbstractBasicTest { + + protected int port2; + + // ------------------------------------------ Methods from AbstractBasicTest + + @BeforeClass + @Override + public void setUpGlobal() throws Exception { + port1 = findFreePort(); + + _connector = new SelectChannelConnector(); + _connector.setPort(port1); + + addConnector(_connector); + + + + + port2 = findFreePort(); + final SelectChannelConnector connector2 = new SelectChannelConnector(); + connector2.setPort(port2); + addConnector(connector2); + WebSocketHandler _wsHandler = getWebSocketHandler(); + HandlerList list = new HandlerList(); + list.addHandler(new AbstractHandler() { + @Override + public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { + if (request.getLocalPort() == port2) { + httpServletResponse.sendRedirect(getTargetUrl()); + } + } + }); + list.addHandler(_wsHandler); + setHandler(list); + + start(); + log.info("Local HTTP server started successfully"); + } + + @Override + public WebSocketHandler getWebSocketHandler() { + return new WebSocketHandler() { + @Override + public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { + return new TextMessageTest.EchoTextWebSocket(); + } + }; + } + + // ------------------------------------------------------------ Test Methods + + @Test(timeOut = 60000) + public void testRedirectToWSResource() throws Exception { + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getRedirectURL()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + + latch.await(); + assertEquals(text.get(), "OnOpen"); + websocket.close(); + } + + + // --------------------------------------------------------- Private Methods + + + private String getRedirectURL() { + return String.format("ws://127.0.0.1:%d/", port2); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java new file mode 100644 index 0000000000..2cdda3be98 --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.websocket.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.websocket.RedirectTest; + +public class GrizzlyRedirectTest extends RedirectTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } +} diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java b/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java new file mode 100644 index 0000000000..38963eb20c --- /dev/null +++ b/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.websocket.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.websocket.RedirectTest; + +public class NettyRedirectTest extends RedirectTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } + +} From 0ad0d3dca83f9ac5912cec4542337c6dda516335 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 14 May 2012 09:23:20 -0400 Subject: [PATCH 0208/2844] Fix errror with clirr --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 908acfe312..827eac5a65 100644 --- a/pom.xml +++ b/pom.xml @@ -447,8 +447,9 @@ **/Request$EntityWriter **/RequestBuilderBase **/Response - **/Response$ + **/Response$* **/FilterContext + **/FilterContext$* **/NettyResponseFuture **/**ResponseBodyPart **/**WebSocket From 0fbabf09d67d7aadf6c8c525f137751996046376 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 15 May 2012 12:24:03 -0400 Subject: [PATCH 0209/2844] Fix for #111 https://github.com/sonatype/async-http-client/issues/111 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 6 ++++-- .../java/com/ning/http/util/AsyncHttpProviderUtils.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 02b286d857..93682399e2 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -547,6 +547,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, ChannelBuffer buffer) throws IOException { String host = AsyncHttpProviderUtils.getHost(uri); + boolean webSocket = isWebSocket(uri); if (request.getVirtualHost() != null) { host = request.getVirtualHost(); @@ -567,11 +568,12 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path.toString()); } - boolean webSocket = isWebSocket(uri); + if (webSocket) { nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); - nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" + uri.getPort()); + nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" + + (uri.getPort() == -1 ? isSecure(uri.getScheme()) ? 443 : 80 : uri.getPort())); nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); nettyRequest.addHeader("Sec-WebSocket-Version", "13"); } diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 43d4aa9114..5395998df8 100644 --- a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -235,7 +235,7 @@ public final static URI getRedirectUri(URI uri, String location) { public final static int getPort(URI uri) { int port = uri.getPort(); if (port == -1) - port = uri.getScheme().equals("http") ? 80 : 443; + port = uri.getScheme().equals("http") || uri.getScheme().equals("ws") ? 80 : 443; return port; } From 9c3419568aac35228116cb63b1a5ae383a9fb53e Mon Sep 17 00:00:00 2001 From: jfarcand Date: Tue, 15 May 2012 13:01:53 -0400 Subject: [PATCH 0210/2844] Incremental fix for #101 [websocket] onError must not be called when status code is != 101. Fix Netty side --- .../providers/netty/NettyAsyncHttpProvider.java | 8 +++++++- .../websocket/WebSocketUpgradeHandler.java | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 93682399e2..da017b1679 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2346,7 +2346,13 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; - if (!validStatus || !validUpgrade || !validConnection || !statusReceived) { + if (!statusReceived) { + h.onClose(new NettyWebSocket(ctx.getChannel()), 1002, "Bad response status " + response.getStatus().getCode()); + future.done(null); + return; + } + + if (!validStatus || !validUpgrade || !validConnection) { throw new IOException("Invalid handshake response"); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index 9854486400..5483720913 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -64,7 +64,7 @@ public final STATE onStatusReceived(HttpResponseStatus responseStatus) throws Ex if (responseStatus.getStatusCode() == 101) { return STATE.UPGRADE; } else { - throw new IllegalStateException("Invalid upgrade protocol, status should be 101 but was " + responseStatus.getStatusCode()); + return STATE.ABORT; } } @@ -113,6 +113,21 @@ public final void onFailure(Throwable t) { } } + public final void onClose(WebSocket webSocket, int status, String reasonPhrase) { + // Connect failure + if (this.webSocket == null) this.webSocket = webSocket; + + for (WebSocketListener w : l) { + if (webSocket != null) { + webSocket.addWebSocketListener(w); + } + w.onClose(webSocket); + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(w.getClass())) { + WebSocketCloseCodeReasonListener.class.cast(w).onClose(webSocket, status, reasonPhrase); + } + } + } + /** * Build a {@link WebSocketUpgradeHandler} */ From 44fb6541bca9101e1144c25fc5561ebf8b06dfa0 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 15 May 2012 10:07:59 -0700 Subject: [PATCH 0211/2844] Fix for #111 - [websocket] Both Netty and Grizzly issues with URI without port. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 908c1f80f7..289b3bc89a 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -522,9 +522,9 @@ static int getPort(final URI uri, final int p) { int port = p; if (port == -1) { final String protocol = uri.getScheme().toLowerCase(); - if ("http".equals(protocol)) { + if ("http".equals(protocol) || "ws".equals(protocol)) { port = 80; - } else if ("https".equals(protocol)) { + } else if ("https".equals(protocol) || "wss".equals(protocol)) { port = 443; } else { throw new IllegalArgumentException("Unknown protocol: " + protocol); From 45ce97b7c983cbc297f90136155903d972d5fc7f Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 15 May 2012 11:11:49 -0700 Subject: [PATCH 0212/2844] Fix for the Grizzly side of #101 : [websocket] onError must not be called when status code is != 101. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 47 +++++++++++-------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 289b3bc89a..3cfa92c9e3 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1288,39 +1288,46 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, return; } } - - if (context.currentState != AsyncHandler.STATE.ABORT) { - boolean upgrade = context.currentState == AsyncHandler.STATE.UPGRADE; + if (context.isWSRequest) { try { - context.currentState = handler.onHeadersReceived( - responseHeaders); - } catch (Exception e) { - httpHeader.setSkipRemainder(true); - context.abort(e); - return; - } - if (upgrade) { - try { + context.protocolHandler.setConnection(ctx.getConnection()); + DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); + context.webSocket = new GrizzlyWebSocketAdapter(ws); + if (context.currentState == AsyncHandler.STATE.UPGRADE) { httpHeader.setChunked(false); - context.protocolHandler.setConnection(ctx.getConnection()); - DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); ws.onConnect(); - context.webSocket = new GrizzlyWebSocketAdapter(ws); WebSocketEngine.getEngine().setWebSocketHolder(ctx.getConnection(), context.protocolHandler, ws); ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); final int wsTimeout = context.provider.clientConfig.getWebSocketIdleTimeoutInMs(); IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), - ((wsTimeout <= 0) - ? IdleTimeoutFilter.FOREVER - : wsTimeout), - TimeUnit.MILLISECONDS); + ((wsTimeout <= 0) + ? IdleTimeoutFilter.FOREVER + : wsTimeout), + TimeUnit.MILLISECONDS); context.result(handler.onCompleted()); + } else { + httpHeader.setSkipRemainder(true); + ((WebSocketUpgradeHandler) context.handler). + onClose(context.webSocket, + 1002, + "WebSocket protocol error: unexpected HTTP response status during handshake."); + context.result(null); + } + } catch (Exception e) { + httpHeader.setSkipRemainder(true); + context.abort(e); + } + } else { + if (context.currentState != AsyncHandler.STATE.ABORT) { + try { + context.currentState = handler.onHeadersReceived( + responseHeaders); } catch (Exception e) { httpHeader.setSkipRemainder(true); context.abort(e); - } + } } } From 7f958224bdd751e409cc9fbe45a46311cf2df4af Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 16 May 2012 17:44:23 +0200 Subject: [PATCH 0213/2844] Fix/clean up some log handling Real buggy one is in NettyConnectionsPoll --- .../client/providers/apache/ApacheAsyncHttpProvider.java | 2 +- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 8 ++------ .../client/providers/grizzly/GrizzlyConnectionsPool.java | 6 ++---- .../http/client/providers/netty/NettyConnectionsPool.java | 3 ++- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 1c98fb4e29..e3a5557873 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -859,7 +859,7 @@ public boolean isDone() { */ public synchronized void run() { if (this.apacheResponseFuture != null && this.apacheResponseFuture.hasExpired()) { - logger.debug("Request Timeout expired for " + this.apacheResponseFuture); + logger.debug("Request Timeout expired for {}", this.apacheResponseFuture); int requestTimeout = config.getRequestTimeoutInMs(); PerRequestConfig p = this.apacheResponseFuture.getRequest().getPerRequestConfig(); diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 93a04e6d42..3f41317cee 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -554,9 +554,7 @@ boolean sendRequest(final FilterChainContext ctx, } else { ctx.write(requestPacket, ctx.getTransportContext().getCompletionHandler()); } - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("REQUEST: " + requestPacket.toString()); - } + LOGGER.debug("REQUEST: {}", requestPacket); return isWriteComplete; } @@ -1221,9 +1219,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { super.onHttpHeadersParsed(httpHeader, ctx); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("RESPONSE: " + httpHeader.toString()); - } + LOGGER.debug("RESPONSE: {}", httpHeader); if (httpHeader.containsHeader(Header.Connection)) { if ("close".equals(httpHeader.getHeader(Header.Connection))) { ConnectionManager.markConnectionAsDoNotCache(ctx.getConnection()); diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index e3478e5769..aadb444ebd 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -100,10 +100,8 @@ public boolean offer(String uri, Connection connection) { DelayedExecutor.IdleConnectionQueue conQueue = connectionsPool.get(uri); if (conQueue == null) { - if (LOG.isDebugEnabled()) { - LOG.debug("Creating new Connection queue for uri [{}] and connection [{}]", - new Object[]{uri, connection}); - } + LOG.debug("Creating new Connection queue for uri [{}] and connection [{}]", + uri, connection); DelayedExecutor.IdleConnectionQueue newPool = delayedExecutor.createIdleConnectionQueue(timeout); conQueue = connectionsPool.putIfAbsent(uri, newPool); diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index 18e582774a..37ae4b67a8 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -126,7 +126,8 @@ public void run() { } } - log.trace(String.format("%d channel open, %d idle channels closed (times: 1st-loop=%d, 2nd-loop=%d).\n", + if (log.isTraceEnabled()) + log.trace(String.format("%d channel open, %d idle channels closed (times: 1st-loop=%d, 2nd-loop=%d).\n", connectionsPool.size(), channelsInTimeout.size(), endConcurrentLoop - currentTime, System.currentTimeMillis() - endConcurrentLoop)); } catch (Throwable t) { log.error("uncaught exception!", t); From b7307e5bde83823203eb61882f028f818d04b088 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 16 May 2012 20:12:28 -0700 Subject: [PATCH 0214/2844] Add bit more commentary on README wrt buffering --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6b8cd9878b..18d49de5c3 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async- Response r = f.get(); ``` -You can also accomplish asynchronous operation without using a Future if you want to receive and process the response in your handler: +Note that in this case all the content must be read fully in memory, even if you used `getResponseBodyAsStream()' method on returned `Response` object. + +You can also accomplish asynchronous (non-blocking) operation without using a Future if you want to receive and process the response in your handler: ```java import com.ning.http.client.*; @@ -52,6 +54,8 @@ You can also accomplish asynchronous operation without using a Future if you wan }); ``` +(this will also fully read `Response` in memory before calling `onCompleted`) + You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response ```java @@ -74,9 +78,11 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron } }); - int statuѕCode = f.get(); + int statusCode = f.get(); ``` +which is something you want to do for large responses: this way you can process content as soon as it becomes available, piece by piece, without having to buffer it all in memory. + You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back: ```java @@ -85,14 +91,16 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron AsyncHttpClient c = new AsyncHttpClient(); Future f = c.prepareGet("http://www.ning.com/ ").execute(new AsyncHandler() { - private StringBuilder builder = new StringBuilder(); + private ByteArrayOutputStream bytes = new ByteArrayOutputStream(); @Override public STATE onStatusReceived(HttpResponseStatus status) throws Exception { int statusCode = status.getStatusCode(); - // The Status have been read - // If you don't want to read the headers,body or stop processing the response - return STATE.ABORT; + // The Status have been read + // If you don't want to read the headers,body or stop processing the response + if (statusCode >= 500) { + return STATE.ABORT; + } } @Override @@ -105,7 +113,7 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - builder.append(new String(bodyPart.getBodyPartBytes())); + bytes.write(bodyPart.getBodyPartBytes()); return STATE.CONTINUE } @@ -113,7 +121,8 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron public String onCompleted() throws Exception { // Will be invoked once the response has been fully read or a ResponseComplete exception // has been thrown. - return builder.toString(); + // NOTE: should probably use Content-Encoding from headers + return bytes.toString("UTF-8"); } @Override From 34e92a98f25f763c7dd092521cc8c33ed3c31590 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 17 May 2012 12:57:53 -0400 Subject: [PATCH 0215/2844] [maven-release-plugin] prepare release async-http-client-1.7.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 827eac5a65..9441526fdd 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.5-SNAPSHOT + 1.7.5 jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 933183963c8692436e990b3f1baf6cdb11d0daef Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 17 May 2012 12:57:59 -0400 Subject: [PATCH 0216/2844] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9441526fdd..b93cb9bf95 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.ning async-http-client Asynchronous Http Client - 1.7.5 + 1.7.6-SNAPSHOT jar Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and From 2b8dc69f17a1feda45ee1ee74c6fa57c51244a01 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Fri, 18 May 2012 15:28:52 -0700 Subject: [PATCH 0217/2844] Trying to resolve eclipse warnings; simplified Netty ResponseBodyPart --- .../com/ning/http/client/AsyncHttpClient.java | 6 +-- .../ning/http/client/AsyncHttpProvider.java | 1 - .../http/client/AsyncHttpProviderConfig.java | 2 +- .../http/client/SimpleAsyncHttpClient.java | 2 +- .../http/client/filter/FilterContext.java | 22 +++++----- .../http/client/filter/IOExceptionFilter.java | 2 +- .../http/client/filter/RequestFilter.java | 3 +- .../apache/ApacheAsyncHttpProvider.java | 16 ++++---- .../grizzly/GrizzlyAsyncHttpProvider.java | 6 +-- .../grizzly/GrizzlyConnectionsPool.java | 7 ++-- .../grizzly/GrizzlyResponseBodyPart.java | 1 - .../jdk/JDKAsyncHttpProviderConfig.java | 3 +- .../netty/NettyAsyncHttpProvider.java | 17 ++++---- .../providers/netty/ResponseBodyPart.java | 41 +++++++++---------- .../resumable/ResumableAsyncHandler.java | 15 +++---- .../java/com/ning/http/util/DateUtil.java | 14 +++---- .../ning/http/client/async/BasicAuthTest.java | 5 --- .../client/async/MultipartUploadTest.java | 2 - .../http/client/async/RemoteSiteTest.java | 2 +- .../resumable/ResumableAsyncHandlerTest.java | 3 +- .../client/websocket/ByteMessageTest.java | 2 +- .../client/websocket/TextMessageTest.java | 4 +- 22 files changed, 80 insertions(+), 96 deletions(-) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/src/main/java/com/ning/http/client/AsyncHttpClient.java index 90c6d5f2fc..5343c02940 100755 --- a/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -506,7 +506,7 @@ public BoundRequestBuilder prepareRequest(Request request) { */ public ListenableFuture executeRequest(Request request, AsyncHandler handler) throws IOException { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).build(); fc = preProcessRequest(fc); return httpProvider.execute(fc.getRequest(), fc.getAsyncHandler()); @@ -520,7 +520,7 @@ public ListenableFuture executeRequest(Request request, AsyncHandler h * @throws IOException */ public ListenableFuture executeRequest(Request request) throws IOException { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(new AsyncCompletionHandlerBase()).request(request).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(new AsyncCompletionHandlerBase()).request(request).build(); fc = preProcessRequest(fc); return httpProvider.execute(fc.getRequest(), fc.getAsyncHandler()); } @@ -531,7 +531,7 @@ public ListenableFuture executeRequest(Request request) throws IOExcep * @param fc {@link FilterContext} * @return {@link FilterContext} */ - private FilterContext preProcessRequest(FilterContext fc) throws IOException { + private FilterContext preProcessRequest(FilterContext fc) throws IOException { for (RequestFilter asyncFilter : config.getRequestFilters()) { try { fc = asyncFilter.filter(fc); diff --git a/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/src/main/java/com/ning/http/client/AsyncHttpProvider.java index 039ffa4e97..49e771569b 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/AsyncHttpProvider.java @@ -16,7 +16,6 @@ package com.ning.http.client; import java.io.IOException; -import java.util.Collection; import java.util.List; /** diff --git a/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java index ea5e0f8911..f006bc32c6 100644 --- a/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java +++ b/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java @@ -29,7 +29,7 @@ public interface AsyncHttpProviderConfig { * @param value the value of the property * @return this instance of AsyncHttpProviderConfig */ - public AsyncHttpProviderConfig addProperty(U name, V value); + public AsyncHttpProviderConfig addProperty(U name, V value); /** * Return the value associated with the property's name diff --git a/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java b/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java index ea03362bad..7193753015 100644 --- a/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java +++ b/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java @@ -678,7 +678,7 @@ public SimpleAsyncHttpClient build() { } private final static class ResumableBodyConsumerAsyncHandler - extends ResumableAsyncHandler + extends ResumableAsyncHandler implements ProgressAsyncHandler { private final ProgressAsyncHandler delegate; diff --git a/src/main/java/com/ning/http/client/filter/FilterContext.java b/src/main/java/com/ning/http/client/filter/FilterContext.java index 91aeee1c6a..e78c4f24b3 100644 --- a/src/main/java/com/ning/http/client/filter/FilterContext.java +++ b/src/main/java/com/ning/http/client/filter/FilterContext.java @@ -33,14 +33,14 @@ */ public class FilterContext { - private final FilterContextBuilder b; + private final FilterContextBuilder b; /** * Create a new {@link FilterContext} * * @param b a {@link FilterContextBuilder} */ - private FilterContext(FilterContextBuilder b) { + private FilterContext(FilterContextBuilder b) { this.b = b; } @@ -108,7 +108,7 @@ public static class FilterContextBuilder { public FilterContextBuilder() { } - public FilterContextBuilder(FilterContext clone) { + public FilterContextBuilder(FilterContext clone) { asyncHandler = clone.getAsyncHandler(); request = clone.getRequest(); responseStatus = clone.getResponseStatus(); @@ -120,7 +120,7 @@ public AsyncHandler getAsyncHandler() { return asyncHandler; } - public FilterContextBuilder asyncHandler(AsyncHandler asyncHandler) { + public FilterContextBuilder asyncHandler(AsyncHandler asyncHandler) { this.asyncHandler = asyncHandler; return this; } @@ -129,33 +129,33 @@ public Request getRequest() { return request; } - public FilterContextBuilder request(Request request) { + public FilterContextBuilder request(Request request) { this.request = request; return this; } - public FilterContextBuilder responseStatus(HttpResponseStatus responseStatus) { + public FilterContextBuilder responseStatus(HttpResponseStatus responseStatus) { this.responseStatus = responseStatus; return this; } - public FilterContextBuilder responseHeaders(HttpResponseHeaders headers) { + public FilterContextBuilder responseHeaders(HttpResponseHeaders headers) { this.headers = headers; return this; } - public FilterContextBuilder replayRequest(boolean replayRequest) { + public FilterContextBuilder replayRequest(boolean replayRequest) { this.replayRequest = replayRequest; return this; } - public FilterContextBuilder ioException(IOException ioException) { + public FilterContextBuilder ioException(IOException ioException) { this.ioException = ioException; return this; } - public FilterContext build() { - return new FilterContext(this); + public FilterContext build() { + return new FilterContext(this); } } diff --git a/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java b/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java index 59f5cdc6f0..eb0a0fd234 100644 --- a/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java +++ b/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java @@ -25,5 +25,5 @@ public interface IOExceptionFilter { * @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one. * @throws FilterException to interrupt the filter processing. */ - public FilterContext filter(FilterContext ctx) throws FilterException; + public FilterContext filter(FilterContext ctx) throws FilterException; } diff --git a/src/main/java/com/ning/http/client/filter/RequestFilter.java b/src/main/java/com/ning/http/client/filter/RequestFilter.java index 31d0749b9b..552cadd085 100644 --- a/src/main/java/com/ning/http/client/filter/RequestFilter.java +++ b/src/main/java/com/ning/http/client/filter/RequestFilter.java @@ -26,6 +26,5 @@ public interface RequestFilter { * @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one. * @throws FilterException to interrupt the filter processing. */ - public FilterContext filter(FilterContext ctx) throws FilterException; - + public FilterContext filter(FilterContext ctx) throws FilterException; } diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index e3a5557873..6ca3feed78 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -323,8 +323,8 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I } } - if (request.getHeaders().getFirstValue("Expect") != null - && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { + String expect = request.getHeaders().getFirstValue("Expect"); + if (expect != null && expect.equalsIgnoreCase("100-Continue")) { post.setUseExpectHeader(true); } method = post; @@ -357,10 +357,9 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I } method.setFollowRedirects(false); - if ((request.getCookies() != null) && !request.getCookies().isEmpty()) { - for (Cookie cookie : request.getCookies()) { - method.setRequestHeader("Cookie", AsyncHttpProviderUtils.encodeCookies(request.getCookies())); - } + Collection cookies = request.getCookies(); + if ((cookies != null) && !cookies.isEmpty()) { + method.setRequestHeader("Cookie", AsyncHttpProviderUtils.encodeCookies(request.getCookies())); } if (request.getHeaders() != null) { @@ -373,8 +372,9 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I } } - if (request.getHeaders().getFirstValue("User-Agent") != null) { - method.setRequestHeader("User-Agent", request.getHeaders().getFirstValue("User-Agent")); + String ua = request.getHeaders().getFirstValue("User-Agent"); + if (ua != null) { + method.setRequestHeader("User-Agent", ua); } else if (config.getUserAgent() != null) { method.setRequestHeader("User-Agent", config.getUserAgent()); } else { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 3f41317cee..621010d791 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -190,9 +190,8 @@ public GrizzlyAsyncHttpProvider(final AsyncHttpClientConfig clientConfig) { /** * {@inheritDoc} */ - @SuppressWarnings({"unchecked"}) public ListenableFuture execute(final Request request, - final AsyncHandler handler) throws IOException { + final AsyncHandler handler) throws IOException { final GrizzlyResponseFuture future = new GrizzlyResponseFuture(this, request, handler); @@ -1322,8 +1321,6 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } - - @SuppressWarnings({"unchecked"}) @Override protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { @@ -2211,6 +2208,7 @@ static class ConnectionManager { // -------------------------------------------------------- Constructors + @SuppressWarnings("unchecked") ConnectionManager(final GrizzlyAsyncHttpProvider provider, final TCPNIOTransport transport) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index aadb444ebd..80b23fd7d0 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -42,6 +42,7 @@ * @author The Grizzly Team * @since 1.7.0 */ +@SuppressWarnings("rawtypes") public class GrizzlyConnectionsPool implements ConnectionsPool { private final static Logger LOG = LoggerFactory.getLogger(GrizzlyConnectionsPool.class); @@ -304,7 +305,6 @@ private static boolean wasModified(final Long l1, final Long l2) { private class DelayedRunnable implements Runnable { - @SuppressWarnings("unchecked") @Override public void run() { while (isStarted) { @@ -315,8 +315,9 @@ public void run() { final TimeoutResolver resolver = delayQueue.resolver; - for (Iterator it = delayQueue.queue.iterator(); it.hasNext(); ) { - final Connection element = it.next(); + for (@SuppressWarnings("rawtypes") + Iterator it = delayQueue.queue.iterator(); it.hasNext(); ) { + final Connection element = (Connection) it.next(); final Long timeoutMs = resolver.getTimeoutMs(element); if (timeoutMs == null || timeoutMs == UNSET_TIMEOUT) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java index 02c9ec0a83..c41eba9d74 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java @@ -21,7 +21,6 @@ import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.utils.BufferInputStream; -import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java index 2a8a0561f8..700c1716ba 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java @@ -24,7 +24,8 @@ public class JDKAsyncHttpProviderConfig implements AsyncHttpProviderConfig properties = new ConcurrentHashMap(); - public AsyncHttpProviderConfig addProperty(String name, String value) { + @Override + public JDKAsyncHttpProviderConfig addProperty(String name, String value) { properties.put(name, value); return this; } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index f82f00c9eb..a258fafbff 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -113,10 +113,10 @@ import java.nio.channels.ClosedChannelException; import java.nio.channels.FileChannel; import java.nio.channels.WritableByteChannel; +import java.nio.charset.Charset; import java.security.GeneralSecurityException; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; -import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; @@ -142,7 +142,10 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme private final static String HTTP = "http"; private static final String WEBSOCKET = "ws"; private static final String WEBSOCKET_SSL = "wss"; + private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); + private final static Charset UTF8 = Charset.forName("UTF-8"); + private final ClientBootstrap plainBootstrap; private final ClientBootstrap secureBootstrap; private final ClientBootstrap webSocketBootstrap; @@ -539,7 +542,6 @@ protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Re return construct(config, request, new HttpMethod(method), uri, buffer); } - @SuppressWarnings("deprecation") private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, @@ -1451,18 +1453,15 @@ private void finishUpdate(final NettyResponseFuture future, final ChannelHand markAsDone(future, ctx); } - @SuppressWarnings("unchecked") - private final boolean updateStatusAndInterrupt(AsyncHandler handler, HttpResponseStatus c) throws Exception { + private final boolean updateStatusAndInterrupt(AsyncHandler handler, HttpResponseStatus c) throws Exception { return handler.onStatusReceived(c) != STATE.CONTINUE; } - @SuppressWarnings("unchecked") - private final boolean updateHeadersAndInterrupt(AsyncHandler handler, HttpResponseHeaders c) throws Exception { + private final boolean updateHeadersAndInterrupt(AsyncHandler handler, HttpResponseHeaders c) throws Exception { return handler.onHeadersReceived(c) != STATE.CONTINUE; } - @SuppressWarnings("unchecked") - private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { + private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; if (c.closeUnderlyingConnection()) { future.setKeepAlive(false); @@ -2385,7 +2384,7 @@ public void setContent(ChannelBuffer content) { NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); webSocket.onMessage(rp.getBodyPartBytes()); - webSocket.onTextMessage(frame.getBinaryData().toString("UTF-8")); + webSocket.onTextMessage(frame.getBinaryData().toString(UTF8)); if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { try { diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java index dc2e370e45..9984f1a2c1 100644 --- a/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java @@ -33,6 +33,8 @@ * A callback class used when an HTTP response body is received. */ public class ResponseBodyPart extends HttpResponseBodyPart { + // Empty arrays are immutable, can freely reuse + private final static byte[] NO_BYTES = new byte[0]; private final HttpChunk chunk; private final HttpResponse response; @@ -40,11 +42,11 @@ public class ResponseBodyPart extends HttpResponseBodyPart { private final boolean isLast; private boolean closeConnection = false; + /** + * Constructor used for non-chunked GET requests and HEAD requests. + */ public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, boolean last) { - super(uri, provider); - isLast = last; - this.chunk = null; - this.response = response; + this(uri, response, provider, null, last); } public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunk chunk, boolean last) { @@ -53,12 +55,13 @@ public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provid this.response = response; isLast = last; } - + /** * Return the response body's part bytes received. * * @return the response body's part bytes received. */ + @Override public byte[] getBodyPartBytes() { byte[] bp = bytes.get(); if (bp != null) { @@ -66,14 +69,11 @@ public byte[] getBodyPartBytes() { } ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); - int read = b.readableBytes(); - int index = b.readerIndex(); + int available = b.readableBytes(); - byte[] rb = new byte[read]; - b.readBytes(rb); - bytes.set(rb); - b.readerIndex(index); - return bytes.get(); + final byte[] rb = (available == 0) ? NO_BYTES : new byte[available]; + b.getBytes(b.readerIndex(), rb, 0, available); + return rb; } @Override @@ -83,19 +83,18 @@ public InputStream readBodyPartBytes() { @Override public int length() { - // ugly... - return getBodyPartBytes().length; + ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); + return b.readableBytes(); } + @Override public int writeTo(OutputStream outputStream) throws IOException { - ChannelBuffer b = chunk != null ? chunk.getContent() : response.getContent(); - int read = b.readableBytes(); - int index = b.readerIndex(); - if (read > 0) { - b.readBytes(outputStream, read); + ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); + int available = b.readableBytes(); + if (available > 0) { + b.getBytes(b.readerIndex(), outputStream, available); } - b.readerIndex(index); - return read; + return available; } @Override diff --git a/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java b/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java index 51d60ccf99..b1eda42f86 100644 --- a/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java +++ b/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java @@ -18,6 +18,7 @@ import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; import com.ning.http.client.Response.ResponseBuilder; import com.ning.http.client.listener.TransferCompletionHandler; import org.slf4j.Logger; @@ -38,13 +39,13 @@ *

* In case of a JVM crash/shutdown, you can create an instance of this class and pass the last valid bytes position. */ -public class ResumableAsyncHandler implements AsyncHandler { +public class ResumableAsyncHandler implements AsyncHandler { private final static Logger logger = LoggerFactory.getLogger(TransferCompletionHandler.class); private final AtomicLong byteTransferred; private Integer contentLength; private String url; private final ResumableProcessor resumableProcessor; - private final AsyncHandler decoratedAsyncHandler; + private final AsyncHandler decoratedAsyncHandler; private static Map resumableIndex; private final static ResumableIndexThread resumeIndexThread = new ResumableIndexThread(); private ResponseBuilder responseBuilder = new ResponseBuilder(); @@ -53,7 +54,7 @@ public class ResumableAsyncHandler implements AsyncHandler { private ResumableAsyncHandler(long byteTransferred, ResumableProcessor resumableProcessor, - AsyncHandler decoratedAsyncHandler, + AsyncHandler decoratedAsyncHandler, boolean accumulateBody) { this.byteTransferred = new AtomicLong(byteTransferred); @@ -82,11 +83,11 @@ public ResumableAsyncHandler() { this(0, null, null, false); } - public ResumableAsyncHandler(AsyncHandler decoratedAsyncHandler) { + public ResumableAsyncHandler(AsyncHandler decoratedAsyncHandler) { this(0, new PropertiesBasedResumableProcessor(), decoratedAsyncHandler, false); } - public ResumableAsyncHandler(long byteTransferred, AsyncHandler decoratedAsyncHandler) { + public ResumableAsyncHandler(long byteTransferred, AsyncHandler decoratedAsyncHandler) { this(byteTransferred, new PropertiesBasedResumableProcessor(), decoratedAsyncHandler, false); } @@ -160,7 +161,7 @@ public AsyncHandler.STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) thro * {@inheritDoc} */ /* @Override */ - public T onCompleted() throws Exception { + public Response onCompleted() throws Exception { resumableProcessor.remove(url); resumableListener.onAllBytesReceived(); @@ -168,7 +169,7 @@ public T onCompleted() throws Exception { decoratedAsyncHandler.onCompleted(); } // Not sure - return (T) responseBuilder.build(); + return responseBuilder.build(); } /** diff --git a/src/main/java/com/ning/http/util/DateUtil.java b/src/main/java/com/ning/http/util/DateUtil.java index 54def8d8c1..dc1f120425 100644 --- a/src/main/java/com/ning/http/util/DateUtil.java +++ b/src/main/java/com/ning/http/util/DateUtil.java @@ -78,7 +78,7 @@ public class DateUtil { */ public static final String PATTERN_ASCTIME = "EEE MMM d HH:mm:ss yyyy"; - private static final Collection DEFAULT_PATTERNS = Arrays.asList( + private static final Collection DEFAULT_PATTERNS = Arrays.asList( new String[]{PATTERN_ASCTIME, PATTERN_RFC1036, PATTERN_RFC1123}); private static final Date DEFAULT_TWO_DIGIT_YEAR_START; @@ -112,7 +112,7 @@ public static Date parseDate(String dateValue) throws DateParseException { * @return the parsed date * @throws DateParseException if none of the dataFormats could parse the dateValue */ - public static Date parseDate(String dateValue, Collection dateFormats) + public static Date parseDate(String dateValue, Collection dateFormats) throws DateParseException { return parseDate(dateValue, dateFormats, null); } @@ -131,7 +131,7 @@ public static Date parseDate(String dateValue, Collection dateFormats) */ public static Date parseDate( String dateValue, - Collection dateFormats, + Collection dateFormats, Date startDate ) throws DateParseException { @@ -154,10 +154,10 @@ public static Date parseDate( } SimpleDateFormat dateParser = null; - Iterator formatIter = dateFormats.iterator(); + Iterator formatIter = dateFormats.iterator(); while (formatIter.hasNext()) { - String format = (String) formatIter.next(); + String format = formatIter.next(); if (dateParser == null) { dateParser = new SimpleDateFormat(format, Locale.US); dateParser.setTimeZone(TimeZone.getTimeZone("GMT")); @@ -214,10 +214,8 @@ private DateUtil() { } public static class DateParseException extends Exception { + private static final long serialVersionUID = 1L; - /** - * - */ public DateParseException() { super(); } diff --git a/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/src/test/java/com/ning/http/client/async/BasicAuthTest.java index bbdefbd3e7..c731dc0d4e 100644 --- a/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/src/test/java/com/ning/http/client/async/BasicAuthTest.java @@ -54,7 +54,6 @@ import java.io.IOException; import java.net.URL; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -62,7 +61,6 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -207,9 +205,6 @@ private void stopSecondServer() throws Exception { } private class RedirectHandler extends AbstractHandler { - - private AtomicBoolean redirectOnce = new AtomicBoolean(false); - public void handle(String s, Request r, HttpServletRequest request, diff --git a/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/src/test/java/com/ning/http/client/async/MultipartUploadTest.java index 580af9ba03..70af4c875a 100644 --- a/src/test/java/com/ning/http/client/async/MultipartUploadTest.java +++ b/src/test/java/com/ning/http/client/async/MultipartUploadTest.java @@ -67,8 +67,6 @@ * @author dominict */ public abstract class MultipartUploadTest extends AbstractBasicTest { - private String BASE_URL; - private String servletEndpointRedirectUrl; public static byte GZIPTEXT[] = new byte[]{31, -117, 8, 8, 11, 43, 79, 75, 0, 3, 104, 101, 108, 108, 111, 46, 116, 120, 116, 0, -53, 72, -51, -55, -55, -25, 2, 0, 32, 48, 58, 54, 6, 0, 0, 0}; diff --git a/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/src/test/java/com/ning/http/client/async/RemoteSiteTest.java index 17f7cff736..25f1c3680e 100644 --- a/src/test/java/com/ning/http/client/async/RemoteSiteTest.java +++ b/src/test/java/com/ning/http/client/async/RemoteSiteTest.java @@ -161,7 +161,7 @@ public void asyncFullBodyProperlyRead() throws Throwable { InputStream stream = r.getResponseBodyAsStream(); int available = stream.available(); int[] lengthWrapper = new int[1]; - byte[] bytes = AsyncHttpProviderUtils.readFully(stream, lengthWrapper); + /*byte[] bytes =*/ AsyncHttpProviderUtils.readFully(stream, lengthWrapper); int byteToRead = lengthWrapper[0]; Assert.assertEquals(available, byteToRead); diff --git a/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java b/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java index 8c9160eb37..298983e0de 100644 --- a/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java +++ b/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java @@ -15,7 +15,6 @@ import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; @@ -29,7 +28,7 @@ public class ResumableAsyncHandlerTest { public void testAdjustRange() { MapResumableProcessor proc = new MapResumableProcessor(); - ResumableAsyncHandler h = new ResumableAsyncHandler(proc); + ResumableAsyncHandler h = new ResumableAsyncHandler(proc); Request request = new RequestBuilder("GET").setUrl("http://test/url").build(); Request newRequest = h.adjustRequestRange(request); assertEquals(newRequest.getUrl(), request.getUrl()); diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index 0566cd9ad4..11442de993 100644 --- a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -159,7 +159,7 @@ public void echoOnOpenMessagesTest() throws Throwable { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(null); - WebSocket websocket = c.prepareGet(getTargetUrl()) + /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { @Override diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 2b1b154770..e830ee9979 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -305,7 +305,7 @@ public void echoTwoMessagesTest() throws Throwable { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()) + /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { @Override @@ -318,8 +318,6 @@ public void onMessage(String message) { public void onFragment(String fragment, boolean last) { } - boolean t = false; - @Override public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { websocket.sendTextMessage("ECHO").sendTextMessage("ECHO"); From 8194daf31f41e6f106bf7f301ed024e15ea46dec Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Fri, 18 May 2012 16:37:31 -0700 Subject: [PATCH 0218/2844] Further warning cleanup, "only" 200 left (mostly trying to resolve generic type tangle) --- .../com/ning/http/client/AsyncHttpClient.java | 2 +- .../com/ning/http/client/ListenableFuture.java | 2 +- src/main/java/com/ning/http/client/Realm.java | 3 --- .../ResumableRandomAccessFileListener.java | 1 - .../client/extra/ThrottleRequestFilter.java | 7 ++++--- .../http/client/filter/FilterException.java | 1 + .../http/client/filter/ResponseFilter.java | 3 +-- .../apache/ApacheAsyncHttpProvider.java | 11 +++++------ .../grizzly/GrizzlyConnectionsPool.java | 3 +-- .../providers/jdk/JDKAsyncHttpProvider.java | 15 +++++++-------- .../providers/jdk/JDKDelegateFuture.java | 5 +++-- .../http/client/providers/jdk/JDKFuture.java | 2 +- .../websocket/WebSocketUpgradeHandler.java | 3 +++ .../multipart/FileUploadStalledException.java | 2 +- .../client/async/AsyncProvidersBasicTest.java | 1 - .../client/async/AsyncStreamHandlerTest.java | 1 - .../client/async/ByteBufferCapacityTest.java | 1 - .../com/ning/http/client/async/FilterTest.java | 18 +++++++++--------- .../client/async/MaxConnectionsInThreads.java | 1 + .../client/async/MaxTotalConnectionTest.java | 6 +++--- .../http/client/async/PostRedirectGetTest.java | 4 ++-- ...llingTest.java => ProxyTunnellingTest.java} | 5 ++--- .../http/client/async/PutLargeFileTest.java | 2 +- .../async/RedirectConnectionUsageTest.java | 4 ++-- .../client/async/RetryNonBlockingIssue.java | 1 + .../grizzly/GrizzlyProxyTunnelingTest.java | 4 ++-- .../async/netty/NettyProxyTunnellingTest.java | 4 ++-- .../http/client/websocket/TextMessageTest.java | 9 ++++----- 28 files changed, 58 insertions(+), 63 deletions(-) rename src/test/java/com/ning/http/client/async/{ProxyyTunnellingTest.java => ProxyTunnellingTest.java} (97%) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/src/main/java/com/ning/http/client/AsyncHttpClient.java index 5343c02940..65f0c73cb5 100755 --- a/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -555,7 +555,7 @@ private FilterContext preProcessRequest(FilterContext fc) throws IOExc builder.setHeader("Range", "bytes=" + request.getRangeOffset() + "-"); request = builder.build(); } - fc = new FilterContext.FilterContextBuilder(fc).request(request).build(); + fc = new FilterContext.FilterContextBuilder(fc).request(request).build(); return fc; } diff --git a/src/main/java/com/ning/http/client/ListenableFuture.java b/src/main/java/com/ning/http/client/ListenableFuture.java index 74dfcb70f0..371c5540b2 100755 --- a/src/main/java/com/ning/http/client/ListenableFuture.java +++ b/src/main/java/com/ning/http/client/ListenableFuture.java @@ -46,7 +46,7 @@ public interface ListenableFuture extends Future { * * @param callable */ - void done(Callable callable); + void done(Callable callable); /** * Abort the current processing, and propagate the {@link Throwable} to the {@link AsyncHandler} or {@link Future} diff --git a/src/main/java/com/ning/http/client/Realm.java b/src/main/java/com/ning/http/client/Realm.java index ffc174f882..f8dbc04907 100644 --- a/src/main/java/com/ning/http/client/Realm.java +++ b/src/main/java/com/ning/http/client/Realm.java @@ -257,9 +257,6 @@ public int hashCode() { * A builder for {@link Realm} */ public static class RealmBuilder { - - private static final Logger logger = LoggerFactory.getLogger(RealmBuilder.class); - // // Portions of code (newCnonce, newResponse) are highly inspired be Jetty 6 BasicAuthentication.java class. // This code is already Apache licenced. diff --git a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java index 042baf1552..a78d1c3079 100644 --- a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java +++ b/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java @@ -25,7 +25,6 @@ */ public class ResumableRandomAccessFileListener implements ResumableListener { private final RandomAccessFile file; - private final static Logger logger = LoggerFactory.getLogger(ThrottleRequestFilter.class); public ResumableRandomAccessFileListener(RandomAccessFile file) { this.file = file; diff --git a/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java b/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java index 6289d2f284..49da8c1572 100644 --- a/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java +++ b/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java @@ -31,6 +31,7 @@ */ public class ThrottleRequestFilter implements RequestFilter { private final static Logger logger = LoggerFactory.getLogger(ThrottleRequestFilter.class); + @SuppressWarnings("unused") private final int maxConnections; private final Semaphore available; private final int maxWait; @@ -51,7 +52,7 @@ public ThrottleRequestFilter(int maxConnections, int maxWait) { * {@inheritDoc} */ /* @Override */ - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { try { if (logger.isDebugEnabled()) { @@ -68,10 +69,10 @@ public FilterContext filter(FilterContext ctx) throws FilterException { String.format("Interrupted Request %s with AsyncHandler %s", ctx.getRequest(), ctx.getAsyncHandler())); } - return new FilterContext.FilterContextBuilder(ctx).asyncHandler(new AsyncHandlerWrapper(ctx.getAsyncHandler())).build(); + return new FilterContext.FilterContextBuilder(ctx).asyncHandler(new AsyncHandlerWrapper(ctx.getAsyncHandler())).build(); } - private class AsyncHandlerWrapper implements AsyncHandler { + private class AsyncHandlerWrapper implements AsyncHandler { private final AsyncHandler asyncHandler; diff --git a/src/main/java/com/ning/http/client/filter/FilterException.java b/src/main/java/com/ning/http/client/filter/FilterException.java index c8e68ee731..b467dd4c7e 100644 --- a/src/main/java/com/ning/http/client/filter/FilterException.java +++ b/src/main/java/com/ning/http/client/filter/FilterException.java @@ -16,6 +16,7 @@ * An exception that can be thrown by an {@link com.ning.http.client.AsyncHandler} to interrupt invocation of * the {@link RequestFilter} and {@link ResponseFilter}. It also interrupt the request and response processing. */ +@SuppressWarnings("serial") public class FilterException extends Exception { /** diff --git a/src/main/java/com/ning/http/client/filter/ResponseFilter.java b/src/main/java/com/ning/http/client/filter/ResponseFilter.java index 3175dfe399..c77aea30d5 100644 --- a/src/main/java/com/ning/http/client/filter/ResponseFilter.java +++ b/src/main/java/com/ning/http/client/filter/ResponseFilter.java @@ -29,6 +29,5 @@ public interface ResponseFilter { * @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one. * @throws FilterException to interrupt the filter processing. */ - public FilterContext filter(FilterContext ctx) throws FilterException; - + public FilterContext filter(FilterContext ctx) throws FilterException; } diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 6ca3feed78..399f3f2561 100644 --- a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -47,7 +47,6 @@ import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.Header; -import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethodBase; import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; @@ -205,7 +204,7 @@ public ListenableFuture execute(Request request, AsyncHandler handler) ApacheResponseFuture f = new ApacheResponseFuture(handler, requestTimeout, request, method); f.touch(); - f.setInnerFuture(config.executorService().submit(new ApacheClientRunnable(request, handler, method, f, httpClient))); + f.setInnerFuture(config.executorService().submit(new ApacheClientRunnable(request, handler, method, f, httpClient))); maxConnections.incrementAndGet(); return f; } @@ -456,7 +455,7 @@ public T call() { int delay = requestTimeout(config, future.getRequest().getPerRequestConfig()); if (delay != -1) { ReaperFuture reaperFuture = new ReaperFuture(future); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, delay, 500, TimeUnit.MILLISECONDS); + Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, delay, 500, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); } @@ -475,7 +474,7 @@ public T call() { } ApacheResponseStatus status = new ApacheResponseStatus(uri, method, ApacheAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { fc = asyncFilter.filter(fc); if (fc == null) { @@ -594,7 +593,7 @@ public T call() { } catch (Throwable t) { if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler) + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler) .request(future.getRequest()).ioException(IOException.class.cast(t)).build(); try { @@ -666,7 +665,7 @@ private Throwable filterException(Throwable t) { return t; } - private FilterContext handleIoException(FilterContext fc) throws FilterException { + private FilterContext handleIoException(FilterContext fc) throws FilterException { for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { fc = asyncFilter.filter(fc); if (fc == null) { diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index 80b23fd7d0..ee2377150c 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -315,8 +315,7 @@ public void run() { final TimeoutResolver resolver = delayQueue.resolver; - for (@SuppressWarnings("rawtypes") - Iterator it = delayQueue.queue.iterator(); it.hasNext(); ) { + for (Iterator it = delayQueue.queue.iterator(); it.hasNext(); ) { final Connection element = (Connection) it.next(); final Long timeoutMs = resolver.getTimeoutMs(element); diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 510b794a1a..2ee51d8e75 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -121,7 +121,7 @@ public ListenableFuture execute(Request request, AsyncHandler handler) return execute(request, handler, null); } - public ListenableFuture execute(Request request, AsyncHandler handler, ListenableFuture future) throws IOException { + public ListenableFuture execute(Request request, AsyncHandler handler, ListenableFuture future) throws IOException { if (isClose.get()) { throw new IOException("Closed"); } @@ -133,10 +133,9 @@ public ListenableFuture execute(Request request, AsyncHandler handler, ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, request); - Proxy proxy = null; if (!avoidProxy && (proxyServer != null || realm != null)) { try { - proxy = configureProxyAndAuth(proxyServer, realm); + /*Proxy proxy =*/ configureProxyAndAuth(proxyServer, realm); } catch (AuthenticationException e) { throw new IOException(e.getMessage()); } @@ -148,15 +147,15 @@ public ListenableFuture execute(Request request, AsyncHandler handler, int requestTimeout = (conf != null && conf.getRequestTimeoutInMs() != 0) ? conf.getRequestTimeoutInMs() : config.getRequestTimeoutInMs(); - JDKDelegateFuture delegate = null; + JDKDelegateFuture delegate = null; if (future != null) { - delegate = new JDKDelegateFuture(handler, requestTimeout, future, urlConnection); + delegate = new JDKDelegateFuture(handler, requestTimeout, future, urlConnection); } - JDKFuture f = delegate == null ? new JDKFuture(handler, requestTimeout, urlConnection) : delegate; + JDKFuture f = (delegate == null) ? new JDKFuture(handler, requestTimeout, urlConnection) : delegate; f.touch(); - f.setInnerFuture(config.executorService().submit(new AsyncHttpUrlConnection(urlConnection, request, handler, f))); + f.setInnerFuture(config.executorService().submit(new AsyncHttpUrlConnection(urlConnection, request, handler, f))); maxConnections.incrementAndGet(); return f; @@ -252,7 +251,7 @@ public T call() throws Exception { logger.debug("\n\nRequest {}\n\nResponse {}\n", request, statusCode); ResponseStatus status = new ResponseStatus(uri, urlConnection, JDKAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { fc = asyncFilter.filter(fc); if (fc == null) { diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java index 9553e02152..b3da007d1a 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java @@ -25,12 +25,13 @@ public class JDKDelegateFuture extends JDKFuture { private final ListenableFuture delegateFuture; - public JDKDelegateFuture(AsyncHandler asyncHandler, int responseTimeoutInMs, ListenableFuture delegateFuture, HttpURLConnection urlConnection) { + public JDKDelegateFuture(AsyncHandler asyncHandler, int responseTimeoutInMs, + ListenableFuture delegateFuture, HttpURLConnection urlConnection) { super(asyncHandler, responseTimeoutInMs, urlConnection); this.delegateFuture = delegateFuture; } - public void done(Callable callable) { + public void done(Callable callable) { delegateFuture.done(callable); super.done(callable); } diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java index 4666459dc9..023abf30c5 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java +++ b/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java @@ -58,7 +58,7 @@ protected void setInnerFuture(Future innerFuture) { this.innerFuture = innerFuture; } - public void done(Callable callable) { + public void done(Callable callable) { isDone.set(true); super.done(); } diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java index 9854486400..e94242521b 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java @@ -28,8 +28,11 @@ public class WebSocketUpgradeHandler implements UpgradeHandler, Async private WebSocket webSocket; private final ConcurrentLinkedQueue l; + @SuppressWarnings("unused") private final String protocol; + @SuppressWarnings("unused") private final long maxByteSize; + @SuppressWarnings("unused") private final long maxTextSize; private final AtomicBoolean ok = new AtomicBoolean(false); diff --git a/src/main/java/com/ning/http/multipart/FileUploadStalledException.java b/src/main/java/com/ning/http/multipart/FileUploadStalledException.java index 6549929868..1533027fdd 100644 --- a/src/main/java/com/ning/http/multipart/FileUploadStalledException.java +++ b/src/main/java/com/ning/http/multipart/FileUploadStalledException.java @@ -17,6 +17,6 @@ /** * @author Gail Hernandez */ +@SuppressWarnings("serial") public class FileUploadStalledException extends IOException { - } diff --git a/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index 41421e46ef..b6d31e5b24 100755 --- a/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -514,7 +514,6 @@ public Response onCompleted(Response response) throws Exception { public void asyncDoPostBodyIsoTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); Response r = c.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); assertEquals(r.getResponseBody().getBytes("ISO-8859-1"),"\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); c.close(); diff --git a/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java index 8e77bdd99d..d909314e33 100644 --- a/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java +++ b/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java @@ -508,7 +508,6 @@ public String onCompleted() throws Exception { @Test(groups = {"standalone", "default_provider"}) public void closeConnectionTest() throws Throwable { - final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); Response r = c.prepareGet(getTargetUrl()).execute(new AsyncHandler() { diff --git a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java index ea8e7134fb..b8476c7d15 100644 --- a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java +++ b/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java @@ -79,7 +79,6 @@ public AbstractHandler configureHandler() throws Exception { @Test(groups = {"standalone", "default_provider"}) public void basicByteBufferTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final AtomicBoolean completed = new AtomicBoolean(false); byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); long repeats = (1024 * 100 * 10 / bytes.length) + 1; diff --git a/src/test/java/com/ning/http/client/async/FilterTest.java b/src/test/java/com/ning/http/client/async/FilterTest.java index 6932087dac..b71bb5566a 100644 --- a/src/test/java/com/ning/http/client/async/FilterTest.java +++ b/src/test/java/com/ning/http/client/async/FilterTest.java @@ -107,8 +107,7 @@ public void maxConnectionsText() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()) - .execute().get(); + /*Response response =*/ c.preparePost(getTargetUrl()).execute().get(); fail("Should have timed out"); } catch (IOException ex) { assertNotNull(ex); @@ -126,7 +125,8 @@ public void basicResponseFilterTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addResponseFilter(new ResponseFilter() { - public FilterContext filter(FilterContext ctx) throws FilterException { + //@Override + public FilterContext filter(FilterContext ctx) throws FilterException { return ctx; } @@ -152,11 +152,11 @@ public void replayResponseFilterTest() throws Throwable { b.addResponseFilter(new ResponseFilter() { - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { if (replay.getAndSet(false)) { Request request = new RequestBuilder(ctx.getRequest()).addHeader("X-Replay", "true").build(); - return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); + return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); } return ctx; } @@ -184,11 +184,11 @@ public void replayStatusCodeResponseFilterTest() throws Throwable { b.addResponseFilter(new ResponseFilter() { - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { if (ctx.getResponseStatus() != null && ctx.getResponseStatus().getStatusCode() == 200 && replay.getAndSet(false)) { Request request = new RequestBuilder(ctx.getRequest()).addHeader("X-Replay", "true").build(); - return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); + return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); } return ctx; } @@ -216,14 +216,14 @@ public void replayHeaderResponseFilterTest() throws Throwable { b.addResponseFilter(new ResponseFilter() { - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { if (ctx.getResponseHeaders() != null && ctx.getResponseHeaders().getHeaders().getFirstValue("Ping").equals("Pong") && replay.getAndSet(false)) { Request request = new RequestBuilder(ctx.getRequest()).addHeader("Ping", "Pong").build(); - return new FilterContext.FilterContextBuilder() + return new FilterContext.FilterContextBuilder() .asyncHandler(ctx.getAsyncHandler()) .request(request) .replayRequest(true) diff --git a/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java b/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java index 01484c610d..d0dd9ea346 100644 --- a/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java +++ b/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java @@ -174,6 +174,7 @@ public String getTargetUrl() { return s; } + @SuppressWarnings("serial") public static class MockTimeoutHttpServlet extends HttpServlet { private static final String contentType = "text/plain"; public static long DEFAULT_TIMEOUT = 2000; diff --git a/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java b/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java index ad47d1ceac..abf99aaf9e 100644 --- a/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java +++ b/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java @@ -109,7 +109,7 @@ public void testMaxTotalConnectionsCorrectExceptionHandling() { .build() ); - List futures = new ArrayList(); + List> futures = new ArrayList>(); boolean caughtError = false; for (int i = 0; i < urls.length; i++) { try { @@ -126,9 +126,9 @@ public void testMaxTotalConnectionsCorrectExceptionHandling() { Assert.assertTrue(caughtError); // get results of executed requests - for (Future future : futures) { + for (Future future : futures) { try { - Object res = future.get(); + /*Response res =*/ future.get(); } catch (InterruptedException e) { log.error("Error!", e); } catch (ExecutionException e) { diff --git a/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java b/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java index 658673384b..9bfac1ff58 100644 --- a/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java +++ b/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java @@ -80,7 +80,7 @@ private void doTestNegative(final int status, boolean strict) throws Exception { setStrict302Handling(strict). addResponseFilter(new ResponseFilter() { @Override - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { // pass on the x-expect-get and remove the x-redirect // headers if found in the response ctx.getResponseHeaders().getHeaders().get("x-expect-post"); @@ -118,7 +118,7 @@ private void doTestPositive(final int status) throws Exception { AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true). addResponseFilter(new ResponseFilter() { @Override - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { // pass on the x-expect-get and remove the x-redirect // headers if found in the response ctx.getResponseHeaders().getHeaders().get("x-expect-get"); diff --git a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java b/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java similarity index 97% rename from src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java rename to src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java index f1dd8a631b..c0bb1f2695 100644 --- a/src/test/java/com/ning/http/client/async/ProxyyTunnellingTest.java +++ b/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java @@ -36,12 +36,12 @@ import java.util.concurrent.TimeoutException; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; /** * Proxy usage tests. */ -public abstract class ProxyyTunnellingTest extends AbstractBasicTest { +@SuppressWarnings("deprecation") +public abstract class ProxyTunnellingTest extends AbstractBasicTest { private Server server2; @@ -158,7 +158,6 @@ public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, .setUrl(getTargetUrl2()) .setHeader("Content-Type", "text/html").build(); - StringBuffer s = new StringBuffer(); Response r = client.get().get(); assertEquals(r.getStatusCode(), 200); diff --git a/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/src/test/java/com/ning/http/client/async/PutLargeFileTest.java index 27cc6b61f6..728ab012fd 100644 --- a/src/test/java/com/ning/http/client/async/PutLargeFileTest.java +++ b/src/test/java/com/ning/http/client/async/PutLargeFileTest.java @@ -62,7 +62,7 @@ public void testPutSmallFile() throws Exception { byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); long repeats = (1024 / bytes.length) + 1; - int timeout = (5000); +// int timeout = (5000); largeFile = createTempFile(bytes, (int) repeats); AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); diff --git a/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java b/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java index 6cc687e49f..997936bd79 100644 --- a/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java +++ b/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java @@ -150,15 +150,15 @@ public void testGetRedirectFinalUrl() { protected abstract AsyncHttpProviderConfig getProviderConfig(); - + @SuppressWarnings("serial") class MockRedirectHttpServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.sendRedirect("/overthere"); } - } + @SuppressWarnings("serial") class MockFullResponseHttpServlet extends HttpServlet { private static final String contentType = "text/xml"; diff --git a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java b/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java index 247fe8c2a3..c9dd69a42c 100644 --- a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java +++ b/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java @@ -259,6 +259,7 @@ public void testRetryBlocking() throws IOException, InterruptedException, } } + @SuppressWarnings("serial") public class MockExceptionServlet extends HttpServlet { private Map requests = new diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java index 9033261a2c..d153c4bcd5 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java +++ b/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java @@ -15,10 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyyTunnellingTest; +import com.ning.http.client.async.ProxyTunnellingTest; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -public class GrizzlyProxyTunnelingTest extends ProxyyTunnellingTest { +public class GrizzlyProxyTunnelingTest extends ProxyTunnellingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java b/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java index b0a8f6fa1d..a07028b865 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java +++ b/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java @@ -15,9 +15,9 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.async.ProxyyTunnellingTest; +import com.ning.http.client.async.ProxyTunnellingTest; -public class NettyProxyTunnellingTest extends ProxyyTunnellingTest { +public class NettyProxyTunnellingTest extends ProxyTunnellingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return ProviderUtil.nettyProvider(config); diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index e830ee9979..3130674fde 100644 --- a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -74,7 +74,7 @@ public void onOpen() throws Throwable { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()) + /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override @@ -116,12 +116,11 @@ public void onEmptyListenerTest() throws Throwable { @Test(timeOut = 60000) public void onFailureTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final AtomicReference text = new AtomicReference(""); +// final AtomicReference text = new AtomicReference(""); - WebSocket websocket = null; Throwable t = null; try { - websocket = c.prepareGet("ws://abcdefg") + /* WebSocket websocket =*/ c.prepareGet("ws://abcdefg") .execute(new WebSocketUpgradeHandler.Builder().build()).get(); } catch (Throwable t2) { t = t2; @@ -135,7 +134,7 @@ public void onTimeoutCloseTest() throws Throwable { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()) + /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override From 21b7843b4812a30396510a05c988b39cb5d8934c Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 23 May 2012 23:31:47 +0200 Subject: [PATCH 0219/2844] AsyncHttpClient implements Closeable interface - enables use of JDK7's "try-with-resources" - see issue #44 --- src/main/java/com/ning/http/client/AsyncHttpClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/src/main/java/com/ning/http/client/AsyncHttpClient.java index 65f0c73cb5..767ef5cb96 100755 --- a/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -22,6 +22,7 @@ import com.ning.http.client.filter.RequestFilter; import com.ning.http.client.providers.jdk.JDKAsyncHttpProvider; import com.ning.http.client.resumable.ResumableAsyncHandler; +import java.io.Closeable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -138,7 +139,7 @@ * An instance of this class will cache every HTTP 1.1 connections and close them when the {@link AsyncHttpClientConfig#getIdleConnectionTimeoutInMs()} * expires. This object can hold many persistent connections to different host. */ -public class AsyncHttpClient { +public class AsyncHttpClient implements Closeable { private final static String DEFAULT_PROVIDER = "com.ning.http.client.providers.netty.NettyAsyncHttpProvider"; private final AsyncHttpProvider httpProvider; From e0f4813c8cb691be9dcc0603a8850ecb184402c4 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 15 Jun 2012 11:47:52 -0700 Subject: [PATCH 0220/2844] Integrate Grizzly 2.2.10. --- pom.xml | 2 +- .../http/client/providers/grizzly/GrizzlyResponse.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index b93cb9bf95..045026284d 100644 --- a/pom.xml +++ b/pom.xml @@ -528,7 +528,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.5 + 2.2.10 true diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 8d803efff4..52f3fece36 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -22,6 +22,7 @@ import com.ning.http.util.AsyncHttpProviderUtils; import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.http.Cookies; import org.glassfish.grizzly.http.CookiesBuilder; import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.memory.Buffers; @@ -291,11 +292,12 @@ public boolean hasResponseBody() { // --------------------------------------------------------- Private Methods - private List convertCookies(final List grizzlyCookies) { + private List convertCookies(Cookies cookies) { - List cookies = new ArrayList(grizzlyCookies.size()); + final org.glassfish.grizzly.http.Cookie[] grizzlyCookies = cookies.get(); + List convertedCookies = new ArrayList(grizzlyCookies.length); for (org.glassfish.grizzly.http.Cookie gCookie : grizzlyCookies) { - cookies.add(new Cookie(gCookie.getDomain(), + convertedCookies.add(new Cookie(gCookie.getDomain(), gCookie.getName(), gCookie.getValue(), gCookie.getPath(), @@ -303,7 +305,7 @@ private List convertCookies(final List Date: Fri, 15 Jun 2012 11:47:52 -0700 Subject: [PATCH 0221/2844] Integrate Grizzly 2.2.10. --- pom.xml | 2 +- .../http/client/providers/grizzly/GrizzlyResponse.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 70da921089..2e29eee388 100644 --- a/pom.xml +++ b/pom.xml @@ -529,7 +529,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.5 + 2.2.10 true diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index e9ba15fbb6..a5cedaa243 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -21,6 +21,7 @@ import com.ning.http.util.AsyncHttpProviderUtils; import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.http.Cookies; import org.glassfish.grizzly.http.CookiesBuilder; import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.memory.Buffers; @@ -199,11 +200,12 @@ public boolean hasResponseBody() { // --------------------------------------------------------- Private Methods - private List convertCookies(final List grizzlyCookies) { + private List convertCookies(Cookies cookies) { - List cookies = new ArrayList(grizzlyCookies.size()); + final org.glassfish.grizzly.http.Cookie[] grizzlyCookies = cookies.get(); + List convertedCookies = new ArrayList(grizzlyCookies.length); for (org.glassfish.grizzly.http.Cookie gCookie : grizzlyCookies) { - cookies.add(new Cookie(gCookie.getDomain(), + convertedCookies.add(new Cookie(gCookie.getDomain(), gCookie.getName(), gCookie.getValue(), gCookie.getPath(), @@ -211,7 +213,7 @@ private List convertCookies(final List Date: Fri, 15 Jun 2012 12:05:59 -0700 Subject: [PATCH 0222/2844] Fix javadoc warnings. --- src/main/java/com/ning/http/client/AsyncHandler.java | 2 +- src/main/java/com/ning/http/client/UpgradeHandler.java | 2 +- src/main/java/com/ning/http/client/filter/FilterContext.java | 1 - src/main/java/com/ning/http/client/websocket/WebSocket.java | 2 +- .../http/client/websocket/WebSocketCloseCodeReasonListener.java | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ning/http/client/AsyncHandler.java b/src/main/java/com/ning/http/client/AsyncHandler.java index ec9bc77022..02b62e1707 100644 --- a/src/main/java/com/ning/http/client/AsyncHandler.java +++ b/src/main/java/com/ning/http/client/AsyncHandler.java @@ -55,7 +55,7 @@ public static enum STATE { */ CONTINUE, /** - * Upgrade the protocol. When specified, the AsyncHttpProvider will try to invoke the {@link UpgradeHandler#onReady} + * Upgrade the protocol. */ UPGRADE } diff --git a/src/main/java/com/ning/http/client/UpgradeHandler.java b/src/main/java/com/ning/http/client/UpgradeHandler.java index 889c4895e1..861e3abe0a 100644 --- a/src/main/java/com/ning/http/client/UpgradeHandler.java +++ b/src/main/java/com/ning/http/client/UpgradeHandler.java @@ -13,7 +13,7 @@ package com.ning.http.client; /** - * Invoked when an {@link AsyncHandler.STATE#UPGRADE} is returned. Currently the library only support {@link WebSocket} + * Invoked when an {@link AsyncHandler.STATE#UPGRADE} is returned. Currently the library only support {@link com.ning.http.client.websocket.WebSocket} * as type. * * @param diff --git a/src/main/java/com/ning/http/client/filter/FilterContext.java b/src/main/java/com/ning/http/client/filter/FilterContext.java index 91aeee1c6a..544a461edb 100644 --- a/src/main/java/com/ning/http/client/filter/FilterContext.java +++ b/src/main/java/com/ning/http/client/filter/FilterContext.java @@ -73,7 +73,6 @@ public HttpResponseStatus getResponseStatus() { /** * Return the response {@link HttpResponseHeaders} - * @return */ public HttpResponseHeaders getResponseHeaders() { return b.headers; diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/src/main/java/com/ning/http/client/websocket/WebSocket.java index fe6f8b2e09..3917a6b4ad 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -41,7 +41,7 @@ public interface WebSocket { * @param offset starting offset. * @param len length. * @param last flag indicating whether or not this is the last fragment. - * @return + * @return this. */ WebSocket stream(byte[] fragment, int offset, int len, boolean last); diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java b/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java index e3213916bc..af524527b7 100644 --- a/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java +++ b/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java @@ -14,7 +14,7 @@ /** * Extend the normal close listener with one that support the WebSocket's code and reason. - * @See http://tools.ietf.org/html/rfc6455#section-5.5.1 + * @see "http://tools.ietf.org/html/rfc6455#section-5.5.1" */ public interface WebSocketCloseCodeReasonListener { From a93f3a40ba4f5726aae035cf28c637ac2567a14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20R=C3=A9mond?= Date: Fri, 22 Jun 2012 19:39:09 +0200 Subject: [PATCH 0223/2844] give the file path in the exception so that it's easier to debug --- src/main/java/com/ning/http/multipart/FilePartSource.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ning/http/multipart/FilePartSource.java b/src/main/java/com/ning/http/multipart/FilePartSource.java index 3f652047cc..f3b28add14 100644 --- a/src/main/java/com/ning/http/multipart/FilePartSource.java +++ b/src/main/java/com/ning/http/multipart/FilePartSource.java @@ -50,10 +50,14 @@ public FilePartSource(File file) throws FileNotFoundException { this.file = file; if (file != null) { if (!file.isFile()) { - throw new FileNotFoundException("File is not a normal file."); + final String errorMessage = + String.format("File is not a normal file (%s).", file.getAbsolutePath()); + throw new FileNotFoundException(errorMessage); } if (!file.canRead()) { - throw new FileNotFoundException("File is not readable."); + final String errorMessage = + String.format("File is not readable (%s).", file.getAbsolutePath()); + throw new FileNotFoundException(errorMessage); } this.fileName = file.getName(); } From eb136417465e13f0ba17c2ae8efdb9a45c22a315 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Jun 2012 11:38:40 -0700 Subject: [PATCH 0224/2844] Modularization of AHC. Some warts due to the refactoring: - duplicated api/test/resources to providers/grizzly/test/resources and providers/netty/test/resources. There's probably a better way to share resources between modules, but for an initial commit, this should be fine. Tip: - When checking the history of files, you may need to pass the --follow flag to the log command. --- api/pom.xml | 44 ++ .../http/client/AsyncCompletionHandler.java | 0 .../client/AsyncCompletionHandlerBase.java | 0 .../com/ning/http/client/AsyncHandler.java | 0 .../com/ning/http/client/AsyncHttpClient.java | 77 +++- .../http/client/AsyncHttpClientConfig.java | 0 .../client/AsyncHttpClientConfigBean.java | 0 .../ning/http/client/AsyncHttpProvider.java | 0 .../http/client/AsyncHttpProviderConfig.java | 0 .../main/java/com/ning/http/client/Body.java | 0 .../com/ning/http/client/BodyConsumer.java | 0 .../client/BodyDeferringAsyncHandler.java | 0 .../com/ning/http/client/BodyGenerator.java | 0 .../com/ning/http/client/ByteArrayPart.java | 0 .../com/ning/http/client/ConnectionsPool.java | 0 .../java/com/ning/http/client/Cookie.java | 0 .../java/com/ning/http/client/FilePart.java | 0 .../FluentCaseInsensitiveStringsMap.java | 0 .../ning/http/client/FluentStringsMap.java | 0 .../com/ning/http/client/HttpContent.java | 0 .../http/client/HttpResponseBodyPart.java | 0 .../ning/http/client/HttpResponseHeaders.java | 0 .../ning/http/client/HttpResponseStatus.java | 0 .../ning/http/client/ListenableFuture.java | 0 .../http/client/MaxRedirectException.java | 0 .../main/java/com/ning/http/client/Part.java | 0 .../ning/http/client/PerRequestConfig.java | 0 .../http/client/ProgressAsyncHandler.java | 0 .../com/ning/http/client/ProxyServer.java | 0 .../ning/http/client/RandomAccessBody.java | 0 .../main/java/com/ning/http/client/Realm.java | 3 - .../java/com/ning/http/client/Request.java | 0 .../com/ning/http/client/RequestBuilder.java | 0 .../ning/http/client/RequestBuilderBase.java | 0 .../java/com/ning/http/client/Response.java | 0 .../http/client/ResumableBodyConsumer.java | 0 .../ning/http/client/SSLEngineFactory.java | 0 .../ning/http/client/SignatureCalculator.java | 0 .../http/client/SimpleAsyncHttpClient.java | 0 .../java/com/ning/http/client/StringPart.java | 0 .../ning/http/client/ThrowableHandler.java | 0 .../com/ning/http/client/UpgradeHandler.java | 0 .../consumers/AppendableBodyConsumer.java | 2 +- .../consumers/ByteBufferBodyConsumer.java | 0 .../client/consumers/FileBodyConsumer.java | 0 .../consumers/OutputStreamBodyConsumer.java | 2 +- .../ResumableRandomAccessFileListener.java | 2 - .../client/extra/ThrottleRequestFilter.java | 0 .../http/client/filter/FilterContext.java | 0 .../http/client/filter/FilterException.java | 0 .../http/client/filter/IOExceptionFilter.java | 0 .../http/client/filter/RequestFilter.java | 0 .../http/client/filter/ResponseFilter.java | 0 .../generators/ByteArrayBodyGenerator.java | 0 .../client/generators/FileBodyGenerator.java | 0 .../generators/InputStreamBodyGenerator.java | 0 .../listenable/AbstractListenableFuture.java | 0 .../http/client/listenable/ExecutionList.java | 0 .../listener/TransferCompletionHandler.java | 0 .../client/listener/TransferListener.java | 0 .../com/ning/http/client/ntlm/NTLMEngine.java | 0 .../http/client/ntlm/NTLMEngineException.java | 0 .../ning/http/client/oauth/ConsumerKey.java | 0 .../oauth/OAuthSignatureCalculator.java | 0 .../ning/http/client/oauth/RequestToken.java | 0 .../http/client/oauth/ThreadSafeHMAC.java | 0 .../http/client/providers/ResponseBase.java | 1 - .../providers/jdk/JDKAsyncHttpProvider.java | 1 - .../jdk/JDKAsyncHttpProviderConfig.java | 0 .../providers/jdk/JDKDelegateFuture.java | 0 .../http/client/providers/jdk/JDKFuture.java | 0 .../client/providers/jdk/JDKResponse.java | 0 .../providers/jdk/ResponseBodyPart.java | 0 .../client/providers/jdk/ResponseHeaders.java | 0 .../client/providers/jdk/ResponseStatus.java | 0 .../PropertiesBasedResumableProcessor.java | 0 .../resumable/ResumableAsyncHandler.java | 0 .../resumable/ResumableIOExceptionFilter.java | 0 .../client/resumable/ResumableListener.java | 0 .../ning/http/client/simple/HeaderMap.java | 0 .../simple/SimpleAHCTransferListener.java | 0 .../webdav/WebDavCompletionHandlerBase.java | 0 .../http/client/webdav/WebDavResponse.java | 0 .../websocket/DefaultWebSocketListener.java | 0 .../ning/http/client/websocket/WebSocket.java | 0 .../websocket/WebSocketByteListener.java | 0 .../WebSocketCloseCodeReasonListener.java | 0 .../client/websocket/WebSocketListener.java | 0 .../websocket/WebSocketPingListener.java | 0 .../websocket/WebSocketPongListener.java | 0 .../websocket/WebSocketTextListener.java | 0 .../websocket/WebSocketUpgradeHandler.java | 0 .../http/multipart/ByteArrayPartSource.java | 0 .../com/ning/http/multipart/FilePart.java | 0 .../ning/http/multipart/FilePartSource.java | 0 .../http/multipart/FilePartStallHandler.java | 0 .../multipart/FileUploadStalledException.java | 0 .../ning/http/multipart/MultipartBody.java | 0 .../http/multipart/MultipartEncodingUtil.java | 0 .../multipart/MultipartRequestEntity.java | 0 .../java/com/ning/http/multipart/Part.java | 0 .../com/ning/http/multipart/PartBase.java | 0 .../com/ning/http/multipart/PartSource.java | 0 .../ning/http/multipart/RequestEntity.java | 0 .../com/ning/http/multipart/StringPart.java | 0 .../http/util/AllowAllHostnameVerifier.java | 0 .../http/util/AsyncHttpProviderUtils.java | 0 .../ning/http/util/AuthenticatorUtils.java | 0 .../main/java/com/ning/http/util/Base64.java | 0 .../java/com/ning/http/util/DateUtil.java | 0 .../java/com/ning/http/util/ProxyUtils.java | 0 .../java/com/ning/http/util/SslUtils.java | 0 .../java/com/ning/http/util/UTF8Codec.java | 0 .../com/ning/http/util/UTF8UrlEncoder.java | 0 .../java/com/ning/http/client/RealmTest.java | 2 +- .../http/client/async/AbstractBasicTest.java | 0 .../client/async/AsyncProvidersBasicTest.java | 1 - .../client/async/AsyncStreamHandlerTest.java | 0 .../async/AsyncStreamLifecycleTest.java | 0 .../http/client/async/AuthTimeoutTest.java | 1 - .../ning/http/client/async/BasicAuthTest.java | 2 +- .../http/client/async/BasicHttpsTest.java | 0 .../ning/http/client/async/BodyChunkTest.java | 0 .../async/BodyDeferringAsyncHandlerTest.java | 0 .../client/async/ByteBufferCapacityTest.java | 1 - .../ning/http/client/async/ChunkingTest.java | 0 .../http/client/async/ComplexClientTest.java | 0 .../http/client/async/ConnectionPoolTest.java | 87 +--- .../http/client/async/DigestAuthTest.java | 1 - .../ning/http/client/async/EmptyBodyTest.java | 0 .../http/client/async/ErrorResponseTest.java | 0 .../client/async/Expect100ContinueTest.java | 0 .../client/async/FilePartLargeFileTest.java | 0 .../ning/http/client/async/FilterTest.java | 0 .../FluentCaseInsensitiveStringsMapTest.java | 0 .../client/async/FluentStringsMapTest.java | 0 .../client/async/FollowingThreadTest.java | 0 .../ning/http/client/async/Head302Test.java | 1 - .../client/async/HostnameVerifierTest.java | 0 .../client/async/HttpToHttpsRedirectTest.java | 0 .../client/async/IdleStateHandlerTest.java | 0 .../http/client/async/InputStreamTest.java | 0 .../client/async/ListenableFutureTest.java | 0 .../client/async/MaxConnectionsInThreads.java | 0 .../client/async/MaxTotalConnectionTest.java | 0 .../client/async/MultipartUploadTest.java | 0 .../http/client/async/MultipleHeaderTest.java | 0 .../http/client/async/NoNullResponseTest.java | 0 .../async/NonAsciiContentLengthTest.java | 0 .../http/client/async/ParamEncodingTest.java | 0 .../async/PerRequestRelative302Test.java | 0 .../client/async/PerRequestTimeoutTest.java | 0 .../client/async/PostRedirectGetTest.java | 0 .../http/client/async/PostWithQSTest.java | 0 .../ning/http/client/async/ProviderUtil.java | 9 - .../com/ning/http/client/async/ProxyTest.java | 2 - .../client/async/ProxyTunnellingTest.java | 0 .../http/client/async/PutLargeFileTest.java | 0 .../client/async/QueryParametersTest.java | 0 .../com/ning/http/client/async/RC10KTest.java | 0 .../async/RedirectConnectionUsageTest.java | 1 - .../http/client/async/Relative302Test.java | 0 .../http/client/async/RemoteSiteTest.java | 0 .../http/client/async/RequestBuilderTest.java | 0 .../http/client/async/RetryRequestTest.java | 0 .../SimpleAsyncClientErrorBehaviourTest.java | 0 .../async/SimpleAsyncHttpClientTest.java | 5 + .../client/async/TransferListenerTest.java | 0 .../http/client/async/WebDavBasicTest.java | 0 .../http/client/async/ZeroCopyFileTest.java | 0 .../ByteArrayBodyGeneratorTest.java | 0 .../client/oauth/TestSignatureCalculator.java | 0 .../resumable/MapResumableProcessor.java | 0 ...PropertiesBasedResumableProcesserTest.java | 0 .../resumable/ResumableAsyncHandlerTest.java | 0 .../client/websocket/AbstractBasicTest.java | 0 .../client/websocket/ByteMessageTest.java | 0 .../websocket/CloseCodeReasonMessageTest.java | 9 - .../http/client/websocket/RedirectTest.java | 2 - .../client/websocket/TextMessageTest.java | 0 .../com/ning/http/util/ProxyUtilsTest.java | 0 .../com/ning/http/util/TestUTF8UrlCodec.java | 0 {src => api/src}/test/resources/300k.png | Bin .../src}/test/resources/SimpleTextFile.txt | 0 .../src}/test/resources/client.keystore | Bin {src => api/src}/test/resources/gzip.txt.gz | Bin .../src}/test/resources/logback-test.xml | 0 .../src}/test/resources/realm.properties | 0 .../src}/test/resources/ssltest-cacerts.jks | Bin .../src}/test/resources/ssltest-keystore.jks | Bin {src => api/src}/test/resources/textfile.txt | 0 {src => api/src}/test/resources/textfile2.txt | 0 pom.xml | 413 ++++++++---------- providers/apache/pom.xml | 37 ++ .../apache/ApacheAsyncHttpProvider.java | 0 .../apache/ApacheAsyncHttpProviderConfig.java | 0 .../providers/apache/ApacheResponse.java | 0 .../apache/ApacheResponseBodyPart.java | 0 .../apache/ApacheResponseFuture.java | 0 .../apache/ApacheResponseHeaders.java | 0 .../apache/ApacheResponseStatus.java | 0 providers/grizzly/pom.xml | 47 ++ .../grizzly/FeedableBodyGenerator.java | 0 .../grizzly/GrizzlyAsyncHttpProvider.java | 0 .../GrizzlyAsyncHttpProviderConfig.java | 0 .../grizzly/GrizzlyConnectionsPool.java | 0 .../providers/grizzly/GrizzlyResponse.java | 0 .../grizzly/GrizzlyResponseBodyPart.java | 0 .../grizzly/GrizzlyResponseFuture.java | 1 - .../grizzly/GrizzlyResponseHeaders.java | 0 .../grizzly/GrizzlyResponseStatus.java | 0 .../grizzly/TransportCustomizer.java | 0 .../GrizzlyAsyncProviderBasicTest.java | 12 +- .../GrizzlyAsyncStreamHandlerTest.java | 3 +- .../GrizzlyAsyncStreamLifecycleTest.java | 3 +- .../grizzly/GrizzlyAuthTimeoutTest.java | 3 +- .../grizzly/GrizzlyBasicAuthTest.java | 3 +- .../grizzly/GrizzlyBasicHttpsTest.java | 3 +- .../grizzly/GrizzlyBodyChunkTest.java | 3 +- .../GrizzlyBodyDeferringAsyncHandlerTest.java | 3 +- .../GrizzlyByteBufferCapacityTest.java | 3 +- .../grizzly/GrizzlyChunkingTest.java | 3 +- .../grizzly/GrizzlyComplexClientTest.java | 3 +- .../grizzly/GrizzlyConnectionPoolTest.java | 3 +- .../grizzly/GrizzlyDigestAuthTest.java | 3 +- .../grizzly/GrizzlyEmptyBodyTest.java | 3 +- .../grizzly/GrizzlyErrorResponseTest.java | 3 +- .../grizzly/GrizzlyExpectContinue100Test.java | 3 +- .../providers}/grizzly/GrizzlyFilterTest.java | 3 +- .../grizzly/GrizzlyFollowingThreadTest.java | 3 +- .../grizzly/GrizzlyHead302Test.java | 3 +- .../GrizzlyHttpToHttpsRedirectTest.java | 3 +- .../grizzly/GrizzlyIdleStateHandlerTest.java | 3 +- .../grizzly/GrizzlyInputStreamTest.java | 3 +- .../grizzly/GrizzlyListenableFutureTest.java | 3 +- .../GrizzlyMaxConnectionsInThreadsTest.java | 3 +- .../GrizzlyMaxTotalConnectionTest.java | 3 +- .../grizzly/GrizzlyMultipleHeaderTest.java | 3 +- .../grizzly/GrizzlyNoNullResponseTest.java | 3 +- .../GrizzlyNonAsciiContentLengthTest.java | 3 +- .../grizzly/GrizzlyParamEncodingTest.java | 3 +- .../GrizzlyPerRequestRelative302Test.java | 3 +- .../grizzly/GrizzlyPerRequestTimeoutTest.java | 3 +- .../grizzly/GrizzlyPostRedirectGetTest.java | 3 +- .../grizzly/GrizzlyPostWithQSTest.java | 3 +- .../providers}/grizzly/GrizzlyProxyTest.java | 3 +- .../grizzly/GrizzlyProxyTunnelingTest.java | 3 +- .../grizzly/GrizzlyPutLargeFileTest.java | 3 +- .../grizzly/GrizzlyQueryParametersTest.java | 3 +- .../providers}/grizzly/GrizzlyRC10KTest.java | 3 +- .../GrizzlyRedirectConnectionUsageTest.java | 5 +- .../grizzly/GrizzlyRelative302Test.java | 3 +- .../grizzly/GrizzlyRemoteSiteTest.java | 3 +- .../grizzly/GrizzlyRetryRequestTest.java | 3 +- .../GrizzlySimpleAsyncHttpClientTest.java | 3 +- .../grizzly/GrizzlyTransferListenerTest.java | 3 +- .../websocket}/GrizzlyByteMessageTest.java | 3 +- .../GrizzlyCloseCodeReasonMsgTest.java | 2 +- .../websocket}/GrizzlyRedirectTest.java | 2 +- .../websocket}/GrizzlyTextMessageTest.java | 3 +- providers/grizzly/src/test/resources/300k.png | Bin 0 -> 265495 bytes .../src/test/resources/SimpleTextFile.txt | 1 + .../src/test/resources/client.keystore | Bin 0 -> 1277 bytes .../grizzly/src/test/resources/gzip.txt.gz | Bin 0 -> 47 bytes .../src/test/resources/logback-test.xml | 13 + .../src/test/resources/realm.properties | 1 + .../src/test/resources/ssltest-cacerts.jks | Bin 0 -> 29888 bytes .../src/test/resources/ssltest-keystore.jks | Bin 0 -> 1445 bytes .../grizzly/src/test/resources/textfile.txt | 1 + .../grizzly/src/test/resources/textfile2.txt | 1 + providers/netty/pom.xml | 45 ++ .../providers/netty/BodyChunkedInput.java | 0 .../providers/netty/BodyFileRegion.java | 0 .../netty/NettyAsyncHttpProvider.java | 2 +- .../netty/NettyAsyncHttpProviderConfig.java | 0 .../providers/netty/NettyConnectListener.java | 2 - .../providers/netty/NettyConnectionsPool.java | 0 .../client/providers/netty/NettyResponse.java | 0 .../providers/netty/NettyResponseFuture.java | 0 .../providers/netty/NettyWebSocket.java | 0 .../http/client/providers/netty/Protocol.java | 0 .../providers/netty/ResponseBodyPart.java | 0 .../providers/netty/ResponseHeaders.java | 0 .../providers/netty/ResponseStatus.java | 0 .../client/providers/netty/WebSocketUtil.java | 1 - .../providers/netty/spnego/SpnegoEngine.java | 0 .../netty/spnego/SpnegoTokenGenerator.java | 0 .../netty}/util/CleanupChannelGroup.java | 2 +- .../netty/NettyAsyncHttpProviderTest.java | 3 +- .../netty/NettyAsyncProviderBasicTest.java | 3 +- .../netty/NettyAsyncResponseTest.java | 0 .../netty/NettyAsyncStreamHandlerTest.java | 2 +- .../netty/NettyAsyncStreamLifecycleTest.java | 2 +- .../netty/NettyAuthTimeoutTest.java | 2 +- .../providers}/netty/NettyBasicAuthTest.java | 2 +- .../providers}/netty/NettyBasicHttpsTest.java | 2 +- .../providers}/netty/NettyBodyChunkTest.java | 2 +- .../NettyBodyDeferringAsyncHandlerTest.java | 2 +- .../netty/NettyByteBufferCapacityTest.java | 3 +- .../providers}/netty/NettyChunkingTest.java | 2 +- .../netty/NettyComplexClientTest.java | 2 +- .../netty/NettyConnectionPoolTest.java | 119 +++++ .../providers}/netty/NettyDigestAuthTest.java | 2 +- .../providers}/netty/NettyEmptyBodyTest.java | 2 +- .../netty/NettyErrorResponseTest.java | 2 +- .../netty/NettyExpect100ContinueTest.java | 2 +- .../netty/NettyFilePartLargeFileTest.java | 2 +- .../providers}/netty/NettyFilterTest.java | 2 +- .../netty/NettyFollowingThreadTest.java | 2 +- .../providers}/netty/NettyHead302Test.java | 2 +- .../netty/NettyHostnameVerifierTest.java | 2 +- .../netty/NettyHttpToHttpsRedirectTest.java | 2 +- .../netty/NettyIdleStateHandlerTest.java | 2 +- .../netty/NettyInputStreamTest.java | 2 +- .../netty/NettyListenableFutureTest.java | 2 +- .../netty/NettyMaxConnectionsInThreads.java | 2 +- .../netty/NettyMaxTotalConnectionTest.java | 2 +- .../netty/NettyMultipartUploadTest.java | 2 +- .../netty/NettyMultipleHeaderTest.java | 2 +- .../netty/NettyNoNullResponseTest.java | 2 +- .../netty/NettyNonAsciiContentLengthTest.java | 2 +- .../netty/NettyParamEncodingTest.java | 2 +- .../netty/NettyPerRequestRelative302Test.java | 2 +- .../netty/NettyPerRequestTimeoutTest.java | 2 +- .../netty/NettyPostRedirectGetTest.java | 2 +- .../providers}/netty/NettyPostWithQSTest.java | 2 +- .../providers}/netty/NettyProxyTest.java | 2 +- .../netty/NettyProxyTunnellingTest.java | 2 +- .../netty/NettyPutLargeFileTest.java | 2 +- .../netty/NettyQueryParametersTest.java | 2 +- .../providers}/netty/NettyRC10KTest.java | 2 +- .../NettyRedirectConnectionUsageTest.java | 3 +- .../netty/NettyRelative302Test.java | 2 +- .../providers}/netty/NettyRemoteSiteTest.java | 2 +- .../netty/NettyRetryRequestTest.java | 2 +- .../netty/NettySimpleAsyncHttpClientTest.java | 2 +- .../netty/NettyTransferListenerTest.java | 2 +- .../netty/NettyWebDavBasicTest.java | 2 +- .../netty/NettyZeroCopyFileTest.java | 3 +- .../netty}/RetryNonBlockingIssue.java | 2 +- .../websocket}/NettyByteMessageTest.java | 2 +- .../NettyCloseCodeReasonMsgTest.java | 2 +- .../netty/websocket}/NettyRedirectTest.java | 2 +- .../websocket}/NettyTextMessageTest.java | 2 +- providers/netty/src/test/resources/300k.png | Bin 0 -> 265495 bytes .../src/test/resources/SimpleTextFile.txt | 1 + .../netty/src/test/resources/client.keystore | Bin 0 -> 1277 bytes .../netty/src/test/resources/gzip.txt.gz | Bin 0 -> 47 bytes .../netty/src/test/resources/logback-test.xml | 13 + .../netty/src/test/resources/realm.properties | 1 + .../src/test/resources/ssltest-cacerts.jks | Bin 0 -> 29888 bytes .../src/test/resources/ssltest-keystore.jks | Bin 0 -> 1445 bytes .../netty/src/test/resources/textfile.txt | 1 + .../netty/src/test/resources/textfile2.txt | 1 + providers/pom.xml | 68 +++ site/pom.xml | 16 + {src => site/src}/site/apt/auth.apt | 0 {src => site/src}/site/apt/configuring.apt | 0 {src => site/src}/site/apt/filters.apt | 0 {src => site/src}/site/apt/oauth.apt | 0 {src => site/src}/site/apt/performances.apt | 0 {src => site/src}/site/apt/providers.apt | 0 {src => site/src}/site/apt/proxy.apt | 0 {src => site/src}/site/apt/request.apt | 0 .../src}/site/apt/resumable-download.apt | 0 {src => site/src}/site/apt/ssl.apt | 0 .../src}/site/apt/transfer-listener.apt | 0 {src => site/src}/site/apt/upload.apt | 0 {src => site/src}/site/apt/webdav.apt | 0 .../src}/site/apt/zero-bytes-copy.apt | 0 {src => site/src}/site/site.xml | 0 {src => site/src}/site/xdoc/index.xml.vm | 0 .../async/netty/NettyConnectionPoolTest.java | 27 -- 373 files changed, 766 insertions(+), 570 deletions(-) create mode 100644 api/pom.xml rename {src => api/src}/main/java/com/ning/http/client/AsyncCompletionHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java (100%) rename {src => api/src}/main/java/com/ning/http/client/AsyncHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/AsyncHttpClient.java (87%) rename {src => api/src}/main/java/com/ning/http/client/AsyncHttpClientConfig.java (100%) rename {src => api/src}/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java (100%) rename {src => api/src}/main/java/com/ning/http/client/AsyncHttpProvider.java (100%) rename {src => api/src}/main/java/com/ning/http/client/AsyncHttpProviderConfig.java (100%) rename {src => api/src}/main/java/com/ning/http/client/Body.java (100%) rename {src => api/src}/main/java/com/ning/http/client/BodyConsumer.java (100%) rename {src => api/src}/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/BodyGenerator.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ByteArrayPart.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ConnectionsPool.java (100%) rename {src => api/src}/main/java/com/ning/http/client/Cookie.java (100%) rename {src => api/src}/main/java/com/ning/http/client/FilePart.java (100%) rename {src => api/src}/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java (100%) rename {src => api/src}/main/java/com/ning/http/client/FluentStringsMap.java (100%) rename {src => api/src}/main/java/com/ning/http/client/HttpContent.java (100%) rename {src => api/src}/main/java/com/ning/http/client/HttpResponseBodyPart.java (100%) rename {src => api/src}/main/java/com/ning/http/client/HttpResponseHeaders.java (100%) rename {src => api/src}/main/java/com/ning/http/client/HttpResponseStatus.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ListenableFuture.java (100%) rename {src => api/src}/main/java/com/ning/http/client/MaxRedirectException.java (100%) rename {src => api/src}/main/java/com/ning/http/client/Part.java (100%) rename {src => api/src}/main/java/com/ning/http/client/PerRequestConfig.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ProgressAsyncHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ProxyServer.java (100%) rename {src => api/src}/main/java/com/ning/http/client/RandomAccessBody.java (100%) rename {src => api/src}/main/java/com/ning/http/client/Realm.java (99%) rename {src => api/src}/main/java/com/ning/http/client/Request.java (100%) rename {src => api/src}/main/java/com/ning/http/client/RequestBuilder.java (100%) rename {src => api/src}/main/java/com/ning/http/client/RequestBuilderBase.java (100%) rename {src => api/src}/main/java/com/ning/http/client/Response.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ResumableBodyConsumer.java (100%) rename {src => api/src}/main/java/com/ning/http/client/SSLEngineFactory.java (100%) rename {src => api/src}/main/java/com/ning/http/client/SignatureCalculator.java (100%) rename {src => api/src}/main/java/com/ning/http/client/SimpleAsyncHttpClient.java (100%) rename {src => api/src}/main/java/com/ning/http/client/StringPart.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ThrowableHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/UpgradeHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java (93%) rename {src => api/src}/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java (100%) rename {src => api/src}/main/java/com/ning/http/client/consumers/FileBodyConsumer.java (100%) rename {src => api/src}/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java (93%) rename {src => api/src}/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java (97%) rename {src => api/src}/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java (100%) rename {src => api/src}/main/java/com/ning/http/client/filter/FilterContext.java (100%) rename {src => api/src}/main/java/com/ning/http/client/filter/FilterException.java (100%) rename {src => api/src}/main/java/com/ning/http/client/filter/IOExceptionFilter.java (100%) rename {src => api/src}/main/java/com/ning/http/client/filter/RequestFilter.java (100%) rename {src => api/src}/main/java/com/ning/http/client/filter/ResponseFilter.java (100%) rename {src => api/src}/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java (100%) rename {src => api/src}/main/java/com/ning/http/client/generators/FileBodyGenerator.java (100%) rename {src => api/src}/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java (100%) rename {src => api/src}/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java (100%) rename {src => api/src}/main/java/com/ning/http/client/listenable/ExecutionList.java (100%) rename {src => api/src}/main/java/com/ning/http/client/listener/TransferCompletionHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/listener/TransferListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ntlm/NTLMEngine.java (100%) rename {src => api/src}/main/java/com/ning/http/client/ntlm/NTLMEngineException.java (100%) rename {src => api/src}/main/java/com/ning/http/client/oauth/ConsumerKey.java (100%) rename {src => api/src}/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java (100%) rename {src => api/src}/main/java/com/ning/http/client/oauth/RequestToken.java (100%) rename {src => api/src}/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/ResponseBase.java (99%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java (99%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/JDKFuture.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/JDKResponse.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java (100%) rename {src => api/src}/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java (100%) rename {src => api/src}/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java (100%) rename {src => api/src}/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java (100%) rename {src => api/src}/main/java/com/ning/http/client/resumable/ResumableListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/simple/HeaderMap.java (100%) rename {src => api/src}/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java (100%) rename {src => api/src}/main/java/com/ning/http/client/webdav/WebDavResponse.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocket.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketByteListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketPingListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketPongListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketTextListener.java (100%) rename {src => api/src}/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/ByteArrayPartSource.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/FilePart.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/FilePartSource.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/FilePartStallHandler.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/FileUploadStalledException.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/MultipartBody.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/MultipartEncodingUtil.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/MultipartRequestEntity.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/Part.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/PartBase.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/PartSource.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/RequestEntity.java (100%) rename {src => api/src}/main/java/com/ning/http/multipart/StringPart.java (100%) rename {src => api/src}/main/java/com/ning/http/util/AllowAllHostnameVerifier.java (100%) rename {src => api/src}/main/java/com/ning/http/util/AsyncHttpProviderUtils.java (100%) rename {src => api/src}/main/java/com/ning/http/util/AuthenticatorUtils.java (100%) rename {src => api/src}/main/java/com/ning/http/util/Base64.java (100%) rename {src => api/src}/main/java/com/ning/http/util/DateUtil.java (100%) rename {src => api/src}/main/java/com/ning/http/util/ProxyUtils.java (100%) rename {src => api/src}/main/java/com/ning/http/util/SslUtils.java (100%) rename {src => api/src}/main/java/com/ning/http/util/UTF8Codec.java (100%) rename {src => api/src}/main/java/com/ning/http/util/UTF8UrlEncoder.java (100%) rename {src => api/src}/test/java/com/ning/http/client/RealmTest.java (98%) rename {src => api/src}/test/java/com/ning/http/client/async/AbstractBasicTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/AuthTimeoutTest.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/BasicAuthTest.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/BasicHttpsTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/BodyChunkTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/ChunkingTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ComplexClientTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ConnectionPoolTest.java (81%) rename {src => api/src}/test/java/com/ning/http/client/async/DigestAuthTest.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/EmptyBodyTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ErrorResponseTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/Expect100ContinueTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/FilePartLargeFileTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/FilterTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/FluentStringsMapTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/FollowingThreadTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/Head302Test.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/HostnameVerifierTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/IdleStateHandlerTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/InputStreamTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ListenableFutureTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/MultipartUploadTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/MultipleHeaderTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/NoNullResponseTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ParamEncodingTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/PerRequestRelative302Test.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/PostRedirectGetTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/PostWithQSTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ProviderUtil.java (77%) rename {src => api/src}/test/java/com/ning/http/client/async/ProxyTest.java (99%) rename {src => api/src}/test/java/com/ning/http/client/async/ProxyTunnellingTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/PutLargeFileTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/QueryParametersTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/RC10KTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java (98%) rename {src => api/src}/test/java/com/ning/http/client/async/Relative302Test.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/RemoteSiteTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/RequestBuilderTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/RetryRequestTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java (98%) rename {src => api/src}/test/java/com/ning/http/client/async/TransferListenerTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/WebDavBasicTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/async/ZeroCopyFileTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java (100%) rename {src => api/src}/test/java/com/ning/http/client/resumable/MapResumableProcessor.java (100%) rename {src => api/src}/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/websocket/AbstractBasicTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/websocket/ByteMessageTest.java (100%) rename {src => api/src}/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java (87%) rename {src => api/src}/test/java/com/ning/http/client/websocket/RedirectTest.java (98%) rename {src => api/src}/test/java/com/ning/http/client/websocket/TextMessageTest.java (100%) rename {src => api/src}/test/java/com/ning/http/util/ProxyUtilsTest.java (100%) rename {src => api/src}/test/java/com/ning/http/util/TestUTF8UrlCodec.java (100%) rename {src => api/src}/test/resources/300k.png (100%) rename {src => api/src}/test/resources/SimpleTextFile.txt (100%) rename {src => api/src}/test/resources/client.keystore (100%) rename {src => api/src}/test/resources/gzip.txt.gz (100%) rename {src => api/src}/test/resources/logback-test.xml (100%) rename {src => api/src}/test/resources/realm.properties (100%) rename {src => api/src}/test/resources/ssltest-cacerts.jks (100%) rename {src => api/src}/test/resources/ssltest-keystore.jks (100%) rename {src => api/src}/test/resources/textfile.txt (100%) rename {src => api/src}/test/resources/textfile2.txt (100%) create mode 100644 providers/apache/pom.xml rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java (100%) rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java (100%) rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponse.java (100%) rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java (100%) rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java (100%) rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java (100%) rename {src => providers/apache/src}/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java (100%) create mode 100644 providers/grizzly/pom.xml rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java (99%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java (100%) rename {src => providers/grizzly/src}/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java (100%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyAsyncProviderBasicTest.java (82%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyAsyncStreamHandlerTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyAsyncStreamLifecycleTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyAuthTimeoutTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyBasicAuthTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyBasicHttpsTest.java (92%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyBodyChunkTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyByteBufferCapacityTest.java (92%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyChunkingTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyComplexClientTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyConnectionPoolTest.java (98%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyDigestAuthTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyEmptyBodyTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyErrorResponseTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyExpectContinue100Test.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyFilterTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyFollowingThreadTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyHead302Test.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyHttpToHttpsRedirectTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyIdleStateHandlerTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyInputStreamTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyListenableFutureTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyMaxConnectionsInThreadsTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyMaxTotalConnectionTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyMultipleHeaderTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyNoNullResponseTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyNonAsciiContentLengthTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyParamEncodingTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyPerRequestRelative302Test.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyPerRequestTimeoutTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyPostRedirectGetTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyPostWithQSTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyProxyTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyProxyTunnelingTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyPutLargeFileTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyQueryParametersTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyRC10KTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyRedirectConnectionUsageTest.java (89%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyRelative302Test.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyRemoteSiteTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyRetryRequestTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlySimpleAsyncHttpClientTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/grizzly/src/test/java/com/ning/http/client/providers}/grizzly/GrizzlyTransferListenerTest.java (91%) rename {src/test/java/com/ning/http/client/websocket/grizzly => providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket}/GrizzlyByteMessageTest.java (93%) rename {src/test/java/com/ning/http/client/websocket/grizzly => providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket}/GrizzlyCloseCodeReasonMsgTest.java (96%) rename {src/test/java/com/ning/http/client/websocket/grizzly => providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket}/GrizzlyRedirectTest.java (95%) rename {src/test/java/com/ning/http/client/websocket/grizzly => providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket}/GrizzlyTextMessageTest.java (94%) create mode 100644 providers/grizzly/src/test/resources/300k.png create mode 100644 providers/grizzly/src/test/resources/SimpleTextFile.txt create mode 100644 providers/grizzly/src/test/resources/client.keystore create mode 100644 providers/grizzly/src/test/resources/gzip.txt.gz create mode 100644 providers/grizzly/src/test/resources/logback-test.xml create mode 100644 providers/grizzly/src/test/resources/realm.properties create mode 100644 providers/grizzly/src/test/resources/ssltest-cacerts.jks create mode 100644 providers/grizzly/src/test/resources/ssltest-keystore.jks create mode 100644 providers/grizzly/src/test/resources/textfile.txt create mode 100644 providers/grizzly/src/test/resources/textfile2.txt create mode 100644 providers/netty/pom.xml rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java (99%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java (98%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyResponse.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/Protocol.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/ResponseStatus.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java (98%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java (100%) rename {src => providers/netty/src}/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java (100%) rename {src/main/java/com/ning/http => providers/netty/src/main/java/com/ning/http/client/providers/netty}/util/CleanupChannelGroup.java (98%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyAsyncHttpProviderTest.java (94%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyAsyncProviderBasicTest.java (92%) rename {src => providers/netty/src}/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java (100%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyAsyncStreamHandlerTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyAsyncStreamLifecycleTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyAuthTimeoutTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyBasicAuthTest.java (97%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyBasicHttpsTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyBodyChunkTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyBodyDeferringAsyncHandlerTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyByteBufferCapacityTest.java (92%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyChunkingTest.java (89%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyComplexClientTest.java (96%) create mode 100644 providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyDigestAuthTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyEmptyBodyTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyErrorResponseTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyExpect100ContinueTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyFilePartLargeFileTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyFilterTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyFollowingThreadTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyHead302Test.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyHostnameVerifierTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyHttpToHttpsRedirectTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyIdleStateHandlerTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyInputStreamTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyListenableFutureTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyMaxConnectionsInThreads.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyMaxTotalConnectionTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyMultipartUploadTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyMultipleHeaderTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyNoNullResponseTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyNonAsciiContentLengthTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyParamEncodingTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyPerRequestRelative302Test.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyPerRequestTimeoutTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyPostRedirectGetTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyPostWithQSTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyProxyTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyProxyTunnellingTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyPutLargeFileTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyQueryParametersTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyRC10KTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyRedirectConnectionUsageTest.java (93%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyRelative302Test.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyRemoteSiteTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyRetryRequestTest.java (95%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettySimpleAsyncHttpClientTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyTransferListenerTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyWebDavBasicTest.java (96%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers}/netty/NettyZeroCopyFileTest.java (91%) rename {src/test/java/com/ning/http/client/async => providers/netty/src/test/java/com/ning/http/client/providers/netty}/RetryNonBlockingIssue.java (99%) rename {src/test/java/com/ning/http/client/websocket/netty => providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket}/NettyByteMessageTest.java (95%) rename {src/test/java/com/ning/http/client/websocket/netty => providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket}/NettyCloseCodeReasonMsgTest.java (95%) rename {src/test/java/com/ning/http/client/websocket/netty => providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket}/NettyRedirectTest.java (95%) rename {src/test/java/com/ning/http/client/websocket/netty => providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket}/NettyTextMessageTest.java (95%) create mode 100644 providers/netty/src/test/resources/300k.png create mode 100644 providers/netty/src/test/resources/SimpleTextFile.txt create mode 100644 providers/netty/src/test/resources/client.keystore create mode 100644 providers/netty/src/test/resources/gzip.txt.gz create mode 100644 providers/netty/src/test/resources/logback-test.xml create mode 100644 providers/netty/src/test/resources/realm.properties create mode 100644 providers/netty/src/test/resources/ssltest-cacerts.jks create mode 100644 providers/netty/src/test/resources/ssltest-keystore.jks create mode 100644 providers/netty/src/test/resources/textfile.txt create mode 100644 providers/netty/src/test/resources/textfile2.txt create mode 100644 providers/pom.xml create mode 100644 site/pom.xml rename {src => site/src}/site/apt/auth.apt (100%) rename {src => site/src}/site/apt/configuring.apt (100%) rename {src => site/src}/site/apt/filters.apt (100%) rename {src => site/src}/site/apt/oauth.apt (100%) rename {src => site/src}/site/apt/performances.apt (100%) rename {src => site/src}/site/apt/providers.apt (100%) rename {src => site/src}/site/apt/proxy.apt (100%) rename {src => site/src}/site/apt/request.apt (100%) rename {src => site/src}/site/apt/resumable-download.apt (100%) rename {src => site/src}/site/apt/ssl.apt (100%) rename {src => site/src}/site/apt/transfer-listener.apt (100%) rename {src => site/src}/site/apt/upload.apt (100%) rename {src => site/src}/site/apt/webdav.apt (100%) rename {src => site/src}/site/apt/zero-bytes-copy.apt (100%) rename {src => site/src}/site/site.xml (100%) rename {src => site/src}/site/xdoc/index.xml.vm (100%) delete mode 100644 src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java diff --git a/api/pom.xml b/api/pom.xml new file mode 100644 index 0000000000..7ca36d01eb --- /dev/null +++ b/api/pom.xml @@ -0,0 +1,44 @@ + + + com.ning + async-http-client-project + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-api + Asynchronous Http Client Project API + 1.8.0-SNAPSHOT + jar + + The Async Http Client (AHC) API classes. + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + test-jar + + + + + + + + + + org.slf4j + slf4j-api + 1.6.2 + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/AsyncCompletionHandler.java b/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncCompletionHandler.java rename to api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java diff --git a/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java b/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java rename to api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java diff --git a/src/main/java/com/ning/http/client/AsyncHandler.java b/api/src/main/java/com/ning/http/client/AsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHandler.java rename to api/src/main/java/com/ning/http/client/AsyncHandler.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpClient.java b/api/src/main/java/com/ning/http/client/AsyncHttpClient.java similarity index 87% rename from src/main/java/com/ning/http/client/AsyncHttpClient.java rename to api/src/main/java/com/ning/http/client/AsyncHttpClient.java index 767ef5cb96..e6d97de16a 100755 --- a/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -20,7 +20,6 @@ import com.ning.http.client.filter.FilterContext; import com.ning.http.client.filter.FilterException; import com.ning.http.client.filter.RequestFilter; -import com.ning.http.client.providers.jdk.JDKAsyncHttpProvider; import com.ning.http.client.resumable.ResumableAsyncHandler; import java.io.Closeable; import org.slf4j.Logger; @@ -141,7 +140,17 @@ */ public class AsyncHttpClient implements Closeable { - private final static String DEFAULT_PROVIDER = "com.ning.http.client.providers.netty.NettyAsyncHttpProvider"; + /** + * Providers that will be searched for, on the classpath, in order when no + * provider is explicitly specified by the developer. + */ + private static final String[] DEFAULT_PROVIDERS = { + "com.ning.http.client.providers.netty.NettyAsyncHttpProvider", + "com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider", + "com.ning.http.client.providers.apache.ApacheAsyncHttpProvider", + "com.ning.http.client.providers.jdk.JDKAsyncHttpProvider" + }; + private final AsyncHttpProvider httpProvider; private final AsyncHttpClientConfig config; private final static Logger logger = LoggerFactory.getLogger(AsyncHttpClient.class); @@ -156,7 +165,17 @@ public class AsyncHttpClient implements Closeable { /** * Create a new HTTP Asynchronous Client using the default {@link AsyncHttpClientConfig} configuration. The - * default {@link AsyncHttpProvider} will be used ({@link com.ning.http.client.providers.netty.NettyAsyncHttpProvider} + * default {@link AsyncHttpProvider} that will be used will be based on the classpath configuration. + * + * The default providers will be searched for in this order: + *

    + *
  • netty
  • + *
  • grizzly
  • + *
  • apache
  • + *
+ * + * If none of those providers are found, then the runtime will default to + * the {@link com.ning.http.client.providers.jdk.JDKAsyncHttpProvider}. */ public AsyncHttpClient() { this(new AsyncHttpClientConfig.Builder().build()); @@ -173,13 +192,24 @@ public AsyncHttpClient(AsyncHttpProvider provider) { } /** - * Create a new HTTP Asynchronous Client using a {@link AsyncHttpClientConfig} configuration and the - * {@link #DEFAULT_PROVIDER} + * Create a new HTTP Asynchronous Client using the specified {@link AsyncHttpClientConfig} configuration. + * This configuration will be passed to the default {@link AsyncHttpProvider} that will be selected based on + * the classpath configuration. + * + * The default providers will be searched for in this order: + *
    + *
  • netty
  • + *
  • grizzly
  • + *
  • apache
  • + *
+ * + * If none of those providers are found, then the runtime will default to + * the {@link com.ning.http.client.providers.jdk.JDKAsyncHttpProvider}. * * @param config a {@link AsyncHttpClientConfig} */ public AsyncHttpClient(AsyncHttpClientConfig config) { - this(loadDefaultProvider(DEFAULT_PROVIDER, config), config); + this(loadDefaultProvider(DEFAULT_PROVIDERS, config), config); } /** @@ -203,7 +233,7 @@ public AsyncHttpClient(AsyncHttpProvider httpProvider, AsyncHttpClientConfig con */ public AsyncHttpClient(String providerClass, AsyncHttpClientConfig config) { this.config = new AsyncHttpClientConfig.Builder().build(); - this.httpProvider = loadDefaultProvider(providerClass, config); + this.httpProvider = loadProvider(providerClass, config); } public class BoundRequestBuilder extends RequestBuilderBase { @@ -354,6 +384,7 @@ public BoundRequestBuilder setSignatureCalculator(SignatureCalculator signatureC * * @return an {@link com.ning.http.client.AsyncHttpProvider} */ + @SuppressWarnings("UnusedDeclaration") public AsyncHttpProvider getProvider() { return httpProvider; } @@ -369,6 +400,7 @@ public void close() { /** * Asynchronous close the {@link AsyncHttpProvider} by spawning a thread and avoid blocking. */ + @SuppressWarnings("UnusedDeclaration") public void closeAsynchronously() { config.applicationThreadPool.submit(new Runnable() { @@ -395,6 +427,7 @@ protected void finalize() throws Throwable { * * @return true if closed */ + @SuppressWarnings("UnusedDeclaration") public boolean isClosed() { return isClosed.get(); } @@ -404,6 +437,7 @@ public boolean isClosed() { * * @return {@link com.ning.http.client.AsyncHttpClientConfig} */ + @SuppressWarnings("UnusedDeclaration") public AsyncHttpClientConfig getConfig() { return config; } @@ -411,6 +445,7 @@ public AsyncHttpClientConfig getConfig() { /** * Set default signature calculator to use for requests build by this client instance */ + @SuppressWarnings("UnusedDeclaration") public AsyncHttpClient setSignatureCalculator(SignatureCalculator signatureCalculator) { this.signatureCalculator = signatureCalculator; return this; @@ -432,6 +467,7 @@ public BoundRequestBuilder prepareGet(String url) { * @param url A well formed URL. * @return {@link RequestBuilder} */ + @SuppressWarnings("UnusedDeclaration") public BoundRequestBuilder prepareConnect(String url) { return requestBuilder("CONNECT", url); } @@ -482,6 +518,7 @@ public BoundRequestBuilder preparePut(String url) { * @param url A well formed URL. * @return {@link RequestBuilder} */ + @SuppressWarnings("UnusedDeclaration") public BoundRequestBuilder prepareDelete(String url) { return requestBuilder("DELETE", url); } @@ -492,6 +529,7 @@ public BoundRequestBuilder prepareDelete(String url) { * @param request a {@link Request} * @return {@link RequestBuilder} */ + @SuppressWarnings("UnusedDeclaration") public BoundRequestBuilder prepareRequest(Request request) { return requestBuilder(request); } @@ -561,12 +599,13 @@ private FilterContext preProcessRequest(FilterContext fc) throws IOExc } @SuppressWarnings("unchecked") - private final static AsyncHttpProvider loadDefaultProvider(String className, AsyncHttpClientConfig config) { + private static AsyncHttpProvider loadProvider(final String className, + final AsyncHttpClientConfig config) { try { Class providerClass = (Class) Thread.currentThread() .getContextClassLoader().loadClass(className); return providerClass.getDeclaredConstructor( - new Class[]{AsyncHttpClientConfig.class}).newInstance(new Object[]{config}); + new Class[]{AsyncHttpClientConfig.class}).newInstance(config); } catch (Throwable t) { // Let's try with another classloader @@ -574,16 +613,24 @@ private final static AsyncHttpProvider loadDefaultProvider(String className, Asy Class providerClass = (Class) AsyncHttpClient.class.getClassLoader().loadClass(className); return providerClass.getDeclaredConstructor( - new Class[]{AsyncHttpClientConfig.class}).newInstance(new Object[]{config}); - } catch (Throwable t2) { + new Class[]{AsyncHttpClientConfig.class}).newInstance(config); + } catch (Throwable ignored) { } + } + return null; + } - if (logger.isDebugEnabled()) { - logger.debug("Default provider not found {}. Using the {}", DEFAULT_PROVIDER, - JDKAsyncHttpProvider.class.getName()); + @SuppressWarnings("unchecked") + private static AsyncHttpProvider loadDefaultProvider(String[] providerClassNames, + AsyncHttpClientConfig config) { + AsyncHttpProvider provider; + for (final String className : providerClassNames) { + provider = loadProvider(className, config); + if (provider != null) { + return provider; } - return new JDKAsyncHttpProvider(config); } + throw new IllegalStateException("No providers found on the classpath"); } protected BoundRequestBuilder requestBuilder(String reqType, String url) { diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpClientConfig.java rename to api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java rename to api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpProvider.java rename to api/src/main/java/com/ning/http/client/AsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java rename to api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/Body.java b/api/src/main/java/com/ning/http/client/Body.java similarity index 100% rename from src/main/java/com/ning/http/client/Body.java rename to api/src/main/java/com/ning/http/client/Body.java diff --git a/src/main/java/com/ning/http/client/BodyConsumer.java b/api/src/main/java/com/ning/http/client/BodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/BodyConsumer.java rename to api/src/main/java/com/ning/http/client/BodyConsumer.java diff --git a/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java b/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java rename to api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java diff --git a/src/main/java/com/ning/http/client/BodyGenerator.java b/api/src/main/java/com/ning/http/client/BodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/BodyGenerator.java rename to api/src/main/java/com/ning/http/client/BodyGenerator.java diff --git a/src/main/java/com/ning/http/client/ByteArrayPart.java b/api/src/main/java/com/ning/http/client/ByteArrayPart.java similarity index 100% rename from src/main/java/com/ning/http/client/ByteArrayPart.java rename to api/src/main/java/com/ning/http/client/ByteArrayPart.java diff --git a/src/main/java/com/ning/http/client/ConnectionsPool.java b/api/src/main/java/com/ning/http/client/ConnectionsPool.java similarity index 100% rename from src/main/java/com/ning/http/client/ConnectionsPool.java rename to api/src/main/java/com/ning/http/client/ConnectionsPool.java diff --git a/src/main/java/com/ning/http/client/Cookie.java b/api/src/main/java/com/ning/http/client/Cookie.java similarity index 100% rename from src/main/java/com/ning/http/client/Cookie.java rename to api/src/main/java/com/ning/http/client/Cookie.java diff --git a/src/main/java/com/ning/http/client/FilePart.java b/api/src/main/java/com/ning/http/client/FilePart.java similarity index 100% rename from src/main/java/com/ning/http/client/FilePart.java rename to api/src/main/java/com/ning/http/client/FilePart.java diff --git a/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java b/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java similarity index 100% rename from src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java rename to api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java diff --git a/src/main/java/com/ning/http/client/FluentStringsMap.java b/api/src/main/java/com/ning/http/client/FluentStringsMap.java similarity index 100% rename from src/main/java/com/ning/http/client/FluentStringsMap.java rename to api/src/main/java/com/ning/http/client/FluentStringsMap.java diff --git a/src/main/java/com/ning/http/client/HttpContent.java b/api/src/main/java/com/ning/http/client/HttpContent.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpContent.java rename to api/src/main/java/com/ning/http/client/HttpContent.java diff --git a/src/main/java/com/ning/http/client/HttpResponseBodyPart.java b/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpResponseBodyPart.java rename to api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/HttpResponseHeaders.java b/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpResponseHeaders.java rename to api/src/main/java/com/ning/http/client/HttpResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/HttpResponseStatus.java b/api/src/main/java/com/ning/http/client/HttpResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/HttpResponseStatus.java rename to api/src/main/java/com/ning/http/client/HttpResponseStatus.java diff --git a/src/main/java/com/ning/http/client/ListenableFuture.java b/api/src/main/java/com/ning/http/client/ListenableFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/ListenableFuture.java rename to api/src/main/java/com/ning/http/client/ListenableFuture.java diff --git a/src/main/java/com/ning/http/client/MaxRedirectException.java b/api/src/main/java/com/ning/http/client/MaxRedirectException.java similarity index 100% rename from src/main/java/com/ning/http/client/MaxRedirectException.java rename to api/src/main/java/com/ning/http/client/MaxRedirectException.java diff --git a/src/main/java/com/ning/http/client/Part.java b/api/src/main/java/com/ning/http/client/Part.java similarity index 100% rename from src/main/java/com/ning/http/client/Part.java rename to api/src/main/java/com/ning/http/client/Part.java diff --git a/src/main/java/com/ning/http/client/PerRequestConfig.java b/api/src/main/java/com/ning/http/client/PerRequestConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/PerRequestConfig.java rename to api/src/main/java/com/ning/http/client/PerRequestConfig.java diff --git a/src/main/java/com/ning/http/client/ProgressAsyncHandler.java b/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/ProgressAsyncHandler.java rename to api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java diff --git a/src/main/java/com/ning/http/client/ProxyServer.java b/api/src/main/java/com/ning/http/client/ProxyServer.java similarity index 100% rename from src/main/java/com/ning/http/client/ProxyServer.java rename to api/src/main/java/com/ning/http/client/ProxyServer.java diff --git a/src/main/java/com/ning/http/client/RandomAccessBody.java b/api/src/main/java/com/ning/http/client/RandomAccessBody.java similarity index 100% rename from src/main/java/com/ning/http/client/RandomAccessBody.java rename to api/src/main/java/com/ning/http/client/RandomAccessBody.java diff --git a/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/com/ning/http/client/Realm.java similarity index 99% rename from src/main/java/com/ning/http/client/Realm.java rename to api/src/main/java/com/ning/http/client/Realm.java index f8dbc04907..2074fab4ed 100644 --- a/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/com/ning/http/client/Realm.java @@ -16,9 +16,6 @@ */ package com.ning.http.client; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; diff --git a/src/main/java/com/ning/http/client/Request.java b/api/src/main/java/com/ning/http/client/Request.java similarity index 100% rename from src/main/java/com/ning/http/client/Request.java rename to api/src/main/java/com/ning/http/client/Request.java diff --git a/src/main/java/com/ning/http/client/RequestBuilder.java b/api/src/main/java/com/ning/http/client/RequestBuilder.java similarity index 100% rename from src/main/java/com/ning/http/client/RequestBuilder.java rename to api/src/main/java/com/ning/http/client/RequestBuilder.java diff --git a/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java similarity index 100% rename from src/main/java/com/ning/http/client/RequestBuilderBase.java rename to api/src/main/java/com/ning/http/client/RequestBuilderBase.java diff --git a/src/main/java/com/ning/http/client/Response.java b/api/src/main/java/com/ning/http/client/Response.java similarity index 100% rename from src/main/java/com/ning/http/client/Response.java rename to api/src/main/java/com/ning/http/client/Response.java diff --git a/src/main/java/com/ning/http/client/ResumableBodyConsumer.java b/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/ResumableBodyConsumer.java rename to api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/SSLEngineFactory.java b/api/src/main/java/com/ning/http/client/SSLEngineFactory.java similarity index 100% rename from src/main/java/com/ning/http/client/SSLEngineFactory.java rename to api/src/main/java/com/ning/http/client/SSLEngineFactory.java diff --git a/src/main/java/com/ning/http/client/SignatureCalculator.java b/api/src/main/java/com/ning/http/client/SignatureCalculator.java similarity index 100% rename from src/main/java/com/ning/http/client/SignatureCalculator.java rename to api/src/main/java/com/ning/http/client/SignatureCalculator.java diff --git a/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java b/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java similarity index 100% rename from src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java rename to api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java diff --git a/src/main/java/com/ning/http/client/StringPart.java b/api/src/main/java/com/ning/http/client/StringPart.java similarity index 100% rename from src/main/java/com/ning/http/client/StringPart.java rename to api/src/main/java/com/ning/http/client/StringPart.java diff --git a/src/main/java/com/ning/http/client/ThrowableHandler.java b/api/src/main/java/com/ning/http/client/ThrowableHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/ThrowableHandler.java rename to api/src/main/java/com/ning/http/client/ThrowableHandler.java diff --git a/src/main/java/com/ning/http/client/UpgradeHandler.java b/api/src/main/java/com/ning/http/client/UpgradeHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/UpgradeHandler.java rename to api/src/main/java/com/ning/http/client/UpgradeHandler.java diff --git a/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java similarity index 93% rename from src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java rename to api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java index ef04f9b8da..bbd03d8871 100644 --- a/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java +++ b/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java @@ -41,7 +41,7 @@ public AppendableBodyConsumer(Appendable appendable) { */ /* @Override */ public void consume(ByteBuffer byteBuffer) throws IOException { - appendable.append(new String(byteBuffer.array(), encoding)); + appendable.append(new String(byteBuffer.array(), byteBuffer.arrayOffset(), byteBuffer.remaining(), encoding)); } /** diff --git a/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java rename to api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java similarity index 100% rename from src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java rename to api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java diff --git a/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java similarity index 93% rename from src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java rename to api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java index d1e806ca43..324fd08d31 100644 --- a/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java +++ b/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java @@ -34,7 +34,7 @@ public OutputStreamBodyConsumer(OutputStream outputStream) { */ /* @Override */ public void consume(ByteBuffer byteBuffer) throws IOException { - outputStream.write(byteBuffer.array()); + outputStream.write(byteBuffer.array(), byteBuffer.arrayOffset(), byteBuffer.remaining()); } /** diff --git a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java similarity index 97% rename from src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java rename to api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java index a78d1c3079..eeb0b3bc69 100644 --- a/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java +++ b/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java @@ -13,8 +13,6 @@ package com.ning.http.client.extra; import com.ning.http.client.resumable.ResumableListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.RandomAccessFile; diff --git a/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java b/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java rename to api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java diff --git a/src/main/java/com/ning/http/client/filter/FilterContext.java b/api/src/main/java/com/ning/http/client/filter/FilterContext.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/FilterContext.java rename to api/src/main/java/com/ning/http/client/filter/FilterContext.java diff --git a/src/main/java/com/ning/http/client/filter/FilterException.java b/api/src/main/java/com/ning/http/client/filter/FilterException.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/FilterException.java rename to api/src/main/java/com/ning/http/client/filter/FilterException.java diff --git a/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java b/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/IOExceptionFilter.java rename to api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java diff --git a/src/main/java/com/ning/http/client/filter/RequestFilter.java b/api/src/main/java/com/ning/http/client/filter/RequestFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/RequestFilter.java rename to api/src/main/java/com/ning/http/client/filter/RequestFilter.java diff --git a/src/main/java/com/ning/http/client/filter/ResponseFilter.java b/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/filter/ResponseFilter.java rename to api/src/main/java/com/ning/http/client/filter/ResponseFilter.java diff --git a/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java b/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java rename to api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java b/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/generators/FileBodyGenerator.java rename to api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java b/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java rename to api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java b/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java rename to api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java diff --git a/src/main/java/com/ning/http/client/listenable/ExecutionList.java b/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java similarity index 100% rename from src/main/java/com/ning/http/client/listenable/ExecutionList.java rename to api/src/main/java/com/ning/http/client/listenable/ExecutionList.java diff --git a/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java b/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java rename to api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java diff --git a/src/main/java/com/ning/http/client/listener/TransferListener.java b/api/src/main/java/com/ning/http/client/listener/TransferListener.java similarity index 100% rename from src/main/java/com/ning/http/client/listener/TransferListener.java rename to api/src/main/java/com/ning/http/client/listener/TransferListener.java diff --git a/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java similarity index 100% rename from src/main/java/com/ning/http/client/ntlm/NTLMEngine.java rename to api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java diff --git a/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java similarity index 100% rename from src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java rename to api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java diff --git a/src/main/java/com/ning/http/client/oauth/ConsumerKey.java b/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/ConsumerKey.java rename to api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java diff --git a/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java rename to api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java diff --git a/src/main/java/com/ning/http/client/oauth/RequestToken.java b/api/src/main/java/com/ning/http/client/oauth/RequestToken.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/RequestToken.java rename to api/src/main/java/com/ning/http/client/oauth/RequestToken.java diff --git a/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java b/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java similarity index 100% rename from src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java rename to api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java diff --git a/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java similarity index 99% rename from src/main/java/com/ning/http/client/providers/ResponseBase.java rename to api/src/main/java/com/ning/http/client/providers/ResponseBase.java index 8457c240dd..713c6a0a6a 100644 --- a/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -3,7 +3,6 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; -import java.nio.charset.Charset; import java.util.List; import com.ning.http.client.FluentCaseInsensitiveStringsMap; diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java similarity index 99% rename from src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java rename to api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 2ee51d8e75..e27375749e 100644 --- a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -68,7 +68,6 @@ import java.nio.ByteBuffer; import java.security.GeneralSecurityException; import java.security.NoSuchAlgorithmException; -import java.util.Collection; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java rename to api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java rename to api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java rename to api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java rename to api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java b/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java rename to api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java b/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java rename to api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java b/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java rename to api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java diff --git a/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java rename to api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java diff --git a/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java b/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java rename to api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java diff --git a/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java b/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java rename to api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java diff --git a/src/main/java/com/ning/http/client/resumable/ResumableListener.java b/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java similarity index 100% rename from src/main/java/com/ning/http/client/resumable/ResumableListener.java rename to api/src/main/java/com/ning/http/client/resumable/ResumableListener.java diff --git a/src/main/java/com/ning/http/client/simple/HeaderMap.java b/api/src/main/java/com/ning/http/client/simple/HeaderMap.java similarity index 100% rename from src/main/java/com/ning/http/client/simple/HeaderMap.java rename to api/src/main/java/com/ning/http/client/simple/HeaderMap.java diff --git a/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java b/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java similarity index 100% rename from src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java rename to api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java diff --git a/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java b/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java similarity index 100% rename from src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java rename to api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java diff --git a/src/main/java/com/ning/http/client/webdav/WebDavResponse.java b/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/webdav/WebDavResponse.java rename to api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java diff --git a/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java b/api/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java rename to api/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocket.java b/api/src/main/java/com/ning/http/client/websocket/WebSocket.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocket.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocket.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketListener.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java diff --git a/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java similarity index 100% rename from src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java rename to api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java diff --git a/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java b/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java similarity index 100% rename from src/main/java/com/ning/http/multipart/ByteArrayPartSource.java rename to api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java diff --git a/src/main/java/com/ning/http/multipart/FilePart.java b/api/src/main/java/com/ning/http/multipart/FilePart.java similarity index 100% rename from src/main/java/com/ning/http/multipart/FilePart.java rename to api/src/main/java/com/ning/http/multipart/FilePart.java diff --git a/src/main/java/com/ning/http/multipart/FilePartSource.java b/api/src/main/java/com/ning/http/multipart/FilePartSource.java similarity index 100% rename from src/main/java/com/ning/http/multipart/FilePartSource.java rename to api/src/main/java/com/ning/http/multipart/FilePartSource.java diff --git a/src/main/java/com/ning/http/multipart/FilePartStallHandler.java b/api/src/main/java/com/ning/http/multipart/FilePartStallHandler.java similarity index 100% rename from src/main/java/com/ning/http/multipart/FilePartStallHandler.java rename to api/src/main/java/com/ning/http/multipart/FilePartStallHandler.java diff --git a/src/main/java/com/ning/http/multipart/FileUploadStalledException.java b/api/src/main/java/com/ning/http/multipart/FileUploadStalledException.java similarity index 100% rename from src/main/java/com/ning/http/multipart/FileUploadStalledException.java rename to api/src/main/java/com/ning/http/multipart/FileUploadStalledException.java diff --git a/src/main/java/com/ning/http/multipart/MultipartBody.java b/api/src/main/java/com/ning/http/multipart/MultipartBody.java similarity index 100% rename from src/main/java/com/ning/http/multipart/MultipartBody.java rename to api/src/main/java/com/ning/http/multipart/MultipartBody.java diff --git a/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java b/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java similarity index 100% rename from src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java rename to api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java diff --git a/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java b/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java similarity index 100% rename from src/main/java/com/ning/http/multipart/MultipartRequestEntity.java rename to api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java diff --git a/src/main/java/com/ning/http/multipart/Part.java b/api/src/main/java/com/ning/http/multipart/Part.java similarity index 100% rename from src/main/java/com/ning/http/multipart/Part.java rename to api/src/main/java/com/ning/http/multipart/Part.java diff --git a/src/main/java/com/ning/http/multipart/PartBase.java b/api/src/main/java/com/ning/http/multipart/PartBase.java similarity index 100% rename from src/main/java/com/ning/http/multipart/PartBase.java rename to api/src/main/java/com/ning/http/multipart/PartBase.java diff --git a/src/main/java/com/ning/http/multipart/PartSource.java b/api/src/main/java/com/ning/http/multipart/PartSource.java similarity index 100% rename from src/main/java/com/ning/http/multipart/PartSource.java rename to api/src/main/java/com/ning/http/multipart/PartSource.java diff --git a/src/main/java/com/ning/http/multipart/RequestEntity.java b/api/src/main/java/com/ning/http/multipart/RequestEntity.java similarity index 100% rename from src/main/java/com/ning/http/multipart/RequestEntity.java rename to api/src/main/java/com/ning/http/multipart/RequestEntity.java diff --git a/src/main/java/com/ning/http/multipart/StringPart.java b/api/src/main/java/com/ning/http/multipart/StringPart.java similarity index 100% rename from src/main/java/com/ning/http/multipart/StringPart.java rename to api/src/main/java/com/ning/http/multipart/StringPart.java diff --git a/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java b/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java similarity index 100% rename from src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java rename to api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java diff --git a/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java rename to api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java diff --git a/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/AuthenticatorUtils.java rename to api/src/main/java/com/ning/http/util/AuthenticatorUtils.java diff --git a/src/main/java/com/ning/http/util/Base64.java b/api/src/main/java/com/ning/http/util/Base64.java similarity index 100% rename from src/main/java/com/ning/http/util/Base64.java rename to api/src/main/java/com/ning/http/util/Base64.java diff --git a/src/main/java/com/ning/http/util/DateUtil.java b/api/src/main/java/com/ning/http/util/DateUtil.java similarity index 100% rename from src/main/java/com/ning/http/util/DateUtil.java rename to api/src/main/java/com/ning/http/util/DateUtil.java diff --git a/src/main/java/com/ning/http/util/ProxyUtils.java b/api/src/main/java/com/ning/http/util/ProxyUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/ProxyUtils.java rename to api/src/main/java/com/ning/http/util/ProxyUtils.java diff --git a/src/main/java/com/ning/http/util/SslUtils.java b/api/src/main/java/com/ning/http/util/SslUtils.java similarity index 100% rename from src/main/java/com/ning/http/util/SslUtils.java rename to api/src/main/java/com/ning/http/util/SslUtils.java diff --git a/src/main/java/com/ning/http/util/UTF8Codec.java b/api/src/main/java/com/ning/http/util/UTF8Codec.java similarity index 100% rename from src/main/java/com/ning/http/util/UTF8Codec.java rename to api/src/main/java/com/ning/http/util/UTF8Codec.java diff --git a/src/main/java/com/ning/http/util/UTF8UrlEncoder.java b/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java similarity index 100% rename from src/main/java/com/ning/http/util/UTF8UrlEncoder.java rename to api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java diff --git a/src/test/java/com/ning/http/client/RealmTest.java b/api/src/test/java/com/ning/http/client/RealmTest.java similarity index 98% rename from src/test/java/com/ning/http/client/RealmTest.java rename to api/src/test/java/com/ning/http/client/RealmTest.java index 6bd2a622b5..71ba2d44ee 100644 --- a/src/test/java/com/ning/http/client/RealmTest.java +++ b/api/src/test/java/com/ning/http/client/RealmTest.java @@ -17,7 +17,7 @@ import org.testng.Assert; import java.math.BigInteger; import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; + import org.testng.annotations.Test; public class RealmTest { diff --git a/src/test/java/com/ning/http/client/async/AbstractBasicTest.java b/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/AbstractBasicTest.java rename to api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java diff --git a/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java rename to api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index b6d31e5b24..2641dc2d17 100755 --- a/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -30,7 +30,6 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import com.ning.http.client.StringPart; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java rename to api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java b/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java rename to api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java diff --git a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/AuthTimeoutTest.java rename to api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java index 37b83eff80..13a9ef5299 100644 --- a/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java @@ -39,7 +39,6 @@ import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/BasicAuthTest.java rename to api/src/test/java/com/ning/http/client/async/BasicAuthTest.java index c731dc0d4e..8f3422e817 100644 --- a/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java @@ -466,7 +466,7 @@ public AbstractHandler configureHandler() throws Exception { return new SimpleHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = {"standalone", "default_provider"}, enabled = false) public void StringBufferBodyConsumerTest() throws Throwable { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder() diff --git a/src/test/java/com/ning/http/client/async/BasicHttpsTest.java b/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/BasicHttpsTest.java rename to api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java diff --git a/src/test/java/com/ning/http/client/async/BodyChunkTest.java b/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/BodyChunkTest.java rename to api/src/test/java/com/ning/http/client/async/BodyChunkTest.java diff --git a/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java rename to api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java rename to api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java index b8476c7d15..58c36c224d 100644 --- a/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java @@ -28,7 +28,6 @@ import java.io.OutputStream; import java.util.Enumeration; import java.util.UUID; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static org.testng.Assert.*; diff --git a/src/test/java/com/ning/http/client/async/ChunkingTest.java b/api/src/test/java/com/ning/http/client/async/ChunkingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ChunkingTest.java rename to api/src/test/java/com/ning/http/client/async/ChunkingTest.java diff --git a/src/test/java/com/ning/http/client/async/ComplexClientTest.java b/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ComplexClientTest.java rename to api/src/test/java/com/ning/http/client/async/ComplexClientTest.java diff --git a/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java similarity index 81% rename from src/test/java/com/ning/http/client/async/ConnectionPoolTest.java rename to api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java index 8f02356c90..27a5917877 100644 --- a/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java @@ -19,9 +19,7 @@ import com.ning.http.client.AsyncCompletionHandlerBase; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ConnectionsPool; import com.ning.http.client.Response; -import org.jboss.netty.channel.Channel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; @@ -141,91 +139,10 @@ public Response onCompleted(Response response) throws } @Test(groups = {"standalone", "default_provider"}) - public void testInvalidConnectionsPool() { - - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return false; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return false; - } - - public void destroy() { - - } - }; - - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; - try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; - } - assertNotNull(exception); - assertEquals(exception.getMessage(), "Too many connections -1"); - client.close(); - } + public abstract void testInvalidConnectionsPool(); @Test(groups = {"standalone", "default_provider"}) - public void testValidConnectionsPool() { - - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return true; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - - } - }; - - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; - try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; - } - assertNull(exception); - client.close(); - } + public abstract void testValidConnectionsPool(); @Test(groups = {"standalone", "default_provider"}) diff --git a/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/DigestAuthTest.java rename to api/src/test/java/com/ning/http/client/async/DigestAuthTest.java index 293139e107..21cbfa91cc 100644 --- a/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java @@ -38,7 +38,6 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/src/test/java/com/ning/http/client/async/EmptyBodyTest.java b/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/EmptyBodyTest.java rename to api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java diff --git a/src/test/java/com/ning/http/client/async/ErrorResponseTest.java b/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ErrorResponseTest.java rename to api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java b/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/Expect100ContinueTest.java rename to api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java diff --git a/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java rename to api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/FilterTest.java b/api/src/test/java/com/ning/http/client/async/FilterTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FilterTest.java rename to api/src/test/java/com/ning/http/client/async/FilterTest.java diff --git a/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java b/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java rename to api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java diff --git a/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java b/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FluentStringsMapTest.java rename to api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java diff --git a/src/test/java/com/ning/http/client/async/FollowingThreadTest.java b/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/FollowingThreadTest.java rename to api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java diff --git a/src/test/java/com/ning/http/client/async/Head302Test.java b/api/src/test/java/com/ning/http/client/async/Head302Test.java similarity index 99% rename from src/test/java/com/ning/http/client/async/Head302Test.java rename to api/src/test/java/com/ning/http/client/async/Head302Test.java index c84f827dce..d73397326d 100644 --- a/src/test/java/com/ning/http/client/async/Head302Test.java +++ b/api/src/test/java/com/ning/http/client/async/Head302Test.java @@ -21,7 +21,6 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.omg.CORBA.TIMEOUT; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/HostnameVerifierTest.java rename to api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java diff --git a/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java b/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java rename to api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java diff --git a/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java b/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java rename to api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java diff --git a/src/test/java/com/ning/http/client/async/InputStreamTest.java b/api/src/test/java/com/ning/http/client/async/InputStreamTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/InputStreamTest.java rename to api/src/test/java/com/ning/http/client/async/InputStreamTest.java diff --git a/src/test/java/com/ning/http/client/async/ListenableFutureTest.java b/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ListenableFutureTest.java rename to api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java diff --git a/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java b/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java rename to api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java diff --git a/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java b/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java rename to api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java diff --git a/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MultipartUploadTest.java rename to api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java diff --git a/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java b/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/MultipleHeaderTest.java rename to api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java diff --git a/src/test/java/com/ning/http/client/async/NoNullResponseTest.java b/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/NoNullResponseTest.java rename to api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java rename to api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java diff --git a/src/test/java/com/ning/http/client/async/ParamEncodingTest.java b/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ParamEncodingTest.java rename to api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java diff --git a/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java rename to api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java diff --git a/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java b/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java rename to api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java diff --git a/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java b/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PostRedirectGetTest.java rename to api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java diff --git a/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PostWithQSTest.java rename to api/src/test/java/com/ning/http/client/async/PostWithQSTest.java diff --git a/src/test/java/com/ning/http/client/async/ProviderUtil.java b/api/src/test/java/com/ning/http/client/async/ProviderUtil.java similarity index 77% rename from src/test/java/com/ning/http/client/async/ProviderUtil.java rename to api/src/test/java/com/ning/http/client/async/ProviderUtil.java index 70f79dc94c..eb3d77cf15 100644 --- a/src/test/java/com/ning/http/client/async/ProviderUtil.java +++ b/api/src/test/java/com/ning/http/client/async/ProviderUtil.java @@ -17,7 +17,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.providers.apache.ApacheAsyncHttpProvider; import com.ning.http.client.providers.jdk.JDKAsyncHttpProvider; public class ProviderUtil { @@ -31,14 +30,6 @@ public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { } } - public static AsyncHttpClient apacheProvider(AsyncHttpClientConfig config) { - if (config == null) { - return new AsyncHttpClient(new ApacheAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); - } else { - return new AsyncHttpClient(new ApacheAsyncHttpProvider(config)); - } - } - public static AsyncHttpClient jdkProvider(AsyncHttpClientConfig config) { if (config == null) { return new AsyncHttpClient(new JDKAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); diff --git a/src/test/java/com/ning/http/client/async/ProxyTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTest.java similarity index 99% rename from src/test/java/com/ning/http/client/async/ProxyTest.java rename to api/src/test/java/com/ning/http/client/async/ProxyTest.java index 941897ce0c..4129a4a729 100644 --- a/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/api/src/test/java/com/ning/http/client/async/ProxyTest.java @@ -21,8 +21,6 @@ import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ProxyServer; import com.ning.http.client.Response; -import com.ning.http.client.ProxyServer.Protocol; -import com.ning.http.util.ProxyUtils; import java.io.IOException; import java.net.ConnectException; diff --git a/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java rename to api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java diff --git a/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/PutLargeFileTest.java rename to api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java diff --git a/src/test/java/com/ning/http/client/async/QueryParametersTest.java b/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/QueryParametersTest.java rename to api/src/test/java/com/ning/http/client/async/QueryParametersTest.java diff --git a/src/test/java/com/ning/http/client/async/RC10KTest.java b/api/src/test/java/com/ning/http/client/async/RC10KTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RC10KTest.java rename to api/src/test/java/com/ning/http/client/async/RC10KTest.java diff --git a/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java b/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java similarity index 98% rename from src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java rename to api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java index 997936bd79..1feb09440a 100644 --- a/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java @@ -21,7 +21,6 @@ import com.ning.http.client.ListenableFuture; import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; diff --git a/src/test/java/com/ning/http/client/async/Relative302Test.java b/api/src/test/java/com/ning/http/client/async/Relative302Test.java similarity index 100% rename from src/test/java/com/ning/http/client/async/Relative302Test.java rename to api/src/test/java/com/ning/http/client/async/Relative302Test.java diff --git a/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RemoteSiteTest.java rename to api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java diff --git a/src/test/java/com/ning/http/client/async/RequestBuilderTest.java b/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RequestBuilderTest.java rename to api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java diff --git a/src/test/java/com/ning/http/client/async/RetryRequestTest.java b/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/RetryRequestTest.java rename to api/src/test/java/com/ning/http/client/async/RetryRequestTest.java diff --git a/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java rename to api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java diff --git a/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java similarity index 98% rename from src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java rename to api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java index 2a6cfcfd15..9697ffcb59 100644 --- a/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java @@ -27,6 +27,7 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import static junit.framework.Assert.assertTrue; @@ -238,6 +239,10 @@ public void testCloseMasterInvalidDerived() throws Exception { try { derived.get().get(); fail("Expected closed AHC"); + } catch (ExecutionException ee) { + if (!(ee.getCause() instanceof IOException)) { + fail("Unexpected failure: " + ee.getCause()); + } } catch (IOException e) { // expected } diff --git a/src/test/java/com/ning/http/client/async/TransferListenerTest.java b/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/TransferListenerTest.java rename to api/src/test/java/com/ning/http/client/async/TransferListenerTest.java diff --git a/src/test/java/com/ning/http/client/async/WebDavBasicTest.java b/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/WebDavBasicTest.java rename to api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java diff --git a/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java similarity index 100% rename from src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java rename to api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java diff --git a/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java b/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java similarity index 100% rename from src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java rename to api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java diff --git a/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java b/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java similarity index 100% rename from src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java rename to api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java diff --git a/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java b/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java similarity index 100% rename from src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java rename to api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java diff --git a/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java b/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java similarity index 100% rename from src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java rename to api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java diff --git a/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java b/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java similarity index 100% rename from src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java rename to api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java diff --git a/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java b/api/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java similarity index 100% rename from src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java rename to api/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java diff --git a/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java similarity index 100% rename from src/test/java/com/ning/http/client/websocket/ByteMessageTest.java rename to api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java diff --git a/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java similarity index 87% rename from src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java rename to api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java index 9329973e03..4fc1a19f04 100644 --- a/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java @@ -14,15 +14,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.websocket.TextMessageTest; -import com.ning.http.client.websocket.WebSocket; -import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; -import com.ning.http.client.websocket.WebSocketListener; -import com.ning.http.client.websocket.WebSocketUpgradeHandler; -import com.ning.http.client.websocket.netty.NettyTextMessageTest; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.concurrent.CountDownLatch; diff --git a/src/test/java/com/ning/http/client/websocket/RedirectTest.java b/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java similarity index 98% rename from src/test/java/com/ning/http/client/websocket/RedirectTest.java rename to api/src/test/java/com/ning/http/client/websocket/RedirectTest.java index 25febcf53f..40d106516b 100644 --- a/src/test/java/com/ning/http/client/websocket/RedirectTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java @@ -16,9 +16,7 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.server.nio.SelectChannelConnector; diff --git a/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java similarity index 100% rename from src/test/java/com/ning/http/client/websocket/TextMessageTest.java rename to api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java diff --git a/src/test/java/com/ning/http/util/ProxyUtilsTest.java b/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java similarity index 100% rename from src/test/java/com/ning/http/util/ProxyUtilsTest.java rename to api/src/test/java/com/ning/http/util/ProxyUtilsTest.java diff --git a/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java b/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java similarity index 100% rename from src/test/java/com/ning/http/util/TestUTF8UrlCodec.java rename to api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java diff --git a/src/test/resources/300k.png b/api/src/test/resources/300k.png similarity index 100% rename from src/test/resources/300k.png rename to api/src/test/resources/300k.png diff --git a/src/test/resources/SimpleTextFile.txt b/api/src/test/resources/SimpleTextFile.txt similarity index 100% rename from src/test/resources/SimpleTextFile.txt rename to api/src/test/resources/SimpleTextFile.txt diff --git a/src/test/resources/client.keystore b/api/src/test/resources/client.keystore similarity index 100% rename from src/test/resources/client.keystore rename to api/src/test/resources/client.keystore diff --git a/src/test/resources/gzip.txt.gz b/api/src/test/resources/gzip.txt.gz similarity index 100% rename from src/test/resources/gzip.txt.gz rename to api/src/test/resources/gzip.txt.gz diff --git a/src/test/resources/logback-test.xml b/api/src/test/resources/logback-test.xml similarity index 100% rename from src/test/resources/logback-test.xml rename to api/src/test/resources/logback-test.xml diff --git a/src/test/resources/realm.properties b/api/src/test/resources/realm.properties similarity index 100% rename from src/test/resources/realm.properties rename to api/src/test/resources/realm.properties diff --git a/src/test/resources/ssltest-cacerts.jks b/api/src/test/resources/ssltest-cacerts.jks similarity index 100% rename from src/test/resources/ssltest-cacerts.jks rename to api/src/test/resources/ssltest-cacerts.jks diff --git a/src/test/resources/ssltest-keystore.jks b/api/src/test/resources/ssltest-keystore.jks similarity index 100% rename from src/test/resources/ssltest-keystore.jks rename to api/src/test/resources/ssltest-keystore.jks diff --git a/src/test/resources/textfile.txt b/api/src/test/resources/textfile.txt similarity index 100% rename from src/test/resources/textfile.txt rename to api/src/test/resources/textfile.txt diff --git a/src/test/resources/textfile2.txt b/api/src/test/resources/textfile2.txt similarity index 100% rename from src/test/resources/textfile2.txt rename to api/src/test/resources/textfile2.txt diff --git a/pom.xml b/pom.xml index 81a20935a1..f37e330d9c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,7 @@ - + org.sonatype.oss oss-parent @@ -7,19 +9,23 @@ 4.0.0 com.ning - async-http-client - Asynchronous Http Client + async-http-client-project + Asynchronous Http Client Project 1.8.0-SNAPSHOT - jar + pom - Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and - asynchronously process the HTTP responses. + The Async Http Client (AHC) library's purpose is to allow Java + applications to easily execute HTTP requests and + asynchronously process the response. http://github.com/sonatype/async-http-client - scm:git:git@github.com:sonatype/async-http-client.git + scm:git:git@github.com:sonatype/async-http-client.git + https://github.com/sonatype/async-http-client - scm:git:git@github.com:sonatype/async-http-client.git + + scm:git:git@github.com:sonatype/async-http-client.git + jira @@ -28,9 +34,14 @@ asynchttpclient - http://groups.google.com/group/asynchttpclient/topics - http://groups.google.com/group/asynchttpclient/subscribe - http://groups.google.com/group/asynchttpclient/subscribe + http://groups.google.com/group/asynchttpclient/topics + + + http://groups.google.com/group/asynchttpclient/subscribe + + + http://groups.google.com/group/asynchttpclient/subscribe + asynchttpclient@googlegroups.com @@ -58,6 +69,11 @@ neotyk Hubert Iwaniuk + + rlubke + Ryan Lubke + ryan.lubke@gmail.com + @@ -72,139 +88,6 @@ repo
- - - io.netty - netty - 3.4.4.Final - - - javax.servlet - servlet-api - - - commons-logging - commons-logging - - - org.slf4j - slf4j-api - - - log4j - log4j - - - - - - org.slf4j - slf4j-api - 1.6.2 - - - - - ch.qos.logback - logback-classic - 0.9.26 - test - - - log4j - log4j - 1.2.13 - test - - - org.testng - testng - 5.8 - test - jdk15 - - - org.eclipse.jetty - jetty-server - 8.1.1.v20120215 - test - - - org.eclipse.jetty - jetty-servlet - 8.1.1.v20120215 - test - - - org.eclipse.jetty - jetty-websocket - 8.1.1.v20120215 - test - - - org.eclipse.jetty - jetty-servlets - 8.1.1.v20120215 - test - - - org.eclipse.jetty - jetty-security - 8.1.1.v20120215 - test - - - org.apache.tomcat - coyote - 6.0.29 - test - - - org.apache.tomcat - catalina - 6.0.29 - test - - - servlet-api - org.apache.tomcat - - - - - - commons-io - commons-io - 2.0.1 - test - - - commons-fileupload - commons-fileupload - 1.2.2 - test - - - - - commons-httpclient - commons-httpclient - 3.1 - true - - - commons-lang - commons-lang - 2.4 - true - - - commons-logging - commons-logging - 1.1.1 - true - - @@ -239,12 +122,7 @@ ${source.property} ${target.property} 1024m - - ${compiler.exclude} - - - ${test.compiler.exclude} - + @@ -252,7 +130,9 @@ maven-surefire-plugin ${surefire.version} - ${surefire.redirectTestOutputToFile} + + ${surefire.redirectTestOutputToFile} + @@ -284,18 +164,10 @@ META-INF - $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) Sonatype - - org.jboss.netty.*;resolution:=optional, - org.apache.commons.httpclient;resolution:=optional, - org.apache.commons.httpclient.*;resolution:=optional, - * - - - com.ning.http.*;version="$(replace;$(project.version);-SNAPSHOT;"")" - @@ -387,7 +259,6 @@ http://java.sun.com/javase/6/docs/api/ - ${javadoc.package.exclude} @@ -399,6 +270,7 @@ + + + ch.qos.logback + logback-classic + 0.9.26 + test + + + log4j + log4j + 1.2.13 + test + + + org.testng + testng + 5.8 + test + jdk15 + + + org.eclipse.jetty + jetty-server + 8.1.1.v20120215 + test + + + org.eclipse.jetty + jetty-servlet + 8.1.1.v20120215 + test + + + org.eclipse.jetty + jetty-websocket + 8.1.1.v20120215 + test + + + org.eclipse.jetty + jetty-servlets + 8.1.1.v20120215 + test + + + org.eclipse.jetty + jetty-security + 8.1.1.v20120215 + test + + + org.apache.tomcat + coyote + 6.0.29 + test + + + org.apache.tomcat + catalina + 6.0.29 + test + + + servlet-api + org.apache.tomcat + + + + + commons-io + commons-io + 2.0.1 + test + + + commons-fileupload + commons-fileupload + 1.2.2 + test + + - http://oss.sonatype.org/content/repositories/snapshots - true - com/ning/http/client/providers/grizzly/*.java - com/ning/http/client/async/grizzly/*.java - com.ning.http.client.providers.grizzly + + http://oss.sonatype.org/content/repositories/snapshots + + true + 1.5 1.5 2.12 diff --git a/providers/apache/pom.xml b/providers/apache/pom.xml new file mode 100644 index 0000000000..5b976d74e8 --- /dev/null +++ b/providers/apache/pom.xml @@ -0,0 +1,37 @@ + + + com.ning + async-http-client-providers-parent + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-apache-provider + Asynchronous Http Client Apache Provider + 1.8.0-SNAPSHOT + jar + + The Async Http Client Apache Provider. + + + + + commons-httpclient + commons-httpclient + 3.1 + + + commons-lang + commons-lang + 2.4 + + + commons-logging + commons-logging + 1.1.1 + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java rename to providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml new file mode 100644 index 0000000000..6929b96539 --- /dev/null +++ b/providers/grizzly/pom.xml @@ -0,0 +1,47 @@ + + + com.ning + async-http-client-providers-parent + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-grizzly-provider + Asynchronous Http Client Grizzly Provider + 1.8.0-SNAPSHOT + jar + + The Async Http Client Grizzly Provider. + + + + + org.glassfish.grizzly + grizzly-websockets + 2.2.10 + + + com.ning + async-http-client-api + ${project.version} + test + tests + + + + + + jvnet-nexus-snapshots + https://maven.java.net/content/repositories/snapshots + + false + + + true + + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java similarity index 99% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java index 239b677206..efa6c5186d 100644 --- a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java @@ -20,7 +20,6 @@ import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.impl.FutureImpl; -import java.io.IOException; import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java diff --git a/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java rename to providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java similarity index 82% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java index c718e2e031..bef44f90ce 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -11,28 +11,18 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.Response; import com.ning.http.client.async.AsyncProvidersBasicTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig; -import com.ning.http.client.providers.grizzly.TransportCustomizer; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; -import org.testng.Assert; import org.testng.annotations.Test; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; -import static org.testng.Assert.assertEquals; public class GrizzlyAsyncProviderBasicTest extends AsyncProvidersBasicTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java index c9bb4de004..e660fa7440 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.AsyncStreamHandlerTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java index b2d376d690..23edd588a9 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAsyncStreamLifecycleTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.AsyncStreamLifecycleTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java index c0224564ca..b71e0a54a1 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyAuthTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.AuthTimeoutTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyAuthTimeoutTest extends AuthTimeoutTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java index 4f0dc2634e..cd194f46f1 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BasicAuthTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyBasicAuthTest extends BasicAuthTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java similarity index 92% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java index d5e27c68f2..7fe5f20c44 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBasicHttpsTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BasicHttpsTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyBasicHttpsTest extends BasicHttpsTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java index 643628e64f..7eee2c22b2 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyChunkTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BodyChunkTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyBodyChunkTest extends BodyChunkTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java index 889f49ad89..e002420535 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BodyDeferringAsyncHandlerTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java similarity index 92% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java index b875ce10f4..d7397a6861 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyByteBufferCapacityTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ByteBufferCapacityTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import org.testng.annotations.Test; public class GrizzlyByteBufferCapacityTest extends ByteBufferCapacityTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java index 153f80c80b..f8fac44596 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyChunkingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ChunkingTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyChunkingTest extends ChunkingTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java index 0b8b4a9d18..9eea582924 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyComplexClientTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ComplexClientTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyComplexClientTest extends ComplexClientTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java similarity index 98% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java index 37395056c1..4c34cb8bb0 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.AsyncHttpClient; @@ -19,7 +19,6 @@ import com.ning.http.client.ConnectionsPool; import com.ning.http.client.Response; import com.ning.http.client.async.ConnectionPoolTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import org.glassfish.grizzly.Connection; import org.testng.annotations.Test; diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java index 95f2f8879a..74f09dcbea 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyDigestAuthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.DigestAuthTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyDigestAuthTest extends DigestAuthTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java index a6a88a4239..77a925056b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyEmptyBodyTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.EmptyBodyTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyEmptyBodyTest extends EmptyBodyTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java index 33c0ff2e7b..0ae9beb704 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyErrorResponseTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ErrorResponseTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyErrorResponseTest extends ErrorResponseTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java index 09307e7185..f8a8a66bcd 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyExpectContinue100Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.Expect100ContinueTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyExpectContinue100Test extends Expect100ContinueTest{ diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java index 19a7d7ce21..424dded0d2 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFilterTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.FilterTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyFilterTest extends FilterTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java index 9835a67d79..981aa35993 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyFollowingThreadTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.FollowingThreadTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyFollowingThreadTest extends FollowingThreadTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java index a84023b1a2..9a875bc5c3 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHead302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.Head302Test; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyHead302Test extends Head302Test { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java index c6ea5c47d5..ea96de47d1 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyHttpToHttpsRedirectTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.HttpToHttpsRedirectTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java index 1096adab69..a05c56e23d 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyIdleStateHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.IdleStateHandlerTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyIdleStateHandlerTest extends IdleStateHandlerTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java index 6702035939..4f3f5f3a86 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyInputStreamTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.InputStreamTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyInputStreamTest extends InputStreamTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java index 285e612721..ac589af94e 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyListenableFutureTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ListenableFutureTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyListenableFutureTest extends ListenableFutureTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java index d9a95eace4..f3280bd330 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxConnectionsInThreadsTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MaxConnectionsInThreads; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyMaxConnectionsInThreadsTest extends MaxConnectionsInThreads { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java index eeb1c08bf4..de2261707b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMaxTotalConnectionTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MaxTotalConnectionTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyMaxTotalConnectionTest extends MaxTotalConnectionTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java index 9635878ac9..34915238c9 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyMultipleHeaderTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MultipleHeaderTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyMultipleHeaderTest extends MultipleHeaderTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java index 2c4fac2577..f46ae7fe2c 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNoNullResponseTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.NoNullResponseTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyNoNullResponseTest extends NoNullResponseTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java index 9ab8b96c3b..db3bae924a 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyNonAsciiContentLengthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.NonAsciiContentLengthTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java index 98fe02b2e7..54adef05a2 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyParamEncodingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ParamEncodingTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyParamEncodingTest extends ParamEncodingTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java index e52d331e14..09f4e05964 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestRelative302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PerRequestRelative302Test; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyPerRequestRelative302Test extends PerRequestRelative302Test { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java index 0a7a16eb7e..a0b433d774 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PerRequestTimeoutTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyPerRequestTimeoutTest extends PerRequestTimeoutTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java index 54a6c78c24..c74918f403 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostRedirectGetTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PostRedirectGetTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyPostRedirectGetTest extends PostRedirectGetTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java index d9dd8b19b9..9405d06a34 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPostWithQSTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PostWithQSTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyPostWithQSTest extends PostWithQSTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java index 1bfbc7f472..2a46f1a59d 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProxyTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyProxyTest extends ProxyTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java index d153c4bcd5..2029b2b4c3 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProxyTunnellingTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyProxyTunnelingTest extends ProxyTunnellingTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java index c26efc51fc..249582521b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyPutLargeFileTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PutLargeFileTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyPutLargeFileTest extends PutLargeFileTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java index 8ee03ce466..fe0f07e497 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyQueryParametersTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.QueryParametersTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyQueryParametersTest extends QueryParametersTest{ diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java index 837b10c43a..db40c23e0b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRC10KTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.RC10KTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyRC10KTest extends RC10KTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java similarity index 89% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java index 5397cf5fa1..1fa6381861 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRedirectConnectionUsageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java @@ -11,15 +11,12 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; import com.ning.http.client.async.RedirectConnectionUsageTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig; -import com.ning.http.client.providers.grizzly.TransportCustomizer; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java index 684f758353..840f370c8b 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRelative302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.Relative302Test; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyRelative302Test extends Relative302Test { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java index 23b8b217bb..8e81e3d3b7 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRemoteSiteTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.RemoteSiteTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyRemoteSiteTest extends RemoteSiteTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java index 20b7cca957..9acea4b787 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyRetryRequestTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.RetryRequestTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyRetryRequestTest extends RetryRequestTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java index 34709e2d62..5cd94e47fe 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.SimpleAsyncHttpClientTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { diff --git a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java index 90181ac0a5..ec8fefc081 100644 --- a/src/test/java/com/ning/http/client/async/grizzly/GrizzlyTransferListenerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.grizzly; +package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.TransferListenerTest; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyTransferListenerTest extends TransferListenerTest { diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java similarity index 93% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java index 5497ba0e6e..7733969cea 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyByteMessageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java @@ -10,11 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.grizzly; +package com.ning.http.client.providers.grizzly.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; import org.testng.annotations.Test; diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java similarity index 96% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java index c767e55080..cd4d190cbd 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyCloseCodeReasonMsgTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.grizzly; +package com.ning.http.client.providers.grizzly.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java index 2cdda3be98..b88787a947 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyRedirectTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.grizzly; +package com.ning.http.client.providers.grizzly.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java similarity index 94% rename from src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java rename to providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java index bef60cb991..7ddb492777 100644 --- a/src/test/java/com/ning/http/client/websocket/grizzly/GrizzlyTextMessageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java @@ -10,11 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.grizzly; +package com.ning.http.client.providers.grizzly.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.websocket.ByteMessageTest; import org.testng.annotations.Test; diff --git a/providers/grizzly/src/test/resources/300k.png b/providers/grizzly/src/test/resources/300k.png new file mode 100644 index 0000000000000000000000000000000000000000..bff4a8598918ed4945bc27db894230d8b5b7cc80 GIT binary patch literal 265495 zcmV)wK$O3UP)4Tx0C)k_S!Y-jOSA6TybDWOa?Uv;S#r)f3c`|eT%s5Vq5=jGkfbOeQNVzJ zh$0}MqDW9c0mXoTprU{v@eX><`M&#n_x`(oZtt@_?^ab;_fFMxSJeQ(wn&bM2tm*R z5E@2_vNh7>b#`&(#ZCYu{J{b>AWZg-j?l5THV6M}`#B1rJ?4nip058@?0;s^`}jtC z0{~gWY%iZ^?@$;w0f5l;j)^gK?Ay7^5D+m@x`oAdDyXu>T*tw1>TZV>Ifw zjJ>TM0BBYKaMWaSls^DOL72`P>+KKgA?gEwVF>dH3@SLKmISf(2yATe*JC?a8Df; zV!3AE#SN|_M0^t{EX!1t}!4OC>*_(?IwmE-rxY^zs;JFY=zzl={Ul0SL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JuDioKuTRGSf1X6H8JJw_C*ONBIp?t9JAd-LS^H^J>eHt$^+4$Ij$YztJ& zbd7aT3j7^u+Z*v~|Ix3z48EP79h!5!(Yis_B>z)d!uIT$0ZW(6pZ|iTT0rTL|L&F7 z|7|}e{lhx^`LPwtMEO~MH-Ec)RPHd7X^3!?*hHgmrJvVnCtlZj|4E5ia_&VB#^X$) z4AT<=`bCww&up5svuV-m7VZxbGG9SX`~Gl2>$Tao_fGFw9b>j5d}rm9^}Byry=wXy z?!#@%-jp5~8Q!<+N~Hg@LUw`1hAp0Ag~~5{G{l6rpXW5{IkD`ajaXH8NKLQCgT?FQ zv^Os+otU?{p8J=gY0}5vNmYz0)@PP{+_xfdLg$L+`wyd@&S#s{ofg+n9jcnb=wtow zyr&j(V+#XQV}qE#=dv>_tVS0SM zb^Yo%sXLrK}p1`GzeOd@Pw zodt4u{6e(vA2`HO+B92w!wh#|NKWxz^=|T`qCJkbBGpxg?9xA-vrW8om3MhUa?$C( Q>4ou<|EC`eTz_&S0BPL&!vFvP literal 0 HcmV?d00001 diff --git a/providers/netty/src/test/resources/gzip.txt.gz b/providers/netty/src/test/resources/gzip.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..80aeb98d2b03a00c13d7c2725d3e281f47a57d81 GIT binary patch literal 47 zcmb2|=HR#?o9WBIoL-e#pjT2+!r;CBl#a)_^V*(gwKoQx@Hl(&Bs)Xnt@zJE3=9ka Do?Q|u literal 0 HcmV?d00001 diff --git a/providers/netty/src/test/resources/logback-test.xml b/providers/netty/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..4acf278710 --- /dev/null +++ b/providers/netty/src/test/resources/logback-test.xml @@ -0,0 +1,13 @@ + + + + %d [%thread] %level %logger - %m%n + + + + + + + + + \ No newline at end of file diff --git a/providers/netty/src/test/resources/realm.properties b/providers/netty/src/test/resources/realm.properties new file mode 100644 index 0000000000..bc9faad66a --- /dev/null +++ b/providers/netty/src/test/resources/realm.properties @@ -0,0 +1 @@ +user=admin, admin \ No newline at end of file diff --git a/providers/netty/src/test/resources/ssltest-cacerts.jks b/providers/netty/src/test/resources/ssltest-cacerts.jks new file mode 100644 index 0000000000000000000000000000000000000000..9c1ffbe49a7b27a250fc7d00fedd45405744fc38 GIT binary patch literal 29888 zcmdsg1zZ*R`aa!#=sbXQokN3kih^`XH_|DkbSf!GBM1V5NGRPR5|Rp10!j-aAxfz5 zpL0OPSa;5{yC#2}VXjB1E`)!BZzxD-0W9piKBoe?>k7 z7Y&m={7m=`E+Qf-Dgq>^2Z{~BL_^j_K?5OaYeLB&B(M!E5S|WjB~9Q;oM0s<3vMVK zga)<)8$|kL2UyF^)7=An-pb>Wvzt9s6e4_d0F>2&4Ga|#5dnWW^5_&`F0g{L8`#X# z!`9i&&ezHk?CEX=c6M^`fyzT0&36^I9zHj~prAV9()g$lccMl+vTkQ>1f!WBS1{sf%1> z?LdZHXJ%emiNO0jqL+XLk>HedBO;1mp0@4CEkVq?CG^Z%Xr+=p#4qpml%mlj&+cYz zzBE027~sjF+&gg)kw(8#e;}bX`c&V0Qp{-}2ZTUb%aS|aY;&V0r{jL+RJUjLDkR+` zuW$UGH-#kQYr{#lrc&)LDy?f4AC?PNI)#V~^Vn#S#wY1cKN!W=Q4AtMIa?OOGSs0L z**5i|xG;}=!nW9vQ2kYlmHo{dUPIzY$cPAtC%+*;+<|Wh5uwC7X7ql2XL|Lb_8{u! zO=yfk@p!QUGrsHE?NUu0b3{dUxz`7h9@wCax@{Gz${~}=>Zg&0_iy$+87>?*O%4^^ zZ4;s~>sc!ASV)-AD!2;`x|cHDhjF*IH6<{>$t{1$4wP&~_vpIVXP-EfVF}fho$UTT z8-G?cg?*(=Z+he283v!T6!?|Y5@3(p< ztgOsE-R+#L+}$nApup}AUUl3nU+oD}I3yS;7?7*g9AqR!BqT(Xliw-|U_>;(w;|LJ zN|-idfk5&{7XfR+uX1Eam?5W*be-mhy;d^EHvyKF=7Jt6GenRV3gJIiW?smN&40~B zgKnN&8%(EyVgMr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d#xfzqXjtL-moF z!Xcr!p`{>qX${kitXwi?@6yhSW#%N_s%gF$QJ%@IbYBDa)I7u2AEVu=442wl0v-D9 zY(M8{-PubkwzyTHh=e~puP#a?<`8Y573wnC))7D8CjX>JzqOAqOET}qY8W3qwFIq% zsgqZxO;|@)yV;Qf{a@bi(_EC};ihIUSJTZn_Oa;jzOKEk!wH4^|gKF_(#8tA4@lW=+Zd(SpK;7LM`c(&h7%?_;A_W(D-b*&d+B392QxIJIT3K8mjl zD{82bd5MoMGV?JzzH+EdLh~lFT=|uA+s^a;bW5`p^R?;g?M?mD*u4DX)2wTJ_K$`~ z#fkJvE@N^%ad{7lPReD;f9}%Zm{iq$IVx_bD+t@EUm~~$zKvw#WsG;v> z2OhmMYxnZ|yX#+->E!eXE~-yw$zt*nR+kRnUzKmhKB-f`D8BgiSiiiy@i@=+UFyYfkd(N8_S4}x2gVV#U}iarSjKkO6^c`eDA}GZT?GhqaIO2{k-+j; z(NrA!B5fX{#$yzgxAe|(3BBY~#J{_?Q#?sKe-+Kpl%+>rqn~tL63ucc$=2VLkA%>! zEXzD54_V8;pn2gfD!D02i%j6>!J;Bs#M3)@hGls#7MTMX#cJg|cChX#T{ZLWJ=GE! zU5K~hP9gnS1$iTKXu&(?HoNMF6kM`PJ!9O|sN22V0yYKe@03qG# A2><{9 literal 0 HcmV?d00001 diff --git a/providers/netty/src/test/resources/ssltest-keystore.jks b/providers/netty/src/test/resources/ssltest-keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..a95b7c5f4fbe9f9cba881475b3854861cb182263 GIT binary patch literal 1445 zcmezO_TO6u1_mY|W&~rFV#CB@AV=73#>MqOiCqRwOxq0j*toRW7+Dy#m;@OaSs7TG zm==Ahum1KTDl}5e`kqee9lk>GwJCjfCp7D~ov*(x`E$+b6=xjpnr%q9^|4>@`!@E+ zi}uIu{+!!*!-C=Vp@lxxA&;l{Nk*7CEQ|PTX1Z`q#lHsu!v5(6#vw9KEZxO~bf#Zb zE?Il~dGkX>A=cv6>qSIP+-5VqZyGyUOVDFdgS=Z}_JfL#JMP&==)6<6Sh2b9`t5ry zzPG<5v@n$N`kc{=4oZz#{&v|`N2`6xPN7puSbB3j=P~RMOPb*@xlF*s=gqB!uVbHl z2<4ScJw8W+`&G{xr?Pq@ONfRqihy3>ye<~BGoZ+h#{_(N>D|Fs2ur2%ps7pF>I zDyq!Qu>EItI4*4OBcD3qb*tuHm9|&fwWayCaOz5XseaVX$*ge1Rv~TixJ>9JFm50^r<=XRnFV)>E5XyX* z`20}6VuG$_v3GNlivo}JLPd+C-52%4{>}87eQM$FyR%#4dd~lTX}Zdhn78D zytSvNb1s=yot+rkvqPAJ?zzMvo@KDD8@ayqLK67Bw^~d=)8$1RIHVRV%M2zL;>ym3BqC9{cp0q5C^#N!jg;Oqrb#c%Au7>88ae?(Y>*m{+_%clwSNmXJJ#2fue( zuJwJi@zm*L*}2hczl+}&I(v&Z{!e{~)NHj6dxQ**W%OyC*S>kOC&pB3PjK_JM&HO^ zRTfe!{SI<_w7t5|Kk+(W=VGl)mKCeLEB4tu{LIA6$iRr~JYXVV2D)pqdW7|<3-SD= zw~jv1mb8iy&d&Q#`!qf`dG>O9pQr~tnf__VzSRmDJ@rmb-s#wH?mS~d;Zu_jv8;Q9 z_!+M@r%rmY%EEvlj5C;{;O@<$*r}E~J@OlQHe8oaPUyCHC1O(4B!1-dme<8*cPnpb uEt|hX&w*2cNrXr4-_Nv(?*ugF{&{FJ?S$IdRLMmwGq0yv95LW9JOTidn?aWV literal 0 HcmV?d00001 diff --git a/providers/netty/src/test/resources/textfile.txt b/providers/netty/src/test/resources/textfile.txt new file mode 100644 index 0000000000..87daee60a9 --- /dev/null +++ b/providers/netty/src/test/resources/textfile.txt @@ -0,0 +1 @@ +filecontent: hello \ No newline at end of file diff --git a/providers/netty/src/test/resources/textfile2.txt b/providers/netty/src/test/resources/textfile2.txt new file mode 100644 index 0000000000..6a91fe609c --- /dev/null +++ b/providers/netty/src/test/resources/textfile2.txt @@ -0,0 +1 @@ +filecontent: hello2 \ No newline at end of file diff --git a/providers/pom.xml b/providers/pom.xml new file mode 100644 index 0000000000..a33f23dc5d --- /dev/null +++ b/providers/pom.xml @@ -0,0 +1,68 @@ + + + com.ning + async-http-client-project + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-providers-parent + Asynchronous Http Client Providers Parent + 1.8.0-SNAPSHOT + pom + + The Async Http Client providers library parent. + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + + + + osgi-bundle + package + + bundle + + + + + + + + + apache + grizzly + netty + + + + + com.ning + async-http-client-api + ${project.version} + + + com.ning + async-http-client-api + ${project.version} + test + tests + + + \ No newline at end of file diff --git a/site/pom.xml b/site/pom.xml new file mode 100644 index 0000000000..49f9d7dbba --- /dev/null +++ b/site/pom.xml @@ -0,0 +1,16 @@ + + + com.ning + async-http-client-project + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-site + Asynchronous Http Client Project Site + 1.8.0-SNAPSHOT + pom + + The Async Http Client site. + + \ No newline at end of file diff --git a/src/site/apt/auth.apt b/site/src/site/apt/auth.apt similarity index 100% rename from src/site/apt/auth.apt rename to site/src/site/apt/auth.apt diff --git a/src/site/apt/configuring.apt b/site/src/site/apt/configuring.apt similarity index 100% rename from src/site/apt/configuring.apt rename to site/src/site/apt/configuring.apt diff --git a/src/site/apt/filters.apt b/site/src/site/apt/filters.apt similarity index 100% rename from src/site/apt/filters.apt rename to site/src/site/apt/filters.apt diff --git a/src/site/apt/oauth.apt b/site/src/site/apt/oauth.apt similarity index 100% rename from src/site/apt/oauth.apt rename to site/src/site/apt/oauth.apt diff --git a/src/site/apt/performances.apt b/site/src/site/apt/performances.apt similarity index 100% rename from src/site/apt/performances.apt rename to site/src/site/apt/performances.apt diff --git a/src/site/apt/providers.apt b/site/src/site/apt/providers.apt similarity index 100% rename from src/site/apt/providers.apt rename to site/src/site/apt/providers.apt diff --git a/src/site/apt/proxy.apt b/site/src/site/apt/proxy.apt similarity index 100% rename from src/site/apt/proxy.apt rename to site/src/site/apt/proxy.apt diff --git a/src/site/apt/request.apt b/site/src/site/apt/request.apt similarity index 100% rename from src/site/apt/request.apt rename to site/src/site/apt/request.apt diff --git a/src/site/apt/resumable-download.apt b/site/src/site/apt/resumable-download.apt similarity index 100% rename from src/site/apt/resumable-download.apt rename to site/src/site/apt/resumable-download.apt diff --git a/src/site/apt/ssl.apt b/site/src/site/apt/ssl.apt similarity index 100% rename from src/site/apt/ssl.apt rename to site/src/site/apt/ssl.apt diff --git a/src/site/apt/transfer-listener.apt b/site/src/site/apt/transfer-listener.apt similarity index 100% rename from src/site/apt/transfer-listener.apt rename to site/src/site/apt/transfer-listener.apt diff --git a/src/site/apt/upload.apt b/site/src/site/apt/upload.apt similarity index 100% rename from src/site/apt/upload.apt rename to site/src/site/apt/upload.apt diff --git a/src/site/apt/webdav.apt b/site/src/site/apt/webdav.apt similarity index 100% rename from src/site/apt/webdav.apt rename to site/src/site/apt/webdav.apt diff --git a/src/site/apt/zero-bytes-copy.apt b/site/src/site/apt/zero-bytes-copy.apt similarity index 100% rename from src/site/apt/zero-bytes-copy.apt rename to site/src/site/apt/zero-bytes-copy.apt diff --git a/src/site/site.xml b/site/src/site/site.xml similarity index 100% rename from src/site/site.xml rename to site/src/site/site.xml diff --git a/src/site/xdoc/index.xml.vm b/site/src/site/xdoc/index.xml.vm similarity index 100% rename from src/site/xdoc/index.xml.vm rename to site/src/site/xdoc/index.xml.vm diff --git a/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java b/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java deleted file mode 100644 index 3c1720e2cc..0000000000 --- a/src/test/java/com/ning/http/client/async/netty/NettyConnectionPoolTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package com.ning.http.client.async.netty; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ConnectionPoolTest; -import com.ning.http.client.async.ProviderUtil; - -public class NettyConnectionPoolTest extends ConnectionPoolTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); - } - -} From bb332d058eef257d0d9e83e47a9fe84bfcb870dc Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 27 Jun 2012 16:39:50 -0700 Subject: [PATCH 0225/2844] Small tweak to module name. --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 7ca36d01eb..5890a3e223 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -9,7 +9,7 @@ 4.0.0 com.ning async-http-client-api - Asynchronous Http Client Project API + Asynchronous Http Client API 1.8.0-SNAPSHOT jar From a2093add5014a145adec8c353405ae728cc7d599 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Fri, 27 Jul 2012 17:48:51 -0300 Subject: [PATCH 0226/2844] Update to latest release, which is 1.7.5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18d49de5c3..baa8289597 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.4 + 1.7.5 ``` From 84040f70e8c647318eee69be5f87cf0f060077bf Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 30 Jul 2012 22:07:23 -0700 Subject: [PATCH 0227/2844] Incremental fix for #128. ResumableRandomAccessFileListener::onBytesReceived() was passing in the array which backed the ByteBuffer, but didn't use the array offset for the initial position. Added additional logic to perform a copy before the file write if the ByteBuffer provided returned false when calling ByteBuffer::hasArray(). --- .../extra/ResumableRandomAccessFileListener.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java index eeb0b3bc69..181149fae1 100644 --- a/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java +++ b/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java @@ -37,7 +37,15 @@ public ResumableRandomAccessFileListener(RandomAccessFile file) { */ public void onBytesReceived(ByteBuffer buffer) throws IOException { file.seek(file.length()); - file.write(buffer.array()); + if (buffer.hasArray()) { + file.write(buffer.array(), buffer.arrayOffset(), buffer.remaining()); + } else { // if the buffer is direct or backed by a String... + byte[] b = new byte[buffer.remaining()]; + int pos = buffer.position(); + buffer.get(b); + buffer.position(pos); + file.write(b); + } } /** From ee8c6ea58a6796fa57f816eb162d76f4fe94e21d Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 30 Jul 2012 22:12:10 -0700 Subject: [PATCH 0228/2844] small tweak to my previous commit. --- .../http/client/extra/ResumableRandomAccessFileListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java index 181149fae1..e823e8d18a 100644 --- a/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java +++ b/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java @@ -38,7 +38,7 @@ public ResumableRandomAccessFileListener(RandomAccessFile file) { public void onBytesReceived(ByteBuffer buffer) throws IOException { file.seek(file.length()); if (buffer.hasArray()) { - file.write(buffer.array(), buffer.arrayOffset(), buffer.remaining()); + file.write(buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining()); } else { // if the buffer is direct or backed by a String... byte[] b = new byte[buffer.remaining()]; int pos = buffer.position(); From 71fb6427d31de9e488947034fb3699917fab03ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20R=C3=A9mond?= Date: Thu, 2 Aug 2012 11:39:06 +0200 Subject: [PATCH 0229/2844] call getUrl() only once --- .../main/java/com/ning/http/client/RequestBuilderBase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 9cc5ec40e0..c8411e0683 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -75,8 +75,9 @@ public RequestImpl(boolean useRawUrl) { public RequestImpl(Request prototype) { if (prototype != null) { this.method = prototype.getMethod(); - int pos = prototype.getUrl().indexOf("?"); - this.url = pos > 0 ? prototype.getUrl().substring(0, pos) : prototype.getUrl(); + String prototypeUrl = prototype.getUrl(); + int pos = prototypeUrl.indexOf("?"); + this.url = pos > 0 ? prototypeUrl.substring(0, pos) : prototypeUrl; this.address = prototype.getInetAddress(); this.localAddress = prototype.getLocalAddress(); this.headers = new FluentCaseInsensitiveStringsMap(prototype.getHeaders()); From 4c867952bfc2debebb265266ed524323114aab7a Mon Sep 17 00:00:00 2001 From: figroc Date: Fri, 3 Aug 2012 18:21:08 +0800 Subject: [PATCH 0230/2844] Update providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java If not Realm bound, do not retry. That doesn't make sense. --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 84d5c81581..4486e55f50 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2114,6 +2114,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws //} if (statusCode == 401 + && realm != null && wwwAuth.size() > 0 && !future.getAndSetAuth(true)) { @@ -2171,6 +2172,7 @@ public Object call() throws Exception { List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); if (statusCode == 407 + && realm != null && proxyAuth.size() > 0 && !future.getAndSetAuth(true)) { From 3472bc2556ccc87ae5a50d4341023c7fb627ef8f Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Sat, 11 Aug 2012 21:38:53 -0700 Subject: [PATCH 0231/2844] - improve proxy tunneling test - Fix proxy tunneling in grizzly provider - add WS tunneling support. --- .../client/async/ProxyTunnellingTest.java | 6 +- providers/grizzly/pom.xml | 2 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 77 ++++++++++++++----- 3 files changed, 62 insertions(+), 23 deletions(-) diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java index c0bb1f2695..a207828ced 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java +++ b/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java @@ -111,7 +111,7 @@ public Response onCompleted(Response response) throws Exception { }); Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(8.1.1.v20120215)"); + assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); asyncHttpClient.close(); } @@ -142,7 +142,7 @@ public Response onCompleted(Response response) throws Exception { }); Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(8.1.1.v20120215)"); + assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); asyncHttpClient.close(); } @@ -161,7 +161,7 @@ public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, Response r = client.get().get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("server"), "Jetty(8.1.1.v20120215)"); + assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); client.close(); } diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index 6929b96539..df4b204c27 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -20,7 +20,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.10 + 2.2.14-SNAPSHOT com.ning diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 4c659daf72..6674d84715 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -148,7 +148,7 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { private final static Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); private static final boolean SEND_FILE_SUPPORT; static { - SEND_FILE_SUPPORT = configSendFileSupport(); + SEND_FILE_SUPPORT = /*configSendFileSupport();*/ false; } private final Attribute REQUEST_STATE_ATTR = Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTransactionContext.class.getName()); @@ -616,6 +616,7 @@ final class HttpTransactionContext { HandShake handshake; ProtocolHandler protocolHandler; WebSocket webSocket; + boolean establishingTunnel; // -------------------------------------------------------- Constructors @@ -674,6 +675,15 @@ void result(Object result) { } } + boolean isTunnelEstablished(final Connection c) { + return c.getAttributes().getAttribute("tunnel-established") != null; + } + + + void tunnelEstablished(final Connection c) { + c.getAttributes().setAttribute("tunnel-established", Boolean.TRUE); + } + } // END HttpTransactionContext @@ -841,7 +851,9 @@ private boolean sendAsGrizzlyRequest(final Request request, final ProxyServer proxy = getProxyServer(request); final boolean useProxy = (proxy != null); if (useProxy) { - if (secure) { + if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) { + secure = false; + httpCtx.establishingTunnel = true; builder.method(Method.CONNECT); builder.uri(AsyncHttpProviderUtils.getAuthority(uri)); } else { @@ -861,7 +873,7 @@ private boolean sendAsGrizzlyRequest(final Request request, } HttpRequestPacket requestPacket; - if (httpCtx.isWSRequest) { + if (httpCtx.isWSRequest && !httpCtx.establishingTunnel) { try { final URI wsURI = new URI(httpCtx.wsRequestURI); httpCtx.protocolHandler = Version.DRAFT17.createHandler(true); @@ -874,7 +886,10 @@ private boolean sendAsGrizzlyRequest(final Request request, } else { requestPacket = builder.build(); } - requestPacket.setSecure(true); + requestPacket.setSecure(secure); + if (secure) { + ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(true, ctx.getConnection())); + } if (!useProxy && !httpCtx.isWSRequest) { addQueryString(request, requestPacket); } @@ -906,7 +921,6 @@ private boolean sendAsGrizzlyRequest(final Request request, } - private boolean isUpgradeRequest(final AsyncHandler handler) { return (handler instanceof UpgradeHandler); } @@ -1136,14 +1150,19 @@ protected void onInitialLineParsed(HttpHeader httpHeader, if (httpHeader.isSkipRemainder()) { return; } + final Connection connection = ctx.getConnection(); final HttpTransactionContext context = - provider.getHttpTransactionContext(ctx.getConnection()); + provider.getHttpTransactionContext(connection); final int status = ((HttpResponsePacket) httpHeader).getStatus(); + if (context.establishingTunnel && HttpStatus.OK_200.statusMatches(status)) { + return; + } if (HttpStatus.CONINTUE_100.statusMatches(status)) { ctx.notifyUpstream(new ContinueEvent(context)); return; } + if (context.statusHandler != null && !context.statusHandler.handlesStatus(status)) { context.statusHandler = null; context.invocationStatus = StatusHandler.InvocationStatus.CONTINUE; @@ -1224,11 +1243,12 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, ConnectionManager.markConnectionAsDoNotCache(ctx.getConnection()); } } - if (httpHeader.isSkipRemainder()) { + final HttpTransactionContext context = + provider.getHttpTransactionContext(ctx.getConnection()); + if (httpHeader.isSkipRemainder() || context.establishingTunnel) { return; } - final HttpTransactionContext context = - provider.getHttpTransactionContext(ctx.getConnection()); + final AsyncHandler handler = context.handler; final List filters = context.provider.clientConfig.getResponseFilters(); final GrizzlyResponseHeaders responseHeaders = new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, @@ -1328,6 +1348,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } + @SuppressWarnings("unchecked") @Override protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { @@ -1340,20 +1361,38 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c result = super.onHttpPacketParsed(httpHeader, ctx); - final HttpTransactionContext context = cleanup(ctx, provider); - - final AsyncHandler handler = context.handler; - if (handler != null) { + final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); + if (context.establishingTunnel + && HttpStatus.OK_200.statusMatches( + ((HttpResponsePacket) httpHeader).getStatus())) { + context.establishingTunnel = false; + final Connection c = ctx.getConnection(); + context.tunnelEstablished(c); try { - context.result(handler.onCompleted()); - } catch (Exception e) { + context.provider.execute(c, + context.request, + context.handler, + context.future); + return result; + } catch (IOException e) { context.abort(e); + return result; } } else { - context.done(null); - } + cleanup(ctx, provider); + final AsyncHandler handler = context.handler; + if (handler != null) { + try { + context.result(handler.onCompleted()); + } catch (Exception e) { + context.abort(e); + } + } else { + context.done(null); + } - return result; + return result; + } } @@ -1382,7 +1421,7 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx, context.abort(new IOException("Maximum pooled connections exceeded")); } else { if (!context.provider.connectionManager.returnConnection(context.requestUrl, c)) { - ctx.getConnection().close().markForRecycle(true); + ctx.getConnection().close(); } } From 2f6549de2c1c80887b7b9294af3a67c28e11bdd0 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 16 Aug 2012 19:39:06 -0700 Subject: [PATCH 0232/2844] Better handling of an Abort state when dealing with a WS request. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 6674d84715..c338e70349 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -101,6 +101,7 @@ import org.glassfish.grizzly.websockets.DataFrame; import org.glassfish.grizzly.websockets.DefaultWebSocket; import org.glassfish.grizzly.websockets.HandShake; +import org.glassfish.grizzly.websockets.HandshakeException; import org.glassfish.grizzly.websockets.ProtocolHandler; import org.glassfish.grizzly.websockets.Version; import org.glassfish.grizzly.websockets.WebSocketEngine; @@ -1209,6 +1210,10 @@ protected void onInitialLineParsed(HttpHeader httpHeader, final AsyncHandler handler = context.handler; if (handler != null) { context.currentState = handler.onStatusReceived(responseStatus); + if (context.isWSRequest && context.currentState == AsyncHandler.STATE.ABORT) { + httpHeader.setSkipRemainder(true); + context.abort(new HandshakeException("Upgrade failed")); + } } } catch (Exception e) { httpHeader.setSkipRemainder(true); From 1cf8d001c2ad495aa9ac6f2d017da708e8c30d73 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 21 Aug 2012 08:12:55 +0200 Subject: [PATCH 0233/2844] Minor changes to AsyncHttpProviderUtils.convertExpireField * Make public so it can be used to parse Expires headers * compute trimmed unquoted String only once --- .../java/com/ning/http/util/AsyncHttpProviderUtils.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 538c63da2e..b92850d374 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -556,12 +556,14 @@ public static Cookie parseCookie(String value) { return new Cookie(domain, cookieName, cookieValue, path, maxAge, secure); } - private static int convertExpireField(String timestring) throws Exception { + public static int convertExpireField(String timestring) throws Exception { Exception exception = null; + String trimmedTimeString = removeQuote(timestring.trim()); + long now = System.currentTimeMillis(); for (SimpleDateFormat sdf : simpleDateFormat.get()) { try { - long expire = sdf.parse(removeQuote(timestring.trim())).getTime(); - return (int) ((expire - System.currentTimeMillis()) / 1000); + long expire = sdf.parse(trimmedTimeString).getTime(); + return (int) ((expire - now) / 1000); } catch (ParseException e) { exception = e; } catch (NumberFormatException e) { From 779070a2b2b9a269548a79849a9e1411ec415861 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 21 Aug 2012 21:29:12 -0500 Subject: [PATCH 0234/2844] Fix for #132 - README.md examples use "http://www.ning.com/ " --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index baa8289597..8beb92779c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async- import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - Future f = asyncHttpClient.prepareGet("http://www.ning.com/ ").execute(); + Future f = asyncHttpClient.prepareGet("http://www.ning.com/").execute(); Response r = f.get(); ``` @@ -38,7 +38,7 @@ You can also accomplish asynchronous (non-blocking) operation without using a Fu import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - asyncHttpClient.prepareGet("http://www.ning.com/ ").execute(new AsyncCompletionHandler(){ + asyncHttpClient.prepareGet("http://www.ning.com/").execute(new AsyncCompletionHandler(){ @Override public Response onCompleted(Response response) throws Exception{ @@ -63,7 +63,7 @@ You can also mix Future with AsyncHandler to only retrieve part of the asynchron import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - Future f = asyncHttpClient.prepareGet("http://www.ning.com/ ").execute( + Future f = asyncHttpClient.prepareGet("http://www.ning.com/").execute( new AsyncCompletionHandler(){ @Override @@ -90,7 +90,7 @@ which is something you want to do for large responses: this way you can process import java.util.concurrent.Future; AsyncHttpClient c = new AsyncHttpClient(); - Future f = c.prepareGet("http://www.ning.com/ ").execute(new AsyncHandler() { + Future f = c.prepareGet("http://www.ning.com/").execute(new AsyncHandler() { private ByteArrayOutputStream bytes = new ByteArrayOutputStream(); @Override From c85541236d3e4e7f0ee9aef106804d600dffd8e2 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 21 Aug 2012 22:26:55 -0500 Subject: [PATCH 0235/2844] Fix for #58 (Change default user-agent value to AsyncHttpClient). --- .../http/client/AsyncHttpClientConfig.java | 26 ++++++++++++++++++- .../client/AsyncHttpClientConfigBean.java | 2 +- .../providers/jdk/JDKAsyncHttpProvider.java | 4 ++- .../com/ning/http/client/version.properties | 1 + .../http/util/AsyncHttpProviderUtils.java | 13 +++++----- pom.xml | 13 ++++++++-- .../apache/ApacheAsyncHttpProvider.java | 2 +- .../netty/NettyAsyncHttpProvider.java | 4 ++- 8 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 api/src/main/java/com/ning/http/client/version.properties diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index b3fb5bac1c..61691415a5 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -24,10 +24,13 @@ import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; +import java.io.IOException; +import java.io.InputStream; import java.security.GeneralSecurityException; import java.util.Collections; import java.util.LinkedList; import java.util.List; +import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -52,6 +55,27 @@ public class AsyncHttpClientConfig { protected final static String ASYNC_CLIENT = AsyncHttpClientConfig.class.getName() + "."; + public final static String AHC_VERSION; + + static { + InputStream is = null; + Properties prop = new Properties(); + try { + is = AsyncHttpClientConfig.class.getResourceAsStream("version.properties"); + prop.load(is); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException ignored) { + + } + } + } + AHC_VERSION = prop.getProperty("ahc.version", "UNKNOWN"); + } protected int maxTotalConnections; protected int maxConnectionPerHost; @@ -490,7 +514,7 @@ public static class Builder { private boolean redirectEnabled = Boolean.getBoolean(ASYNC_CLIENT + "defaultRedirectsEnabled"); private int maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); private boolean compressionEnabled = Boolean.getBoolean(ASYNC_CLIENT + "compressionEnabled"); - private String userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "NING/1.0"); + private String userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "AsyncHttpClient/" + AHC_VERSION); private boolean useProxyProperties = Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties"); private boolean allowPoolingConnection = true; private ScheduledExecutorService reaper = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors(), new ThreadFactory() { diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java index 0924d4d760..0aaf123614 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java @@ -53,7 +53,7 @@ void configureDefaults() { redirectEnabled = Boolean.getBoolean(ASYNC_CLIENT + "defaultRedirectsEnabled"); maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); compressionEnabled = Boolean.getBoolean(ASYNC_CLIENT + "compressionEnabled"); - userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "NING/1.0"); + userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "AsyncHttpClient/" + AHC_VERSION); boolean useProxyProperties = Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties"); if (useProxyProperties) { diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index e27375749e..6bd46a78fb 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -547,7 +547,9 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request } else if (config.getUserAgent() != null) { urlConnection.setRequestProperty("User-Agent", config.getUserAgent()); } else { - urlConnection.setRequestProperty("User-Agent", AsyncHttpProviderUtils.constructUserAgent(JDKAsyncHttpProvider.class)); + urlConnection.setRequestProperty("User-Agent", + AsyncHttpProviderUtils.constructUserAgent(JDKAsyncHttpProvider.class, + config)); } if (request.getCookies() != null && !request.getCookies().isEmpty()) { diff --git a/api/src/main/java/com/ning/http/client/version.properties b/api/src/main/java/com/ning/http/client/version.properties new file mode 100644 index 0000000000..242abfd904 --- /dev/null +++ b/api/src/main/java/com/ning/http/client/version.properties @@ -0,0 +1 @@ +ahc.version=${pom.version} \ No newline at end of file diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 538c63da2e..761daf3bf4 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -12,6 +12,7 @@ */ package com.ning.http.util; +import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.ByteArrayPart; import com.ning.http.client.Cookie; @@ -466,10 +467,11 @@ private static void add(StringBuilder sb, String name, int val) { sb.append((char) SEMICOLON); } - public static String constructUserAgent(Class httpProvider) { - StringBuffer b = new StringBuffer("AsyncHttpClient/1.0") - .append(" ") - .append("(") + public static String constructUserAgent(Class httpProvider, + AsyncHttpClientConfig config) { + return new StringBuffer(config.getUserAgent()) + .append(' ') + .append('(') .append(httpProvider.getSimpleName()) .append(" - ") .append(System.getProperty("os.name")) @@ -479,8 +481,7 @@ public static String constructUserAgent(Class httpP .append(System.getProperty("java.version")) .append(" - ") .append(Runtime.getRuntime().availableProcessors()) - .append(" core(s))"); - return b.toString(); + .append(" core(s))").toString(); } public static String parseCharset(String contentType) { diff --git a/pom.xml b/pom.xml index f37e330d9c..72b9927ae2 100644 --- a/pom.xml +++ b/pom.xml @@ -89,6 +89,15 @@ + + + true + src/main/java/ + + **/*.java + + + @@ -571,8 +580,8 @@ true - 1.5 - 1.5 + 1.6 + 1.6 2.12 diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 399f3f2561..2c11ab3794 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -377,7 +377,7 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I } else if (config.getUserAgent() != null) { method.setRequestHeader("User-Agent", config.getUserAgent()); } else { - method.setRequestHeader("User-Agent", AsyncHttpProviderUtils.constructUserAgent(ApacheAsyncHttpProvider.class)); + method.setRequestHeader("User-Agent", AsyncHttpProviderUtils.constructUserAgent(ApacheAsyncHttpProvider.class, config)); } if (config.isCompressionEnabled()) { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4486e55f50..05d5479352 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -715,7 +715,9 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } else if (config.getUserAgent() != null) { nettyRequest.setHeader("User-Agent", config.getUserAgent()); } else { - nettyRequest.setHeader("User-Agent", AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class)); + nettyRequest.setHeader("User-Agent", + AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class, + config)); } if (!m.equals(HttpMethod.CONNECT)) { From 2d70a391074755b85799fba4943c6fd743308f6b Mon Sep 17 00:00:00 2001 From: Kyrylo Stokoz Date: Wed, 22 Aug 2012 12:42:42 +0200 Subject: [PATCH 0236/2844] Added an option for netty connection pool to limit the time when connection can be put back to pool. In case of Amazon Cloud DNS records can change in seconds, and taking into account that AHC caches already resolved connection and never re-resolve DNS records if response if ok, introducing option to limit life for cached connection, to be able to gracefully route traffic to new host in case dns records changed. --- .../http/client/AsyncHttpClientConfig.java | 26 +++++++++++++++++++ .../providers/netty/NettyConnectionsPool.java | 15 +++++++++++ 2 files changed, 41 insertions(+) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 61691415a5..b3d841132f 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -108,6 +108,7 @@ public class AsyncHttpClientConfig { protected HostnameVerifier hostnameVerifier; protected int ioThreadMultiplier; protected boolean strict302Handling; + protected int maxConnectionLifeTimeInMs; protected AsyncHttpClientConfig() { } @@ -119,6 +120,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, int idleConnectionInPoolTimeoutInMs, int idleConnectionTimeoutInMs, int requestTimeoutInMs, + int connectionMaxLifeTimeInMs, boolean redirectEnabled, int maxDefaultRedirects, boolean compressionEnabled, @@ -150,6 +152,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.idleConnectionInPoolTimeoutInMs = idleConnectionInPoolTimeoutInMs; this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; this.requestTimeoutInMs = requestTimeoutInMs; + this.maxConnectionLifeTimeInMs = connectionMaxLifeTimeInMs; this.redirectEnabled = redirectEnabled; this.maxDefaultRedirects = maxDefaultRedirects; this.compressionEnabled = compressionEnabled; @@ -500,6 +503,15 @@ public boolean isStrict302Handling() { return strict302Handling; } + /** + * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. + * + * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. + */ + public int getMaxConnectionLifeTimeInMs() { + return maxConnectionLifeTimeInMs; + } + /** * Builder for an {@link AsyncHttpClient} */ @@ -511,6 +523,7 @@ public static class Builder { private int defaultIdleConnectionInPoolTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionInPoolTimeoutInMS", 60 * 1000); private int defaultIdleConnectionTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultIdleConnectionTimeoutInMS", 60 * 1000); private int defaultRequestTimeoutInMs = Integer.getInteger(ASYNC_CLIENT + "defaultRequestTimeoutInMS", 60 * 1000); + private int defaultMaxConnectionLifeTimeInMs = Integer.getInteger(ASYNC_CLIENT + "defaultMaxConnectionLifeTimeInMs", -1); private boolean redirectEnabled = Boolean.getBoolean(ASYNC_CLIENT + "defaultRedirectsEnabled"); private int maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); private boolean compressionEnabled = Boolean.getBoolean(ASYNC_CLIENT + "compressionEnabled"); @@ -980,6 +993,17 @@ public Builder setStrict302Handling(final boolean strict302Handling) { return this; } + /** + * Set the maximum time in millisecond connection can be added to the pool for further reuse + * + * @param maxConnectionLifeTimeInMs the maximum time in millisecond connection can be added to the pool for further reuse + * @return a {@link Builder} + */ + public Builder setMaxConnectionLifeTimeInMs(int maxConnectionLifeTimeInMs) { + this.defaultMaxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs; + return this; + } + /** * Create a config builder with values taken from the given prototype configuration. * @@ -993,6 +1017,7 @@ public Builder(AsyncHttpClientConfig prototype) { defaultIdleConnectionInPoolTimeoutInMs = prototype.getIdleConnectionInPoolTimeoutInMs(); defaultIdleConnectionTimeoutInMs = prototype.getIdleConnectionTimeoutInMs(); defaultMaxConnectionPerHost = prototype.getMaxConnectionPerHost(); + defaultMaxConnectionLifeTimeInMs = prototype.getMaxConnectionLifeTimeInMs(); maxDefaultRedirects = prototype.getMaxRedirects(); defaultMaxTotalConnections = prototype.getMaxTotalConnections(); proxyServer = prototype.getProxyServer(); @@ -1046,6 +1071,7 @@ public AsyncHttpClientConfig build() { defaultIdleConnectionInPoolTimeoutInMs, defaultIdleConnectionTimeoutInMs, defaultRequestTimeoutInMs, + defaultMaxConnectionLifeTimeInMs, redirectEnabled, maxDefaultRedirects, compressionEnabled, diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index 37ae4b67a8..b09a224625 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -34,11 +34,13 @@ public class NettyConnectionsPool implements ConnectionsPool { private final static Logger log = LoggerFactory.getLogger(NettyConnectionsPool.class); private final ConcurrentHashMap> connectionsPool = new ConcurrentHashMap>(); private final ConcurrentHashMap channel2IdleChannel = new ConcurrentHashMap(); + private final ConcurrentHashMap channel2CreationDate = new ConcurrentHashMap(); private final AtomicBoolean isClosed = new AtomicBoolean(false); private final Timer idleConnectionDetector = new Timer(true); private final boolean sslConnectionPoolEnabled; private final int maxTotalConnections; private final int maxConnectionPerHost; + private final int maxConnectionLifeTimeInMs; private final long maxIdleTime; public NettyConnectionsPool(NettyAsyncHttpProvider provider) { @@ -46,6 +48,7 @@ public NettyConnectionsPool(NettyAsyncHttpProvider provider) { this.maxConnectionPerHost = provider.getConfig().getMaxConnectionPerHost(); this.sslConnectionPoolEnabled = provider.getConfig().isSslConnectionPoolEnabled(); this.maxIdleTime = provider.getConfig().getIdleConnectionInPoolTimeoutInMs(); + this.maxConnectionLifeTimeInMs = provider.getConfig().getMaxConnectionLifeTimeInMs(); this.idleConnectionDetector.schedule(new IdleChannelDetector(), maxIdleTime, maxIdleTime); } @@ -145,6 +148,15 @@ public boolean offer(String uri, Channel channel) { return false; } + Long createTime = channel2CreationDate.get(channel); + if (createTime == null){ + channel2CreationDate.putIfAbsent(channel, System.currentTimeMillis()); + } + else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeInMs) < System.currentTimeMillis() ) { + log.debug("Channel {} expired", channel); + return false; + } + log.debug("Adding uri: {} for channel {}", uri, channel); channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); @@ -222,6 +234,7 @@ private boolean remove(IdleChannel pooledChannel) { * {@inheritDoc} */ public boolean removeAll(Channel channel) { + channel2CreationDate.remove(channel); return !isClosed.get() && remove(channel2IdleChannel.get(channel)); } @@ -251,11 +264,13 @@ public void destroy() { } connectionsPool.clear(); channel2IdleChannel.clear(); + channel2CreationDate.clear(); } private void close(Channel channel) { try { channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel2CreationDate.remove(channel); channel.close(); } catch (Throwable t) { // noop From b1a866738591d74a3418b674760fd2bf60113a67 Mon Sep 17 00:00:00 2001 From: Brian Gruber Date: Wed, 22 Aug 2012 16:20:26 -0400 Subject: [PATCH 0237/2844] error message on timeout includes units --- .../ning/http/client/providers/netty/NettyResponseFuture.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index bb58421dcb..c568aa0e4b 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -212,7 +212,7 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, if (expired) { isCancelled.set(true); - TimeoutException te = new TimeoutException(String.format("No response received after %s", l)); + TimeoutException te = new TimeoutException(String.format("No response received after %s %s", l, tu.name().toLowerCase())); if (!throwableCalled.getAndSet(true)) { try { asyncHandler.onThrowable(te); From f0affeb3522976ef635b39de1cd043cd71cbc28a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 27 Aug 2012 11:27:15 -0500 Subject: [PATCH 0238/2844] Upgrade to latest Grizzly 2.2.x release. --- providers/grizzly/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index df4b204c27..be26bb69f9 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -20,7 +20,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.14-SNAPSHOT + 2.2.16 com.ning @@ -44,4 +44,4 @@ - \ No newline at end of file + From 22b7ac5153b8c8d65c010f1fae28863ca71f8389 Mon Sep 17 00:00:00 2001 From: Jenny Williamson Date: Tue, 28 Aug 2012 13:13:59 -0700 Subject: [PATCH 0239/2844] reset statusReceived when retrying connection otherwise handler.onStatusReceived is never called on the retry. --- .../ning/http/client/providers/netty/NettyAsyncHttpProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 05d5479352..c36bdc1877 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1415,6 +1415,7 @@ protected boolean remotelyClosed(Channel channel, NettyResponseFuture future) } future.setState(NettyResponseFuture.STATE.RECONNECTED); + future.getAndSetStatusReceived(false); log.debug("Trying to recover request {}\n", future.getNettyRequest()); From 3df88ef9460eb7a72aa9ed2b16ad3844ad5e786b Mon Sep 17 00:00:00 2001 From: Levi Notik Date: Tue, 4 Sep 2012 15:14:56 -0400 Subject: [PATCH 0240/2844] FIX ISSUE #127 NettyAsyncHttpProdiver redirects ignoring case Issue #127 mentions that the NettyHttpProvider ignores case when checking for equality between the redirect Uri and the Future's Uri. This commit simply changes the equalsIgnoreCase to equals. --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 05d5479352..5034263087 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1987,7 +1987,7 @@ private boolean redirect(Request request, String location = response.getHeader(HttpHeaders.Names.LOCATION); URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); - if (!uri.toString().equalsIgnoreCase(future.getURI().toString())) { + if (!uri.toString().equals(future.getURI().toString())) { final RequestBuilder nBuilder = stripQueryString ? new RequestBuilder(future.getRequest()).setQueryParameters(null) : new RequestBuilder(future.getRequest()); From 59bda9da57be920733c5d0768c138c9f0f71f613 Mon Sep 17 00:00:00 2001 From: elFarto Date: Tue, 11 Sep 2012 15:55:37 +0200 Subject: [PATCH 0241/2844] Update api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java Added limit of 2 fields to split in parseCookie, to be able to handle cookies such as: Set-Cookie: PREF=ID=a3be7e468f2a528c:FF=0:TM=1347369... --- .../main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 59691c06af..6d417cf934 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -505,7 +505,7 @@ public static String parseCharset(String contentType) { public static Cookie parseCookie(String value) { String[] fields = value.split(";\\s*"); - String[] cookie = fields[0].split("="); + String[] cookie = fields[0].split("=", 2); String cookieName = cookie[0]; String cookieValue = (cookie.length == 1) ? null : cookie[1]; From 9af5921d5d55de3985d0cfaecd5cd667738ea7a7 Mon Sep 17 00:00:00 2001 From: Stephen Dawkins Date: Tue, 11 Sep 2012 15:38:48 +0100 Subject: [PATCH 0242/2844] added testcase for cookie parsing fix --- .../http/util/TestAsyncHttpProviderUtils.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java diff --git a/api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java b/api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java new file mode 100644 index 0000000000..e2bab0876f --- /dev/null +++ b/api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java @@ -0,0 +1,33 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.util; + +import com.ning.http.client.Cookie; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class TestAsyncHttpProviderUtils +{ + @Test(groups="fast") + public void testCookieParsing() + { + String cookieValue = "ID=a3be7f468f2a528c:FF=0:TM=1397369269:LM=134759269:S=XZQK3o8HJ1mytzgz"; + String testCookie = "PREF=" + cookieValue + "; expires=Thu, 11-Sep-2013 13:14:29 GMT; path=/; domain=.google.co.uk"; + Cookie cookie = AsyncHttpProviderUtils.parseCookie(testCookie); + + Assert.assertEquals(cookie.getValue(), cookieValue); + } +} From 219ef7baacbbd657d5de2742fcd7d648bb447c64 Mon Sep 17 00:00:00 2001 From: Dustin Norlander Date: Thu, 27 Sep 2012 16:41:47 -0700 Subject: [PATCH 0243/2844] missing semi colon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8beb92779c..9355735d29 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ which is something you want to do for large responses: this way you can process @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { bytes.write(bodyPart.getBodyPartBytes()); - return STATE.CONTINUE + return STATE.CONTINUE; } @Override From 299c87e52e91d31158635f972153bc5d0d48d34c Mon Sep 17 00:00:00 2001 From: Robert Macaulay Date: Mon, 1 Oct 2012 12:27:32 -0500 Subject: [PATCH 0244/2844] Base keep-alive decision on the presence of a connection:close header instead of keep-alive presence. --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index d63db0cc4f..193a005058 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2072,7 +2072,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws int statusCode = response.getStatus().getCode(); String ka = response.getHeader(HttpHeaders.Names.CONNECTION); - future.setKeepAlive(ka == null || ka.toLowerCase().equals("keep-alive")); + future.setKeepAlive(ka == null || ! ka.toLowerCase().equals("close")); List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); From 677afc64b66dc8ef91d76b73ade36657d0a0e1d1 Mon Sep 17 00:00:00 2001 From: Ivan Porto Carrero Date: Wed, 3 Oct 2012 16:52:06 -0700 Subject: [PATCH 0245/2844] Support patch and trace methods for the request builder --- .../com/ning/http/client/AsyncHttpClient.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClient.java b/api/src/main/java/com/ning/http/client/AsyncHttpClient.java index e6d97de16a..d4d4e3157a 100755 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClient.java @@ -523,6 +523,28 @@ public BoundRequestBuilder prepareDelete(String url) { return requestBuilder("DELETE", url); } + /** + * Prepare an HTTP client PATCH request. + * + * @param url A well formed URL. + * @return {@link RequestBuilder} + */ + @SuppressWarnings("UnusedDeclaration") + public BoundRequestBuilder preparePatch(String url) { + return requestBuilder("PATCH", url); + } + + /** + * Prepare an HTTP client TRACE request. + * + * @param url A well formed URL. + * @return {@link RequestBuilder} + */ + @SuppressWarnings("UnusedDeclaration") + public BoundRequestBuilder prepareTrace(String url) { + return requestBuilder("TRACE", url); + } + /** * Construct a {@link RequestBuilder} using a {@link Request} * From 900a8da82475a2cd90f6a2443268d7dc935a61c1 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 10 Oct 2012 10:58:28 +0200 Subject: [PATCH 0246/2844] Make RequestImpl.toString also print params --- .../java/com/ning/http/client/RequestBuilderBase.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index c8411e0683..b7470f0da6 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -293,12 +293,20 @@ public String toString() { sb.append("\t"); sb.append(method); + sb.append("\theaders:" for (String name : headers.keySet()) { sb.append("\t"); sb.append(name); sb.append(":"); sb.append(headers.getJoinedValue(name, ", ")); } + sb.append("\tparams:" + for (String name : params.keySet()) { + sb.append("\t"); + sb.append(name); + sb.append(":"); + sb.append(params.getJoinedValue(name, ", ")); + } return sb.toString(); } From 5f70ea818fec7d79dbfd8f7b156be3bc059fc373 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Thu, 11 Oct 2012 18:01:12 +0200 Subject: [PATCH 0247/2844] fixing compile error from 900a8da82475a2cd90f6a2443268d7dc935a61c1 --- .../main/java/com/ning/http/client/RequestBuilderBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index b7470f0da6..60df9cec33 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -293,14 +293,14 @@ public String toString() { sb.append("\t"); sb.append(method); - sb.append("\theaders:" + sb.append("\theaders:"); for (String name : headers.keySet()) { sb.append("\t"); sb.append(name); sb.append(":"); sb.append(headers.getJoinedValue(name, ", ")); } - sb.append("\tparams:" + sb.append("\tparams:"); for (String name : params.keySet()) { sb.append("\t"); sb.append(name); From 05159b5c5aa19b5cf6cd69ea2d17f806481f100a Mon Sep 17 00:00:00 2001 From: Ivan Porto Carrero Date: Wed, 17 Oct 2012 19:27:43 -0700 Subject: [PATCH 0248/2844] adds the ability to do reverse auth --- .../client/oauth/OAuthSignatureCalculator.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java index e33ad87c73..58787193fb 100644 --- a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java +++ b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java @@ -52,9 +52,11 @@ public class OAuthSignatureCalculator private static final String KEY_OAUTH_TIMESTAMP = "oauth_timestamp"; private static final String KEY_OAUTH_TOKEN = "oauth_token"; private static final String KEY_OAUTH_VERSION = "oauth_version"; + private static final String KEY_X_AUTH_MODE = "x_auth_mode"; private static final String OAUTH_VERSION_1_0 = "1.0"; private static final String OAUTH_SIGNATURE_METHOD = "HMAC-SHA1"; + private static final String OAUTH_REVERSE_AUTH = "reverse_auth"; /** * To generate Nonce, need some (pseudo)randomness; no need for @@ -70,15 +72,27 @@ public class OAuthSignatureCalculator protected final RequestToken userAuth; + protected final Boolean useReverseAuth; + /** * @param consumerAuth Consumer key to use for signature calculation * @param userAuth Request/access token to use for signature calculation */ public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) { + this(consumerAuth, userAuth, false); + } + + /** + * @param consumerAuth Consumer key to use for signature calculation + * @param userAuth Request/access token to use for signature calculation + * @param useReverseAuth Whether or not to use the reverse auth signature or the regular one + */ + public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth, Boolean useReverseAuth ) { mac = new ThreadSafeHMAC(consumerAuth, userAuth); this.consumerAuth = consumerAuth; this.userAuth = userAuth; random = new Random(System.identityHashCode(this) + System.currentTimeMillis()); + this.useReverseAuth = useReverseAuth; } //@Override // silly 1.5; doesn't allow this for interfaces @@ -130,6 +144,8 @@ public String calculateSignature(String method, String baseURL, long oauthTimest allParameters.add(KEY_OAUTH_TIMESTAMP, String.valueOf(oauthTimestamp)); allParameters.add(KEY_OAUTH_TOKEN, userAuth.getKey()); allParameters.add(KEY_OAUTH_VERSION, OAUTH_VERSION_1_0); + if (useReverseAuth) + allParameters.add(KEY_X_AUTH_MODE, OAUTH_REVERSE_AUTH); if (formParams != null) { for (Map.Entry> entry : formParams) { @@ -180,6 +196,8 @@ public String constructAuthHeader(String signature, String nonce, long oauthTime sb.append("\", "); sb.append(KEY_OAUTH_VERSION).append("=\"").append(OAUTH_VERSION_1_0).append("\""); + if (useReverseAuth) + sb.append(KEY_X_AUTH_MODE).append("=\"").append(OAUTH_REVERSE_AUTH).append("\""); return sb.toString(); } From 1c8442a160688b0fa0f048025e4c77146431eb5d Mon Sep 17 00:00:00 2001 From: Ivan Porto Carrero Date: Thu, 18 Oct 2012 20:43:26 -0700 Subject: [PATCH 0249/2844] Revert change for reverse auth --- .../client/oauth/OAuthSignatureCalculator.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java index 58787193fb..e33ad87c73 100644 --- a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java +++ b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java @@ -52,11 +52,9 @@ public class OAuthSignatureCalculator private static final String KEY_OAUTH_TIMESTAMP = "oauth_timestamp"; private static final String KEY_OAUTH_TOKEN = "oauth_token"; private static final String KEY_OAUTH_VERSION = "oauth_version"; - private static final String KEY_X_AUTH_MODE = "x_auth_mode"; private static final String OAUTH_VERSION_1_0 = "1.0"; private static final String OAUTH_SIGNATURE_METHOD = "HMAC-SHA1"; - private static final String OAUTH_REVERSE_AUTH = "reverse_auth"; /** * To generate Nonce, need some (pseudo)randomness; no need for @@ -72,27 +70,15 @@ public class OAuthSignatureCalculator protected final RequestToken userAuth; - protected final Boolean useReverseAuth; - /** * @param consumerAuth Consumer key to use for signature calculation * @param userAuth Request/access token to use for signature calculation */ public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) { - this(consumerAuth, userAuth, false); - } - - /** - * @param consumerAuth Consumer key to use for signature calculation - * @param userAuth Request/access token to use for signature calculation - * @param useReverseAuth Whether or not to use the reverse auth signature or the regular one - */ - public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth, Boolean useReverseAuth ) { mac = new ThreadSafeHMAC(consumerAuth, userAuth); this.consumerAuth = consumerAuth; this.userAuth = userAuth; random = new Random(System.identityHashCode(this) + System.currentTimeMillis()); - this.useReverseAuth = useReverseAuth; } //@Override // silly 1.5; doesn't allow this for interfaces @@ -144,8 +130,6 @@ public String calculateSignature(String method, String baseURL, long oauthTimest allParameters.add(KEY_OAUTH_TIMESTAMP, String.valueOf(oauthTimestamp)); allParameters.add(KEY_OAUTH_TOKEN, userAuth.getKey()); allParameters.add(KEY_OAUTH_VERSION, OAUTH_VERSION_1_0); - if (useReverseAuth) - allParameters.add(KEY_X_AUTH_MODE, OAUTH_REVERSE_AUTH); if (formParams != null) { for (Map.Entry> entry : formParams) { @@ -196,8 +180,6 @@ public String constructAuthHeader(String signature, String nonce, long oauthTime sb.append("\", "); sb.append(KEY_OAUTH_VERSION).append("=\"").append(OAUTH_VERSION_1_0).append("\""); - if (useReverseAuth) - sb.append(KEY_X_AUTH_MODE).append("=\"").append(OAUTH_REVERSE_AUTH).append("\""); return sb.toString(); } From f5aba7edf38ceda17582e2b1a80bdf4cfc6f3a6f Mon Sep 17 00:00:00 2001 From: Erwan Loisant Date: Fri, 19 Oct 2012 15:13:36 +0200 Subject: [PATCH 0250/2844] Non blocking upload for Netty --- .../providers/netty/BodyChunkedInput.java | 40 +++--- .../netty/FeedableBodyGenerator.java | 119 ++++++++++++++++++ .../netty/NettyAsyncHttpProvider.java | 9 ++ 3 files changed, 153 insertions(+), 15 deletions(-) create mode 100644 providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java index 9ea1de6609..102f6d84f4 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java @@ -33,6 +33,8 @@ class BodyChunkedInput private static final ByteBuffer EOF = ByteBuffer.allocate(0); + private boolean endOfInput = false; + public BodyChunkedInput(Body body) { if (body == null) { throw new IllegalArgumentException("no body specified"); @@ -40,13 +42,21 @@ public BodyChunkedInput(Body body) { this.body = body; } - private ByteBuffer peekNextChuck() + private ByteBuffer peekNextChunk() throws IOException { if (nextChunk == null) { ByteBuffer buffer = ByteBuffer.allocate(chunkSize); - if (body.read(buffer) < 0) { - nextChunk = EOF; + long length = body.read(buffer); + if (length < 0) { + // Negative means this is finished + buffer.flip(); + nextChunk = buffer; + endOfInput = true; + } else if (length == 0) { + // Zero means we didn't get anything this time, but may get next time + buffer.flip(); + nextChunk = null; } else { buffer.flip(); nextChunk = buffer; @@ -55,28 +65,28 @@ private ByteBuffer peekNextChuck() return nextChunk; } - public boolean hasNextChunk() - throws Exception { - return !isEndOfInput(); + /** + * Having no next chunk does not necessarily means end of input, other chunks may arrive later + */ + public boolean hasNextChunk() throws Exception { + return peekNextChunk() != null; } - public Object nextChunk() - throws Exception { - ByteBuffer buffer = peekNextChuck(); - if (buffer == EOF) { + public Object nextChunk() throws Exception { + ByteBuffer buffer = peekNextChunk(); + if (buffer == null || buffer == EOF) { return null; } nextChunk = null; + return ChannelBuffers.wrappedBuffer(buffer); } - public boolean isEndOfInput() - throws Exception { - return peekNextChuck() == EOF; + public boolean isEndOfInput() throws Exception { + return endOfInput; } - public void close() - throws Exception { + public void close() throws Exception { body.close(); } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java new file mode 100644 index 0000000000..36c4d6f90e --- /dev/null +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicInteger; + +import com.ning.http.client.Body; +import com.ning.http.client.BodyGenerator; + +/** + * {@link BodyGenerator} which may return just part of the payload at the time + * handler is requesting it. If it happens - PartialBodyGenerator becomes responsible + * for finishing payload transferring asynchronously. + */ +public class FeedableBodyGenerator implements BodyGenerator { + private final static byte[] END_PADDING = "\r\n".getBytes(); + private final static byte[] ZERO = "0".getBytes(); + private final Queue queue = new ConcurrentLinkedQueue(); + private final AtomicInteger queueSize = new AtomicInteger(); + private FeedListener listener; + + @Override + public Body createBody() throws IOException { + return new PushBody(); + } + + public void feed(final ByteBuffer buffer, final boolean isLast) throws IOException { + queue.offer(new BodyPart(buffer, isLast)); + queueSize.incrementAndGet(); + if (listener != null) { + listener.onContentAdded(); + } + } + + public static interface FeedListener { + public void onContentAdded(); + } + + public void setListener(FeedListener listener) { + this.listener = listener; + } + + private final class PushBody implements Body { + private final int ONGOING = 0; + private final int CLOSING = 1; + private final int FINISHED = 2; + + private int finishState = 0; + + @Override + public long getContentLength() { + return -1; + } + + @Override + public long read(final ByteBuffer buffer) throws IOException { + BodyPart nextPart = queue.peek(); + if (nextPart == null) { + // Nothing in the queue + switch (finishState) { + case ONGOING: + return 0; + case CLOSING: + buffer.put(ZERO); + buffer.put(END_PADDING); + finishState = FINISHED; + return buffer.position(); + case FINISHED: + buffer.put(END_PADDING); + return -1; + } + } + int capacity = buffer.remaining() - 10; // be safe (we'll have to add size, ending, etc.) + int size = Math.min(nextPart.buffer.remaining(), capacity); + buffer.put(Integer.toHexString(size).getBytes()); + buffer.put(END_PADDING); + for (int i=0; i < size; i++) { + buffer.put(nextPart.buffer.get()); + } + buffer.put(END_PADDING); + if (!nextPart.buffer.hasRemaining()) { + if (nextPart.isLast) { + finishState = CLOSING; + } + queue.remove(); + } + return size; + } + + @Override + public void close() throws IOException { + } + + } + + private final static class BodyPart { + private final boolean isLast; + private final ByteBuffer buffer; + + public BodyPart(final ByteBuffer buffer, final boolean isLast) { + this.buffer = buffer; + this.isLast = isLast; + } + } +} diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 193a005058..0e5cdfa04d 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -45,6 +45,7 @@ import com.ning.http.client.listener.TransferCompletionHandler; import com.ning.http.client.ntlm.NTLMEngine; import com.ning.http.client.ntlm.NTLMEngineException; +import com.ning.http.client.providers.netty.FeedableBodyGenerator.FeedListener; import com.ning.http.client.providers.netty.spnego.SpnegoEngine; import com.ning.http.client.websocket.WebSocketUpgradeHandler; import com.ning.http.multipart.MultipartBody; @@ -488,6 +489,14 @@ protected final void writeRequest(final Channel channel, writeFuture = channel.write(bodyFileRegion); } else { BodyChunkedInput bodyChunkedInput = new BodyChunkedInput(body); + BodyGenerator bg = future.getRequest().getBodyGenerator(); + if (bg instanceof FeedableBodyGenerator) { + ((FeedableBodyGenerator)bg).setListener(new FeedListener() { + @Override public void onContentAdded() { + channel.getPipeline().get(ChunkedWriteHandler.class).resumeTransfer(); + } + }); + } writeFuture = channel.write(bodyChunkedInput); } From f4d87676f2f8c3763c41112c48ebfc588fc8b3d6 Mon Sep 17 00:00:00 2001 From: Erwan Loisant Date: Mon, 22 Oct 2012 17:04:27 +0200 Subject: [PATCH 0251/2844] Fix a NPE in RequestBuilderBase.toString() --- .../ning/http/client/RequestBuilderBase.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 60df9cec33..949e76abfc 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -294,18 +294,22 @@ public String toString() { sb.append("\t"); sb.append(method); sb.append("\theaders:"); - for (String name : headers.keySet()) { - sb.append("\t"); - sb.append(name); - sb.append(":"); - sb.append(headers.getJoinedValue(name, ", ")); + if (headers != null) { + for (String name : headers.keySet()) { + sb.append("\t"); + sb.append(name); + sb.append(":"); + sb.append(headers.getJoinedValue(name, ", ")); + } } sb.append("\tparams:"); - for (String name : params.keySet()) { - sb.append("\t"); - sb.append(name); - sb.append(":"); - sb.append(params.getJoinedValue(name, ", ")); + if (params != null) { + for (String name : params.keySet()) { + sb.append("\t"); + sb.append(name); + sb.append(":"); + sb.append(params.getJoinedValue(name, ", ")); + } } return sb.toString(); From 04ae91cf343ba9f50170194bb4b63399eec61a21 Mon Sep 17 00:00:00 2001 From: softprops Date: Wed, 31 Oct 2012 01:04:42 -0400 Subject: [PATCH 0252/2844] fixed type in setMaxRequestRetry javadoc --- .../main/java/com/ning/http/client/AsyncHttpClientConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index b3d841132f..8f0e4c1017 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -904,7 +904,7 @@ public Builder setRequestCompressionLevel(int requestCompressionLevel) { } /** - * Set the number of time a request will be retried when an {@link java.io.IOException} occurs because of a Network exception. + * Set the number of times a request will be retried when an {@link java.io.IOException} occurs because of a Network exception. * * @param maxRequestRetry the number of time a request will be retried * @return this From 4a67d1b6c5e98eff5fd083f9dce5deb5e2f093a5 Mon Sep 17 00:00:00 2001 From: softprops Date: Wed, 31 Oct 2012 01:06:25 -0400 Subject: [PATCH 0253/2844] another typo --- .../main/java/com/ning/http/client/AsyncHttpClientConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 8f0e4c1017..677b2c4aa1 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -906,7 +906,7 @@ public Builder setRequestCompressionLevel(int requestCompressionLevel) { /** * Set the number of times a request will be retried when an {@link java.io.IOException} occurs because of a Network exception. * - * @param maxRequestRetry the number of time a request will be retried + * @param maxRequestRetry the number of times a request will be retried * @return this */ public Builder setMaxRequestRetry(int maxRequestRetry) { From 81f52b585750946d1e9feb682f2bef0a00b1d5f2 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Fri, 9 Nov 2012 15:24:28 -0500 Subject: [PATCH 0254/2844] 1.7.7 release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9355735d29..0db4fb3c5b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.5 + 1.7.7 ``` From c322357edaa60818b9f291d0feaa48adc75efa89 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 26 Nov 2012 11:07:09 -0800 Subject: [PATCH 0255/2844] Fix order dependence of header values. --- .../ning/http/client/async/AsyncStreamHandlerTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java index d909314e33..297d1c38f5 100644 --- a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java @@ -29,6 +29,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; @@ -475,13 +476,20 @@ public Integer onCompleted() throws Exception { public void asyncOptionsTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); + final String[] expected = { + "GET","HEAD","OPTIONS","POST","TRACE" + }; c.prepareOptions("http://www.apache.org/").execute(new AsyncHandlerAdapter() { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("Allow", ", "), "GET,HEAD,POST,OPTIONS,TRACE"); + String[] values = h.get("Allow").get(0).split(",|, "); + Assert.assertNotNull(values); + Assert.assertEquals(values.length, expected.length); + Arrays.sort(values); + Assert.assertEquals(expected, values); return STATE.ABORT; } From 8105e0f7612a92808c686d4f067919cba19f52e5 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 26 Nov 2012 11:12:36 -0800 Subject: [PATCH 0256/2844] Commit fix for #165 from bric3. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 20 +++++++++++++++---- .../GrizzlyAsyncHttpProviderConfig.java | 11 +++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index c338e70349..569bfae703 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -135,6 +135,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; /** @@ -370,8 +371,14 @@ public void onTimeout(Connection connection) { false); final SwitchingSSLFilter filter = new SwitchingSSLFilter(configurator, defaultSecState); fcb.add(filter); - final AsyncHttpClientEventFilter eventFilter = new - AsyncHttpClientEventFilter(this); + GrizzlyAsyncHttpProviderConfig providerConfig = + (GrizzlyAsyncHttpProviderConfig) clientConfig.getAsyncHttpProviderConfig(); + final AsyncHttpClientEventFilter eventFilter; + if (providerConfig != null) { + eventFilter = new AsyncHttpClientEventFilter(this, (Integer) providerConfig.getProperty(MAX_HTTP_PACKET_HEADER_SIZE)); + } else { + eventFilter = new AsyncHttpClientEventFilter(this); + } final AsyncHttpClientFilter clientFilter = new AsyncHttpClientFilter(clientConfig); ContentEncoding[] encodings = eventFilter.getContentEncodings(); @@ -389,8 +396,6 @@ public void onTimeout(Connection connection) { fcb.add(eventFilter); fcb.add(clientFilter); - GrizzlyAsyncHttpProviderConfig providerConfig = - (GrizzlyAsyncHttpProviderConfig) clientConfig.getAsyncHttpProviderConfig(); if (providerConfig != null) { final TransportCustomizer customizer = (TransportCustomizer) providerConfig.getProperty(TRANSPORT_CUSTOMIZER); @@ -1070,7 +1075,14 @@ private static final class AsyncHttpClientEventFilter extends HttpClientFilter { AsyncHttpClientEventFilter(final GrizzlyAsyncHttpProvider provider) { + this(provider, DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); + } + + + AsyncHttpClientEventFilter(final GrizzlyAsyncHttpProvider provider, + final int maxHeaderSize) { + super(maxHeaderSize); this.provider = provider; HANDLER_MAP.put(HttpStatus.UNAUTHORIZED_401.getStatusCode(), AuthorizationHandler.INSTANCE); diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java index 70b7425391..e79473859d 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java @@ -14,6 +14,7 @@ package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHttpProviderConfig; +import org.glassfish.grizzly.http.HttpCodecFilter; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import java.util.HashMap; @@ -49,7 +50,14 @@ public static enum Property { * * @see TransportCustomizer */ - TRANSPORT_CUSTOMIZER(TransportCustomizer.class); + TRANSPORT_CUSTOMIZER(TransportCustomizer.class), + + /** + * Defines the maximum HTTP packet header size. + * + * @since 1.8 + */ + MAX_HTTP_PACKET_HEADER_SIZE(Integer.class, HttpCodecFilter.DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); final Object defaultValue; @@ -81,6 +89,7 @@ boolean hasDefaultValue() { * @throws IllegalArgumentException if the type of the specified value * does not match the expected type of the specified {@link Property}. */ + @SuppressWarnings("unchecked") @Override public AsyncHttpProviderConfig addProperty(Property name, Object value) { if (name == null) { From 9d75ba8916acfb46b27d05c1be7dfd7e54711741 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 26 Nov 2012 11:24:17 -0800 Subject: [PATCH 0257/2844] Fix argument order on assert call. --- .../java/com/ning/http/client/async/AsyncStreamHandlerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java index 297d1c38f5..512153b287 100644 --- a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java @@ -489,7 +489,7 @@ public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { Assert.assertNotNull(values); Assert.assertEquals(values.length, expected.length); Arrays.sort(values); - Assert.assertEquals(expected, values); + Assert.assertEquals(values, expected); return STATE.ABORT; } From 3e19b9c790333efee0987ed56b5b850c2ae25f41 Mon Sep 17 00:00:00 2001 From: Dominic Tootell Date: Wed, 28 Nov 2012 10:17:05 +0000 Subject: [PATCH 0258/2844] possible fix to issue #114 where if the request times out, we cancel the future (as before); but now also directly make a call to close the channel. Not sure if this impact any pooling on that channel though. --- .../http/client/providers/netty/NettyResponseFuture.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index c568aa0e4b..9cca742465 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -211,7 +211,13 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, } if (expired) { - isCancelled.set(true); + isCancelled.set(false); + try { + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.close(); + } catch (Throwable t) { + // Ignore + } TimeoutException te = new TimeoutException(String.format("No response received after %s %s", l, tu.name().toLowerCase())); if (!throwableCalled.getAndSet(true)) { try { From 7c8b4c31b555950908f1c4227b4e7b782aa9b22a Mon Sep 17 00:00:00 2001 From: Dominic Tootell Date: Wed, 28 Nov 2012 10:57:21 +0000 Subject: [PATCH 0259/2844] doh.. made isCancelled.set(false); when meant to be true. --- .../ning/http/client/providers/netty/NettyResponseFuture.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index 9cca742465..68dd5ed03b 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -211,7 +211,7 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, } if (expired) { - isCancelled.set(false); + isCancelled.set(true); try { channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); channel.close(); From 8c7604c7ada0d21a25641cbde3f50c9704ae80b1 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Thu, 29 Nov 2012 08:26:49 -0500 Subject: [PATCH 0260/2844] Bump version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0db4fb3c5b..96d38b6bb1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.7 + 1.7.8 ``` From 78f9a3c124eb82ced92ceeef69dc7e8abaab4be3 Mon Sep 17 00:00:00 2001 From: losar Date: Fri, 30 Nov 2012 11:23:35 +0100 Subject: [PATCH 0261/2844] Fix high latency of multipart requests Multipart requests have high latency if socket send buffer fills up due to slow consumer. Producer should perform socket readiness check to detect that situation instead of using a fixed wait time. --- .../ning/http/multipart/MultipartBody.java | 61 +++++++++++++------ 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/api/src/main/java/com/ning/http/multipart/MultipartBody.java b/api/src/main/java/com/ning/http/multipart/MultipartBody.java index 88ee5da2ea..2757e768f4 100644 --- a/api/src/main/java/com/ning/http/multipart/MultipartBody.java +++ b/api/src/main/java/com/ning/http/multipart/MultipartBody.java @@ -25,10 +25,10 @@ import java.io.InputStream; import java.io.RandomAccessFile; import java.nio.ByteBuffer; -import java.nio.channels.FileChannel; -import java.nio.channels.WritableByteChannel; +import java.nio.channels.*; import java.util.ArrayList; import java.util.List; +import java.util.Set; public class MultipartBody implements RandomAccessBody { @@ -569,22 +569,47 @@ private long writeToTarget(WritableByteChannel target, ByteArrayOutputStream byt int maxSpin = 0; synchronized (byteWriter) { ByteBuffer message = ByteBuffer.wrap(byteWriter.toByteArray()); - while ((target.isOpen()) && (written < byteWriter.size())) { - long nWrite = target.write(message); - written += nWrite; - if (nWrite == 0 && maxSpin++ < 10) { - logger.info("Waiting for writing..."); - try { - byteWriter.wait(1000); - } catch (InterruptedException e) { - logger.trace(e.getMessage(), e); - } - } else { - if (maxSpin >= 10) { - throw new IOException("Unable to write on channel " + target); - } - maxSpin = 0; - } + + if (target instanceof SocketChannel) { + final Selector selector = Selector.open(); + try { + final SocketChannel channel = (SocketChannel) target; + channel.register(selector, SelectionKey.OP_WRITE); + + while(written < byteWriter.size() && selector.select() != 0) { + final Set selectedKeys = selector.selectedKeys(); + + for (SelectionKey key : selectedKeys) { + if (key.isWritable()) { + written += target.write(message); + } + } + } + + if (written < byteWriter.size()) { + throw new IOException("Unable to write on channel " + target); + } + } finally { + selector.close(); + } + } else { + while ((target.isOpen()) && (written < byteWriter.size())) { + long nWrite = target.write(message); + written += nWrite; + if (nWrite == 0 && maxSpin++ < 10) { + logger.info("Waiting for writing..."); + try { + byteWriter.wait(1000); + } catch (InterruptedException e) { + logger.trace(e.getMessage(), e); + } + } else { + if (maxSpin >= 10) { + throw new IOException("Unable to write on channel " + target); + } + maxSpin = 0; + } + } } } return written; From a68e9a09081fb3a4418cf82792e6e6fef889ed57 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 30 Nov 2012 08:52:33 -0500 Subject: [PATCH 0262/2844] Fix indentation --- .../ning/http/multipart/MultipartBody.java | 103 +++++++++--------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/api/src/main/java/com/ning/http/multipart/MultipartBody.java b/api/src/main/java/com/ning/http/multipart/MultipartBody.java index 2757e768f4..fe97ed8c19 100644 --- a/api/src/main/java/com/ning/http/multipart/MultipartBody.java +++ b/api/src/main/java/com/ning/http/multipart/MultipartBody.java @@ -435,11 +435,11 @@ private ByteArrayOutputStream generateFileStart(FilePart filePart) } private long handleFilePart(WritableByteChannel target, FilePart filePart) throws IOException { - FilePartStallHandler handler = new FilePartStallHandler( - filePart.getStalledTime(), filePart); - - handler.start(); - + FilePartStallHandler handler = new FilePartStallHandler( + filePart.getStalledTime(), filePart); + + handler.start(); + if (FilePartSource.class.isAssignableFrom(filePart.getSource().getClass())) { int length = 0; @@ -458,13 +458,13 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw long nWrite = 0; synchronized (fc) { while (fileLength != l) { - if(handler.isFailed()) { - logger.debug("Stalled error"); + if (handler.isFailed()) { + logger.debug("Stalled error"); throw new FileUploadStalledException(); - } + } try { nWrite = fc.transferTo(fileLength, l, target); - + if (nWrite == 0) { logger.info("Waiting for writing..."); try { @@ -472,9 +472,8 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw } catch (InterruptedException e) { logger.trace(e.getMessage(), e); } - } - else { - handler.writeHappened(); + } else { + handler.writeHappened(); } } catch (IOException ex) { String message = ex.getMessage(); @@ -496,7 +495,7 @@ private long handleFilePart(WritableByteChannel target, FilePart filePart) throw } } handler.completed(); - + fc.close(); length += handleFileEnd(target, filePart); @@ -556,7 +555,7 @@ private long handleMultiPart(WritableByteChannel target, Part currentPart) throw return handleStringPart(target, (StringPart) currentPart); } else if (currentPart.getClass().equals(FilePart.class)) { FilePart filePart = (FilePart) currentPart; - + return handleFilePart(target, filePart); } return 0; @@ -571,45 +570,45 @@ private long writeToTarget(WritableByteChannel target, ByteArrayOutputStream byt ByteBuffer message = ByteBuffer.wrap(byteWriter.toByteArray()); if (target instanceof SocketChannel) { - final Selector selector = Selector.open(); - try { - final SocketChannel channel = (SocketChannel) target; - channel.register(selector, SelectionKey.OP_WRITE); - - while(written < byteWriter.size() && selector.select() != 0) { - final Set selectedKeys = selector.selectedKeys(); - - for (SelectionKey key : selectedKeys) { - if (key.isWritable()) { - written += target.write(message); - } - } - } - - if (written < byteWriter.size()) { - throw new IOException("Unable to write on channel " + target); - } - } finally { - selector.close(); - } + final Selector selector = Selector.open(); + try { + final SocketChannel channel = (SocketChannel) target; + channel.register(selector, SelectionKey.OP_WRITE); + + while (written < byteWriter.size() && selector.select() != 0) { + final Set selectedKeys = selector.selectedKeys(); + + for (SelectionKey key : selectedKeys) { + if (key.isWritable()) { + written += target.write(message); + } + } + } + + if (written < byteWriter.size()) { + throw new IOException("Unable to write on channel " + target); + } + } finally { + selector.close(); + } } else { - while ((target.isOpen()) && (written < byteWriter.size())) { - long nWrite = target.write(message); - written += nWrite; - if (nWrite == 0 && maxSpin++ < 10) { - logger.info("Waiting for writing..."); - try { - byteWriter.wait(1000); - } catch (InterruptedException e) { - logger.trace(e.getMessage(), e); - } - } else { - if (maxSpin >= 10) { - throw new IOException("Unable to write on channel " + target); - } - maxSpin = 0; - } - } + while ((target.isOpen()) && (written < byteWriter.size())) { + long nWrite = target.write(message); + written += nWrite; + if (nWrite == 0 && maxSpin++ < 10) { + logger.info("Waiting for writing..."); + try { + byteWriter.wait(1000); + } catch (InterruptedException e) { + logger.trace(e.getMessage(), e); + } + } else { + if (maxSpin >= 10) { + throw new IOException("Unable to write on channel " + target); + } + maxSpin = 0; + } + } } } return written; From d3d5f54ecf3a98e00f0250d92ac9f159e8cc274e Mon Sep 17 00:00:00 2001 From: Dominic Tootell Date: Fri, 30 Nov 2012 14:49:00 +0000 Subject: [PATCH 0263/2844] test for simulating the "too many connections" exception --- .../NettyRequestThrottleTimeoutTest.java | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java new file mode 100644 index 0000000000..066990482d --- /dev/null +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.*; +import com.ning.http.client.async.AbstractBasicTest; +import com.ning.http.client.async.ProviderUtil; +import org.eclipse.jetty.continuation.Continuation; +import org.eclipse.jetty.continuation.ContinuationSupport; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.*; + +import static org.testng.Assert.*; +import static org.testng.Assert.fail; + +public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { + private static final String MSG = "Enough is enough."; + private static final int SLEEPTIME_MS = 1000; + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } + + @Override + public AbstractHandler configureHandler() throws Exception { + return new SlowHandler(); + } + + private class SlowHandler extends AbstractHandler { + public void handle(String target, Request baseRequest, HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { + response.setStatus(HttpServletResponse.SC_OK); + final Continuation continuation = ContinuationSupport.getContinuation(request); + continuation.suspend(); + new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(SLEEPTIME_MS); + response.getOutputStream().print(MSG); + response.getOutputStream().flush(); + continuation.complete(); + } catch (InterruptedException e) { + log.error(e.getMessage(), e); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + }).start(); + baseRequest.setHandled(true); + } + } + + @Test(groups = {"standalone", "netty_provider"}) + public void testRequestTimeout() throws IOException { + final Semaphore requestThrottle = new Semaphore(1); + + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder() + .setCompressionEnabled(true) + .setAllowPoolingConnection(true) + .setMaximumConnectionsTotal(1).build()); + + final CountDownLatch latch = new CountDownLatch(2); + + final List tooManyConnections = new ArrayList(2); + for(int i=0;i<2;i++) { + final int threadNumber = i; + new Thread(new Runnable() { + + public void run() { + try { + requestThrottle.acquire(); + PerRequestConfig requestConfig = new PerRequestConfig(); + requestConfig.setRequestTimeoutInMs(SLEEPTIME_MS/2); + Future responseFuture = null; + try { + responseFuture = + client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(new AsyncCompletionHandler() { + + @Override + public Response onCompleted(Response response) throws Exception { + requestThrottle.release(); + return response; + } + + @Override + public void onThrowable(Throwable t) { + requestThrottle.release(); + } + }); + } catch(Exception e) { + tooManyConnections.add(e); + } + + if(responseFuture!=null) + responseFuture.get(); + } catch (Exception e) { + } finally { + latch.countDown(); + } + + } + }).start(); + + + } + + try { + latch.await(30,TimeUnit.SECONDS); + } catch (Exception e) { + fail("failed to wait for requests to complete"); + } + + assertTrue(tooManyConnections.size()==0,"Should not have any connection errors where too many connections have been attempted"); + + client.close(); + } +} From 6eccf6ab4732adc5cb2b8eed01f82747730b73d6 Mon Sep 17 00:00:00 2001 From: Miro Bezjak Date: Tue, 4 Dec 2012 18:22:15 +0100 Subject: [PATCH 0264/2844] Authentication header includes `NTLM' auth-scheme. Example HTTP header: Authentication: NTLM ntlm-stuff-here\r\n This is the way Firefox and Chromium work. --- .../client/providers/netty/NettyAsyncHttpProvider.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 0e5cdfa04d..213c7d2b70 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -146,7 +146,7 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); private final static Charset UTF8 = Charset.forName("UTF-8"); - + private final ClientBootstrap plainBootstrap; private final ClientBootstrap secureBootstrap; private final ClientBootstrap webSocketBootstrap; @@ -654,8 +654,8 @@ private static HttpRequest construct(AsyncHttpClientConfig config, break; case NTLM: try { - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, - ntlmEngine.generateType1Msg("NTLM " + domain, authHost)); + String msg = ntlmEngine.generateType1Msg("NTLM " + domain, authHost); + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); } catch (NTLMEngineException e) { IOException ie = new IOException(); ie.initCause(e); @@ -2472,4 +2472,3 @@ private static boolean isSecure(URI uri) { return isSecure(uri.getScheme()); } } - From d8254d3ab7d1bf07847c061155767cebc46c7c39 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 13 Dec 2012 09:54:42 -0800 Subject: [PATCH 0265/2844] Integrate Grizzly 2.3-beta8. --- providers/grizzly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index be26bb69f9..b469437233 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -20,7 +20,7 @@ org.glassfish.grizzly grizzly-websockets - 2.2.16 + 2.3-beta8 com.ning From cdb9c5ae2a1275aff616834368a08fc509ca3658 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 17 Dec 2012 23:54:17 +0100 Subject: [PATCH 0266/2844] Fix proposal for #182 against master --- .../com/ning/http/client/providers/ResponseBase.java | 12 ++++-------- .../ning/http/client/providers/jdk/JDKResponse.java | 3 +-- .../http/client/providers/apache/ApacheResponse.java | 3 +-- .../http/client/providers/netty/NettyResponse.java | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java index 713c6a0a6a..6ddb6763f8 100644 --- a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -15,7 +15,6 @@ public abstract class ResponseBase implements Response { protected final static String DEFAULT_CHARSET = "ISO-8859-1"; - protected final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; protected final List bodyParts; protected final HttpResponseHeaders headers; @@ -48,25 +47,22 @@ public final URI getUri() /*throws MalformedURLException*/ { /* @Override */ public final String getContentType() { - return getHeader("Content-Type"); + return headers != null? getHeader("Content-Type"): null; } /* @Override */ public final String getHeader(String name) { - return getHeaders().getFirstValue(name); + return headers != null? getHeaders().getFirstValue(name): null; } /* @Override */ public final List getHeaders(String name) { - return getHeaders().get(name); + return headers != null? getHeaders().get(name): null; } /* @Override */ public final FluentCaseInsensitiveStringsMap getHeaders() { - if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); - } - return headers.getHeaders(); + return headers != null? headers.getHeaders(): new FluentCaseInsensitiveStringsMap(); } /* @Override */ diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index 3475b6184f..9971ec733b 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -13,7 +13,6 @@ package com.ning.http.client.providers.jdk; import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; import com.ning.http.client.HttpResponseStatus; @@ -50,7 +49,7 @@ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOExc /* @Override */ public List getCookies() { if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); + return Collections.emptyList(); } if (cookies.isEmpty()) { for (Map.Entry> header : headers.getHeaders().entrySet()) { diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index 2589cbfff2..000aab2f91 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -26,7 +26,6 @@ import java.util.Map; public class ApacheResponse extends ResponseBase { - private final static String HEADERS_NOT_COMPUTED = "Response's headers hasn't been computed by your AsyncHandler."; private final List cookies = new ArrayList(); @@ -61,7 +60,7 @@ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOExc /* @Override */ public List getCookies() { if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); + return Collections.emptyList(); } if (cookies.isEmpty()) { for (Map.Entry> header : headers.getHeaders().entrySet()) { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index 78528280c8..c0b87596f7 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -58,7 +58,7 @@ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOExc public List getCookies() { if (headers == null) { - throw new IllegalStateException(HEADERS_NOT_COMPUTED); + return Collections.emptyList(); } if (cookies.isEmpty()) { for (Map.Entry> header : headers.getHeaders().entrySet()) { From b5145426947331130fccfe03c5bf102f823e0c63 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 18 Dec 2012 00:49:57 +0100 Subject: [PATCH 0267/2844] Minor clean up --- .gitignore | 2 +- .../http/client/providers/ResponseBase.java | 55 +++++++++++------ .../client/providers/jdk/JDKResponse.java | 47 +++----------- .../providers/apache/ApacheResponse.java | 60 ++++-------------- .../providers/grizzly/GrizzlyResponse.java | 61 ++++--------------- .../client/providers/netty/NettyResponse.java | 56 ++++------------- 6 files changed, 81 insertions(+), 200 deletions(-) diff --git a/.gitignore b/.gitignore index 6f4c9fc7f7..b023787595 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,6 @@ nbproject .DS_Store target test-output -/META-INF/MANIFEST.MF +MANIFEST.MF work atlassian-ide-plugin.xml diff --git a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java index 6ddb6763f8..72b2b5cbc7 100644 --- a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -3,8 +3,10 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.Collections; import java.util.List; +import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; @@ -19,6 +21,7 @@ public abstract class ResponseBase implements Response protected final List bodyParts; protected final HttpResponseHeaders headers; protected final HttpResponseStatus status; + private List cookies; protected ResponseBase(HttpResponseStatus status, HttpResponseHeaders headers, @@ -81,34 +84,52 @@ public String getResponseBody() throws IOException { } public String getResponseBody(String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - - return AsyncHttpProviderUtils.contentToString(bodyParts, charset); + return AsyncHttpProviderUtils.contentToString(bodyParts, calculateCharset(charset)); } /* @Override */ public InputStream getResponseBodyAsStream() throws IOException { return AsyncHttpProviderUtils.contentAsStream(bodyParts); } + + protected abstract List buildCookies(); + + public List getCookies() { - protected String calculateCharset() { - String charset = null; - String contentType = getContentType(); - if (contentType != null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); + if (headers == null) { + return Collections.emptyList(); } - if (charset == null) { - charset = DEFAULT_CHARSET; + if (cookies == null) { + cookies = buildCookies(); } + return cookies; + + } + + protected String calculateCharset(String charset) { + + if (charset == null) { + String contentType = getContentType(); + if (contentType != null) { + charset = AsyncHttpProviderUtils.parseCharset(contentType); + } else { + charset = DEFAULT_CHARSET; + } + } + return charset; } + public boolean hasResponseStatus() { + return status != null; + } + + public boolean hasResponseHeaders() { + return headers != null && !headers.getHeaders().isEmpty(); + } + + public boolean hasResponseBody() { + return bodyParts != null && !bodyParts.isEmpty(); + } } diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index 9971ec733b..56bc330e59 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -26,7 +26,6 @@ import java.util.Map; public class JDKResponse extends ResponseBase { - private final List cookies = new ArrayList(); public JDKResponse(HttpResponseStatus status, HttpResponseHeaders headers, @@ -47,46 +46,18 @@ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOExc } /* @Override */ - public List getCookies() { - if (headers == null) { - return Collections.emptyList(); - } - if (cookies.isEmpty()) { - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - cookies.add(cookie); - } + public List buildCookies() { + List cookies = new ArrayList(); + for (Map.Entry> header : headers.getHeaders().entrySet()) { + if (header.getKey().equalsIgnoreCase("Set-Cookie")) { + // TODO: ask for parsed header + List v = header.getValue(); + for (String value : v) { + Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); + cookies.add(cookie); } } } return Collections.unmodifiableList(cookies); } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseStatus() { - return (bodyParts != null ? true : false); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseHeaders() { - return (headers != null ? true : false); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseBody() { - return (bodyParts != null && bodyParts.size() > 0 ? true : false); - } } diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index 000aab2f91..43059dee7d 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -27,9 +27,7 @@ public class ApacheResponse extends ResponseBase { - private final List cookies = new ArrayList(); - - public ApacheResponse(HttpResponseStatus status, + public ApacheResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { super(status, headers, bodyParts); @@ -44,60 +42,24 @@ public String getResponseBodyExcerpt(int maxLength) throws IOException { /* @Override */ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - String contentType = getContentType(); - if (contentType != null && charset == null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } - - if (charset == null) { - charset = DEFAULT_CHARSET; - } - + charset = calculateCharset(charset); String response = AsyncHttpProviderUtils.contentToString(bodyParts, charset); return response.length() <= maxLength ? response : response.substring(0, maxLength); } /* @Override */ - public List getCookies() { - if (headers == null) { - return Collections.emptyList(); - } - if (cookies.isEmpty()) { - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - cookies.add(cookie); - } + public List buildCookies() { + List cookies = new ArrayList(); + for (Map.Entry> header : headers.getHeaders().entrySet()) { + if (header.getKey().equalsIgnoreCase("Set-Cookie")) { + // TODO: ask for parsed header + List v = header.getValue(); + for (String value : v) { + Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); + cookies.add(cookie); } } } return Collections.unmodifiableList(cookies); } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseStatus() { - return (bodyParts != null ? true : false); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseHeaders() { - return (headers != null ? true : false); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseBody() { - return (bodyParts != null && bodyParts.size() > 0 ? true : false); - } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index a5cedaa243..6bf78717d4 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -45,9 +45,6 @@ public class GrizzlyResponse extends ResponseBase { private final Buffer responseBody; - private List cookies; - - // ------------------------------------------------------------ Constructors @@ -93,9 +90,7 @@ public InputStream getResponseBodyAsStream() throws IOException { * {@inheritDoc} */ public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - if (charset == null) { - charset = calculateCharset(); - } + charset = calculateCharset(charset); final int len = Math.min(responseBody.remaining(), maxLength); final int pos = responseBody.position(); return responseBody.toStringContent(getCharset(charset), pos, len + pos); @@ -148,55 +143,21 @@ public String getResponseBody() throws IOException { /** * {@inheritDoc} */ - public List getCookies() { - - if (headers == null) { - return Collections.emptyList(); - } - - if (cookies == null) { - List values = headers.getHeaders().get("set-cookie"); - if (values != null && !values.isEmpty()) { - CookiesBuilder.ServerCookiesBuilder builder = - new CookiesBuilder.ServerCookiesBuilder(false); - for (String header : values) { - builder.parse(header); - } - cookies = convertCookies(builder.build()); + public List buildCookies() { - } else { - cookies = Collections.unmodifiableList(Collections.emptyList()); + List values = headers.getHeaders().get("set-cookie"); + if (values != null && !values.isEmpty()) { + CookiesBuilder.ServerCookiesBuilder builder = new CookiesBuilder.ServerCookiesBuilder(false); + for (String header : values) { + builder.parse(header); } - } - return cookies; - - } - - - /** - * {@inheritDoc} - */ - public boolean hasResponseStatus() { - return (status != null); - } - - - /** - * {@inheritDoc} - */ - public boolean hasResponseHeaders() { - return (headers != null && !headers.getHeaders().isEmpty()); - } + return convertCookies(builder.build()); - - /** - * {@inheritDoc} - */ - public boolean hasResponseBody() { - return (bodyParts != null && !bodyParts.isEmpty()); + } else { + return Collections.unmodifiableList(Collections.emptyList()); + } } - // --------------------------------------------------------- Private Methods diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index c0b87596f7..dd2b2a0de7 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -32,7 +32,6 @@ * Wrapper around the {@link com.ning.http.client.Response} API. */ public class NettyResponse extends ResponseBase { - private final List cookies = new ArrayList(); public NettyResponse(HttpResponseStatus status, HttpResponseHeaders headers, @@ -47,56 +46,23 @@ public String getResponseBodyExcerpt(int maxLength) throws IOException { public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { // should be fine; except that it may split multi-byte chars (last char may become '?') - if (charset == null) { - charset = calculateCharset(); - } + charset = calculateCharset(charset); byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); return new String(b, charset); } - - /* @Override */ - - public List getCookies() { - if (headers == null) { - return Collections.emptyList(); - } - if (cookies.isEmpty()) { - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - cookies.add(cookie); - } + + protected List buildCookies() { + List cookies = new ArrayList(); + for (Map.Entry> header : headers.getHeaders().entrySet()) { + if (header.getKey().equalsIgnoreCase("Set-Cookie")) { + // TODO: ask for parsed header + List v = header.getValue(); + for (String value : v) { + Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); + cookies.add(cookie); } } } return Collections.unmodifiableList(cookies); } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseStatus() { - return (status != null ? true : false); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseHeaders() { - return (headers != null ? true : false); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseBody() { - return (bodyParts != null && bodyParts.size() > 0 ? true : false); - } - } From 6c556c8ff619c1dcdbca5953ac56910ccb86f142 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 18 Dec 2012 11:40:59 +0100 Subject: [PATCH 0268/2844] Fix charset computation when it's not specified in contentType --- .../ning/http/client/providers/ResponseBase.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java index 72b2b5cbc7..1f98acf535 100644 --- a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -109,16 +109,12 @@ public List getCookies() { protected String calculateCharset(String charset) { - if (charset == null) { - String contentType = getContentType(); - if (contentType != null) { - charset = AsyncHttpProviderUtils.parseCharset(contentType); - } else { - charset = DEFAULT_CHARSET; - } - } - - return charset; + if (charset == null) { + String contentType = getContentType(); + if (contentType != null) + charset = AsyncHttpProviderUtils.parseCharset(contentType); // parseCharset can return null + } + return charset != null? charset: DEFAULT_CHARSET; } public boolean hasResponseStatus() { From dc124b382d09f23b83a019e636e65a76c461932a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 17 Dec 2012 10:20:32 -0800 Subject: [PATCH 0269/2844] Handle timeouts 10ms or less better. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 569bfae703..017950557a 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -320,6 +320,9 @@ protected void initializeTransport(final AsyncHttpClientConfig clientConfig) { int delay = 500; if (timeout < delay) { delay = timeout - 10; + if (delay <= 0) { + delay = timeout; + } } timeoutExecutor = IdleTimeoutFilter.createDefaultIdleDelayedExecutor(delay, TimeUnit.MILLISECONDS); timeoutExecutor.start(); From d3aebfc9194bfd3133c43683feb0b4484a2f1f4c Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 27 Dec 2012 13:46:56 -0800 Subject: [PATCH 0270/2844] Fix for #190. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 017950557a..caa6629bcb 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -844,7 +844,8 @@ private boolean sendAsGrizzlyRequest(final Request request, } final URI uri = AsyncHttpProviderUtils.createUri(httpCtx.requestUrl); final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); - boolean secure = "https".equals(uri.getScheme()); + final String scheme = uri.getScheme(); + boolean secure = "https".equals(scheme) || "wss".equals(scheme); builder.method(request.getMethod()); builder.protocol(Protocol.HTTP_1_1); String host = request.getVirtualHost(); @@ -861,6 +862,7 @@ private boolean sendAsGrizzlyRequest(final Request request, final boolean useProxy = (proxy != null); if (useProxy) { if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) { + ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(false, ctx.getConnection())); secure = false; httpCtx.establishingTunnel = true; builder.method(Method.CONNECT); From 9087e43e93e33e54c57536d430b8f7a016325da3 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Mon, 31 Dec 2012 00:17:12 +0100 Subject: [PATCH 0271/2844] Following RFC Spec, GET can contain a BODY --- .../main/java/com/ning/http/client/RequestBuilderBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 949e76abfc..85b88e538c 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -459,8 +459,8 @@ private void resetMultipartData() { } private void checkIfBodyAllowed() { - if ("GET".equals(request.method) || "HEAD".equals(request.method)) { - throw new IllegalArgumentException("Can NOT set Body on HTTP Request Method GET nor HEAD."); + if ("HEAD".equals(request.method)) { + throw new IllegalArgumentException("Can NOT set Body on HTTP Request Method HEAD."); } } From 5b8a7fac93b7fac5f007d8578c09c790b8a11296 Mon Sep 17 00:00:00 2001 From: Nicolas Deverge Date: Wed, 2 Jan 2013 10:39:46 +0100 Subject: [PATCH 0272/2844] Update the source repository. The github repository seems to have been changed. I updated the pom.xml accordingly in order that the project report of the maven site should be ok. --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 72b9927ae2..c475b6ec26 100644 --- a/pom.xml +++ b/pom.xml @@ -18,13 +18,13 @@ applications to easily execute HTTP requests and asynchronously process the response. - http://github.com/sonatype/async-http-client + http://github.com/AsyncHttpClient/async-http-client - scm:git:git@github.com:sonatype/async-http-client.git + scm:git:git@github.com:AsyncHttpClient/async-http-client.git - https://github.com/sonatype/async-http-client + https://github.com/AsyncHttpClient/async-http-client - scm:git:git@github.com:sonatype/async-http-client.git + scm:git:git@github.com:AsyncHttpClient/async-http-client.git From b6433d221db6396573a4d73c366006190537444a Mon Sep 17 00:00:00 2001 From: "vedick@gmail.com" Date: Thu, 10 Jan 2013 19:16:55 +0530 Subject: [PATCH 0273/2844] made the digest with proxy work --- .../com/ning/http/client/ProxyServer.java | 12 +- .../main/java/com/ning/http/client/Realm.java | 13 +++ .../ning/http/util/AuthenticatorUtils.java | 12 ++ .../grizzly/GrizzlyAsyncHttpProvider.java | 104 +++++++++++++++++- 4 files changed, 135 insertions(+), 6 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/ProxyServer.java b/api/src/main/java/com/ning/http/client/ProxyServer.java index 79cc5e1eee..f0551329a5 100644 --- a/api/src/main/java/com/ning/http/client/ProxyServer.java +++ b/api/src/main/java/com/ning/http/client/ProxyServer.java @@ -53,7 +53,17 @@ public String toString() { private int port; private String ntlmDomain = System.getProperty("http.auth.ntlm.domain", ""); - public ProxyServer(final Protocol protocol, final String host, final int port, String principal, String password) { + private boolean isBasic = true; + + public boolean isBasic() { + return isBasic; + } + + public void setBasic(boolean isBasic) { + this.isBasic = isBasic; + } + + public ProxyServer(final Protocol protocol, final String host, final int port, String principal, String password) { this.protocol = protocol; this.host = host; this.port = port; diff --git a/api/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/com/ning/http/client/Realm.java index 2074fab4ed..10da77fa03 100644 --- a/api/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/com/ning/http/client/Realm.java @@ -439,6 +439,19 @@ public RealmBuilder parseWWWAuthenticateHeader(String headerLine) { return this; } + public RealmBuilder parseProxyAuthenticateHeader(String headerLine) { + setRealmName(match(headerLine, "realm")); + setNonce(match(headerLine, "nonce")); + setOpaque(match(headerLine, "opaque")); + setQop(match(headerLine, "qop")); + if (getNonce() != null && !getNonce().equalsIgnoreCase("")) { + setScheme(AuthScheme.DIGEST); + } else { + setScheme(AuthScheme.BASIC); + } + return this; + } + public RealmBuilder setNtlmMessageType2Received(boolean messageType2Received) { this.messageType2Received = messageType2Received; return this; diff --git a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java index c1220f256e..10a6bdb117 100644 --- a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java @@ -49,6 +49,18 @@ public static String computeDigestAuthentication(Realm realm) throws NoSuchAlgor return new String(builder.toString().getBytes("ISO_8859_1")); } + public static String computeDigestAuthentication(ProxyServer proxy) { + try{ + StringBuilder builder = new StringBuilder().append("Digest "); + construct(builder, "username", proxy.getPrincipal(),true); + return new String(builder.toString().getBytes("ISO_8859_1")); + } + catch (Exception e){ + e.printStackTrace(); + } + return null; + } + private static StringBuilder construct(StringBuilder builder, String name, String value) { return construct(builder, name, value, false); } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index caa6629bcb..dfcb1d2d4a 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -915,9 +915,9 @@ private boolean sendAsGrizzlyRequest(final Request request, } if (proxy.getPrincipal() != null) { - requestPacket.setHeader(Header.ProxyAuthorization, - AuthenticatorUtils.computeBasicAuthentication(proxy)); + requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); } + } } final AsyncHandler h = httpCtx.handler; @@ -1091,6 +1091,8 @@ private static final class AsyncHttpClientEventFilter extends HttpClientFilter { this.provider = provider; HANDLER_MAP.put(HttpStatus.UNAUTHORIZED_401.getStatusCode(), AuthorizationHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.getStatusCode(), + ProxyAuthorizationHandler.INSTANCE); HANDLER_MAP.put(HttpStatus.MOVED_PERMANENTLY_301.getStatusCode(), RedirectHandler.INSTANCE); HANDLER_MAP.put(HttpStatus.FOUND_302.getStatusCode(), @@ -1265,9 +1267,9 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, ConnectionManager.markConnectionAsDoNotCache(ctx.getConnection()); } } - final HttpTransactionContext context = - provider.getHttpTransactionContext(ctx.getConnection()); - if (httpHeader.isSkipRemainder() || context.establishingTunnel) { + final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); + + if (httpHeader.isSkipRemainder() || (context.establishingTunnel && context.statusHandler==null)) { return; } @@ -1327,6 +1329,14 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } if (context.isWSRequest) { try { + //in case of DIGEST auth protocol handler is null and just returning here is working + if(context.protocolHandler == null) + { + return; + //context.protocolHandler = Version.DRAFT17.createHandler(true); + //context.currentState = AsyncHandler.STATE.UPGRADE; + } + context.protocolHandler.setConnection(ctx.getConnection()); DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); context.webSocket = new GrizzlyWebSocketAdapter(ws); @@ -1569,6 +1579,90 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, } // END AuthorizationHandler + private static final class ProxyAuthorizationHandler implements StatusHandler { + + private static final ProxyAuthorizationHandler INSTANCE = + new ProxyAuthorizationHandler(); + + // -------------------------------------- Methods from StatusHandler + + + public boolean handlesStatus(int statusCode) { + return (HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.statusMatches(statusCode)); + } + + @SuppressWarnings({"unchecked"}) + public boolean handleStatus(final HttpResponsePacket responsePacket, + final HttpTransactionContext httpTransactionContext, + final FilterChainContext ctx) { + + final String proxy_auth = responsePacket.getHeader(Header.ProxyAuthenticate); + if (proxy_auth == null) { + throw new IllegalStateException("407 response received, but no Proxy Authenticate header was present"); + } + + final Request req = httpTransactionContext.request; + ProxyServer proxyServer = httpTransactionContext.provider.clientConfig.getProxyServer(); + String principal = proxyServer.getPrincipal(); + String password = proxyServer.getPassword(); + Realm realm = new Realm.RealmBuilder().setPrincipal(principal) + .setPassword(password) + .setUri("/") + .setMethodName("CONNECT") + .setUsePreemptiveAuth(true) + .parseProxyAuthenticateHeader(proxy_auth) + .build(); + if (proxy_auth.toLowerCase().startsWith("basic")) { + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + try { + req.getHeaders().add(Header.ProxyAuthorization.toString(), + AuthenticatorUtils.computeBasicAuthentication(realm)); + } catch (UnsupportedEncodingException ignored) { + } + } else if (proxy_auth.toLowerCase().startsWith("digest")) { + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + try { + req.getHeaders().add(Header.ProxyAuthorization.toString(), + AuthenticatorUtils.computeDigestAuthentication(realm)); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException("Digest authentication not supported", e); + } catch (UnsupportedEncodingException e) { + throw new IllegalStateException("Unsupported encoding.", e); + } + } else { + throw new IllegalStateException("Unsupported authorization method: " + proxy_auth); + } + + final ConnectionManager m = httpTransactionContext.provider.connectionManager; + try { + final Connection c = m.obtainConnection(req, + httpTransactionContext.future); + final HttpTransactionContext newContext = + httpTransactionContext.copy(); + httpTransactionContext.future = null; + httpTransactionContext.provider.setHttpTransactionContext(c, newContext); + newContext.invocationStatus = InvocationStatus.STOP; + try { + httpTransactionContext.provider.execute(c, + req, + httpTransactionContext.handler, + httpTransactionContext.future); + return false; + } catch (IOException ioe) { + newContext.abort(ioe); + return false; + } + } catch (Exception e) { + httpTransactionContext.abort(e); + } + httpTransactionContext.invocationStatus = InvocationStatus.STOP; + return false; + } + + } // END AuthorizationHandler + private static final class RedirectHandler implements StatusHandler { From d98106204e98d56fd796f96bd7c55a48c835c81a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 10 Jan 2013 11:06:25 -0800 Subject: [PATCH 0274/2844] Fix test failure - bodies are allowed for GET. --- .../com/ning/http/client/async/AsyncProvidersBasicTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index 2641dc2d17..7724e9c48c 100755 --- a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -1559,8 +1559,8 @@ public void onThrowable(Throwable t) { c.close(); } - @Test(groups = {"standalone", "default_provider"}, expectedExceptions = IllegalArgumentException.class) - public void getShouldNotAllowBody() throws IllegalArgumentException, IOException { + @Test(groups = {"standalone", "default_provider"}) + public void getShouldAllowBody() throws IllegalArgumentException, IOException { AsyncHttpClient c = getAsyncHttpClient(null); AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); builder.setBody("Boo!"); From 54f1ce807c830fc23ae4867a7e31828278b25483 Mon Sep 17 00:00:00 2001 From: "vedick@gmail.com" Date: Fri, 11 Jan 2013 12:00:03 +0530 Subject: [PATCH 0275/2844] sending basic only if proxy is of basic auth --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index dfcb1d2d4a..0ec44f4f30 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -914,7 +914,7 @@ private boolean sendAsGrizzlyRequest(final Request request, requestPacket.setHeader(Header.ProxyConnection, "keep-alive"); } - if (proxy.getPrincipal() != null) { + if (proxy.getPrincipal() != null && proxy.isBasic()) { requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); } From af7c197b718680f0a10517cec99208b0fb2e7148 Mon Sep 17 00:00:00 2001 From: Artur Dryomov Date: Sun, 13 Jan 2013 23:21:17 +0300 Subject: [PATCH 0276/2844] Fix code indentation in the readme file. --- README.md | 232 +++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 117 deletions(-) diff --git a/README.md b/README.md index 96d38b6bb1..640a41e10e 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ Getting started [HTML](http://sonatype.github.com/async-http-client/) [PDF](http Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. First, in order to add it to your Maven project, simply add this dependency: ```xml - - com.ning - async-http-client - 1.7.8 - + + com.ning + async-http-client + 1.7.8 + ``` You can also download the artifact @@ -21,12 +21,12 @@ You can also download the artifact Then in your code you can simply do ([Javadoc](http://sonatype.github.com/async-http-client/apidocs/index.html)) ```java - import com.ning.http.client.*; - import java.util.concurrent.Future; +import com.ning.http.client.*; +import java.util.concurrent.Future; - AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - Future f = asyncHttpClient.prepareGet("http://www.ning.com/").execute(); - Response r = f.get(); +AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); +Future f = asyncHttpClient.prepareGet("http://www.ning.com/").execute(); +Response r = f.get(); ``` Note that in this case all the content must be read fully in memory, even if you used `getResponseBodyAsStream()' method on returned `Response` object. @@ -34,24 +34,24 @@ Note that in this case all the content must be read fully in memory, even if you You can also accomplish asynchronous (non-blocking) operation without using a Future if you want to receive and process the response in your handler: ```java - import com.ning.http.client.*; - import java.util.concurrent.Future; - - AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - asyncHttpClient.prepareGet("http://www.ning.com/").execute(new AsyncCompletionHandler(){ - - @Override - public Response onCompleted(Response response) throws Exception{ - // Do something with the Response - // ... - return response; - } - - @Override - public void onThrowable(Throwable t){ - // Something wrong happened. - } - }); +import com.ning.http.client.*; +import java.util.concurrent.Future; + +AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); +asyncHttpClient.prepareGet("http://www.ning.com/").execute(new AsyncCompletionHandler(){ + + @Override + public Response onCompleted(Response response) throws Exception{ + // Do something with the Response + // ... + return response; + } + + @Override + public void onThrowable(Throwable t){ + // Something wrong happened. + } +}); ``` (this will also fully read `Response` in memory before calling `onCompleted`) @@ -59,26 +59,26 @@ You can also accomplish asynchronous (non-blocking) operation without using a Fu You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response ```java - import com.ning.http.client.*; - import java.util.concurrent.Future; - - AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - Future f = asyncHttpClient.prepareGet("http://www.ning.com/").execute( - new AsyncCompletionHandler(){ - - @Override - public Integer onCompleted(Response response) throws Exception{ - // Do something with the Response - return response.getStatusCode(); - } - - @Override - public void onThrowable(Throwable t){ - // Something wrong happened. - } - }); +import com.ning.http.client.*; +import java.util.concurrent.Future; + +AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); +Future f = asyncHttpClient.prepareGet("http://www.ning.com/").execute( + new AsyncCompletionHandler(){ + + @Override + public Integer onCompleted(Response response) throws Exception{ + // Do something with the Response + return response.getStatusCode(); + } - int statusCode = f.get(); + @Override + public void onThrowable(Throwable t){ + // Something wrong happened. + } +}); + +int statusCode = f.get(); ``` which is something you want to do for large responses: this way you can process content as soon as it becomes available, piece by piece, without having to buffer it all in memory. @@ -86,94 +86,93 @@ which is something you want to do for large responses: this way you can process You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back: ```java - import com.ning.http.client.*; - import java.util.concurrent.Future; +import com.ning.http.client.*; +import java.util.concurrent.Future; + +AsyncHttpClient c = new AsyncHttpClient(); +Future f = c.prepareGet("http://www.ning.com/").execute(new AsyncHandler() { + private ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + + @Override + public STATE onStatusReceived(HttpResponseStatus status) throws Exception { + int statusCode = status.getStatusCode(); + // The Status have been read + // If you don't want to read the headers,body or stop processing the response + if (statusCode >= 500) { + return STATE.ABORT; + } + } + + @Override + public STATE onHeadersReceived(HttpResponseHeaders h) throws Exception { + Headers headers = h.getHeaders(); + // The headers have been read + // If you don't want to read the body, or stop processing the response + return STATE.ABORT; + } + + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + bytes.write(bodyPart.getBodyPartBytes()); + return STATE.CONTINUE; + } + + @Override + public String onCompleted() throws Exception { + // Will be invoked once the response has been fully read or a ResponseComplete exception + // has been thrown. + // NOTE: should probably use Content-Encoding from headers + return bytes.toString("UTF-8"); + } + + @Override + public void onThrowable(Throwable t) { + } +}); + +String bodyResponse = f.get(); +``` - AsyncHttpClient c = new AsyncHttpClient(); - Future f = c.prepareGet("http://www.ning.com/").execute(new AsyncHandler() { - private ByteArrayOutputStream bytes = new ByteArrayOutputStream(); +Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: - @Override - public STATE onStatusReceived(HttpResponseStatus status) throws Exception { - int statusCode = status.getStatusCode(); - // The Status have been read - // If you don't want to read the headers,body or stop processing the response - if (statusCode >= 500) { - return STATE.ABORT; - } - } +```java +AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() + S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); +AsyncHttpClient c = new AsyncHttpClient(cf); +``` + +Async Http Client also support WebSocket by simply doing: + +```java +WebSocket websocket = c.prepareGet(getTargetUrl()) + .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener( + new WebSocketTextListener() { @Override - public STATE onHeadersReceived(HttpResponseHeaders h) throws Exception { - Headers headers = h.getHeaders(); - // The headers have been read - // If you don't want to read the body, or stop processing the response - return STATE.ABORT; + public void onMessage(String message) { } @Override - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - bytes.write(bodyPart.getBodyPartBytes()); - return STATE.CONTINUE; + public void onOpen(WebSocket websocket) { + websocket.sendTextMessage("...").sendBinaryMessage("..."); } @Override - public String onCompleted() throws Exception { - // Will be invoked once the response has been fully read or a ResponseComplete exception - // has been thrown. - // NOTE: should probably use Content-Encoding from headers - return bytes.toString("UTF-8"); + public void onClose(.WebSocket websocket) { + latch.countDown(); } @Override - public void onThrowable(Throwable t) { + public void onError(Throwable t) { } - }); - - String bodyResponse = f.get(); -``` - -Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: - -```java - - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() - S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); - AsyncHttpClient c = new AsyncHttpClient(cf); -``` - -Async Http Client also support WebSocket by simply doing: - -```java - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener( - new WebSocketTextListener() { - - @Override - public void onMessage(String message) { - } - - @Override - public void onOpen(WebSocket websocket) { - websocket.sendTextMessage("...").sendBinaryMessage("..."); - } - - @Override - public void onClose(.WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - } - }).build()).get(); + }).build()).get(); ``` The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of [Netty](http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like [Grizzly](http://grizzly.java.net) ```java - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); +AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); +AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); ``` Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group @@ -181,4 +180,3 @@ Keep up to date on the library development by joining the Asynchronous HTTP Clie [Google Group](http://groups.google.com/group/asynchttpclient) or follow us on [Twitter](http://twitter.com/jfarcand) - From ec14af826998c386badae72097d3a680799294e5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 19 Jan 2013 07:58:35 +0000 Subject: [PATCH 0277/2844] Allow Netty provider subclass to modify pipeline --- .../netty/NettyAsyncHttpProvider.java | 44 +++++---- .../netty/NettyAsyncProviderPipelineTest.java | 99 +++++++++++++++++++ 2 files changed, 123 insertions(+), 20 deletions(-) create mode 100644 providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 213c7d2b70..584be4b2ed 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -244,26 +244,7 @@ void configureNetty() { } } - plainBootstrap.setPipelineFactory(new ChannelPipelineFactory() { - - /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); - - pipeline.addLast(HTTP_HANDLER, new HttpClientCodec()); - - if (config.getRequestCompressionLevel() > 0) { - pipeline.addLast("deflater", new HttpContentCompressor(config.getRequestCompressionLevel())); - } - - if (config.isCompressionEnabled()) { - pipeline.addLast("inflater", new HttpContentDecompressor()); - } - pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); - pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; - } - }); + plainBootstrap.setPipelineFactory(createPlainPipelineFactory()); DefaultChannelFuture.setUseDeadLockChecker(false); if (asyncHttpProviderConfig != null) { @@ -288,6 +269,29 @@ public ChannelPipeline getPipeline() throws Exception { }); } + protected ChannelPipelineFactory createPlainPipelineFactory() { + return new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + + pipeline.addLast(HTTP_HANDLER, new HttpClientCodec()); + + if (config.getRequestCompressionLevel() > 0) { + pipeline.addLast("deflater", new HttpContentCompressor(config.getRequestCompressionLevel())); + } + + if (config.isCompressionEnabled()) { + pipeline.addLast("inflater", new HttpContentDecompressor()); + } + pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + return pipeline; + } + }; + } + void constructSSLPipeline(final NettyConnectListener cl) { secureBootstrap.setPipelineFactory(new ChannelPipelineFactory() { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java new file mode 100644 index 0000000000..7024c9c48c --- /dev/null +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.providers.netty; + +import static org.testng.Assert.assertEquals; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ChannelPipeline; +import org.jboss.netty.channel.ChannelPipelineFactory; +import org.jboss.netty.channel.MessageEvent; +import org.jboss.netty.channel.SimpleChannelHandler; +import org.jboss.netty.handler.codec.http.HttpMessage; +import org.testng.Assert; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.Request; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.async.AbstractBasicTest; + +public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return new AsyncHttpClient(new CopyEncodingNettyAsyncHttpProvider(config), config); + } + + @Test(groups = {"standalone", "netty_provider"}) + public void asyncPipelineTest() throws Throwable { + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder() + .setCompressionEnabled(true).build()); + + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); + p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-Original-Content-Encoding"), ""); + } finally { + l.countDown(); + } + return response; + } + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + p.close(); + } + + private static class CopyEncodingNettyAsyncHttpProvider extends NettyAsyncHttpProvider { + public CopyEncodingNettyAsyncHttpProvider(AsyncHttpClientConfig config) { + super(config); + } + protected ChannelPipelineFactory createPlainPipelineFactory() { + final ChannelPipelineFactory pipelineFactory = super.createPlainPipelineFactory(); + return new ChannelPipelineFactory() { + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipelineFactory.getPipeline(); + pipeline.addBefore("inflater", "copyEncodingHeader", new CopyEncodingHandler()); + return pipeline; + } + }; + } + } + + private static class CopyEncodingHandler extends SimpleChannelHandler { + @Override + public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { + Object msg = e.getMessage(); + if (msg instanceof HttpMessage) { + HttpMessage m = (HttpMessage) msg; + // for test there is no Content-Encoding header so just hard coding value + // for verification + m.setHeader("X-Original-Content-Encoding", ""); + } + ctx.sendUpstream(e); + } + } +} From a16dd921ee7b078cb2aab9662b4b57ab6ee1f067 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 28 Jan 2013 10:31:12 -0500 Subject: [PATCH 0278/2844] Proper fix for #193 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 584be4b2ed..1732e3f9be 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -751,7 +751,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } String reqType = request.getMethod(); - if (!"GET".equals(reqType) && !"HEAD".equals(reqType) && !"OPTION".equals(reqType) && !"TRACE".equals(reqType)) { + if (!"HEAD".equals(reqType) && !"OPTION".equals(reqType) && !"TRACE".equals(reqType)) { String bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : request.getBodyEncoding(); From 3c3695dc6577d600039a0ce85f9745eaed9749a9 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 28 Jan 2013 10:34:42 -0600 Subject: [PATCH 0279/2844] Lazily initialize SPNegoEngine, may help with use on Android where these classes aren't present. --- .../providers/netty/NettyAsyncHttpProvider.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 584be4b2ed..8451e5a087 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -175,7 +175,7 @@ public boolean remove(Object o) { private final boolean trackConnections; private final boolean useRawUrl; private final static NTLMEngine ntlmEngine = new NTLMEngine(); - private final static SpnegoEngine spnegoEngine = new SpnegoEngine(); + private static SpnegoEngine spnegoEngine = null; private final Protocol httpProtocol = new HttpProtocol(); private final Protocol webSocketProtocol = new WebSocketProtocol(); @@ -555,6 +555,12 @@ protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Re return construct(config, request, new HttpMethod(method), uri, buffer); } + private static SpnegoEngine getSpnegoEngine() { + if(spnegoEngine == null) + spnegoEngine = new SpnegoEngine(); + return spnegoEngine; + } + private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, @@ -671,7 +677,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, String challengeHeader = null; String server = proxyServer == null ? host : proxyServer.getHost(); try { - challengeHeader = spnegoEngine.generateToken(server); + challengeHeader = getSpnegoEngine().generateToken(server); } catch (Throwable e) { IOException ie = new IOException(); ie.initCause(e); @@ -1152,7 +1158,7 @@ private Realm kerberosChallenge(List proxyAuth, String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); String server = proxyServer == null ? host : proxyServer.getHost(); try { - String challengeHeader = spnegoEngine.generateToken(server); + String challengeHeader = getSpnegoEngine().generateToken(server); headers.remove(HttpHeaders.Names.AUTHORIZATION); headers.add(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); From 0bc1880f02dd543bb75b6aa16b4e89eef93caf35 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 7 Feb 2013 16:11:09 +0100 Subject: [PATCH 0280/2844] Introduce ConnectionPoolKeyStrategy Only works for NettyProvider --- .../client/ConnectionPoolKeyStrategy.java | 23 ++++++++++++++ .../client/DefaultConnectionPoolStrategy.java | 30 +++++++++++++++++++ .../java/com/ning/http/client/Request.java | 1 + .../ning/http/client/RequestBuilderBase.java | 11 +++++++ .../netty/NettyAsyncHttpProvider.java | 19 +++++++----- .../providers/netty/NettyResponseFuture.java | 12 ++++++-- 6 files changed, 87 insertions(+), 9 deletions(-) create mode 100644 api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java create mode 100644 api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java diff --git a/api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java b/api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java new file mode 100644 index 0000000000..3beb10d3ec --- /dev/null +++ b/api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java @@ -0,0 +1,23 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client; + +import java.net.URI; + +public interface ConnectionPoolKeyStrategy { + + String getKey(URI uri); +} diff --git a/api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java b/api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java new file mode 100644 index 0000000000..c56f656123 --- /dev/null +++ b/api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java @@ -0,0 +1,30 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client; + +import java.net.URI; + +import com.ning.http.util.AsyncHttpProviderUtils; + +public enum DefaultConnectionPoolStrategy implements ConnectionPoolKeyStrategy { + + INSTANCE; + + @Override + public String getKey(URI uri) { + return AsyncHttpProviderUtils.getBaseUrl(uri); + } +} diff --git a/api/src/main/java/com/ning/http/client/Request.java b/api/src/main/java/com/ning/http/client/Request.java index 10576405bb..eb31a23fba 100644 --- a/api/src/main/java/com/ning/http/client/Request.java +++ b/api/src/main/java/com/ning/http/client/Request.java @@ -232,4 +232,5 @@ public static interface EntityWriter { public boolean isUseRawUrl(); + ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy(); } diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 85b88e538c..367fc751db 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -67,6 +67,7 @@ private static final class RequestImpl implements Request { private long rangeOffset = 0; public String charset; private boolean useRawUrl = false; + private ConnectionPoolKeyStrategy connectionPoolKeyStrategy = DefaultConnectionPoolStrategy.INSTANCE; public RequestImpl(boolean useRawUrl) { this.useRawUrl = useRawUrl; @@ -100,6 +101,7 @@ public RequestImpl(Request prototype) { this.rangeOffset = prototype.getRangeOffset(); this.charset = prototype.getBodyEncoding(); this.useRawUrl = prototype.isUseRawUrl(); + this.connectionPoolKeyStrategy = prototype.getConnectionPoolKeyStrategy(); } } @@ -287,6 +289,10 @@ public String getBodyEncoding() { return charset; } + public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { + return connectionPoolKeyStrategy; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(url); @@ -603,6 +609,11 @@ public T setBodyEncoding(String charset) { return derived.cast(this); } + public T setConnectionPoolKeyStrategy(ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { + request.connectionPoolKeyStrategy = connectionPoolKeyStrategy; + return derived.cast(this); + } + public Request build() { if ((request.length < 0) && (request.streamData == null) && allowBody(request.getMethod())) { // can't concatenate content-length diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 815236ea09..f14d795b38 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -21,6 +21,7 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.Body; import com.ning.http.client.BodyGenerator; +import com.ning.http.client.ConnectionPoolKeyStrategy; import com.ning.http.client.ConnectionsPool; import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; @@ -345,8 +346,9 @@ public ChannelPipeline getPipeline() throws Exception { } } - private Channel lookupInCache(URI uri) { - final Channel channel = connectionsPool.poll(AsyncHttpProviderUtils.getBaseUrl(uri)); + private Channel lookupInCache(URI uri, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { + + final Channel channel = connectionsPool.poll(connectionPoolKeyStrategy.getKey(uri)); if (channel != null) { log.debug("Using cached Channel {}\n for uri {}\n", channel, uri); @@ -910,7 +912,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand if (f != null && f.reuseChannel() && f.channel() != null) { channel = f.channel(); } else { - channel = lookupInCache(uri); + channel = lookupInCache(uri, request.getConnectionPoolKeyStrategy()); } } @@ -1271,7 +1273,8 @@ private Realm ntlmProxyChallenge(List wwwAuth, private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future, final boolean keepAlive, final URI uri) { ctx.setAttachment(new AsyncCallable(future) { public Object call() throws Exception { - if (keepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(uri), ctx.getChannel())) { + // TODO POOL + if (keepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(uri), ctx.getChannel())) { return null; } @@ -1467,8 +1470,9 @@ private void finishUpdate(final NettyResponseFuture future, final ChannelHand if (lastValidChunk && future.getKeepAlive()) { drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); } else { + // TODO POOL if (future.getKeepAlive() && ctx.getChannel().isReadable() && - connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(future.getURI()), ctx.getChannel())) { + connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(future.getURI()), ctx.getChannel())) { markAsDone(future, ctx); return; } @@ -1666,7 +1670,7 @@ public static NettyResponseFuture newFuture(URI uri, NettyAsyncHttpProvider provider) { NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, - requestTimeout(config, request.getPerRequestConfig()), config.getIdleConnectionTimeoutInMs(), provider); + requestTimeout(config, request.getPerRequestConfig()), config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy()); if (request.getHeaders().getFirstValue("Expect") != null && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { @@ -2036,10 +2040,11 @@ private boolean redirect(Request request, nBuilder.addOrReplaceCookie(c); } + final String connectionPoolKey = future.getConnectionPoolKeyStrategy().getKey(initialConnectionUri); AsyncCallable ac = new AsyncCallable(future) { public Object call() throws Exception { if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && - connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(initialConnectionUri), ctx.getChannel())) { + connectionsPool.offer(connectionPoolKey, ctx.getChannel())) { return null; } finishChannel(ctx); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index 68dd5ed03b..f77c3b3354 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -16,6 +16,7 @@ package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHandler; +import com.ning.http.client.ConnectionPoolKeyStrategy; import com.ning.http.client.Request; import com.ning.http.client.listenable.AbstractListenableFuture; import org.jboss.netty.channel.Channel; @@ -85,14 +86,16 @@ enum STATE { private boolean writeBody; private final AtomicBoolean throwableCalled = new AtomicBoolean(false); private boolean allowConnect = false; - + private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; + public NettyResponseFuture(URI uri, Request request, AsyncHandler asyncHandler, HttpRequest nettyRequest, int responseTimeoutInMs, int idleConnectionTimeoutInMs, - NettyAsyncHttpProvider asyncHttpProvider) { + NettyAsyncHttpProvider asyncHttpProvider, + ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { this.asyncHandler = asyncHandler; this.responseTimeoutInMs = responseTimeoutInMs; @@ -101,6 +104,7 @@ public NettyResponseFuture(URI uri, this.nettyRequest = nettyRequest; this.uri = uri; this.asyncHttpProvider = asyncHttpProvider; + this.connectionPoolKeyStrategy = connectionPoolKeyStrategy; if (System.getProperty(MAX_RETRY) != null) { maxRetry = Integer.valueOf(System.getProperty(MAX_RETRY)); @@ -119,6 +123,10 @@ protected void setURI(URI uri) { this.uri = uri; } + public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { + return connectionPoolKeyStrategy; + } + /** * {@inheritDoc} */ From 1f4b5417c1f7f33c209ceec73b4a868557a9ecbc Mon Sep 17 00:00:00 2001 From: RickBullotta Date: Sat, 9 Feb 2013 10:16:47 -0500 Subject: [PATCH 0281/2844] Fix for netty websocket implementation Updated NettyAsyncHttpProvider and NettyWebSocket to properly handle web socket frames and callbacks --- .../netty/NettyAsyncHttpProvider.java | 28 +++++++- .../providers/netty/NettyWebSocket.java | 64 +++++++++++++++++-- 2 files changed, 85 insertions(+), 7 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 815236ea09..d8e30290d9 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -92,7 +92,9 @@ import org.jboss.netty.handler.codec.http.HttpResponse; import org.jboss.netty.handler.codec.http.HttpResponseDecoder; import org.jboss.netty.handler.codec.http.HttpVersion; +import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame; @@ -2308,7 +2310,15 @@ public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { } private final class WebSocketProtocol implements Protocol { - + private static final byte OPCODE_CONT = 0x0; + private static final byte OPCODE_TEXT = 0x1; + private static final byte OPCODE_BINARY = 0x2; + private static final byte OPCODE_UNKNOWN = -1; + + protected ChannelBuffer byteBuffer = null; + protected StringBuilder textBuffer = null; + protected byte pendingOpcode = OPCODE_UNKNOWN; + // @Override public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); @@ -2390,6 +2400,13 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { } else if (e.getMessage() instanceof WebSocketFrame) { final WebSocketFrame frame = (WebSocketFrame) e.getMessage(); + if(frame instanceof TextWebSocketFrame) { + pendingOpcode = OPCODE_TEXT; + } + else if(frame instanceof BinaryWebSocketFrame) { + pendingOpcode = OPCODE_BINARY; + } + HttpChunk webSocketChunk = new HttpChunk() { private ChannelBuffer content; @@ -2415,8 +2432,13 @@ public void setContent(ChannelBuffer content) { h.onBodyPartReceived(rp); NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - webSocket.onMessage(rp.getBodyPartBytes()); - webSocket.onTextMessage(frame.getBinaryData().toString(UTF8)); + + if(pendingOpcode == OPCODE_BINARY) { + webSocket.onBinaryFragment(rp.getBodyPartBytes(),frame.isFinalFragment()); + } + else { + webSocket.onTextFragment(frame.getBinaryData().toString(UTF8),frame.isFinalFragment()); + } if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { try { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 498e15ba12..3e0f7947e8 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -27,6 +27,8 @@ import java.util.concurrent.ConcurrentLinkedQueue; +import java.io.ByteArrayOutputStream; + import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; public class NettyWebSocket implements WebSocket { @@ -35,6 +37,10 @@ public class NettyWebSocket implements WebSocket { private final Channel channel; private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); + private StringBuilder textBuffer; + private ByteArrayOutputStream byteBuffer; + private int maxBufferSize = 128000000; + public NettyWebSocket(Channel channel) { this.channel = channel; } @@ -90,6 +96,17 @@ public WebSocket removeWebSocketListener(WebSocketListener l) { return this; } + public int getMaxBufferSize() { + return maxBufferSize; + } + + public void setMaxBufferSize(int bufferSize) { + maxBufferSize = bufferSize; + + if(maxBufferSize < 8192) + maxBufferSize = 8192; + } + // @Override public boolean isOpen() { return channel.isOpen(); @@ -102,11 +119,31 @@ public void close() { channel.close(); } - protected void onMessage(byte[] message) { + protected void onBinaryFragment(byte[] message, boolean last) { for (WebSocketListener l : listeners) { if (WebSocketByteListener.class.isAssignableFrom(l.getClass())) { try { - WebSocketByteListener.class.cast(l).onMessage(message); + WebSocketByteListener.class.cast(l).onFragment(message,last); + + if(byteBuffer == null) { + byteBuffer = new ByteArrayOutputStream(); + } + + byteBuffer.write(message); + + if(byteBuffer.size() > maxBufferSize) { + Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); + l.onError(e); + this.close(); + return; + } + + + if(last) { + WebSocketByteListener.class.cast(l).onMessage(byteBuffer.toByteArray()); + byteBuffer = null; + textBuffer = null; + } } catch (Exception ex) { l.onError(ex); } @@ -114,11 +151,30 @@ protected void onMessage(byte[] message) { } } - protected void onTextMessage(String message) { + protected void onTextFragment(String message, boolean last) { for (WebSocketListener l : listeners) { if (WebSocketTextListener.class.isAssignableFrom(l.getClass())) { try { - WebSocketTextListener.class.cast(l).onMessage(message); + WebSocketTextListener.class.cast(l).onFragment(message,last); + + if(textBuffer == null) { + textBuffer = new StringBuilder(); + } + + textBuffer.append(message); + + if(textBuffer.length() > maxBufferSize) { + Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); + l.onError(e); + this.close(); + return; + } + + if(last) { + WebSocketTextListener.class.cast(l).onMessage(textBuffer.toString()); + byteBuffer = null; + textBuffer = null; + } } catch (Exception ex) { l.onError(ex); } From 65d3abc5207a93e522ee60cbb11e074950c72871 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Feb 2013 11:14:11 +0100 Subject: [PATCH 0282/2844] Minor clean up after PR #214 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index f14d795b38..532bb64611 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -347,7 +347,6 @@ public ChannelPipeline getPipeline() throws Exception { } private Channel lookupInCache(URI uri, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { - final Channel channel = connectionsPool.poll(connectionPoolKeyStrategy.getKey(uri)); if (channel != null) { @@ -1273,7 +1272,6 @@ private Realm ntlmProxyChallenge(List wwwAuth, private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future, final boolean keepAlive, final URI uri) { ctx.setAttachment(new AsyncCallable(future) { public Object call() throws Exception { - // TODO POOL if (keepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(uri), ctx.getChannel())) { return null; } @@ -1470,7 +1468,6 @@ private void finishUpdate(final NettyResponseFuture future, final ChannelHand if (lastValidChunk && future.getKeepAlive()) { drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); } else { - // TODO POOL if (future.getKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(future.getURI()), ctx.getChannel())) { markAsDone(future, ctx); From c431fc14f9ec57c74a35e220ed29d7ee868e3b39 Mon Sep 17 00:00:00 2001 From: andekaputra Date: Sat, 16 Feb 2013 03:08:53 +0700 Subject: [PATCH 0283/2844] Allows to configure Netty NioClientSocketChannelFactory --- .../netty/NettyAsyncHttpProvider.java | 40 +++++++++++++------ .../netty/NettyAsyncHttpProviderConfig.java | 5 +++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index db77c80a58..5d7b016448 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -158,6 +158,7 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme private final AsyncHttpClientConfig config; private final AtomicBoolean isClose = new AtomicBoolean(false); private final ClientSocketChannelFactory socketChannelFactory; + private final boolean allowReleaseSocketChannelFactory; private final ChannelGroup openChannels = new CleanupChannelGroup("asyncHttpClient") { @@ -193,17 +194,28 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { if (asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.USE_BLOCKING_IO) != null) { socketChannelFactory = new OioClientSocketChannelFactory(config.executorService()); + this.allowReleaseSocketChannelFactory = true; } else { - ExecutorService e; - Object o = asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.BOSS_EXECUTOR_SERVICE); - if (o != null && ExecutorService.class.isAssignableFrom(o.getClass())) { - e = ExecutorService.class.cast(o); + // check if external NioClientSocketChannelFactory is defined + Object oo = asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.SOCKET_CHANNEL_FACTORY); + if (oo != null && NioClientSocketChannelFactory.class.isAssignableFrom(oo.getClass())) { + this.socketChannelFactory = NioClientSocketChannelFactory.class.cast(oo); + + // cannot allow releasing shared channel factory + this.allowReleaseSocketChannelFactory = false; } else { - e = Executors.newCachedThreadPool(); + ExecutorService e = null; + Object o = asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.BOSS_EXECUTOR_SERVICE); + if (o != null && ExecutorService.class.isAssignableFrom(o.getClass())) { + e = ExecutorService.class.cast(o); + } else { + e = Executors.newCachedThreadPool(); + } + int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); + log.debug("Number of application's worker threads is {}", numWorkers); + socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); + this.allowReleaseSocketChannelFactory = true; } - int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); - log.debug("Number of application's worker threads is {}", numWorkers); - socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); } plainBootstrap = new ClientBootstrap(socketChannelFactory); secureBootstrap = new ClientBootstrap(socketChannelFactory); @@ -860,11 +872,13 @@ public void close() { config.executorService().shutdown(); config.reaper().shutdown(); - socketChannelFactory.releaseExternalResources(); - plainBootstrap.releaseExternalResources(); - secureBootstrap.releaseExternalResources(); - webSocketBootstrap.releaseExternalResources(); - secureWebSocketBootstrap.releaseExternalResources(); + if (this.allowReleaseSocketChannelFactory) { + socketChannelFactory.releaseExternalResources(); + plainBootstrap.releaseExternalResources(); + secureBootstrap.releaseExternalResources(); + webSocketBootstrap.releaseExternalResources(); + secureWebSocketBootstrap.releaseExternalResources(); + } } catch (Throwable t) { log.warn("Unexpected error on close", t); } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java index 7c976149e6..7ecbb5e979 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java @@ -51,6 +51,11 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig Date: Tue, 19 Feb 2013 10:34:55 +0100 Subject: [PATCH 0284/2844] Make NettyConnectionsPool properly trace open channels, fix #222 --- .../client/providers/netty/NettyConnectionsPool.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index b09a224625..c53b086b41 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -129,9 +129,14 @@ public void run() { } } - if (log.isTraceEnabled()) + if (log.isTraceEnabled()) { + int openChannels = 0; + for (ConcurrentLinkedQueue hostChannels: connectionsPool.values()) { + openChannels += hostChannels.size(); + } log.trace(String.format("%d channel open, %d idle channels closed (times: 1st-loop=%d, 2nd-loop=%d).\n", - connectionsPool.size(), channelsInTimeout.size(), endConcurrentLoop - currentTime, System.currentTimeMillis() - endConcurrentLoop)); + openChannels, channelsInTimeout.size(), endConcurrentLoop - currentTime, System.currentTimeMillis() - endConcurrentLoop)); + } } catch (Throwable t) { log.error("uncaught exception!", t); } From 56815d54f1eb10b951134d9f2b8d07557df693f8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Feb 2013 14:31:58 -0800 Subject: [PATCH 0285/2844] Changes for #230. --- .../ning/http/client/consumers/AppendableBodyConsumer.java | 7 +++++-- .../com/ning/http/client/consumers/FileBodyConsumer.java | 6 ++++-- .../http/client/consumers/OutputStreamBodyConsumer.java | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java index bbd03d8871..62c946f41f 100644 --- a/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java +++ b/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -41,7 +41,10 @@ public AppendableBodyConsumer(Appendable appendable) { */ /* @Override */ public void consume(ByteBuffer byteBuffer) throws IOException { - appendable.append(new String(byteBuffer.array(), byteBuffer.arrayOffset(), byteBuffer.remaining(), encoding)); + appendable.append(new String(byteBuffer.array(), + byteBuffer.arrayOffset() + byteBuffer.position(), + byteBuffer.remaining(), + encoding)); } /** diff --git a/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java index ad8b7e288f..63f9eae4ad 100644 --- a/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java +++ b/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -35,7 +35,9 @@ public FileBodyConsumer(RandomAccessFile file) { /* @Override */ public void consume(ByteBuffer byteBuffer) throws IOException { // TODO: Channel.transferFrom may be a good idea to investigate. - file.write(byteBuffer.array()); + file.write(byteBuffer.array(), + byteBuffer.arrayOffset() + byteBuffer.position(), + byteBuffer.remaining()); } /** diff --git a/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java b/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java index 324fd08d31..09ed1cb282 100644 --- a/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java +++ b/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -34,7 +34,9 @@ public OutputStreamBodyConsumer(OutputStream outputStream) { */ /* @Override */ public void consume(ByteBuffer byteBuffer) throws IOException { - outputStream.write(byteBuffer.array(), byteBuffer.arrayOffset(), byteBuffer.remaining()); + outputStream.write(byteBuffer.array(), + byteBuffer.arrayOffset() + byteBuffer.position(), + byteBuffer.remaining()); } /** From 38070bdc4d6231ae260b5b3e3084a5c0e5bfd2b4 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Feb 2013 14:32:53 -0800 Subject: [PATCH 0286/2844] Grizzly changes for PR #214. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 0ec44f4f30..059410370f 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -18,6 +18,7 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.Body; import com.ning.http.client.BodyGenerator; +import com.ning.http.client.ConnectionPoolKeyStrategy; import com.ning.http.client.ConnectionsPool; import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; @@ -214,9 +215,7 @@ public void completed(final Connection c) { try { execute(c, request, handler, future); } catch (Exception e) { - if (e instanceof RuntimeException) { - failed(e); - } else if (e instanceof IOException) { + if (e instanceof RuntimeException || e instanceof IOException) { failed(e); } if (LOGGER.isWarnEnabled()) { @@ -1452,7 +1451,7 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx, if (!context.provider.connectionManager.canReturnConnection(c)) { context.abort(new IOException("Maximum pooled connections exceeded")); } else { - if (!context.provider.connectionManager.returnConnection(context.requestUrl, c)) { + if (!context.provider.connectionManager.returnConnection(context.request, c)) { ctx.getConnection().close(); } } @@ -2412,7 +2411,7 @@ void doAsyncTrackedConnection(final Request request, final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { final String url = request.getUrl(); - Connection c = pool.poll(AsyncHttpProviderUtils.getBaseUrl(url)); + Connection c = pool.poll(getPoolKey(request)); if (c == null) { if (!connectionMonitor.acquire()) { throw new IOException("Max connections exceeded"); @@ -2497,9 +2496,9 @@ private ProxyServer getProxyServer(Request request) { } - boolean returnConnection(final String url, final Connection c) { + boolean returnConnection(final Request request, final Connection c) { final boolean result = (DO_NOT_CACHE.get(c) == null - && pool.offer(AsyncHttpProviderUtils.getBaseUrl(url), c)); + && pool.offer(getPoolKey(request), c)); if (result) { if (provider.resolver != null) { provider.resolver.setTimeoutMillis(c, IdleTimeoutFilter.FOREVER); @@ -2560,6 +2559,11 @@ public void updated(Connection result) { }; } + private static String getPoolKey(final Request request) { + final ConnectionPoolKeyStrategy keyStrategy = request.getConnectionPoolKeyStrategy(); + return keyStrategy.getKey(AsyncHttpProviderUtils.createUri(AsyncHttpProviderUtils.getBaseUrl(request.getUrl()))); + } + // ------------------------------------------------------ Nested Classes private static class ConnectionMonitor implements Connection.CloseListener { From 2e0aa7e346e7af6085f8bcd1c4243c282e2f4b9a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Feb 2013 14:33:27 -0800 Subject: [PATCH 0287/2844] Tests disabled until #229 is resolved. --- .../grizzly/GrizzlyProxyTunnelingTest.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java index 2029b2b4c3..e2631e7e58 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -16,6 +16,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProxyTunnellingTest; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + public class GrizzlyProxyTunnelingTest extends ProxyTunnellingTest { @@ -27,4 +33,21 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); } + @Test(enabled=false) + @Override + public void testRequestProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { + super.testRequestProxy(); + } + + @Test(enabled=false) + @Override + public void testConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { + super.testConfigProxy(); + } + + @Test(enabled=false) + @Override + public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { + super.testSimpleAHCConfigProxy(); + } } From ee13ad864b61c0c9e3465485fb9cf5d2072701ac Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Feb 2013 14:33:50 -0800 Subject: [PATCH 0288/2844] Integrate Grizzly 2.3-RC4. --- providers/grizzly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index b469437233..a5e3526aa0 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -20,7 +20,7 @@ org.glassfish.grizzly grizzly-websockets - 2.3-beta8 + 2.3-rc4 com.ning From 15f723fed5d3358ae27feb919782cf01bd26aaa3 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Feb 2013 14:34:21 -0800 Subject: [PATCH 0289/2844] Return SSL tests to run status. Delegate task handling was tripping up over the UnsupportedOperationException. --- .../java/com/ning/http/client/async/NoNullResponseTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java b/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java index cc9f0890e3..6c43cef52c 100644 --- a/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java +++ b/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010 Ning, Inc. + * Copyright 2010-2013 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the @@ -72,11 +72,11 @@ private SSLContext getSSLContext() throws GeneralSecurityException { private static class MockTrustManager implements X509TrustManager { public X509Certificate[] getAcceptedIssuers() { - throw new UnsupportedOperationException(); + return null; } public void checkClientTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { - throw new UnsupportedOperationException(); + // do nothing. } public void checkServerTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { From 6ca427d349be73b9d7de045e06e9f95b7921afb3 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 22 Feb 2013 16:49:36 -0800 Subject: [PATCH 0290/2844] Grizzly-related changes for #207. By default, fragments will be buffered. Once the last fragment has been received the full message will be passed to the listener. Original functionality can be re-enabled by setting the BUFFER_WEBSOCKET_FRAGMENTS to false on the GrizzlyAsyncHttpProviderConfig instance. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 96 +++++++++++++++---- .../GrizzlyAsyncHttpProviderConfig.java | 10 +- 2 files changed, 84 insertions(+), 22 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 059410370f..97cb0dfb2c 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -16,6 +16,7 @@ import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.AsyncHttpProviderConfig; import com.ning.http.client.Body; import com.ning.http.client.BodyGenerator; import com.ning.http.client.ConnectionPoolKeyStrategy; @@ -112,6 +113,7 @@ import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; +import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; @@ -136,6 +138,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.BUFFER_WEBSOCKET_FRAGMENTS; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; @@ -1328,17 +1331,19 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } if (context.isWSRequest) { try { - //in case of DIGEST auth protocol handler is null and just returning here is working - if(context.protocolHandler == null) - { - return; - //context.protocolHandler = Version.DRAFT17.createHandler(true); - //context.currentState = AsyncHandler.STATE.UPGRADE; - } - + //in case of DIGEST auth protocol handler is null and just returning here is working + if(context.protocolHandler == null) + { + return; + //context.protocolHandler = Version.DRAFT17.createHandler(true); + //context.currentState = AsyncHandler.STATE.UPGRADE; + } + context.protocolHandler.setConnection(ctx.getConnection()); - DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); - context.webSocket = new GrizzlyWebSocketAdapter(ws); + + final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context); + context.webSocket = webSocketAdapter; + DefaultWebSocket ws = webSocketAdapter.gWebSocket; if (context.currentState == AsyncHandler.STATE.UPGRADE) { httpHeader.setChunked(false); ws.onConnect(); @@ -1429,6 +1434,16 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c // ----------------------------------------------------- Private Methods + private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) { + DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); + AsyncHttpProviderConfig config = context.provider.clientConfig.getAsyncHttpProviderConfig(); + boolean bufferFragments = true; + if (config instanceof GrizzlyAsyncHttpProviderConfig) { + bufferFragments = (Boolean) ((GrizzlyAsyncHttpProviderConfig) config).getProperty(BUFFER_WEBSOCKET_FRAGMENTS); + } + + return new GrizzlyWebSocketAdapter(ws, bufferFragments); + } private static boolean isRedirectAllowed(final HttpTransactionContext ctx) { boolean allowed = ctx.request.isRedirectEnabled(); @@ -2724,13 +2739,16 @@ public void getBytes(byte[] bytes) { private static final class GrizzlyWebSocketAdapter implements WebSocket { - private final org.glassfish.grizzly.websockets.WebSocket gWebSocket; + private final DefaultWebSocket gWebSocket; + private final boolean bufferFragments; // -------------------------------------------------------- Constructors - GrizzlyWebSocketAdapter(final org.glassfish.grizzly.websockets.WebSocket gWebSocket) { - this.gWebSocket = gWebSocket; + GrizzlyWebSocketAdapter(final DefaultWebSocket gWebSocket, + final boolean bufferFragements) { + this.gWebSocket = gWebSocket; + this.bufferFragments = bufferFragements; } @@ -2811,14 +2829,24 @@ public void close() { private static final class AHCWebSocketListenerAdapter implements org.glassfish.grizzly.websockets.WebSocketListener { private final WebSocketListener ahcListener; - private final WebSocket webSocket; + private final GrizzlyWebSocketAdapter webSocket; + private final StringBuilder stringBuffer; + private final ByteArrayOutputStream byteArrayOutputStream; // -------------------------------------------------------- Constructors - AHCWebSocketListenerAdapter(final WebSocketListener ahcListener, WebSocket webSocket) { + AHCWebSocketListenerAdapter(final WebSocketListener ahcListener, + final GrizzlyWebSocketAdapter webSocket) { this.ahcListener = ahcListener; this.webSocket = webSocket; + if (webSocket.bufferFragments) { + stringBuffer = new StringBuilder(); + byteArrayOutputStream = new ByteArrayOutputStream(); + } else { + stringBuffer = null; + byteArrayOutputStream = null; + } } @@ -2893,10 +2921,23 @@ public void onPong(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] } @Override - public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean b) { + public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean last) { try { - if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketTextListener.class.cast(ahcListener).onFragment(s, b); + if (this.webSocket.bufferFragments) { + synchronized (this.webSocket) { + stringBuffer.append(s); + if (last) { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + final String message = stringBuffer.toString(); + stringBuffer.setLength(0); + WebSocketTextListener.class.cast(ahcListener).onMessage(message); + } + } + } + } else { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onFragment(s, last); + } } } catch (Throwable e) { ahcListener.onError(e); @@ -2904,10 +2945,23 @@ public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, Str } @Override - public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean b) { + public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean last) { try { - if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, b); + if (this.webSocket.bufferFragments) { + synchronized (this.webSocket) { + byteArrayOutputStream.write(bytes); + if (last) { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + final byte[] bytesLocal = byteArrayOutputStream.toByteArray(); + byteArrayOutputStream.reset(); + WebSocketByteListener.class.cast(ahcListener).onMessage(bytesLocal); + } + } + } + } else { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, last); + } } } catch (Throwable e) { ahcListener.onError(e); diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java index e79473859d..d0b61e8958 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java @@ -57,7 +57,15 @@ public static enum Property { * * @since 1.8 */ - MAX_HTTP_PACKET_HEADER_SIZE(Integer.class, HttpCodecFilter.DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); + MAX_HTTP_PACKET_HEADER_SIZE(Integer.class, HttpCodecFilter.DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE), + + /** + * By default, Websocket messages that are fragmented will be buffered. Once all + * fragments have been accumulated, the appropriate onMessage() call back will be + * invoked with the complete message. If this functionality is not desired, set + * this property to false. + */ + BUFFER_WEBSOCKET_FRAGMENTS(Boolean.class, true); final Object defaultValue; From 8c3659465a3339002a3960ca80bfdcc0d91d4bc9 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 25 Feb 2013 01:40:57 -0800 Subject: [PATCH 0291/2844] Minor cleanup to GrizzlyResponse. --- .../http/client/providers/grizzly/GrizzlyResponse.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 6bf78717d4..6ef07a8279 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -136,10 +136,18 @@ public String getResponseBodyExcerpt(int maxLength) throws IOException { */ public String getResponseBody() throws IOException { - return getResponseBody(Charsets.DEFAULT_CHARACTER_ENCODING); + return getResponseBody(null); } + /** + * @return the response body as a Grizzly {@link Buffer}. + */ + @SuppressWarnings("UnusedDeclaration") + public Buffer getResponseBodyAsBuffer() { + return responseBody; + } + /** * {@inheritDoc} */ From 75a23e9494ac690025ae28f2fb93cf0283296390 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 25 Feb 2013 16:26:39 +0100 Subject: [PATCH 0292/2844] Port Netty buffers usage --- .../java/com/ning/http/client/Response.java | 46 +++++++++------- .../http/client/providers/ResponseBase.java | 6 ++- .../http/client/webdav/WebDavResponse.java | 5 ++ providers/netty/pom.xml | 20 +------ .../client/providers/netty/NettyResponse.java | 52 +++++++++++++++++++ .../providers/netty/ResponseBodyPart.java | 16 +++--- 6 files changed, 98 insertions(+), 47 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/Response.java b/api/src/main/java/com/ning/http/client/Response.java index e245247cd3..1151706345 100644 --- a/api/src/main/java/com/ning/http/client/Response.java +++ b/api/src/main/java/com/ning/http/client/Response.java @@ -20,6 +20,7 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -33,14 +34,14 @@ public interface Response { * * @return The status code */ - public int getStatusCode(); + int getStatusCode(); /** * Returns the status text for the request. * * @return The status text */ - public String getStatusText(); + String getStatusText(); /** * Return the entire response body as a byte[]. @@ -48,7 +49,15 @@ public interface Response { * @return the entire response body as a byte[]. * @throws IOException */ - public byte[] getResponseBodyAsBytes() throws IOException; + byte[] getResponseBodyAsBytes() throws IOException; + + /** + * Return the entire response body as a ByteBuffer. + * + * @return the entire response body as a ByteBuffer. + * @throws IOException + */ + ByteBuffer getResponseBodyAsByteBuffer() throws IOException; /** * Returns an input stream for the response body. Note that you should not try to get this more than once, @@ -57,7 +66,7 @@ public interface Response { * @return The input stream * @throws java.io.IOException */ - public InputStream getResponseBodyAsStream() throws IOException; + InputStream getResponseBodyAsStream() throws IOException; /** * Returns the first maxLength bytes of the response body as a string. Note that this does not check @@ -69,7 +78,7 @@ public interface Response { * @return The response body * @throws java.io.IOException */ - public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException; + String getResponseBodyExcerpt(int maxLength, String charset) throws IOException; /** * Return the entire response body as a String. @@ -78,7 +87,7 @@ public interface Response { * @return the entire response body as a String. * @throws IOException */ - public String getResponseBody(String charset) throws IOException; + String getResponseBody(String charset) throws IOException; /** * Returns the first maxLength bytes of the response body as a string. Note that this does not check @@ -89,7 +98,7 @@ public interface Response { * @return The response body * @throws java.io.IOException */ - public String getResponseBodyExcerpt(int maxLength) throws IOException; + String getResponseBodyExcerpt(int maxLength) throws IOException; /** * Return the entire response body as a String. @@ -97,7 +106,7 @@ public interface Response { * @return the entire response body as a String. * @throws IOException */ - public String getResponseBody() throws IOException; + String getResponseBody() throws IOException; /** * Return the request {@link URI}. Note that if the request got redirected, the value of the {@link URI} will be @@ -106,30 +115,30 @@ public interface Response { * @return the request {@link URI}. * @throws MalformedURLException */ - public URI getUri() throws MalformedURLException; + URI getUri() throws MalformedURLException; /** * Return the content-type header value. * * @return the content-type header value. */ - public String getContentType(); + String getContentType(); /** * Return the response header * * @return the response header */ - public String getHeader(String name); + String getHeader(String name); /** * Return a {@link List} of the response header value. * * @return the response header */ - public List getHeaders(String name); + List getHeaders(String name); - public FluentCaseInsensitiveStringsMap getHeaders(); + FluentCaseInsensitiveStringsMap getHeaders(); /** * Return true if the response redirects to another object. @@ -143,19 +152,19 @@ public interface Response { * * @return The textual representation */ - public String toString(); + String toString(); /** * Return the list of {@link Cookie}. */ - public List getCookies(); + List getCookies(); /** * Return true if the response's status has been computed by an {@link AsyncHandler} * * @return true if the response's status has been computed by an {@link AsyncHandler} */ - public boolean hasResponseStatus(); + boolean hasResponseStatus(); /** * Return true if the response's headers has been computed by an {@link AsyncHandler} It will return false if the @@ -164,7 +173,7 @@ public interface Response { * * @return true if the response's headers has been computed by an {@link AsyncHandler} */ - public boolean hasResponseHeaders(); + boolean hasResponseHeaders(); /** * Return true if the response's body has been computed by an {@link AsyncHandler}. It will return false if the @@ -173,8 +182,7 @@ public interface Response { * * @return true if the response's body has been computed by an {@link AsyncHandler} */ - public boolean hasResponseBody(); - + boolean hasResponseBody(); public static class ResponseBuilder { private final List bodies = diff --git a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java index 1f98acf535..1af8dd949f 100644 --- a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -3,6 +3,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.nio.ByteBuffer; import java.util.Collections; import java.util.List; @@ -42,7 +43,6 @@ public final String getStatusText() { return status.getStatusText(); } - /* @Override */ public final URI getUri() /*throws MalformedURLException*/ { return status.getUrl(); @@ -78,6 +78,10 @@ public byte[] getResponseBodyAsBytes() throws IOException { return AsyncHttpProviderUtils.contentToBytes(bodyParts); } + public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { + return ByteBuffer.wrap(getResponseBodyAsBytes()); + } + /* @Override */ public String getResponseBody() throws IOException { return getResponseBody(DEFAULT_CHARSET); diff --git a/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java b/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java index c77cee0320..360178d429 100644 --- a/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java +++ b/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java @@ -21,6 +21,7 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; +import java.nio.ByteBuffer; import java.util.List; /** @@ -49,6 +50,10 @@ public byte[] getResponseBodyAsBytes() throws IOException { return response.getResponseBodyAsBytes(); } + public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { + return response.getResponseBodyAsByteBuffer(); + } + public InputStream getResponseBodyAsStream() throws IOException { return response.getResponseBodyAsStream(); } diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index eda60306e0..744809da2e 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -20,25 +20,7 @@ io.netty netty - 3.4.4.Final - - - javax.servlet - servlet-api - - - commons-logging - commons-logging - - - org.slf4j - slf4j-api - - - log4j - log4j - - + 3.6.3.Final diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index dd2b2a0de7..a8b229374a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -23,11 +23,18 @@ import com.ning.http.util.AsyncHttpProviderUtils; import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBufferInputStream; +import org.jboss.netty.buffer.ChannelBuffers; + /** * Wrapper around the {@link com.ning.http.client.Response} API. */ @@ -65,4 +72,49 @@ protected List buildCookies() { } return Collections.unmodifiableList(cookies); } + + /* @Override */ + public byte[] getResponseBodyAsBytes() throws IOException { + return getResponseBodyAsByteBuffer().array(); + } + + /* @Override */ + public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { + return getResponseBodyAsChannelBuffer().toByteBuffer(); + } + + /* @Override */ + public String getResponseBody() throws IOException { + return getResponseBody(null); + } + + /* @Override */ + public String getResponseBody(String charset) throws IOException { + return getResponseBodyAsChannelBuffer().toString(Charset.forName(calculateCharset(charset))); + } + + /* @Override */ + public InputStream getResponseBodyAsStream() throws IOException { + return new ChannelBufferInputStream(getResponseBodyAsChannelBuffer()); + } + + public ChannelBuffer getResponseBodyAsChannelBuffer() throws IOException { + ChannelBuffer b = null; + switch (bodyParts.size()) { + case 0: + b = ChannelBuffers.EMPTY_BUFFER; + break; + case 1: + b = ResponseBodyPart.class.cast(bodyParts.get(0)).getChannelBuffer(); + break; + default: + ChannelBuffer[] channelBuffers = new ChannelBuffer[bodyParts.size()]; + for (int i = 0; i < bodyParts.size(); i++) { + channelBuffers[i] = ResponseBodyPart.class.cast(bodyParts.get(i)).getChannelBuffer(); + } + b = ChannelBuffers.wrappedBuffer(channelBuffers); + } + + return b; + } } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java index 9984f1a2c1..1452736ee9 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java @@ -33,8 +33,6 @@ * A callback class used when an HTTP response body is received. */ public class ResponseBodyPart extends HttpResponseBodyPart { - // Empty arrays are immutable, can freely reuse - private final static byte[] NO_BYTES = new byte[0]; private final HttpChunk chunk; private final HttpResponse response; @@ -68,11 +66,9 @@ public byte[] getBodyPartBytes() { return bp; } - ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); - int available = b.readableBytes(); - - final byte[] rb = (available == 0) ? NO_BYTES : new byte[available]; - b.getBytes(b.readerIndex(), rb, 0, available); + ChannelBuffer b = getChannelBuffer(); + byte[] rb = b.toByteBuffer().array(); + bytes.set(rb); return rb; } @@ -89,7 +85,7 @@ public int length() { @Override public int writeTo(OutputStream outputStream) throws IOException { - ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); + ChannelBuffer b = getChannelBuffer(); int available = b.readableBytes(); if (available > 0) { b.getBytes(b.readerIndex(), outputStream, available); @@ -102,6 +98,10 @@ public ByteBuffer getBodyByteBuffer() { return ByteBuffer.wrap(getBodyPartBytes()); } + public ChannelBuffer getChannelBuffer() { + return chunk != null ? chunk.getContent() : response.getContent(); + } + /** * {@inheritDoc} */ From c00b2b02f4eae735f65584edab432ffd5c171a78 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 28 Feb 2013 12:11:01 -0800 Subject: [PATCH 0293/2844] Changes for #234 and more. - changed occurrences of .equals("") to use .length() instead. - Fixed random test failures where test cases expected post data to come in one chunk - this may not always be the case. --- api/src/main/java/com/ning/http/client/Realm.java | 6 +++--- .../java/com/ning/http/client/RequestBuilderBase.java | 8 ++++---- .../java/com/ning/http/client/ntlm/NTLMEngine.java | 4 ++-- .../client/providers/jdk/JDKAsyncHttpProvider.java | 4 ++-- .../java/com/ning/http/util/AuthenticatorUtils.java | 4 ++-- .../com/ning/http/client/async/BasicHttpsTest.java | 11 ++++++++--- .../ning/http/client/async/HostnameVerifierTest.java | 11 ++++++++--- .../com/ning/http/client/async/PostWithQSTest.java | 4 ++-- .../providers/netty/NettyAsyncHttpProvider.java | 4 ++-- 9 files changed, 33 insertions(+), 23 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/com/ning/http/client/Realm.java index 10da77fa03..4785eddb9a 100644 --- a/api/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/com/ning/http/client/Realm.java @@ -1,5 +1,5 @@ /* - * Copyright 2010 Ning, Inc. + * Copyright 2010-2013 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the @@ -538,7 +538,7 @@ private void newResponse() throws UnsupportedEncodingException { .append(uri).toString().getBytes("ISO-8859-1")); byte[] ha2 = md.digest(); - if(qop==null || qop.equals("")) { + if(qop==null || qop.length() == 0) { md.update(new StringBuilder(toBase16(ha1)) .append(':') .append(nonce) @@ -599,7 +599,7 @@ private static String toBase16(byte[] bytes) { public Realm build() { // Avoid generating - if (nonce != null && !nonce.equals("")) { + if (nonce != null && nonce.length() > 0) { newCnonce(); try { newResponse(); diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 367fc751db..855505e5a6 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2010 Ning, Inc. + * Copyright 2010-2013 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the @@ -163,7 +163,7 @@ private String toUrl(boolean encode) { } else { builder.append(name); } - if (value != null && !value.equals("")) { + if (value != null) { builder.append('='); if (encode) { UTF8UrlEncoder.appendEncoded(builder, value); @@ -384,11 +384,11 @@ private String buildUrl(String url) { } } - if (uri.getRawQuery() != null && !uri.getRawQuery().equals("")) { + if (uri.getRawQuery() != null && uri.getRawQuery().length() > 0) { String[] queries = uri.getRawQuery().split("&"); int pos; for (String query : queries) { - pos = query.indexOf("="); + pos = query.indexOf('='); if (pos <= 0) { addQueryParameter(query, null); } else { diff --git a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java index a56c9bf141..b06249ca7a 100644 --- a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java +++ b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -123,7 +123,7 @@ final String getResponseFor(String message, String username, String password, String host, String domain) throws NTLMEngineException { final String response; - if (message == null || message.trim().equals("")) { + if (message == null || message.trim().length() == 0) { response = getType1Message(host, domain); } else { Type2Message t2m = new Type2Message(message); diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 6bd46a78fb..642584002d 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -516,7 +516,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request AuthenticatorUtils.computeBasicAuthentication(realm)); break; case DIGEST: - if (realm.getNonce() != null && !realm.getNonce().equals("")) { + if (realm.getNonce() != null && realm.getNonce().length() > 0) { try { urlConnection.setRequestProperty("Authorization", AuthenticatorUtils.computeDigestAuthentication(realm)); diff --git a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java index 10a6bdb117..f17d2fd27b 100644 --- a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -40,7 +40,7 @@ public static String computeDigestAuthentication(Realm realm) throws NoSuchAlgor builder.append("algorithm").append('=').append(realm.getAlgorithm()).append(", "); construct(builder, "response", realm.getResponse()); - if (realm.getOpaque() != null && realm.getOpaque() != null && realm.getOpaque().equals("") == false) + if (realm.getOpaque() != null && realm.getOpaque().length() > 0) construct(builder, "opaque", realm.getOpaque()); builder.append("qop").append('=').append(realm.getQop()).append(", "); builder.append("nc").append('=').append(realm.getNc()).append(", "); diff --git a/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java b/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java index bcd508e2d6..6a70d6b0be 100644 --- a/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java +++ b/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java @@ -122,10 +122,15 @@ public void handle(String pathInContext, size = httpRequest.getContentLength(); } byte[] bytes = new byte[size]; + int pos = 0; if (bytes.length > 0) { - //noinspection ResultOfMethodCallIgnored - int read = httpRequest.getInputStream().read(bytes); - httpResponse.getOutputStream().write(bytes, 0, read); + int read = 0; + while (read != -1) { + read = httpRequest.getInputStream().read(bytes, pos, bytes.length - pos); + pos += read; + } + + httpResponse.getOutputStream().write(bytes); } httpResponse.setStatus(200); diff --git a/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java index bd0725c711..47311144f2 100644 --- a/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java +++ b/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java @@ -113,10 +113,15 @@ public void handle(String pathInContext, size = httpRequest.getContentLength(); } byte[] bytes = new byte[size]; + int pos = 0; if (bytes.length > 0) { - //noinspection ResultOfMethodCallIgnored - int read = httpRequest.getInputStream().read(bytes); - httpResponse.getOutputStream().write(bytes, 0, read); + int read = 0; + while (read != -1) { + read = httpRequest.getInputStream().read(bytes, pos, bytes.length - pos); + pos += read; + } + + httpResponse.getOutputStream().write(bytes); } httpResponse.setStatus(200); diff --git a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java index d99498bd18..6f59c9d93f 100644 --- a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java +++ b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java @@ -89,7 +89,7 @@ public void postWithNulParamQS() throws IOException, ExecutionException, Timeout /* @Override */ public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a")) { + if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=")) { throw new IOException(status.getUrl().toURL().toString()); } return super.onStatusReceived(status); @@ -109,7 +109,7 @@ public void postWithNulParamsQS() throws IOException, ExecutionException, Timeou /* @Override */ public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c&d=e")) { + if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { throw new IOException("failed to parse the query properly"); } return super.onStatusReceived(status); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 5d7b016448..22c3a96cb5 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2010 Ning, Inc. + * Copyright 2010-2013 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the @@ -668,7 +668,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, AuthenticatorUtils.computeBasicAuthentication(realm)); break; case DIGEST: - if (realm.getNonce() != null && !realm.getNonce().equals("")) { + if (realm.getNonce() != null && realm.getNonce().length() > 0) { try { nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeDigestAuthentication(realm)); From cce8c8b7f1226e991e1e23225f0f784fd448ab8b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Sat, 2 Mar 2013 14:49:07 -0800 Subject: [PATCH 0294/2844] Fix test failure. Logic was using the platform charset for a request body if none was specified. Test ran fine within intellij as the default charset was macroman, however, when run from the commandline, the test would fail as the default would be UTF-8. ISO-8859-1 is now used if no encoding is specified. --- .../http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 97cb0dfb2c..cb0a50599e 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2001,7 +2001,7 @@ public boolean doHandle(final FilterChainContext ctx, String charset = request.getBodyEncoding(); if (charset == null) { - charset = Charsets.DEFAULT_CHARACTER_ENCODING; + charset = Charsets.ASCII_CHARSET.name(); } final byte[] data = request.getStringData().getBytes(charset); final MemoryManager mm = ctx.getMemoryManager(); From 84d483d3656e648fb87c4f560eaba7f483578850 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Sat, 2 Mar 2013 14:52:50 -0800 Subject: [PATCH 0295/2844] Fix test failure. Logic was using the platform charset for a request body if none was specified. Test ran fine within intellij as the default charset was macroman, however, when run from the commandline, the test would fail as the default would be UTF-8. ISO-8859-1 is now used if no encoding is specified. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index cb0a50599e..d03ca2ac33 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1965,7 +1965,7 @@ public boolean doHandle(final FilterChainContext ctx, String charset = request.getBodyEncoding(); if (charset == null) { - charset = Charsets.DEFAULT_CHARACTER_ENCODING; + charset = Charsets.ASCII_CHARSET.name(); } final byte[] data = new String(request.getByteData(), charset).getBytes(charset); final MemoryManager mm = ctx.getMemoryManager(); @@ -2068,7 +2068,7 @@ public boolean doHandle(final FilterChainContext ctx, StringBuilder sb = null; String charset = request.getBodyEncoding(); if (charset == null) { - charset = Charsets.DEFAULT_CHARACTER_ENCODING; + charset = Charsets.ASCII_CHARSET.name(); } final FluentStringsMap params = request.getParams(); if (!params.isEmpty()) { From 072235dfd836fb27f8da2f8d86aad74c0ee177c6 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Sat, 2 Mar 2013 16:29:08 -0800 Subject: [PATCH 0296/2844] Changes for #229. - Override onFilterChainChanged to be a no-op to prevent the optimized server-side SSLFilter from being inserted into the chain. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 5 +++++ .../grizzly/GrizzlyProxyTunnelingTest.java | 17 ----------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index d03ca2ac33..759f3b0659 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -64,6 +64,7 @@ import org.glassfish.grizzly.attributes.Attribute; import org.glassfish.grizzly.attributes.AttributeStorage; import org.glassfish.grizzly.filterchain.BaseFilter; +import org.glassfish.grizzly.filterchain.FilterChain; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.filterchain.FilterChainEvent; @@ -2671,6 +2672,10 @@ public NextAction handleWrite(FilterChainContext ctx) throws IOException { } + @Override + public void onFilterChainChanged(FilterChain filterChain) { + // no-op + } // ----------------------------------------------------- Private Methods diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java index e2631e7e58..8d370ee356 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -33,21 +33,4 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); } - @Test(enabled=false) - @Override - public void testRequestProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - super.testRequestProxy(); - } - - @Test(enabled=false) - @Override - public void testConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - super.testConfigProxy(); - } - - @Test(enabled=false) - @Override - public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - super.testSimpleAHCConfigProxy(); - } } From cb897e87e15d5ce32adbaa2f90021811a3d127e6 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 7 Mar 2013 14:00:44 +0100 Subject: [PATCH 0297/2844] Make WebSocket implement Closeable, close #166 --- .../main/java/com/ning/http/client/websocket/WebSocket.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocket.java b/api/src/main/java/com/ning/http/client/websocket/WebSocket.java index 3917a6b4ad..ae7183fe48 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/api/src/main/java/com/ning/http/client/websocket/WebSocket.java @@ -12,10 +12,12 @@ */ package com.ning.http.client.websocket; +import java.io.Closeable; + /** * A Websocket client */ -public interface WebSocket { +public interface WebSocket extends Closeable { /** * Send a byte message. From 91502402b9f363104f0378c09584a37bdf3698ca Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 7 Mar 2013 15:58:58 +0100 Subject: [PATCH 0298/2844] Add new extra module shipping Guava Future adapter, port fix for #240 --- extras/guava/pom.xml | 26 ++++++++ .../client/extra/ListenableFutureAdapter.java | 57 ++++++++++++++++++ extras/pom.xml | 59 +++++++++++++++++++ pom.xml | 6 ++ 4 files changed, 148 insertions(+) create mode 100644 extras/guava/pom.xml create mode 100644 extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java create mode 100644 extras/pom.xml diff --git a/extras/guava/pom.xml b/extras/guava/pom.xml new file mode 100644 index 0000000000..21b5756ed9 --- /dev/null +++ b/extras/guava/pom.xml @@ -0,0 +1,26 @@ + + + com.ning + async-http-client-extras-parent + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-extras-guava + Asynchronous Http Client Guava Extras + 1.8.0-SNAPSHOT + jar + + The Async Http Client Guava Extras. + + + + + com.google.guava + guava + 11.0.2 + + + \ No newline at end of file diff --git a/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java b/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java new file mode 100644 index 0000000000..7d32343fca --- /dev/null +++ b/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.extra; + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import com.ning.http.client.ListenableFuture; + +public final class ListenableFutureAdapter { + + /** + * @param future an AHC ListenableFuture + * @return a Guava ListenableFuture + */ + public static com.google.common.util.concurrent.ListenableFuture asGuavaFuture(final ListenableFuture future) { + + return new com.google.common.util.concurrent.ListenableFuture() { + + public boolean cancel(boolean mayInterruptIfRunning) { + return future.cancel(mayInterruptIfRunning); + } + + public V get() throws InterruptedException, ExecutionException { + return future.get(); + } + + public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return future.get(timeout, unit); + } + + public boolean isCancelled() { + return future.isCancelled(); + } + + public boolean isDone() { + return future.isDone(); + } + + public void addListener(final Runnable runnable, final Executor executor) { + future.addListener(runnable, executor); + } + }; + } +} diff --git a/extras/pom.xml b/extras/pom.xml new file mode 100644 index 0000000000..fc51307e0a --- /dev/null +++ b/extras/pom.xml @@ -0,0 +1,59 @@ + + + com.ning + async-http-client-project + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-extras-parent + Asynchronous Http Client Extras Parent + 1.8.0-SNAPSHOT + pom + + The Async Http Client extras library parent. + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.4 + true + + META-INF + + + $(replace;$(project.version);-SNAPSHOT;.$(tstamp;yyyyMMdd-HHmm)) + + Sonatype + + + + + osgi-bundle + package + + bundle + + + + + + + + + guava + + + + + com.ning + async-http-client-api + ${project.version} + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index c475b6ec26..8e6eda0a3b 100644 --- a/pom.xml +++ b/pom.xml @@ -74,6 +74,11 @@ Ryan Lubke ryan.lubke@gmail.com + + slandelle + Stephane Landelle + slandelle@excilys.com + @@ -490,6 +495,7 @@ api providers + extras site From 005c6660ba628b6bff075795c70b6d3d21e489f9 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 8 Mar 2013 09:39:03 +0100 Subject: [PATCH 0299/2844] Fix ssl doc typo, close #87 --- site/src/site/apt/ssl.apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/site/apt/ssl.apt b/site/src/site/apt/ssl.apt index 9c7e5db94e..aeb3e958a9 100644 --- a/site/src/site/apt/ssl.apt +++ b/site/src/site/apt/ssl.apt @@ -35,6 +35,6 @@ SecureRandom secureRandom = new SecureRandom(); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, secureRandom); Builder builder = new AsyncHttpClientConfig.Builder(); -builder.setSSLContext(myOwnThreadPool); +builder.setSSLContext(sslContext); AsyncHttpClient client = new AsyncHttpClient(builder.build()); +-----+ From 979487a404a63ede4e7e5f8c7ebbbf14f73af89d Mon Sep 17 00:00:00 2001 From: Bongjae Chang Date: Sat, 9 Mar 2013 21:26:19 +0900 Subject: [PATCH 0300/2844] Issue #244 "About redundant timeout exception of Grizzly provider" + prevented duplicated operation of GrizzlyResponseFuture + fixed closeConnection()'s typo + added a testcase for this issue --- .../grizzly/GrizzlyResponseFuture.java | 29 ++++- .../GrizzlyUnexpectingTimeoutTest.java | 122 ++++++++++++++++++ 2 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java index efa6c5186d..c93d52094f 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012-2013 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -37,6 +37,7 @@ public class GrizzlyResponseFuture extends AbstractListenableFuture { private final AtomicBoolean done = new AtomicBoolean(false); + private final AtomicBoolean cancelled = new AtomicBoolean(false); private final AsyncHandler handler; private final GrizzlyAsyncHttpProvider provider; private final Request request; @@ -65,17 +66,25 @@ public class GrizzlyResponseFuture extends AbstractListenableFuture { public void done(Callable callable) { - done.compareAndSet(false, true); - super.done(); + if (!done.compareAndSet(false, true) || cancelled.get()) { + return; + } + done(); } public void abort(Throwable t) { + if (done.get() || !cancelled.compareAndSet(false, true)) { + return; + } delegate.failure(t); if (handler != null) { - handler.onThrowable(t); + try { + handler.onThrowable(t); + } catch (Throwable ignore) { + } } closeConnection(); done(); @@ -120,7 +129,15 @@ public boolean getAndSetWriteBody(boolean writeBody) { public boolean cancel(boolean mayInterruptIfRunning) { - handler.onThrowable(new CancellationException()); + if (done.get() || !cancelled.compareAndSet(false, true)) { + return false; + } + if (handler != null) { + try { + handler.onThrowable(new CancellationException()); + } catch (Throwable ignore) { + } + } done(); return delegate.cancel(mayInterruptIfRunning); @@ -181,7 +198,7 @@ void setDelegate(final FutureImpl delegate) { private void closeConnection() { - if (connection != null && !connection.isOpen()) { + if (connection != null && connection.isOpen()) { connection.close().markForRecycle(true); } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java new file mode 100644 index 0000000000..753e4ed11d --- /dev/null +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2012-2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.providers.grizzly; + +import com.ning.http.client.AsyncCompletionHandler; +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.Response; +import com.ning.http.client.async.AbstractBasicTest; +import org.eclipse.jetty.continuation.Continuation; +import org.eclipse.jetty.continuation.ContinuationSupport; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.fail; + +public class GrizzlyUnexpectingTimeoutTest extends AbstractBasicTest { + + private static final String MSG = "Unauthorized without WWW-Authenticate header"; + + protected String getExpectedTimeoutMessage() { + return "401 response received, but no WWW-Authenticate header was present"; + } + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } + + @Override + public AbstractHandler configureHandler() throws Exception { + return new ExpectExceptionHandler(); + } + + private class ExpectExceptionHandler extends AbstractHandler { + public void handle(String target, Request baseRequest, HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { + response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); + final Continuation continuation = ContinuationSupport.getContinuation(request); + continuation.suspend(); + new Thread(new Runnable() { + public void run() { + try { + response.getOutputStream().print(MSG); + response.getOutputStream().flush(); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + }).start(); + baseRequest.setHandled(true); + } + } + + @Test(groups = {"standalone", "default_provider"}) + public void unexpectingTimeoutTest() throws IOException { + final AtomicInteger counts = new AtomicInteger(); + final int timeout = 100; + + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(timeout).build()); + Future responseFuture = + client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandler() { + @Override + public Response onCompleted(Response response) throws Exception { + counts.incrementAndGet(); + return response; + } + + @Override + public void onThrowable(Throwable t) { + counts.incrementAndGet(); + super.onThrowable(t); + } + }); + // currently, an exception is expected + // because the grizzly provider would throw IllegalStateException if WWW-Authenticate header doesn't exist with 401 response status. + try { + Response response = responseFuture.get(); + assertNull(response); + } catch (InterruptedException e) { + fail("Interrupted.", e); + } catch (ExecutionException e) { + assertFalse(e.getCause() instanceof TimeoutException); + assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); + } + // wait for timeout again. + try { + Thread.sleep(timeout*2); + } catch (InterruptedException e) { + fail("Interrupted.", e); + } + // the result should be either onCompleted or onThrowable. + assertEquals(1, counts.get(), "result should be one"); + client.close(); + } +} From 7204f93a9ef207cac0c2ac61fcc5848f84af8db4 Mon Sep 17 00:00:00 2001 From: Bongjae Chang Date: Sat, 9 Mar 2013 23:07:30 +0900 Subject: [PATCH 0301/2844] Issue #246 "Relative302Test could be failed in some countries" + fixed the regular expression --- .../test/java/com/ning/http/client/async/Relative302Test.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/java/com/ning/http/client/async/Relative302Test.java b/api/src/test/java/com/ning/http/client/async/Relative302Test.java index e8a72640b4..9d1f63c98f 100644 --- a/api/src/test/java/com/ning/http/client/async/Relative302Test.java +++ b/api/src/test/java/com/ning/http/client/async/Relative302Test.java @@ -103,7 +103,7 @@ public void redirected302Test() throws Throwable { assertNotNull(response); assertEquals(response.getStatusCode(), 200); - String anyGoogleSubdomain = "http://www.google.[a-z]{1,}:80"; + String anyGoogleSubdomain = "http://www\\.google\\.[a-z]+(\\.[a-z]+)*:80"; String baseUrl = getBaseUrl( response.getUri() ); assertTrue(baseUrl.matches( anyGoogleSubdomain ), "response does not show redirection to " + anyGoogleSubdomain); From 2cc4cf195392010409cbe94d7c25f9b3f5f25af5 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Sat, 9 Mar 2013 22:34:17 +0100 Subject: [PATCH 0302/2844] Port MiscUtil.isNonEmpty to master --- .../FluentCaseInsensitiveStringsMap.java | 4 +- .../main/java/com/ning/http/client/Realm.java | 8 ++-- .../ning/http/client/RequestBuilderBase.java | 6 ++- .../listener/TransferCompletionHandler.java | 4 +- .../http/client/providers/ResponseBase.java | 6 ++- .../providers/jdk/JDKAsyncHttpProvider.java | 8 ++-- .../ning/http/util/AuthenticatorUtils.java | 4 +- .../java/com/ning/http/util/MiscUtil.java | 42 +++++++++++++++++++ .../java/com/ning/http/util/ProxyUtils.java | 4 +- .../http/client/async/ParamEncodingTest.java | 3 +- .../http/client/async/PostWithQSTest.java | 3 +- .../client/async/QueryParametersTest.java | 3 +- .../apache/ApacheAsyncHttpProvider.java | 4 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 23 +++++----- .../providers/grizzly/GrizzlyResponse.java | 6 ++- .../netty/NettyAsyncHttpProvider.java | 13 +++--- .../providers/netty/ResponseHeaders.java | 2 +- 17 files changed, 105 insertions(+), 38 deletions(-) create mode 100644 api/src/main/java/com/ning/http/util/MiscUtil.java diff --git a/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java b/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java index 009af7e43f..b4afd7d8f8 100644 --- a/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java +++ b/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java @@ -16,6 +16,8 @@ */ package com.ning.http.client; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -66,7 +68,7 @@ public FluentCaseInsensitiveStringsMap(Map> src) { * @return This object */ public FluentCaseInsensitiveStringsMap add(String key, String... values) { - if ((values != null) && (values.length > 0)) { + if (isNonEmpty(values)) { add(key, Arrays.asList(values)); } return this; diff --git a/api/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/com/ning/http/client/Realm.java index 4785eddb9a..af5ae68933 100644 --- a/api/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/com/ning/http/client/Realm.java @@ -16,6 +16,8 @@ */ package com.ning.http.client; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -431,7 +433,7 @@ public RealmBuilder parseWWWAuthenticateHeader(String headerLine) { setAlgorithm(match(headerLine, "algorithm")); setOpaque(match(headerLine, "opaque")); setQop(match(headerLine, "qop")); - if (getNonce() != null && !getNonce().equalsIgnoreCase("")) { + if (isNonEmpty(getNonce())) { setScheme(AuthScheme.DIGEST); } else { setScheme(AuthScheme.BASIC); @@ -444,7 +446,7 @@ public RealmBuilder parseProxyAuthenticateHeader(String headerLine) { setNonce(match(headerLine, "nonce")); setOpaque(match(headerLine, "opaque")); setQop(match(headerLine, "qop")); - if (getNonce() != null && !getNonce().equalsIgnoreCase("")) { + if (isNonEmpty(getNonce())) { setScheme(AuthScheme.DIGEST); } else { setScheme(AuthScheme.BASIC); @@ -599,7 +601,7 @@ private static String toBase16(byte[] bytes) { public Realm build() { // Avoid generating - if (nonce != null && nonce.length() > 0) { + if (isNonEmpty(nonce)) { newCnonce(); try { newResponse(); diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 855505e5a6..5991285109 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -15,6 +15,8 @@ */ package com.ning.http.client; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.Request.EntityWriter; import com.ning.http.util.UTF8UrlEncoder; import org.slf4j.Logger; @@ -145,7 +147,7 @@ private String toUrl(boolean encode) { } } - if (queryParams != null && !queryParams.isEmpty()) { + if (isNonEmpty(queryParams)) { StringBuilder builder = new StringBuilder(); if (!url.substring(8).contains("/")) { // no other "/" than http[s]:// -> http://localhost:1234 @@ -384,7 +386,7 @@ private String buildUrl(String url) { } } - if (uri.getRawQuery() != null && uri.getRawQuery().length() > 0) { + if (isNonEmpty(uri.getRawQuery())) { String[] queries = uri.getRawQuery().split("&"); int pos; for (String query : queries) { diff --git a/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java b/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java index 6d71cbd238..8e74808cf3 100644 --- a/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java +++ b/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java @@ -12,6 +12,8 @@ */ package com.ning.http.client.listener; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.AsyncCompletionHandlerBase; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; @@ -144,7 +146,7 @@ public Response onCompleted(Response response) throws Exception { */ public STATE onHeaderWriteCompleted() { List list = transferAdapter.getHeaders().get("Content-Length"); - if (list != null && list.size() > 0 && list.get(0) != "") { + if (isNonEmpty(list) && list.get(0).length() != 0) { totalBytesToTransfer.set(Long.valueOf(list.get(0))); } diff --git a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java index 1af8dd949f..f1b695f392 100644 --- a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java +++ b/api/src/main/java/com/ning/http/client/providers/ResponseBase.java @@ -1,5 +1,7 @@ package com.ning.http.client.providers; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -126,10 +128,10 @@ public boolean hasResponseStatus() { } public boolean hasResponseHeaders() { - return headers != null && !headers.getHeaders().isEmpty(); + return headers != null && isNonEmpty(headers.getHeaders()); } public boolean hasResponseBody() { - return bodyParts != null && !bodyParts.isEmpty(); + return isNonEmpty(bodyParts); } } diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 642584002d..ff82708731 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -12,6 +12,8 @@ */ package com.ning.http.client.providers.jdk; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; @@ -373,7 +375,7 @@ public T call() throws Exception { } catch (Throwable t) { logger.debug(t.getMessage(), t); - if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { + if (IOException.class.isAssignableFrom(t.getClass()) && !config.getIOExceptionFilters().isEmpty()) { FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler) .request(request).ioException(IOException.class.cast(t)).build(); @@ -516,7 +518,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request AuthenticatorUtils.computeBasicAuthentication(realm)); break; case DIGEST: - if (realm.getNonce() != null && realm.getNonce().length() > 0) { + if (isNonEmpty(realm.getNonce())) { try { urlConnection.setRequestProperty("Authorization", AuthenticatorUtils.computeDigestAuthentication(realm)); @@ -552,7 +554,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request config)); } - if (request.getCookies() != null && !request.getCookies().isEmpty()) { + if (isNonEmpty(request.getCookies())) { urlConnection.setRequestProperty("Cookie", AsyncHttpProviderUtils.encodeCookies(request.getCookies())); } diff --git a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java index f17d2fd27b..ea803cc7a3 100644 --- a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java @@ -12,6 +12,8 @@ */ package com.ning.http.util; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.ProxyServer; import com.ning.http.client.Realm; @@ -40,7 +42,7 @@ public static String computeDigestAuthentication(Realm realm) throws NoSuchAlgor builder.append("algorithm").append('=').append(realm.getAlgorithm()).append(", "); construct(builder, "response", realm.getResponse()); - if (realm.getOpaque() != null && realm.getOpaque().length() > 0) + if (isNonEmpty(realm.getOpaque())) construct(builder, "opaque", realm.getOpaque()); builder.append("qop").append('=').append(realm.getQop()).append(", "); builder.append("nc").append('=').append(realm.getNc()).append(", "); diff --git a/api/src/main/java/com/ning/http/util/MiscUtil.java b/api/src/main/java/com/ning/http/util/MiscUtil.java new file mode 100644 index 0000000000..31cc531735 --- /dev/null +++ b/api/src/main/java/com/ning/http/util/MiscUtil.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.util; + +import java.util.Collection; +import java.util.Map; + +public class MiscUtil { + + private MiscUtil() { + } + + public static boolean isNonEmpty(String string) { + return string != null && string.length() != 0; + } + + public static boolean isNonEmpty(Object[] array) { + return array != null && array.length != 0; + } + + public static boolean isNonEmpty(byte[] array) { + return array != null && array.length != 0; + } + + public static boolean isNonEmpty(Collection collection) { + return collection != null && !collection.isEmpty(); + } + + public static boolean isNonEmpty(Map map) { + return map != null && !map.isEmpty(); + } +} diff --git a/api/src/main/java/com/ning/http/util/ProxyUtils.java b/api/src/main/java/com/ning/http/util/ProxyUtils.java index a3bd9f58e4..90bd086560 100644 --- a/api/src/main/java/com/ning/http/util/ProxyUtils.java +++ b/api/src/main/java/com/ning/http/util/ProxyUtils.java @@ -12,6 +12,8 @@ */ package com.ning.http.util; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.ProxyServer; import com.ning.http.client.ProxyServer.Protocol; import com.ning.http.client.Request; @@ -89,7 +91,7 @@ public static boolean avoidProxy(final ProxyServer proxyServer, final String tar List nonProxyHosts = proxyServer.getNonProxyHosts(); - if (nonProxyHosts != null && nonProxyHosts.size() > 0) { + if (isNonEmpty(nonProxyHosts)) { for (String nonProxyHost : nonProxyHosts) { if (nonProxyHost.startsWith("*") && nonProxyHost.length() > 1 && targetHost.endsWith(nonProxyHost.substring(1).toLowerCase())) { diff --git a/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java b/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java index 02af3160ee..d4f279bf20 100644 --- a/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java +++ b/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java @@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import static com.ning.http.util.MiscUtil.isNonEmpty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -42,7 +43,7 @@ public void handle(String s, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { String p = request.getParameter("test"); - if (p != null && !p.equals("")) { + if (isNonEmpty(p)) { response.setStatus(HttpServletResponse.SC_OK); response.addHeader("X-Param", p); } else { diff --git a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java index 6f59c9d93f..ea1537a929 100644 --- a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java +++ b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java @@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import static com.ning.http.util.MiscUtil.isNonEmpty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -54,7 +55,7 @@ public void handle(String s, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { String qs = request.getQueryString(); - if (qs != null && !qs.equals("") && request.getContentLength() == 3) { + if (isNonEmpty(qs) && request.getContentLength() == 3) { ServletInputStream is = request.getInputStream(); response.setStatus(HttpServletResponse.SC_OK); byte buf[] = new byte[is.available()]; diff --git a/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java b/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java index 028a9543d4..a7879a944a 100644 --- a/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java +++ b/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java @@ -33,6 +33,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import static com.ning.http.util.MiscUtil.isNonEmpty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -49,7 +50,7 @@ public void handle(String s, HttpServletResponse response) throws IOException, ServletException { if ("GET".equalsIgnoreCase(request.getMethod())) { String qs = request.getQueryString(); - if (qs != null && !qs.equals("")) { + if (isNonEmpty(qs)) { for (String qnv : qs.split("&")) { String nv[] = qnv.split("="); response.addHeader(nv[0], nv[1]); diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 2c11ab3794..eecd271fac 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -12,6 +12,8 @@ */ package com.ning.http.client.providers.apache; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; @@ -357,7 +359,7 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I method.setFollowRedirects(false); Collection cookies = request.getCookies(); - if ((cookies != null) && !cookies.isEmpty()) { + if (isNonEmpty(cookies)) { method.setRequestHeader("Cookie", AsyncHttpProviderUtils.encodeCookies(request.getCookies())); } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 759f3b0659..54dd650d3a 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -139,6 +139,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import static com.ning.http.util.MiscUtil.isNonEmpty; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.BUFFER_WEBSOCKET_FRAGMENTS; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; @@ -974,11 +975,11 @@ private void addHeaders(final Request request, final HttpRequestPacket requestPacket) { final FluentCaseInsensitiveStringsMap map = request.getHeaders(); - if (map != null && !map.isEmpty()) { + if (isNonEmpty(map)) { for (final Map.Entry> entry : map.entrySet()) { final String headerName = entry.getKey(); final List headerValues = entry.getValue(); - if (headerValues != null && !headerValues.isEmpty()) { + if (isNonEmpty(headerValues)) { for (final String headerValue : headerValues) { requestPacket.addHeader(headerName, headerValue); } @@ -1007,7 +1008,7 @@ private void addCookies(final Request request, final HttpRequestPacket requestPacket) { final Collection cookies = request.getCookies(); - if (cookies != null && !cookies.isEmpty()) { + if (isNonEmpty(cookies)) { StringBuilder sb = new StringBuilder(128); org.glassfish.grizzly.http.Cookie[] gCookies = new org.glassfish.grizzly.http.Cookie[cookies.size()]; @@ -1041,16 +1042,16 @@ private void addQueryString(final Request request, final HttpRequestPacket requestPacket) { final FluentStringsMap map = request.getQueryParams(); - if (map != null && !map.isEmpty()) { + if (isNonEmpty(map)) { StringBuilder sb = new StringBuilder(128); for (final Map.Entry> entry : map.entrySet()) { final String name = entry.getKey(); final List values = entry.getValue(); - if (values != null && !values.isEmpty()) { + if (isNonEmpty(values)) { try { for (int i = 0, len = values.size(); i < len; i++) { final String value = values.get(i); - if (value != null && value.length() > 0) { + if (isNonEmpty(value)) { sb.append(URLEncoder.encode(name, "UTF-8")).append('=') .append(URLEncoder.encode(values.get(i), "UTF-8")).append('&'); } else { @@ -2054,7 +2055,7 @@ private final class ParamsBodyHandler implements BodyHandler { public boolean handlesBodyType(final Request request) { final FluentStringsMap params = request.getParams(); - return (params != null && !params.isEmpty()); + return isNonEmpty(params); } @SuppressWarnings({"unchecked"}) @@ -2076,7 +2077,7 @@ public boolean doHandle(final FilterChainContext ctx, for (Map.Entry> entry : params.entrySet()) { String name = entry.getKey(); List values = entry.getValue(); - if (values != null && !values.isEmpty()) { + if (isNonEmpty(values)) { if (sb == null) { sb = new StringBuilder(128); } @@ -2201,7 +2202,7 @@ private static final class PartsBodyHandler implements BodyHandler { public boolean handlesBodyType(final Request request) { final List parts = request.getParts(); - return (parts != null && !parts.isEmpty()); + return isNonEmpty(parts); } @SuppressWarnings({"unchecked"}) @@ -2768,7 +2769,7 @@ public WebSocket sendMessage(byte[] message) { @Override public WebSocket stream(byte[] fragment, boolean last) { - if (fragment != null && fragment.length > 0) { + if (isNonEmpty(fragment)) { gWebSocket.stream(last, fragment, 0, fragment.length); } return this; @@ -2776,7 +2777,7 @@ public WebSocket stream(byte[] fragment, boolean last) { @Override public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { - if (fragment != null && fragment.length > 0) { + if (isNonEmpty(fragment)) { gWebSocket.stream(last, fragment, offset, len); } return this; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 6ef07a8279..e7c4720f01 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -13,6 +13,8 @@ package com.ning.http.client.providers.grizzly; +import static com.ning.http.util.MiscUtil.isNonEmpty; + import com.ning.http.client.Cookie; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; @@ -53,7 +55,7 @@ public GrizzlyResponse(final HttpResponseStatus status, final List bodyParts) { super(status, headers, bodyParts); - if (bodyParts != null && !bodyParts.isEmpty()) { + if (isNonEmpty(bodyParts)) { if (bodyParts.size() == 1) { responseBody = ((GrizzlyResponseBodyPart) bodyParts.get(0)).getBodyBuffer(); } else { @@ -154,7 +156,7 @@ public Buffer getResponseBodyAsBuffer() { public List buildCookies() { List values = headers.getHeaders().get("set-cookie"); - if (values != null && !values.isEmpty()) { + if (isNonEmpty(values)) { CookiesBuilder.ServerCookiesBuilder builder = new CookiesBuilder.ServerCookiesBuilder(false); for (String header : values) { builder.parse(header); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 22c3a96cb5..9a3e3f9652 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -135,6 +135,7 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; +import static com.ning.http.util.MiscUtil.isNonEmpty; import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; import static org.jboss.netty.channel.Channels.pipeline; @@ -643,7 +644,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } } else { List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); - if (auth != null && auth.size() > 0 && auth.get(0).startsWith("NTLM")) { + if (isNonEmpty(auth) && auth.get(0).startsWith("NTLM")) { nettyRequest.addHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, auth.get(0)); } } @@ -668,7 +669,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, AuthenticatorUtils.computeBasicAuthentication(realm)); break; case DIGEST: - if (realm.getNonce() != null && realm.getNonce().length() > 0) { + if (isNonEmpty(realm.getNonce())) { try { nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeDigestAuthentication(realm)); @@ -718,10 +719,10 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } if (proxyServer.getPrincipal() != null) { - if (proxyServer.getNtlmDomain() != null && proxyServer.getNtlmDomain().length() > 0) { + if (isNonEmpty(proxyServer.getNtlmDomain())) { List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); - if (!(auth != null && auth.size() > 0 && auth.get(0).startsWith("NTLM"))) { + if (!(isNonEmpty(auth) && auth.get(0).startsWith("NTLM"))) { try { String msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), proxyServer.getHost()); @@ -755,7 +756,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, } if (!m.equals(HttpMethod.CONNECT)) { - if (request.getCookies() != null && !request.getCookies().isEmpty()) { + if (isNonEmpty(request.getCookies())) { CookieEncoder httpCookieEncoder = new CookieEncoder(false); Iterator ic = request.getCookies().iterator(); Cookie c; @@ -792,7 +793,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, int length = lengthWrapper[0]; nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes, 0, length)); - } else if (request.getParams() != null && !request.getParams().isEmpty()) { + } else if (isNonEmpty(request.getParams())) { StringBuilder sb = new StringBuilder(); for (final Entry> paramEntry : request.getParams()) { final String key = paramEntry.getKey(); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java index 0db2b32334..8f94f8925b 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java @@ -54,7 +54,7 @@ private FluentCaseInsensitiveStringsMap computerHeaders() { } } - if (trailingHeaders != null && trailingHeaders.getHeaderNames().size() > 0) { + if (trailingHeaders != null) { for (final String s : trailingHeaders.getHeaderNames()) { for (String header : response.getHeaders(s)) { h.add(s, header); From ffc8457b2756e9a6d207dc6b270e69a771523e1d Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 8 Mar 2013 22:20:14 +0100 Subject: [PATCH 0303/2844] Port fix for #139 to master --- .../java/com/ning/http/client/Request.java | 5 + .../ning/http/client/RequestBuilderBase.java | 119 ++++++---- .../http/util/AsyncHttpProviderUtils.java | 10 +- .../java/com/ning/http/util/ProxyUtils.java | 3 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 40 ++-- .../netty/NettyAsyncHttpProvider.java | 38 ++- .../client/providers/netty/NettyResponse.java | 221 ++++++++++++++++++ 7 files changed, 334 insertions(+), 102 deletions(-) create mode 100644 src/main/java/com/ning/http/client/providers/netty/NettyResponse.java diff --git a/api/src/main/java/com/ning/http/client/Request.java b/api/src/main/java/com/ning/http/client/Request.java index eb31a23fba..8871dd6cc8 100644 --- a/api/src/main/java/com/ning/http/client/Request.java +++ b/api/src/main/java/com/ning/http/client/Request.java @@ -21,6 +21,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; +import java.net.URI; import java.util.Collection; import java.util.List; @@ -66,6 +67,10 @@ public static interface EntityWriter { */ public String getUrl(); + public URI getOriginalURI(); + public URI getURI(); + public URI getRawURI(); + /** * Return the InetAddress to override * diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 5991285109..1c2aeab821 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -18,6 +18,7 @@ import static com.ning.http.util.MiscUtil.isNonEmpty; import com.ning.http.client.Request.EntityWriter; +import com.ning.http.util.AsyncHttpProviderUtils; import com.ning.http.util.UTF8UrlEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,15 +39,19 @@ /** * Builder for {@link Request} - * + * * @param */ public abstract class RequestBuilderBase> { private final static Logger logger = LoggerFactory.getLogger(RequestBuilderBase.class); + private static final URI DEFAULT_REQUEST_URL = URI.create("http://localhost"); + private static final class RequestImpl implements Request { private String method; - private String url = null; + private URI originalUri = null; + private URI uri = null; + private URI rawUri = null; private InetAddress address = null; private InetAddress localAddress = null; private FluentCaseInsensitiveStringsMap headers = new FluentCaseInsensitiveStringsMap(); @@ -78,9 +83,7 @@ public RequestImpl(boolean useRawUrl) { public RequestImpl(Request prototype) { if (prototype != null) { this.method = prototype.getMethod(); - String prototypeUrl = prototype.getUrl(); - int pos = prototypeUrl.indexOf("?"); - this.url = pos > 0 ? prototypeUrl.substring(0, pos) : prototypeUrl; + this.originalUri = prototype.getOriginalURI(); this.address = prototype.getInetAddress(); this.localAddress = prototype.getLocalAddress(); this.headers = new FluentCaseInsensitiveStringsMap(prototype.getHeaders()); @@ -117,12 +120,6 @@ public String getMethod() { return method; } - /* @Override */ - - public String getUrl() { - return toUrl(true); - } - public InetAddress getInetAddress() { return address; } @@ -130,35 +127,67 @@ public InetAddress getInetAddress() { public InetAddress getLocalAddress() { return localAddress; } - - private String toUrl(boolean encode) { - if (url == null) { + private String removeTrailingSlash(URI uri) { + String uriString = uri.toString(); + if (uriString.endsWith("/")) { + return uriString.substring(0, uriString.length() - 1); + } else { + return uriString; + } + } + + /* @Override */ + public String getUrl() { + return removeTrailingSlash(getURI()); + } + + /* @Override */ + public String getRawUrl() { + return removeTrailingSlash(getRawURI()); + } + + public URI getOriginalURI() { + return originalUri; + } + + public URI getURI() { + if (uri == null) + uri = toURI(true); + return uri; + } + + public URI getRawURI() { + if (rawUri == null) + rawUri = toURI(false); + return rawUri; + } + + private URI toURI(boolean encode) { + + if (originalUri == null) { logger.debug("setUrl hasn't been invoked. Using http://localhost"); - url = "http://localhost"; + originalUri = DEFAULT_REQUEST_URL; } - String uri = url; - if (!uri.startsWith("ws")) { - try { - uri = URI.create(url).toURL().toString(); - } catch (Throwable e) { - throw new IllegalArgumentException("Illegal URL: " + url, e); - } + AsyncHttpProviderUtils.validateSupportedScheme(originalUri); + + StringBuilder builder = new StringBuilder(); + builder.append(originalUri.getScheme()).append("://").append(originalUri.getAuthority()); + if (isNonEmpty(originalUri.getRawPath())) { + builder.append(originalUri.getRawPath()); + } else { + builder.append("/"); } if (isNonEmpty(queryParams)) { - StringBuilder builder = new StringBuilder(); - if (!url.substring(8).contains("/")) { // no other "/" than http[s]:// -> http://localhost:1234 - builder.append("/"); - } builder.append("?"); - for (Iterator>> i = queryParams.iterator(); i.hasNext(); ) { + for (Iterator>> i = queryParams.iterator(); i.hasNext();) { Map.Entry> param = i.next(); String name = param.getKey(); - for (Iterator j = param.getValue().iterator(); j.hasNext(); ) { + for (Iterator j = param.getValue().iterator(); j.hasNext();) { String value = j.next(); if (encode) { UTF8UrlEncoder.appendEncoded(builder, name); @@ -181,14 +210,9 @@ private String toUrl(boolean encode) { builder.append('&'); } } - uri += builder.toString(); } - return uri; - } - /* @Override */ - public String getRawUrl() { - return toUrl(false); + return URI.create(builder.toString()); } /* @Override */ @@ -292,12 +316,12 @@ public String getBodyEncoding() { } public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { - return connectionPoolKeyStrategy; + return connectionPoolKeyStrategy; } @Override public String toString() { - StringBuilder sb = new StringBuilder(url); + StringBuilder sb = new StringBuilder(getURI().toString()); sb.append("\t"); sb.append(method); @@ -346,7 +370,7 @@ protected RequestBuilderBase(Class derived, Request prototype) { } public T setUrl(String url) { - request.url = buildUrl(url); + request.originalUri = buildURI(url); return derived.cast(this); } @@ -360,7 +384,7 @@ public T setLocalInetAddress(InetAddress address) { return derived.cast(this); } - private String buildUrl(String url) { + private URI buildURI(String url) { URI uri = URI.create(url); StringBuilder buildedUrl = new StringBuilder(); @@ -380,7 +404,7 @@ private String buildUrl(String url) { if (url.indexOf("://") == -1) { String s = buildedUrl.toString(); url = s + url.substring(uri.getScheme().length() + 1); - return buildUrl(url); + return buildURI(url); } else { throw new IllegalArgumentException("Invalid url " + uri.toString()); } @@ -395,7 +419,7 @@ private String buildUrl(String url) { addQueryParameter(query, null); } else { try { - if (this.useRawUrl) { + if (useRawUrl) { addQueryParameter(query.substring(0, pos), query.substring(pos + 1)); } else { addQueryParameter(URLDecoder.decode(query.substring(0, pos), "UTF-8"), URLDecoder.decode(query.substring(pos + 1), "UTF-8")); @@ -406,10 +430,9 @@ private String buildUrl(String url) { } } } - return buildedUrl.toString(); + return uri; } - public T setVirtualHost(String virtualHost) { request.virtualHost = virtualHost; return derived.cast(this); @@ -612,8 +635,8 @@ public T setBodyEncoding(String charset) { } public T setConnectionPoolKeyStrategy(ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { - request.connectionPoolKeyStrategy = connectionPoolKeyStrategy; - return derived.cast(this); + request.connectionPoolKeyStrategy = connectionPoolKeyStrategy; + return derived.cast(this); } public Request build() { @@ -633,13 +656,7 @@ public Request build() { } private boolean allowBody(String method) { - if (method.equalsIgnoreCase("GET") || method.equalsIgnoreCase("OPTIONS") - && method.equalsIgnoreCase("TRACE") - && method.equalsIgnoreCase("HEAD")) { - return false; - } else { - return true; - } + return !(method.equalsIgnoreCase("GET") || method.equalsIgnoreCase("OPTIONS") || method.equalsIgnoreCase("TRACE") || method.equalsIgnoreCase("HEAD")); } public T addOrReplaceCookie(Cookie cookie) { diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 6d417cf934..bc8dc9d2ef 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -140,14 +140,18 @@ public final static SimpleDateFormat[] get() { static final String VERSION = "Version"; - public final static URI createUri(String u) { - URI uri = URI.create(u); + public static final void validateSupportedScheme(URI uri) { final String scheme = uri.getScheme(); if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https") && !scheme.equalsIgnoreCase("ws") && !scheme.equalsIgnoreCase("wss")) { - throw new IllegalArgumentException("The URI scheme, of the URI " + u + throw new IllegalArgumentException("The URI scheme, of the URI " + uri + ", must be equal (ignoring case) to 'http', 'https', 'ws', or 'wss'"); } + } + + public final static URI createUri(String u) { + URI uri = URI.create(u); + validateSupportedScheme(uri); String path = uri.getPath(); if (path == null) { diff --git a/api/src/main/java/com/ning/http/util/ProxyUtils.java b/api/src/main/java/com/ning/http/util/ProxyUtils.java index 90bd086560..a135122149 100644 --- a/api/src/main/java/com/ning/http/util/ProxyUtils.java +++ b/api/src/main/java/com/ning/http/util/ProxyUtils.java @@ -18,7 +18,6 @@ import com.ning.http.client.ProxyServer.Protocol; import com.ning.http.client.Request; -import java.net.URI; import java.util.List; import java.util.Properties; @@ -72,7 +71,7 @@ public class ProxyUtils { * @return true if we have to avoid proxy use (obeying non-proxy hosts settings), false otherwise. */ public static boolean avoidProxy(final ProxyServer proxyServer, final Request request) { - return avoidProxy(proxyServer, AsyncHttpProviderUtils.getHost(URI.create(request.getUrl()))); + return avoidProxy(proxyServer, AsyncHttpProviderUtils.getHost(request.getOriginalURI())); } /** diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 54dd650d3a..2c1f8abf46 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -846,7 +846,7 @@ private boolean sendAsGrizzlyRequest(final Request request, httpCtx.isWSRequest = true; convertToUpgradeRequest(httpCtx); } - final URI uri = AsyncHttpProviderUtils.createUri(httpCtx.requestUrl); + final URI uri = httpCtx.request.getURI(); final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); final String scheme = uri.getScheme(); boolean secure = "https".equals(scheme) || "wss".equals(scheme); @@ -1220,9 +1220,9 @@ protected void onInitialLineParsed(HttpHeader httpHeader, } } final GrizzlyResponseStatus responseStatus = - new GrizzlyResponseStatus((HttpResponsePacket) httpHeader, - getURI(context.requestUrl), - provider); + new GrizzlyResponseStatus((HttpResponsePacket) httpHeader, + context.request.getURI(), + provider); context.responseStatus = responseStatus; if (context.statusHandler != null) { return; @@ -1477,14 +1477,6 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx, } - - private static URI getURI(String url) { - - return AsyncHttpProviderUtils.createUri(url); - - } - - private static boolean redirectCountExceeded(final HttpTransactionContext context) { return (context.redirectCount.get() > context.maxRedirectCount); @@ -1541,7 +1533,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, final Request req = httpTransactionContext.request; realm = new Realm.RealmBuilder().clone(realm) .setScheme(realm.getAuthScheme()) - .setUri(URI.create(httpTransactionContext.requestUrl).getPath()) + .setUri(httpTransactionContext.request.getURI().getPath()) .setMethodName(req.getMethod()) .setUsePreemptiveAuth(true) .parseWWWAuthenticateHeader(auth) @@ -1704,9 +1696,9 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, URI orig; if (httpTransactionContext.lastRedirectURI == null) { - orig = AsyncHttpProviderUtils.createUri(httpTransactionContext.requestUrl); + orig = httpTransactionContext.request.getURI(); } else { - orig = AsyncHttpProviderUtils.getRedirectUri(AsyncHttpProviderUtils.createUri(httpTransactionContext.requestUrl), + orig = AsyncHttpProviderUtils.getRedirectUri(httpTransactionContext.request.getURI(), httpTransactionContext.lastRedirectURI); } httpTransactionContext.lastRedirectURI = redirectURL; @@ -2427,13 +2419,12 @@ void doAsyncTrackedConnection(final Request request, final GrizzlyResponseFuture requestFuture, final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { - final String url = request.getUrl(); Connection c = pool.poll(getPoolKey(request)); if (c == null) { if (!connectionMonitor.acquire()) { throw new IOException("Max connections exceeded"); } - doAsyncConnect(url, request, requestFuture, connectHandler); + doAsyncConnect(request, requestFuture, connectHandler); } else { provider.touchConnection(c, request); connectHandler.completed(c); @@ -2445,25 +2436,23 @@ Connection obtainConnection(final Request request, final GrizzlyResponseFuture requestFuture) throws IOException, ExecutionException, InterruptedException, TimeoutException { - final Connection c = (obtainConnection0(request.getUrl(), - request, + final Connection c = (obtainConnection0(request, requestFuture)); DO_NOT_CACHE.set(c, Boolean.TRUE); return c; } - void doAsyncConnect(final String url, - final Request request, + void doAsyncConnect(final Request request, final GrizzlyResponseFuture requestFuture, final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { - final URI uri = AsyncHttpProviderUtils.createUri(url); ProxyServer proxy = getProxyServer(request); if (ProxyUtils.avoidProxy(proxy, request)) { proxy = null; } + final URI uri = request.getURI(); String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); if(request.getLocalAddress()!=null) { @@ -2476,12 +2465,11 @@ void doAsyncConnect(final String url, } - private Connection obtainConnection0(final String url, - final Request request, + private Connection obtainConnection0(final Request request, final GrizzlyResponseFuture requestFuture) throws IOException, ExecutionException, InterruptedException, TimeoutException { - final URI uri = AsyncHttpProviderUtils.createUri(url); + final URI uri = request.getURI(); ProxyServer proxy = getProxyServer(request); if (ProxyUtils.avoidProxy(proxy, request)) { proxy = null; @@ -2578,7 +2566,7 @@ public void updated(Connection result) { private static String getPoolKey(final Request request) { final ConnectionPoolKeyStrategy keyStrategy = request.getConnectionPoolKeyStrategy(); - return keyStrategy.getKey(AsyncHttpProviderUtils.createUri(AsyncHttpProviderUtils.getBaseUrl(request.getUrl()))); + return keyStrategy.getKey(request.getURI()); } // ------------------------------------------------------ Nested Classes diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 9a3e3f9652..b0cd8b3a7d 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -594,16 +594,14 @@ private static HttpRequest construct(AsyncHttpClientConfig config, if (m.equals(HttpMethod.CONNECT)) { nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { - StringBuilder path = null; + String path = null; if (isProxyServer(config, request)) - path = new StringBuilder(uri.toString()); - else { - path = new StringBuilder(uri.getRawPath()); - if (uri.getQuery() != null) { - path.append("?").append(uri.getRawQuery()); - } - } - nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path.toString()); + path = uri.toString(); + else if (uri.getRawQuery() != null) + path = uri.getRawPath() + "?" + uri.getRawQuery(); + else + path = uri.getRawPath(); + nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path); } if (webSocket) { @@ -915,13 +913,12 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); - String requestUrl; + URI uri; if (useRawUrl) { - requestUrl = request.getRawUrl(); + uri = request.getRawURI(); } else { - requestUrl = request.getUrl(); + uri = request.getURI(); } - URI uri = AsyncHttpProviderUtils.createUri(requestUrl); Channel channel = null; if (useCache) { @@ -1172,7 +1169,7 @@ private Realm kerberosChallenge(List proxyAuth, Realm realm, NettyResponseFuture future) throws NTLMEngineException { - URI uri = URI.create(request.getUrl()); + URI uri = request.getURI(); String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); String server = proxyServer == null ? host : proxyServer.getHost(); try { @@ -1186,7 +1183,7 @@ private Realm kerberosChallenge(List proxyAuth, } else { realmBuilder = new Realm.RealmBuilder(); } - return realmBuilder.setUri(uri.getPath()) + return realmBuilder.setUri(uri.getRawPath()) .setMethodName(request.getMethod()) .setScheme(Realm.AuthScheme.KERBEROS) .build(); @@ -1217,9 +1214,10 @@ private Realm ntlmChallenge(List wwwAuth, if (realm != null && !realm.isNtlmMessageType2Received()) { String challengeHeader = ntlmEngine.generateType1Msg(ntlmDomain, ntlmHost); + URI uri = request.getURI(); headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) - .setUri(URI.create(request.getUrl()).getPath()) + .setUri(uri.getRawPath()) .setMethodName(request.getMethod()) .setNtlmMessageType2Received(true) .build(); @@ -1245,7 +1243,7 @@ private Realm ntlmChallenge(List wwwAuth, authScheme = Realm.AuthScheme.NTLM; } newRealm = realmBuilder.setScheme(authScheme) - .setUri(URI.create(request.getUrl()).getPath()) + .setUri(request.getURI().getPath()) .setMethodName(request.getMethod()) .build(); } @@ -1279,7 +1277,7 @@ private Realm ntlmProxyChallenge(List wwwAuth, realmBuilder = new Realm.RealmBuilder(); } newRealm = realmBuilder//.setScheme(realm.getAuthScheme()) - .setUri(URI.create(request.getUrl()).getPath()) + .setUri(request.getURI().getPath()) .setMethodName(request.getMethod()) .build(); @@ -2176,7 +2174,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws realmBuilder = new Realm.RealmBuilder(); } newRealm = realmBuilder - .setUri(URI.create(request.getUrl()).getPath()) + .setUri(request.getURI().getPath()) .setMethodName(request.getMethod()) .setUsePreemptiveAuth(true) .parseWWWAuthenticateHeader(wwwAuth.get(0)) @@ -2249,7 +2247,7 @@ public Object call() throws Exception { try { log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - upgradeProtocol(ctx.getChannel().getPipeline(), URI.create(request.getUrl()).getScheme()); + upgradeProtocol(ctx.getChannel().getPipeline(), request.getURI().getScheme()); } catch (Throwable ex) { abort(future, ex); } diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java new file mode 100644 index 0000000000..65870b0ca0 --- /dev/null +++ b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -0,0 +1,221 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty; + +import static com.ning.http.util.MiscUtil.isNonEmpty; + +import com.ning.http.client.Cookie; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.Response; +import com.ning.http.util.AsyncHttpProviderUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URI; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBufferInputStream; +import org.jboss.netty.buffer.ChannelBuffers; + +/** + * Wrapper around the {@link com.ning.http.client.Response} API. + */ +public class NettyResponse implements Response { + private final static Charset DEFAULT_CHARSET = Charset.forName("ISO-8859-1"); + + private final List bodyParts; + private final HttpResponseHeaders headers; + private final HttpResponseStatus status; + private List cookies; + + public NettyResponse(HttpResponseStatus status, + HttpResponseHeaders headers, + List bodyParts) { + + this.status = status; + this.headers = headers; + this.bodyParts = bodyParts; + } + + /* @Override */ + + public int getStatusCode() { + return status.getStatusCode(); + } + + /* @Override */ + + public String getStatusText() { + return status.getStatusText(); + } + + /* @Override */ + public byte[] getResponseBodyAsBytes() throws IOException { + return getResponseBodyAsByteBuffer().array(); + } + + public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { + return getResponseBodyAsChannelBuffer().toByteBuffer(); + } + + /* @Override */ + public String getResponseBody() throws IOException { + return getResponseBody(null); + } + + public String getResponseBody(String charset) throws IOException { + return getResponseBodyAsChannelBuffer().toString(computeCharset(charset)); + } + + /* @Override */ + public InputStream getResponseBodyAsStream() throws IOException { + return new ChannelBufferInputStream(getResponseBodyAsChannelBuffer()); + } + + public ChannelBuffer getResponseBodyAsChannelBuffer() throws IOException { + ChannelBuffer b = null; + switch (bodyParts.size()) { + case 0: + b = ChannelBuffers.EMPTY_BUFFER; + break; + case 1: + b = ResponseBodyPart.class.cast(bodyParts.get(0)).getChannelBuffer(); + break; + default: + ChannelBuffer[] channelBuffers = new ChannelBuffer[bodyParts.size()]; + for (int i = 0; i < bodyParts.size(); i++) { + channelBuffers[i] = ResponseBodyPart.class.cast(bodyParts.get(i)).getChannelBuffer(); + } + b = ChannelBuffers.wrappedBuffer(channelBuffers); + } + + return b; + } + + /* @Override */ + + public String getResponseBodyExcerpt(int maxLength) throws IOException { + return getResponseBodyExcerpt(maxLength, null); + } + + public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { + String response = getResponseBody(charset); + return response.length() <= maxLength ? response : response.substring(0, maxLength); + } + + private Charset computeCharset(String charset) { + if (charset == null) { + String contentType = getContentType(); + if (contentType != null) + charset = AsyncHttpProviderUtils.parseCharset(contentType); // parseCharset can return null + } + return charset != null ? Charset.forName(charset) : DEFAULT_CHARSET; + } + + /* @Override */ + + public URI getUri() throws MalformedURLException { + return status.getUrl(); + } + + /* @Override */ + + public String getContentType() { + return getHeader("Content-Type"); + } + + /* @Override */ + + public String getHeader(String name) { + return headers != null ? headers.getHeaders().getFirstValue(name) : null; + } + + /* @Override */ + + public List getHeaders(String name) { + return headers != null ? headers.getHeaders().get(name) : Collections. emptyList(); + } + + /* @Override */ + + public FluentCaseInsensitiveStringsMap getHeaders() { + return headers != null ? headers.getHeaders() : new FluentCaseInsensitiveStringsMap(); + } + + /* @Override */ + + public boolean isRedirected() { + return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); + } + + /* @Override */ + + public List getCookies() { + if (headers == null) { + return Collections.emptyList(); + } + if (cookies == null) { + List localCookies = new ArrayList(); + for (Map.Entry> header : headers.getHeaders().entrySet()) { + if (header.getKey().equalsIgnoreCase("Set-Cookie")) { + // TODO: ask for parsed header + List v = header.getValue(); + for (String value : v) { + Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); + localCookies.add(cookie); + } + } + } + cookies = Collections.unmodifiableList(localCookies); + } + return cookies; + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean hasResponseStatus() { + return status != null; + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean hasResponseHeaders() { + return headers != null; + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean hasResponseBody() { + return isNonEmpty(bodyParts); + } + +} From 87d26666d3f82c890bdc6d025f7ebfc2bc88c113 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Sun, 10 Mar 2013 03:17:31 +0100 Subject: [PATCH 0304/2844] Port fix for #239 to master --- .../client/async/AsyncProvidersBasicTest.java | 2282 +++++++++-------- .../client/async/AsyncStreamHandlerTest.java | 749 +++--- .../async/AsyncStreamLifecycleTest.java | 99 +- .../http/client/async/AuthTimeoutTest.java | 138 +- .../ning/http/client/async/BasicAuthTest.java | 344 +-- .../http/client/async/BasicHttpsTest.java | 156 +- .../ning/http/client/async/BodyChunkTest.java | 26 +- .../async/BodyDeferringAsyncHandlerTest.java | 205 +- .../client/async/ByteBufferCapacityTest.java | 68 +- .../http/client/async/ComplexClientTest.java | 47 +- .../http/client/async/ConnectionPoolTest.java | 339 ++- .../http/client/async/DigestAuthTest.java | 79 +- .../ning/http/client/async/EmptyBodyTest.java | 119 +- .../http/client/async/ErrorResponseTest.java | 27 +- .../client/async/Expect100ContinueTest.java | 30 +- .../client/async/FilePartLargeFileTest.java | 58 +- .../ning/http/client/async/FilterTest.java | 96 +- .../client/async/FollowingThreadTest.java | 98 +- .../ning/http/client/async/Head302Test.java | 36 +- .../client/async/HostnameVerifierTest.java | 144 +- .../client/async/HttpToHttpsRedirectTest.java | 74 +- .../http/client/async/InputStreamTest.java | 64 +- .../client/async/ListenableFutureTest.java | 37 +- .../client/async/MaxConnectionsInThreads.java | 147 +- .../client/async/MaxTotalConnectionTest.java | 196 +- .../client/async/MultipartUploadTest.java | 45 +- .../http/client/async/MultipleHeaderTest.java | 187 +- .../http/client/async/NoNullResponseTest.java | 41 +- .../async/NonAsciiContentLengthTest.java | 105 +- .../http/client/async/ParamEncodingTest.java | 25 +- .../async/PerRequestRelative302Test.java | 87 +- .../client/async/PerRequestTimeoutTest.java | 105 +- .../client/async/PostRedirectGetTest.java | 139 +- .../http/client/async/PostWithQSTest.java | 80 +- .../ning/http/client/async/ProviderUtil.java | 41 - .../com/ning/http/client/async/ProxyTest.java | 183 +- .../client/async/ProxyTunnellingTest.java | 106 +- .../http/client/async/PutLargeFileTest.java | 59 +- .../client/async/QueryParametersTest.java | 80 +- .../com/ning/http/client/async/RC10KTest.java | 30 +- .../http/client/async/Relative302Test.java | 94 +- .../http/client/async/RemoteSiteTest.java | 314 +-- .../http/client/async/RetryRequestTest.java | 13 +- .../SimpleAsyncClientErrorBehaviourTest.java | 73 +- .../async/SimpleAsyncHttpClientTest.java | 250 +- .../client/async/TransferListenerTest.java | 330 ++- .../http/client/async/WebDavBasicTest.java | 135 +- .../http/client/async/ZeroCopyFileTest.java | 238 +- .../ByteArrayBodyGeneratorTest.java | 1 - .../client/websocket/ByteMessageTest.java | 291 ++- .../websocket/CloseCodeReasonMessageTest.java | 54 +- .../http/client/websocket/RedirectTest.java | 76 +- .../client/websocket/TextMessageTest.java | 530 ++-- .../GrizzlyAsyncProviderBasicTest.java | 5 +- .../GrizzlyAsyncStreamHandlerTest.java | 5 +- .../GrizzlyAsyncStreamLifecycleTest.java | 5 +- .../grizzly/GrizzlyAuthTimeoutTest.java | 5 +- .../grizzly/GrizzlyBasicAuthTest.java | 5 +- .../grizzly/GrizzlyBasicHttpsTest.java | 5 +- .../grizzly/GrizzlyBodyChunkTest.java | 5 +- .../GrizzlyBodyDeferringAsyncHandlerTest.java | 5 +- .../GrizzlyByteBufferCapacityTest.java | 5 +- .../grizzly/GrizzlyChunkingTest.java | 5 +- .../grizzly/GrizzlyComplexClientTest.java | 5 +- .../grizzly/GrizzlyConnectionPoolTest.java | 169 +- .../grizzly/GrizzlyDigestAuthTest.java | 5 +- .../grizzly/GrizzlyEmptyBodyTest.java | 5 +- .../grizzly/GrizzlyErrorResponseTest.java | 5 +- .../grizzly/GrizzlyExpectContinue100Test.java | 5 +- .../providers/grizzly/GrizzlyFilterTest.java | 5 +- .../grizzly/GrizzlyFollowingThreadTest.java | 5 +- .../providers/grizzly/GrizzlyHead302Test.java | 5 +- .../GrizzlyHttpToHttpsRedirectTest.java | 5 +- .../grizzly/GrizzlyIdleStateHandlerTest.java | 5 +- .../grizzly/GrizzlyInputStreamTest.java | 5 +- .../grizzly/GrizzlyListenableFutureTest.java | 5 +- .../GrizzlyMaxConnectionsInThreadsTest.java | 5 +- .../GrizzlyMaxTotalConnectionTest.java | 5 +- .../grizzly/GrizzlyMultipleHeaderTest.java | 5 +- .../grizzly/GrizzlyNoNullResponseTest.java | 5 +- .../GrizzlyNonAsciiContentLengthTest.java | 5 +- .../grizzly/GrizzlyParamEncodingTest.java | 5 +- .../GrizzlyPerRequestRelative302Test.java | 5 +- .../grizzly/GrizzlyPerRequestTimeoutTest.java | 5 +- .../grizzly/GrizzlyPostRedirectGetTest.java | 5 +- .../grizzly/GrizzlyPostWithQSTest.java | 5 +- .../grizzly/GrizzlyProviderUtil.java | 29 + .../providers/grizzly/GrizzlyProxyTest.java | 5 +- .../grizzly/GrizzlyProxyTunnelingTest.java | 11 +- .../grizzly/GrizzlyPutLargeFileTest.java | 5 +- .../grizzly/GrizzlyQueryParametersTest.java | 5 +- .../providers/grizzly/GrizzlyRC10KTest.java | 5 +- .../GrizzlyRedirectConnectionUsageTest.java | 5 +- .../grizzly/GrizzlyRelative302Test.java | 5 +- .../grizzly/GrizzlyRemoteSiteTest.java | 5 +- .../grizzly/GrizzlyRetryRequestTest.java | 5 +- .../GrizzlySimpleAsyncHttpClientTest.java | 5 +- .../grizzly/GrizzlyTransferListenerTest.java | 5 +- .../GrizzlyUnexpectingTimeoutTest.java | 73 +- .../websocket/GrizzlyByteMessageTest.java | 6 +- .../GrizzlyCloseCodeReasonMsgTest.java | 6 +- .../websocket/GrizzlyRedirectTest.java | 6 +- .../websocket/GrizzlyTextMessageTest.java | 6 +- .../netty/NettyAsyncHttpProviderTest.java | 24 +- .../netty/NettyAsyncProviderBasicTest.java | 9 +- .../netty/NettyAsyncProviderPipelineTest.java | 41 +- .../netty/NettyAsyncStreamHandlerTest.java | 3 +- .../netty/NettyAsyncStreamLifecycleTest.java | 3 +- .../providers/netty/NettyAuthTimeoutTest.java | 3 +- .../providers/netty/NettyBasicAuthTest.java | 14 +- .../providers/netty/NettyBasicHttpsTest.java | 3 +- .../providers/netty/NettyBodyChunkTest.java | 3 +- .../NettyBodyDeferringAsyncHandlerTest.java | 6 +- .../netty/NettyByteBufferCapacityTest.java | 3 +- .../providers/netty/NettyChunkingTest.java | 3 +- .../netty/NettyComplexClientTest.java | 3 +- .../netty/NettyConnectionPoolTest.java | 68 +- .../providers/netty/NettyDigestAuthTest.java | 3 +- .../providers/netty/NettyEmptyBodyTest.java | 3 +- .../netty/NettyErrorResponseTest.java | 3 +- .../netty/NettyExpect100ContinueTest.java | 3 +- .../netty/NettyFilePartLargeFileTest.java | 3 +- .../providers/netty/NettyFilterTest.java | 3 +- .../netty/NettyFollowingThreadTest.java | 4 +- .../providers/netty/NettyHead302Test.java | 3 +- .../netty/NettyHostnameVerifierTest.java | 3 +- .../netty/NettyHttpToHttpsRedirectTest.java | 3 +- .../netty/NettyIdleStateHandlerTest.java | 3 +- .../providers/netty/NettyInputStreamTest.java | 3 +- .../netty/NettyListenableFutureTest.java | 3 +- .../netty/NettyMaxConnectionsInThreads.java | 3 +- .../netty/NettyMaxTotalConnectionTest.java | 3 +- .../netty/NettyMultipartUploadTest.java | 4 +- .../netty/NettyMultipleHeaderTest.java | 3 +- .../netty/NettyNoNullResponseTest.java | 3 +- .../netty/NettyNonAsciiContentLengthTest.java | 7 +- .../netty/NettyParamEncodingTest.java | 3 +- .../netty/NettyPerRequestRelative302Test.java | 3 +- .../netty/NettyPerRequestTimeoutTest.java | 3 +- .../netty/NettyPostRedirectGetTest.java | 3 +- .../providers/netty/NettyPostWithQSTest.java | 3 +- .../providers/netty/NettyProviderUtil.java | 36 + .../providers/netty/NettyProxyTest.java | 6 +- .../netty/NettyProxyTunnellingTest.java | 3 +- .../netty/NettyPutLargeFileTest.java | 3 +- .../netty/NettyQueryParametersTest.java | 3 +- .../providers/netty/NettyRC10KTest.java | 3 +- .../NettyRedirectConnectionUsageTest.java | 6 +- .../providers/netty/NettyRelative302Test.java | 3 +- .../providers/netty/NettyRemoteSiteTest.java | 4 +- .../NettyRequestThrottleTimeoutTest.java | 132 +- .../netty/NettyRetryRequestTest.java | 3 +- .../netty/NettyTransferListenerTest.java | 3 +- .../providers/netty/NettyWebDavBasicTest.java | 3 +- .../netty/NettyZeroCopyFileTest.java | 3 +- .../netty/websocket/NettyByteMessageTest.java | 4 +- .../NettyCloseCodeReasonMsgTest.java | 4 +- .../netty/websocket/NettyRedirectTest.java | 4 +- .../netty/websocket/NettyTextMessageTest.java | 4 +- 159 files changed, 5088 insertions(+), 5289 deletions(-) delete mode 100644 api/src/test/java/com/ning/http/client/async/ProviderUtil.java create mode 100644 providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java create mode 100644 providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java diff --git a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index 7724e9c48c..8d3f435cfc 100755 --- a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -60,324 +60,337 @@ import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; - public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { private static final String UTF_8 = "text/html;charset=UTF-8"; - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncProviderEncodingTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - Request request = new RequestBuilder("GET").setUrl("http://foo.com/foo.html?q=+%20x").build(); - String requestUrl = request.getUrl(); - Assert.assertEquals(requestUrl, "http://foo.com/foo.html?q=%20%20x"); - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { - @Override - public String onCompleted(Response response) throws Exception { - return response.getUri().toString(); - } + AsyncHttpClient p = getAsyncHttpClient(null); + try { + Request request = new RequestBuilder("GET").setUrl("http://foo.com/foo.html?q=+%20x").build(); + String requestUrl = request.getUrl(); + Assert.assertEquals(requestUrl, "http://foo.com/foo.html?q=%20%20x"); + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + @Override + public String onCompleted(Response response) throws Exception { + return response.getUri().toString(); + } - /* @Override */ - public void onThrowable(Throwable t) { - t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); - } + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } - }); - String url = responseFuture.get(); - Assert.assertEquals(url, "http://foo.com/foo.html?q=%20%20x"); - p.close(); + }); + String url = responseFuture.get(); + Assert.assertEquals(url, "http://foo.com/foo.html?q=%20%20x"); + } finally { + p.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncProviderEncodingTest2() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - Request request = new RequestBuilder("GET").setUrl("http://foo.com/foo.html") - .addQueryParameter("q", "a b") - .build(); - - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { - @Override - public String onCompleted(Response response) throws Exception { - return response.getUri().toString(); - } + AsyncHttpClient p = getAsyncHttpClient(null); + try { + Request request = new RequestBuilder("GET").setUrl("http://foo.com/foo.html").addQueryParameter("q", "a b").build(); - /* @Override */ - public void onThrowable(Throwable t) { - t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); - } + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + @Override + public String onCompleted(Response response) throws Exception { + return response.getUri().toString(); + } + + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } - }); - String url = responseFuture.get(); - Assert.assertEquals(url, "http://foo.com/foo.html?q=a%20b"); - p.close(); + }); + String url = responseFuture.get(); + Assert.assertEquals(url, "http://foo.com/foo.html?q=a%20b"); + } finally { + p.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void emptyRequestURI() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - Request request = new RequestBuilder("GET").setUrl("http://foo.com") - .build(); - - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { - @Override - public String onCompleted(Response response) throws Exception { - return response.getUri().toString(); - } + AsyncHttpClient p = getAsyncHttpClient(null); + try { + Request request = new RequestBuilder("GET").setUrl("http://foo.com").build(); - /* @Override */ - public void onThrowable(Throwable t) { - t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); - } + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + @Override + public String onCompleted(Response response) throws Exception { + return response.getUri().toString(); + } + + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } - }); - String url = responseFuture.get(); - Assert.assertEquals(url, "http://foo.com/"); - p.close(); + }); + String url = responseFuture.get(); + Assert.assertEquals(url, "http://foo.com/"); + } finally { + p.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncProviderContentLenghtGETTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch l = new CountDownLatch(1); - URL url = new URL(getTargetUrl()); - final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); - connection.connect(); + AsyncHttpClient p = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); + URL url = new URL(getTargetUrl()); + final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.connect(); - Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); + p.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - int contentLenght = -1; - if (response.getHeader("content-length") != null) { - contentLenght = Integer.valueOf(response.getHeader("content-length")); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + int contentLenght = -1; + if (response.getHeader("content-length") != null) { + contentLenght = Integer.valueOf(response.getHeader("content-length")); + } + int ct = connection.getContentLength(); + assertEquals(contentLenght, ct); + } finally { + l.countDown(); } - int ct = connection.getContentLength(); - assertEquals(contentLenght, ct); - } finally { - l.countDown(); + return response; } - return response; - } - @Override - public void onThrowable(Throwable t) { - try { - Assert.fail("Unexpected exception", t); - } finally { - l.countDown(); + @Override + public void onThrowable(Throwable t) { + try { + Assert.fail("Unexpected exception", t); + } finally { + l.countDown(); + } } - } - - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + p.close(); } - - p.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncContentTypeGETTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + AsyncHttpClient p = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); + p.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getContentType(), UTF_8); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getContentType(), UTF_8); + } finally { + l.countDown(); + } + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + p.close(); } - p.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncHeaderGETTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + AsyncHttpClient n = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); + n.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getContentType(), UTF_8); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getContentType(), UTF_8); + } finally { + l.countDown(); + } + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + n.close(); } - n.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncHeaderPOSTTest() throws Throwable { - final CountDownLatch l = new CountDownLatch(1); - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Test1", "Test1"); - h.add("Test2", "Test2"); - h.add("Test3", "Test3"); - h.add("Test4", "Test4"); - h.add("Test5", "Test5"); - Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).setHeaders(h).build(); + AsyncHttpClient n = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Test1", "Test1"); + h.add("Test2", "Test2"); + h.add("Test3", "Test3"); + h.add("Test4", "Test4"); + h.add("Test5", "Test5"); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).setHeaders(h).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + n.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - System.out.println(">>>>> " + response.getStatusText()); - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - assertEquals(response.getHeader("X-Test" + i), "Test" + i); + @Override + public Response onCompleted(Response response) throws Exception { + try { + System.out.println(">>>>> " + response.getStatusText()); + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + assertEquals(response.getHeader("X-Test" + i), "Test" + i); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + n.close(); } - n.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncParamPOSTTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); + AsyncHttpClient n = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); - Map> m = new HashMap>(); - for (int i = 0; i < 5; i++) { - m.put("param_" + i, Arrays.asList("value_" + i)); - } - Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + Map> m = new HashMap>(); + for (int i = 0; i < 5; i++) { + m.put("param_" + i, Arrays.asList("value_" + i)); + } + Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).build(); + n.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + System.out.println(">>>>> " + response.getHeader("X-param_" + i)); + assertEquals(response.getHeader("X-param_" + i), "value_" + i); + } + + } finally { + l.countDown(); } - - } finally { - l.countDown(); + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + n.close(); } - n.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncStatusHEADTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("HEAD").setUrl(getTargetUrl()).build(); - Response response = n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + AsyncHttpClient n = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("HEAD").setUrl(getTargetUrl()).build(); + Response response = n.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + } finally { + l.countDown(); + } + return response; } - return response; - } - }).get(); + }).get(); - try { - String s = response.getResponseBody(); - Assert.assertEquals("",s); - } catch (IllegalStateException ex) { - fail(); - } + try { + String s = response.getResponseBody(); + Assert.assertEquals("", s); + } catch (IllegalStateException ex) { + fail(); + } - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + n.close(); } - n.close(); - } // TODO: fix test - @Test(groups = {"standalone", "default_provider", "async"}, enabled = false) + @Test(groups = { "standalone", "default_provider", "async" }, enabled = false) public void asyncStatusHEADContentLenghtTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder() - .setRequestTimeoutInMs(120 * 1000).build()); + AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(120 * 1000).build()); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("HEAD").setUrl(getTargetUrl()).build(); - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("HEAD") - .setUrl(getTargetUrl()) - .build(); + n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + Assert.fail(); + return response; + } - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - Assert.fail(); - return response; - } + @Override + public void onThrowable(Throwable t) { + try { + assertEquals(t.getClass(), IOException.class); + assertEquals(t.getMessage(), "No response received. Connection timed out"); + } finally { + l.countDown(); + } - @Override - public void onThrowable(Throwable t) { - try { - assertEquals(t.getClass(), IOException.class); - assertEquals(t.getMessage(), "No response received. Connection timed out"); - } finally { - l.countDown(); } + }).get(); + if (!l.await(10 * 5 * 1000, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - - if (!l.await(10 * 5 * 1000, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + n.close(); } - n.close(); - } - @Test(groups = {"online", "default_provider", "async"}) + @Test(groups = { "online", "default_provider", "async" }) public void asyncNullSchemeTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); @@ -386,633 +399,686 @@ public void asyncNullSchemeTest() throws Throwable { Assert.fail(); } catch (IllegalArgumentException ex) { Assert.assertTrue(true); + } finally { + c.close(); } - c.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetTransferEncodingTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch l = new CountDownLatch(1); + AsyncHttpClient c = getAsyncHttpClient(null); + try { + final CountDownLatch l = new CountDownLatch(1); - c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("Transfer-Encoding"), "chunked"); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("Transfer-Encoding"), "chunked"); + } finally { + l.countDown(); + } + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetHeadersTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Test1", "Test1"); - h.add("Test2", "Test2"); - h.add("Test3", "Test3"); - h.add("Test4", "Test4"); - h.add("Test5", "Test5"); - c.prepareGet(getTargetUrl()).setHeaders(h).execute(new AsyncCompletionHandlerAdapter() { - - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - assertEquals(response.getHeader("X-Test" + i), "Test" + i); + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Test1", "Test1"); + h.add("Test2", "Test2"); + h.add("Test3", "Test3"); + h.add("Test4", "Test4"); + h.add("Test5", "Test5"); + c.prepareGet(getTargetUrl()).setHeaders(h).execute(new AsyncCompletionHandlerAdapter() { + + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + assertEquals(response.getHeader("X-Test" + i), "Test" + i); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + c.close(); } - c.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetCookieTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Test1", "Test1"); - h.add("Test2", "Test2"); - h.add("Test3", "Test3"); - h.add("Test4", "Test4"); - h.add("Test5", "Test5"); - - final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false); - c.prepareGet(getTargetUrl()).setHeaders(h).addCookie(coo).execute(new AsyncCompletionHandlerAdapter() { - - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - List cookies = response.getCookies(); - assertEquals(cookies.size(), 1); - assertEquals(cookies.get(0).toString(), coo.toString()); - } finally { - l.countDown(); + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Test1", "Test1"); + h.add("Test2", "Test2"); + h.add("Test3", "Test3"); + h.add("Test4", "Test4"); + h.add("Test5", "Test5"); + + final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false); + c.prepareGet(getTargetUrl()).setHeaders(h).addCookie(coo).execute(new AsyncCompletionHandlerAdapter() { + + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + List cookies = response.getCookies(); + assertEquals(cookies.size(), 1); + assertEquals(cookies.get(0).toString(), coo.toString()); + } finally { + l.countDown(); + } + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostDefaultContentType() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - c.preparePost(getTargetUrl()).addParameter("foo", "bar").execute(new AsyncCompletionHandlerAdapter() { + try { + final CountDownLatch l = new CountDownLatch(1); + c.preparePost(getTargetUrl()).addParameter("foo", "bar").execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - FluentCaseInsensitiveStringsMap h = response.getHeaders(); - assertEquals(h.getJoinedValue("X-Content-Type", ", "), "application/x-www-form-urlencoded"); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + FluentCaseInsensitiveStringsMap h = response.getHeaders(); + assertEquals(h.getJoinedValue("X-Content-Type", ", "), "application/x-www-form-urlencoded"); + } finally { + l.countDown(); + } + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostBodyIsoTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - Response r = c.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); - assertEquals(r.getResponseBody().getBytes("ISO-8859-1"),"\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); - c.close(); + try { + Response r = c.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); + assertEquals(r.getResponseBody().getBytes("ISO-8859-1"), "\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); + } finally { + c.close(); + } } - - @Test(groups = {"standalone", "default_provider", "async"}) - public void asyncDoPostBytesTest() throws Throwable { + @Test(groups = { "standalone", "default_provider", "async" }) + public void asyncDoPostBytesTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); + c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + System.out.println(">>>>> " + response.getHeader("X-param_" + i)); + assertEquals(response.getHeader("X-param_" + i), "value_" + i); + + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; - } - }).get(); + }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostInputStreamTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); - - c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); + ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); + c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + System.out.println(">>>>> " + response.getHeader("X-param_" + i)); + assertEquals(response.getHeader("X-param_" + i), "value_" + i); + + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPutInputStreamTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); - - c.preparePut(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); + ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); + c.preparePut(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + System.out.println(">>>>> " + response.getHeader("X-param_" + i)); + assertEquals(response.getHeader("X-param_" + i), "value_" + i); + + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostEntityWriterTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - - final StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - byte[] bytes = sb.toString().getBytes(); - h.add("Content-Length", String.valueOf(bytes.length)); + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + + final StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); + byte[] bytes = sb.toString().getBytes(); + h.add("Content-Length", String.valueOf(bytes.length)); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(new Request.EntityWriter() { + c.preparePost(getTargetUrl()).setHeaders(h).setBody(new Request.EntityWriter() { - /* @Override */ - public void writeEntity(OutputStream out) throws IOException { - out.write(sb.toString().getBytes("UTF-8")); - } - }).execute(new AsyncCompletionHandlerAdapter() { + /* @Override */ + public void writeEntity(OutputStream out) throws IOException { + out.write(sb.toString().getBytes("UTF-8")); + } + }).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + System.out.println(">>>>> " + response.getHeader("X-param_" + i)); + assertEquals(response.getHeader("X-param_" + i), "value_" + i); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostMultiPartTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); + try { + final CountDownLatch l = new CountDownLatch(1); - Part p = new StringPart("foo", "bar"); + Part p = new StringPart("foo", "bar"); - c.preparePost(getTargetUrl()).addBodyPart(p).execute(new AsyncCompletionHandlerAdapter() { + c.preparePost(getTargetUrl()).addBodyPart(p).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - String xContentType = response.getHeader("X-Content-Type"); - String boundary = xContentType.substring( - (xContentType.indexOf("boundary") + "boundary".length() + 1)); - - String s = response.getResponseBodyExcerpt(boundary.length() + "--".length()).substring("--".length()); - assertEquals(boundary, s); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + String xContentType = response.getHeader("X-Content-Type"); + String boundary = xContentType.substring((xContentType.indexOf("boundary") + "boundary".length() + 1)); + + String s = response.getResponseBodyExcerpt(boundary.length() + "--".length()).substring("--".length()); + assertEquals(boundary, s); + } finally { + l.countDown(); + } + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostBasicGZIPTest() throws Throwable { - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build(); AsyncHttpClient c = getAsyncHttpClient(cf); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-Accept-Encoding"), "gzip"); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-Accept-Encoding"), "gzip"); + } finally { + l.countDown(); + } + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + c.close(); } - c.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostProxyTest() throws Throwable { - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port2)).build(); AsyncHttpClient c = getAsyncHttpClient(cf); - - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - - Response response = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandler() { - @Override - public Response onCompleted(Response response) throws Exception { - return response; + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); } + sb.deleteCharAt(sb.length() - 1); - @Override - public void onThrowable(Throwable t) { - } - }).get(); + Response response = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandler() { + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } + @Override + public void onThrowable(Throwable t) { + } + }).get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-Proxy-Connection"), "keep-alive"); - c.close(); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-Proxy-Connection"), "keep-alive"); + } finally { + c.close(); + } } - - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncRequestVirtualServerPOSTTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient n = getAsyncHttpClient(null); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); + Map> m = new HashMap>(); + for (int i = 0; i < 5; i++) { + m.put("param_" + i, Arrays.asList("value_" + i)); + } + Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).setVirtualHost("localhost:" + port1).build(); - Map> m = new HashMap>(); - for (int i = 0; i < 5; i++) { - m.put("param_" + i, Arrays.asList("value_" + i)); - } - Request request = new RequestBuilder("POST") - .setUrl(getTargetUrl()) - .setHeaders(h) - .setParameters(m) - .setVirtualHost("localhost:" + port1) - .build(); - - Response response = n.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(); - - assertEquals(response.getStatusCode(), 200); - if (response.getHeader("X-Host").startsWith("localhost")) { - assertEquals(response.getHeader("X-Host"), "localhost:" + port1); - } else { - assertEquals(response.getHeader("X-Host"), "127.0.0.1:" + port1); - } - n.close(); + Response response = n.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(); + assertEquals(response.getStatusCode(), 200); + if (response.getHeader("X-Host").startsWith("localhost")) { + assertEquals(response.getHeader("X-Host"), "localhost:" + port1); + } else { + assertEquals(response.getHeader("X-Host"), "127.0.0.1:" + port1); + } + } finally { + n.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPutTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - - Response response = c.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); - assertEquals(response.getStatusCode(), 200); - c.close(); + Response response = c.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostLatchBytesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + try { + final CountDownLatch l = new CountDownLatch(1); + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); + c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + for (int i = 1; i < 5; i++) { + System.out.println(">>>>> " + response.getHeader("X-param_" + i)); + assertEquals(response.getHeader("X-param_" + i), "value_" + i); + + } + return response; + } finally { + l.countDown(); } - return response; - } finally { - l.countDown(); } - } - }); + }); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostDelayCancelTest() throws Throwable { - - AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - h.add("LockThread", "true"); - StringBuilder sb = new StringBuilder(); - sb.append("LockThread=true"); - - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter(){ - @Override - public void onThrowable(Throwable t) { - } - }); - future.cancel(true); - Response response = future.get(TIMEOUT, TimeUnit.SECONDS); - Assert.assertNull(response); - c.close(); - } - - @Test(groups = {"standalone", "default_provider", "async"}) - public void asyncDoPostDelayBytesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - h.add("LockThread", "true"); - StringBuilder sb = new StringBuilder(); - sb.append("LockThread=true"); - try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + h.add("LockThread", "true"); + StringBuilder sb = new StringBuilder(); + sb.append("LockThread=true"); + Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { - t.printStackTrace(); } }); + future.cancel(true); + Response response = future.get(TIMEOUT, TimeUnit.SECONDS); + Assert.assertNull(response); + } finally { + c.close(); + } + } + + @Test(groups = { "standalone", "default_provider", "async" }) + public void asyncDoPostDelayBytesTest() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(null); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + h.add("LockThread", "true"); + StringBuilder sb = new StringBuilder(); + sb.append("LockThread=true"); - future.get(10, TimeUnit.SECONDS); - } catch (ExecutionException ex) { - if (ex.getCause() != null && TimeoutException.class.isAssignableFrom(ex.getCause().getClass())) { + try { + Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + @Override + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + }); + + future.get(10, TimeUnit.SECONDS); + } catch (ExecutionException ex) { + if (ex.getCause() != null && TimeoutException.class.isAssignableFrom(ex.getCause().getClass())) { + Assert.assertTrue(true); + } + } catch (TimeoutException te) { Assert.assertTrue(true); + } catch (IllegalStateException ex) { + Assert.assertTrue(false); } - } catch (TimeoutException te) { - Assert.assertTrue(true); - } catch (IllegalStateException ex) { - Assert.assertTrue(false); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostNullBytesTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); - - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); - Response response = future.get(); - Assert.assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - c.close(); + Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); + Response response = future.get(); + Assert.assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostListenerBytesTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.deleteCharAt(sb.length() - 1); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 5; i++) { + sb.append("param_"); + sb.append(i); + sb.append("=value_"); + sb.append(i); + sb.append("&"); + } + sb.deleteCharAt(sb.length() - 1); - final CountDownLatch l = new CountDownLatch(1); + final CountDownLatch l = new CountDownLatch(1); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - } finally { - l.countDown(); + c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + } finally { + l.countDown(); + } + return response; } - return response; - } - }); + }); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Latch time out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Latch time out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidFuture() throws Throwable { + AsyncHttpClient c = getAsyncHttpClient(null); + try { + int dummyPort = findFreePort(); + final AtomicInteger count = new AtomicInteger(); + for (int i = 0; i < 20; i++) { + try { + Response response = c.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { + /* @Override */ + public void onThrowable(Throwable t) { + count.incrementAndGet(); + } + }).get(); + assertNull(response, "Should have thrown ExecutionException"); + } catch (ExecutionException ex) { + Throwable cause = ex.getCause(); + if (!(cause instanceof ConnectException)) { + fail("Should have been caused by ConnectException, not by " + cause.getClass().getName()); + } + } + } + assertEquals(count.get(), 20); + } finally { + c.close(); + } + } - int dummyPort = findFreePort(); + @Test(groups = { "standalone", "default_provider", "async" }) + public void asyncConnectInvalidPortFuture() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final AtomicInteger count = new AtomicInteger(); - for (int i = 0; i < 20; i++) { + try { + int dummyPort = findFreePort(); try { Response response = c.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { /* @Override */ public void onThrowable(Throwable t) { - count.incrementAndGet(); + t.printStackTrace(); } }).get(); assertNull(response, "Should have thrown ExecutionException"); @@ -1022,599 +1088,639 @@ public void onThrowable(Throwable t) { fail("Should have been caused by ConnectException, not by " + cause.getClass().getName()); } } + } finally { + c.close(); } - assertEquals(count.get(), 20); - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) - public void asyncConnectInvalidPortFuture() throws Throwable { - - int dummyPort = findFreePort(); + @Test(groups = { "standalone", "default_provider", "async" }) + public void asyncConnectInvalidPort() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); try { - Response response = c.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ - public void onThrowable(Throwable t) { - t.printStackTrace(); - } - }).get(); - assertNull(response, "Should have thrown ExecutionException"); - } catch (ExecutionException ex) { - Throwable cause = ex.getCause(); - if (!(cause instanceof ConnectException)) { - fail("Should have been caused by ConnectException, not by " + cause.getClass().getName()); + // pick a random unused local port + int port = findFreePort(); + + try { + Response response = c.preparePost(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + }).get(); + assertNull(response, "No ExecutionException was thrown"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) - public void asyncConnectInvalidPort() throws Throwable { + @Test(groups = { "standalone", "default_provider", "async" }) + public void asyncConnectInvalidHandlerPort() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - // pick a random unused local port - int port = findFreePort(); - try { - Response response = c.preparePost(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { + final CountDownLatch l = new CountDownLatch(1); + int port = findFreePort(); + + c.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { /* @Override */ public void onThrowable(Throwable t) { - t.printStackTrace(); + try { + assertEquals(t.getClass(), ConnectException.class); + } finally { + l.countDown(); + } } - }).get(); - assertNull(response, "No ExecutionException was thrown"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); - } - c.close(); - } - - @Test(groups = {"standalone", "default_provider", "async"}) - public void asyncConnectInvalidHandlerPort() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - int port = findFreePort(); + }); - c.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ - public void onThrowable(Throwable t) { - try { - assertEquals(t.getClass(), ConnectException.class); - } finally { - l.countDown(); - } + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); } - }); - - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"online", "default_provider", "async"}) + @Test(groups = { "online", "default_provider", "async" }) public void asyncConnectInvalidHandlerHost() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); + try { + final CountDownLatch l = new CountDownLatch(1); - c.prepareGet("http://null.apache.org:9999/").execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ - public void onThrowable(Throwable t) { - if (t != null) { - if (t.getClass().equals(ConnectException.class)) { - l.countDown(); - } else if (t.getClass().equals(UnresolvedAddressException.class)) { - l.countDown(); + c.prepareGet("http://null.apache.org:9999/").execute(new AsyncCompletionHandlerAdapter() { + /* @Override */ + public void onThrowable(Throwable t) { + if (t != null) { + if (t.getClass().equals(ConnectException.class)) { + l.countDown(); + } else if (t.getClass().equals(UnresolvedAddressException.class)) { + l.countDown(); + } } } - } - }); + }); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + c.close(); } - c.close(); } - - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidFuturePort() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - final AtomicBoolean called = new AtomicBoolean(false); - final AtomicBoolean rightCause = new AtomicBoolean(false); - // pick a random unused local port - int port = findFreePort(); - try { - Response response = c.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { - @Override - public void onThrowable(Throwable t) { - called.set(true); - if (t instanceof ConnectException) { - rightCause.set(true); + final AtomicBoolean called = new AtomicBoolean(false); + final AtomicBoolean rightCause = new AtomicBoolean(false); + // pick a random unused local port + int port = findFreePort(); + + try { + Response response = c.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { + @Override + public void onThrowable(Throwable t) { + called.set(true); + if (t instanceof ConnectException) { + rightCause.set(true); + } } - } - }).get(); - assertNull(response, "No ExecutionException was thrown"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); + }).get(); + assertNull(response, "No ExecutionException was thrown"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); + } + assertTrue(called.get(), "onThrowable should get called."); + assertTrue(rightCause.get(), "onThrowable should get called with ConnectionException"); + } finally { + c.close(); } - assertTrue(called.get(), "onThrowable should get called."); - assertTrue(rightCause.get(), "onThrowable should get called with ConnectionException"); - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncContentLenghtGETTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - Response response = c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + try { + Response response = c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public void onThrowable(Throwable t) { - Assert.fail("Unexpected exception", t); - } - }).get(); + @Override + public void onThrowable(Throwable t) { + Assert.fail("Unexpected exception", t); + } + }).get(); - Assert.assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - c.close(); + Assert.assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncResponseBodyTooLarge() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - Response response = c.preparePost(getTargetUrl()).setBody("0123456789").execute(new AsyncCompletionHandlerAdapter() { + try { + Response response = c.preparePost(getTargetUrl()).setBody("0123456789").execute(new AsyncCompletionHandlerAdapter() { - @Override - public void onThrowable(Throwable t) { - Assert.fail("Unexpected exception", t); - } - }).get(); + @Override + public void onThrowable(Throwable t) { + Assert.fail("Unexpected exception", t); + } + }).get(); - Assert.assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); - c.close(); + Assert.assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncResponseEmptyBody() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - Response response = c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + try { + Response response = c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public void onThrowable(Throwable t) { - Assert.fail("Unexpected exception", t); - } - }).get(); + @Override + public void onThrowable(Throwable t) { + Assert.fail("Unexpected exception", t); + } + }).get(); - assertEquals(response.getResponseBody(),""); - c.close(); + assertEquals(response.getResponseBody(), ""); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider", "asyncAPI"}) + @Test(groups = { "standalone", "default_provider", "asyncAPI" }) public void asyncAPIContentLenghtGETTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(1); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(1); + client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { - client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + } finally { + l.countDown(); + } + return response; + } - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - } finally { - l.countDown(); + @Override + public void onThrowable(Throwable t) { } - return response; - } + }); - @Override - public void onThrowable(Throwable t) { + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); } - }); - - - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider", "asyncAPI"}) + @Test(groups = { "standalone", "default_provider", "asyncAPI" }) public void asyncAPIHandlerExceptionTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(1); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(1); - - client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - throw new IllegalStateException("FOO"); - } + client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + throw new IllegalStateException("FOO"); + } - @Override - public void onThrowable(Throwable t) { - try { - if (t.getMessage() != null) { - assertEquals(t.getMessage(), "FOO"); + @Override + public void onThrowable(Throwable t) { + try { + if (t.getMessage() != null) { + assertEquals(t.getMessage(), "FOO"); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); } - } - }); - + }); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + client.close(); } - client.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetDelayHandlerTest() throws Throwable { - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("LockThread", "true"); AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(5 * 1000).build()); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("LockThread", "true"); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(1); + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(1); - client.prepareGet(getTargetUrl()).setHeaders(h).execute(new AsyncCompletionHandlerAdapter() { + client.prepareGet(getTargetUrl()).setHeaders(h).execute(new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - Assert.fail("Must not receive a response"); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + Assert.fail("Must not receive a response"); + } finally { + l.countDown(); + } + return response; } - return response; - } - @Override - public void onThrowable(Throwable t) { - try { - if (t instanceof TimeoutException) { - Assert.assertTrue(true); - } else { - Assert.fail("Unexpected exception", t); + @Override + public void onThrowable(Throwable t) { + try { + if (t instanceof TimeoutException) { + Assert.assertTrue(true); + } else { + Assert.fail("Unexpected exception", t); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); } - } - }); + }); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + client.close(); } - client.close(); - } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetQueryStringTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(1); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(1); - - AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { + AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - Assert.assertTrue(response.getHeader("X-pathInfo") != null); - Assert.assertTrue(response.getHeader("X-queryString") != null); - } finally { - l.countDown(); + @Override + public Response onCompleted(Response response) throws Exception { + try { + Assert.assertTrue(response.getHeader("X-pathInfo") != null); + Assert.assertTrue(response.getHeader("X-queryString") != null); + } finally { + l.countDown(); + } + return response; } - return response; - } - }; + }; - Request req = new RequestBuilder("GET") - .setUrl(getTargetUrl() + "?foo=bar").build(); + Request req = new RequestBuilder("GET").setUrl(getTargetUrl() + "?foo=bar").build(); - client.executeRequest(req, handler).get(); + client.executeRequest(req, handler).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetKeepAliveHandlerTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(2); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(2); + AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { - AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { + String remoteAddr = null; - String remoteAddr = null; + @Override + public Response onCompleted(Response response) throws Exception { + assertEquals(response.getStatusCode(), 200); + if (remoteAddr == null) { + remoteAddr = response.getHeader("X-KEEP-ALIVE"); + l.countDown(); + } else { + assertEquals(response.getHeader("X-KEEP-ALIVE"), remoteAddr); + l.countDown(); + } - @Override - public Response onCompleted(Response response) throws Exception { - assertEquals(response.getStatusCode(), 200); - if (remoteAddr == null) { - remoteAddr = response.getHeader("X-KEEP-ALIVE"); - l.countDown(); - } else { - assertEquals(response.getHeader("X-KEEP-ALIVE"), remoteAddr); - l.countDown(); + return response; } + }; - return response; - } - }; - - client.prepareGet(getTargetUrl()).execute(handler).get(); - client.prepareGet(getTargetUrl()).execute(handler); + client.prepareGet(getTargetUrl()).execute(handler).get(); + client.prepareGet(getTargetUrl()).execute(handler); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + client.close(); } - client.close(); } - @Test(groups = {"online", "default_provider", "async"}) + @Test(groups = { "online", "default_provider", "async" }) public void asyncDoGetMaxRedirectTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(new Builder().setMaximumNumberOfRedirects(0).setFollowRedirects(true).build()); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(1); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(1); - - AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { + AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - Assert.fail("Should not be here"); - return response; - } + @Override + public Response onCompleted(Response response) throws Exception { + Assert.fail("Should not be here"); + return response; + } - @Override - public void onThrowable(Throwable t) { - t.printStackTrace(); - try { - assertEquals(t.getClass(), MaxRedirectException.class); - } finally { - l.countDown(); + @Override + public void onThrowable(Throwable t) { + t.printStackTrace(); + try { + assertEquals(t.getClass(), MaxRedirectException.class); + } finally { + l.countDown(); + } } - } - }; + }; - client.prepareGet("http://google.com/").execute(handler); + client.prepareGet("http://google.com/").execute(handler); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + client.close(); } - client.close(); } - @Test(groups = {"online", "default_provider", "async"}) + @Test(groups = { "online", "default_provider", "async" }) public void asyncDoGetNestedTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().build()); - - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(2); + final AsyncHttpClient client = getAsyncHttpClient(null); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(2); - final AsyncCompletionHandlerAdapter handler = new AsyncCompletionHandlerAdapter() { + final AsyncCompletionHandlerAdapter handler = new AsyncCompletionHandlerAdapter() { - private final static int MAX_NESTED = 2; + private final static int MAX_NESTED = 2; - private AtomicInteger nestedCount = new AtomicInteger(0); + private AtomicInteger nestedCount = new AtomicInteger(0); - @Override - public Response onCompleted(Response response) throws Exception { - try { - if (nestedCount.getAndIncrement() < MAX_NESTED) { - System.out.println("Executing a nested request: " + nestedCount); - client.prepareGet("http://google.com/").execute(this); + @Override + public Response onCompleted(Response response) throws Exception { + try { + if (nestedCount.getAndIncrement() < MAX_NESTED) { + System.out.println("Executing a nested request: " + nestedCount); + client.prepareGet("http://google.com/").execute(this); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); + return response; } - return response; - } - - @Override - public void onThrowable(Throwable t) { - t.printStackTrace(); - } - }; + @Override + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + }; - client.prepareGet("http://www.google.com/").execute(handler); + client.prepareGet("http://www.google.com/").execute(handler); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + client.close(); } - client.close(); } - @Test(groups = {"online", "default_provider", "async"}) + @Test(groups = { "online", "default_provider", "async" }) public void asyncDoGetStreamAndBodyTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().build()); - Response r = client.prepareGet("http://www.google.com/").execute().get(); - - r.getResponseBody(); - r.getResponseBodyAsStream(); + final AsyncHttpClient client = getAsyncHttpClient(null); + try { + Response r = client.prepareGet("http://www.google.com/").execute().get(); - client.close(); + r.getResponseBody(); + r.getResponseBodyAsStream(); + } finally { + client.close(); + } } - @Test(groups = {"online", "default_provider", "async"}) + @Test(groups = { "online", "default_provider", "async" }) public void asyncUrlWithoutPathTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().build()); - Response r = client.prepareGet("http://www.google.com").execute().get(); - - r.getResponseBody(); - r.getResponseBodyAsStream(); + final AsyncHttpClient client = getAsyncHttpClient(null); + try { + Response r = client.prepareGet("http://www.google.com").execute().get(); - client.close(); + r.getResponseBody(); + r.getResponseBodyAsStream(); + } finally { + client.close(); + } } - @Test(groups = {"default_provider", "async"}) + @Test(groups = { "default_provider", "async" }) public void optionsTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().build()); - Response r = client.prepareOptions(getTargetUrl()).execute().get(); - - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("Allow"), "GET,HEAD,POST,OPTIONS,TRACE"); + final AsyncHttpClient client = getAsyncHttpClient(null); + try { + Response r = client.prepareOptions(getTargetUrl()).execute().get(); - client.close(); + assertEquals(r.getStatusCode(), 200); + assertEquals(r.getHeader("Allow"), "GET,HEAD,POST,OPTIONS,TRACE"); + } finally { + client.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testAwsS3() throws Exception { - final AsyncHttpClient c = getAsyncHttpClient(new Builder().build()); - Response response = c.prepareGet("http://test.s3.amazonaws.com/").execute().get(); - if (response.getResponseBody() == null || response.getResponseBody().equals("")) { - fail("No response Body"); - } else { - assertEquals(response.getStatusCode(), 403); + final AsyncHttpClient c = getAsyncHttpClient(null); + try { + Response response = c.prepareGet("http://test.s3.amazonaws.com/").execute().get(); + if (response.getResponseBody() == null || response.getResponseBody().equals("")) { + fail("No response Body"); + } else { + assertEquals(response.getStatusCode(), 403); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testAsyncHttpProviderConfig() throws Exception { final AsyncHttpClient c = getAsyncHttpClient(new Builder().setAsyncHttpClientProviderConfig(getProviderConfig()).build()); - Response response = c.prepareGet("http://test.s3.amazonaws.com/").execute().get(); - if (response.getResponseBody() == null || response.getResponseBody().equals("")) { - fail("No response Body"); - } else { - assertEquals(response.getStatusCode(), 403); + try { + Response response = c.prepareGet("http://test.s3.amazonaws.com/").execute().get(); + if (response.getResponseBody() == null || response.getResponseBody().equals("")) { + fail("No response Body"); + } else { + assertEquals(response.getStatusCode(), 403); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void idleRequestTimeoutTest() throws Exception { - AsyncHttpClient c = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(5000).setRequestTimeoutInMs(10000).build()); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - h.add("LockThread", "true"); - - long t1 = System.currentTimeMillis(); + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(5000).setRequestTimeoutInMs(10000).build()); try { - c.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute(new AsyncHandlerAdapter() { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + h.add("LockThread", "true"); - /* @Override */ - public void onThrowable(Throwable t) { -// t.printStackTrace(); - } + long t1 = System.currentTimeMillis(); + try { + c.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute(new AsyncHandlerAdapter() { - }).get(); - Assert.fail(); - } catch (Throwable ex) { - final long elapsedTime = System.currentTimeMillis() - t1; - System.out.println("EXPIRED: " + (elapsedTime)); - Assert.assertNotNull(ex.getCause()); - Assert.assertTrue(elapsedTime >= 10000 && elapsedTime <= 25000); + /* @Override */ + public void onThrowable(Throwable t) { + // t.printStackTrace(); + } + + }).get(); + Assert.fail(); + } catch (Throwable ex) { + final long elapsedTime = System.currentTimeMillis() - t1; + System.out.println("EXPIRED: " + (elapsedTime)); + Assert.assertNotNull(ex.getCause()); + Assert.assertTrue(elapsedTime >= 10000 && elapsedTime <= 25000); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider", "async"}) + @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostCancelTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - h.add("LockThread", "true"); - StringBuilder sb = new StringBuilder(); - sb.append("LockThread=true"); - - final AtomicReference ex = new AtomicReference(); - ex.set(null); try { - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); + h.add("LockThread", "true"); + StringBuilder sb = new StringBuilder(); + sb.append("LockThread=true"); + + final AtomicReference ex = new AtomicReference(); + ex.set(null); + try { + Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { - @Override - public void onThrowable(Throwable t) { - if (t instanceof CancellationException) { - ex.set((CancellationException)t); + @Override + public void onThrowable(Throwable t) { + if (t instanceof CancellationException) { + ex.set((CancellationException) t); + } + t.printStackTrace(); } - t.printStackTrace(); - } - - }); - future.cancel(true); - } catch (IllegalStateException ise) { - fail(); + }); + + future.cancel(true); + } catch (IllegalStateException ise) { + fail(); + } + Assert.assertNotNull(ex.get()); + } finally { + c.close(); } - Assert.assertNotNull(ex.get()); - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void getShouldAllowBody() throws IllegalArgumentException, IOException { AsyncHttpClient c = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); - builder.setBody("Boo!"); - builder.execute(); + try { + AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); + builder.setBody("Boo!"); + builder.execute(); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}, expectedExceptions = IllegalArgumentException.class) + @Test(groups = { "standalone", "default_provider" }, expectedExceptions = IllegalArgumentException.class) public void headShouldNotAllowBody() throws IllegalArgumentException, IOException { AsyncHttpClient c = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder builder = c.prepareHead(getTargetUrl()); - builder.setBody("Boo!"); - builder.execute(); + try { + AsyncHttpClient.BoundRequestBuilder builder = c.prepareHead(getTargetUrl()); + builder.setBody("Boo!"); + builder.execute(); + } finally { + c.close(); + } } protected String getBrokenTargetUrl() { return String.format("http:127.0.0.1:%d/foo/test", port1); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void invalidUri() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getBrokenTargetUrl()); - Response r = c.executeRequest(builder.build()).get(); - assertEquals(200, r.getStatusCode()); + try { + AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getBrokenTargetUrl()); + Response r = c.executeRequest(builder.build()).get(); + assertEquals(200, r.getStatusCode()); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncHttpClientConfigBeanTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfigBean().setUserAgent("test")); - AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); - Response r = c.executeRequest(builder.build()).get(); - assertEquals(200, r.getStatusCode()); + try { + AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); + Response r = c.executeRequest(builder.build()).get(); + assertEquals(200, r.getStatusCode()); + } finally { + c.close(); + } } - @Test(groups = {"default_provider", "async"}) + @Test(groups = { "default_provider", "async" }) public void bodyAsByteTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().build()); + final AsyncHttpClient client = getAsyncHttpClient(null); Response r = client.prepareGet(getTargetUrl()).execute().get(); assertEquals(r.getStatusCode(), 200); - assertEquals(r.getResponseBodyAsBytes(), new byte[]{}); + assertEquals(r.getResponseBodyAsBytes(), new byte[] {}); client.close(); } - @Test(groups = {"default_provider", "async"}) + @Test(groups = { "default_provider", "async" }) public void mirrorByteTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - Response r = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); - - assertEquals(r.getStatusCode(), 200); - assertEquals(new String(r.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); + final AsyncHttpClient client = getAsyncHttpClient(null); + try { + Response r = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); - client.close(); + assertEquals(r.getStatusCode(), 200); + assertEquals(new String(r.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); + } finally { + client.close(); + } } protected abstract AsyncHttpProviderConfig getProviderConfig(); diff --git a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java index 512153b287..b328aea527 100644 --- a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java @@ -29,7 +29,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; @@ -41,42 +40,44 @@ public abstract class AsyncStreamHandlerTest extends AbstractBasicTest { private final static String RESPONSE = "param_1_"; private final static String UTF8 = "text/html;charset=utf-8"; - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncStreamGETTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); - - c.prepareGet(getTargetUrl()).execute(new AsyncHandlerAdapter() { - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - try { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); - return STATE.ABORT; - } finally { - l.countDown(); + try { + c.prepareGet(getTargetUrl()).execute(new AsyncHandlerAdapter() { + + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + try { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); + return STATE.ABORT; + } finally { + l.countDown(); + } } - } - @Override - public void onThrowable(Throwable t) { - try { - Assert.fail("", t); - } finally { - l.countDown(); + @Override + public void onThrowable(Throwable t) { + try { + Assert.fail("", t); + } finally { + l.countDown(); + } } - } - }); + }); - if (!l.await(5, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(5, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncStreamPOSTTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -85,43 +86,45 @@ public void asyncStreamPOSTTest() throws Throwable { m.put("param_1", Arrays.asList("value_1")); AsyncHttpClient c = getAsyncHttpClient(null); + try { + c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { + private StringBuilder builder = new StringBuilder(); - c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { - private StringBuilder builder = new StringBuilder(); - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); - return STATE.CONTINUE; - } + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); + return STATE.CONTINUE; + } - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.append(new String(content.getBodyPartBytes())); - return STATE.CONTINUE; - } + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.append(new String(content.getBodyPartBytes())); + return STATE.CONTINUE; + } - @Override - public String onCompleted() throws Exception { - try { - String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); - return r; - } finally { - l.countDown(); + @Override + public String onCompleted() throws Exception { + try { + String r = builder.toString().trim(); + Assert.assertEquals(r, RESPONSE); + return r; + } finally { + l.countDown(); + } } - } - }); + }); - if (!l.await(10, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(10, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncStreamInterruptTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -132,119 +135,123 @@ public void asyncStreamInterruptTest() throws Throwable { final AtomicBoolean a = new AtomicBoolean(true); AsyncHttpClient c = getAsyncHttpClient(null); + try { + c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { - c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); - return STATE.ABORT; - } + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); + return STATE.ABORT; + } - @Override - public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { - a.set(false); - Assert.fail("Interrupted not working"); - return STATE.ABORT; - } + @Override + public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { + a.set(false); + Assert.fail("Interrupted not working"); + return STATE.ABORT; + } - @Override - public void onThrowable(Throwable t) { - try { - Assert.fail("", t); - } finally { - l.countDown(); + @Override + public void onThrowable(Throwable t) { + try { + Assert.fail("", t); + } finally { + l.countDown(); + } } - } - }); + }); - l.await(5, TimeUnit.SECONDS); - Assert.assertTrue(a.get()); - c.close(); + l.await(5, TimeUnit.SECONDS); + Assert.assertTrue(a.get()); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncStreamFutureTest() throws Throwable { Map> m = new HashMap>(); m.put("param_1", Arrays.asList("value_1")); AsyncHttpClient c = getAsyncHttpClient(null); + try { + Future f = c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { + private StringBuilder builder = new StringBuilder(); - Future f = c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { - private StringBuilder builder = new StringBuilder(); + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); + return STATE.CONTINUE; + } - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); - return STATE.CONTINUE; - } + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.append(new String(content.getBodyPartBytes())); + return STATE.CONTINUE; + } - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.append(new String(content.getBodyPartBytes())); - return STATE.CONTINUE; - } + @Override + public String onCompleted() throws Exception { + String r = builder.toString().trim(); + Assert.assertEquals(r, RESPONSE); + return r; + } - @Override - public String onCompleted() throws Exception { - String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); - return r; - } + @Override + public void onThrowable(Throwable t) { + Assert.fail("", t); + } + }); - @Override - public void onThrowable(Throwable t) { - Assert.fail("", t); + try { + String r = f.get(5, TimeUnit.SECONDS); + Assert.assertNotNull(r); + Assert.assertEquals(r.trim(), RESPONSE); + } catch (TimeoutException ex) { + Assert.fail(); } - }); - - try { - String r = f.get(5, TimeUnit.SECONDS); - Assert.assertNotNull(r); - Assert.assertEquals(r.trim(), RESPONSE); - } catch (TimeoutException ex) { - Assert.fail(); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncStreamThrowableRefusedTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); + try { + c.prepareGet(getTargetUrl()).execute(new AsyncHandlerAdapter() { - c.prepareGet(getTargetUrl()).execute(new AsyncHandlerAdapter() { - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - throw new RuntimeException("FOO"); - } - - @Override + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + throw new RuntimeException("FOO"); + } - public void onThrowable(Throwable t) { - try { - if (t.getMessage() != null) { - Assert.assertEquals(t.getMessage(), "FOO"); + @Override + public void onThrowable(Throwable t) { + try { + if (t.getMessage() != null) { + Assert.assertEquals(t.getMessage(), "FOO"); + } + } finally { + l.countDown(); } - } finally { - l.countDown(); } - } - }); - + }); - if (!l.await(10, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + if (!l.await(10, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncStreamReusePOSTTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -253,305 +260,319 @@ public void asyncStreamReusePOSTTest() throws Throwable { Map> m = new HashMap>(); m.put("param_1", Arrays.asList("value_1")); AsyncHttpClient c = getAsyncHttpClient(null); + try { + c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { + private StringBuilder builder = new StringBuilder(); - c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { - private StringBuilder builder = new StringBuilder(); + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); + return STATE.CONTINUE; + } - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); - return STATE.CONTINUE; - } + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.append(new String(content.getBodyPartBytes())); + return STATE.CONTINUE; + } - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.append(new String(content.getBodyPartBytes())); - return STATE.CONTINUE; - } + @Override + public String onCompleted() throws Exception { + try { + String r = builder.toString().trim(); + Assert.assertEquals(r, RESPONSE); + return r; + } finally { + l.countDown(); + } - @Override - public String onCompleted() throws Exception { - try { - String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); - return r; - } finally { - l.countDown(); } + }); + if (!l.await(20, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }); - - if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); - } - // Let do the same again - c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { - private StringBuilder builder = new StringBuilder(); + // Let do the same again + c.preparePost(getTargetUrl()).setParameters(m).execute(new AsyncHandlerAdapter() { + private StringBuilder builder = new StringBuilder(); - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); - return STATE.CONTINUE; - } + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), UTF8); + return STATE.CONTINUE; + } - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.append(new String(content.getBodyPartBytes())); - return STATE.CONTINUE; - } + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.append(new String(content.getBodyPartBytes())); + return STATE.CONTINUE; + } - @Override - public String onCompleted() throws Exception { - try { - String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); - return r; - } finally { - l.countDown(); + @Override + public String onCompleted() throws Exception { + try { + String r = builder.toString().trim(); + Assert.assertEquals(r, RESPONSE); + return r; + } finally { + l.countDown(); + } } - } - }); + }); - if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(20, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void asyncStream301WithBody() throws Throwable { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); - c.prepareGet("http://google.com/").execute(new AsyncHandlerAdapter() { - private StringBuilder builder = new StringBuilder(); - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), "text/html; charset=utf-8"); - return STATE.CONTINUE; - } + try { + c.prepareGet("http://google.com/").execute(new AsyncHandlerAdapter() { + private StringBuilder builder = new StringBuilder(); - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.append(new String(content.getBodyPartBytes())); - return STATE.CONTINUE; - } + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(), "text/html; charset=utf-8"); + return STATE.CONTINUE; + } - @Override - public String onCompleted() throws Exception { - String r = builder.toString(); - Assert.assertTrue(r.contains("301 Moved")); - l.countDown(); - return r; - } - }); + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.append(new String(content.getBodyPartBytes())); + return STATE.CONTINUE; + } - if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + @Override + public String onCompleted() throws Exception { + String r = builder.toString(); + Assert.assertTrue(r.contains("301 Moved")); + l.countDown(); + return r; + } + }); + + if (!l.await(20, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void asyncStream301RedirectWithBody() throws Throwable { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); - c.prepareGet("http://google.com/").execute(new AsyncHandlerAdapter() { - private StringBuilder builder = new StringBuilder(); - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getFirstValue( "server" ), "gws"); - // This assertion below is not an invariant, since implicitly contains locale-dependant settings - // and fails when run in country having own localized Google site and it's locale relies on something - // other than ISO-8859-1. - // In Hungary for example, http://google.com/ redirects to http://www.google.hu/, a localized - // Google site, that uses ISO-8892-2 encoding (default for HU). Similar is true for other - // non-ISO-8859-1 using countries that have "localized" google, like google.hr, google.rs, google.cz, google.sk etc. - // - // Assert.assertEquals(h.getJoinedValue("content-type", ", "), "text/html; charset=ISO-8859-1"); - return STATE.CONTINUE; - } + try { + c.prepareGet("http://google.com/").execute(new AsyncHandlerAdapter() { + private StringBuilder builder = new StringBuilder(); - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.append(new String(content.getBodyPartBytes())); - return STATE.CONTINUE; - } + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + Assert.assertEquals(h.getFirstValue("server"), "gws"); + // This assertion below is not an invariant, since implicitly contains locale-dependant settings + // and fails when run in country having own localized Google site and it's locale relies on something + // other than ISO-8859-1. + // In Hungary for example, http://google.com/ redirects to http://www.google.hu/, a localized + // Google site, that uses ISO-8892-2 encoding (default for HU). Similar is true for other + // non-ISO-8859-1 using countries that have "localized" google, like google.hr, google.rs, google.cz, google.sk etc. + // + // Assert.assertEquals(h.getJoinedValue("content-type", ", "), "text/html; charset=ISO-8859-1"); + return STATE.CONTINUE; + } - @Override - public String onCompleted() throws Exception { - String r = builder.toString(); - Assert.assertTrue(!r.contains("301 Moved")); - l.countDown(); + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.append(new String(content.getBodyPartBytes())); + return STATE.CONTINUE; + } - return r; - } - }); + @Override + public String onCompleted() throws Exception { + String r = builder.toString(); + Assert.assertTrue(!r.contains("301 Moved")); + l.countDown(); + + return r; + } + }); - if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(20, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}, timeOut = 3000, description = "Test behavior of 'read only status line' scenario.") + @Test(groups = { "standalone", "default_provider" }, timeOut = 3000, description = "Test behavior of 'read only status line' scenario.") public void asyncStreamJustStatusLine() throws Throwable { final int STATUS = 0; final int COMPLETED = 1; final int OTHER = 2; - final boolean[] whatCalled = new boolean[]{false, false, false}; + final boolean[] whatCalled = new boolean[] { false, false, false }; final CountDownLatch latch = new CountDownLatch(1); AsyncHttpClient client = getAsyncHttpClient(null); - Future statusCode = client.prepareGet(getTargetUrl()).execute(new AsyncHandler() { - private int status = -1; + try { + Future statusCode = client.prepareGet(getTargetUrl()).execute(new AsyncHandler() { + private int status = -1; - /* @Override */ - public void onThrowable(Throwable t) { - whatCalled[OTHER] = true; - latch.countDown(); - } + /* @Override */ + public void onThrowable(Throwable t) { + whatCalled[OTHER] = true; + latch.countDown(); + } - /* @Override */ - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - whatCalled[OTHER] = true; - latch.countDown(); - return STATE.ABORT; - } + /* @Override */ + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + whatCalled[OTHER] = true; + latch.countDown(); + return STATE.ABORT; + } - /* @Override */ - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - whatCalled[STATUS] = true; - System.out.println(responseStatus); - status = responseStatus.getStatusCode(); - latch.countDown(); - return STATE.ABORT; - } + /* @Override */ + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + whatCalled[STATUS] = true; + System.out.println(responseStatus); + status = responseStatus.getStatusCode(); + latch.countDown(); + return STATE.ABORT; + } - /* @Override */ - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - whatCalled[OTHER] = true; - latch.countDown(); - return STATE.ABORT; - } + /* @Override */ + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + whatCalled[OTHER] = true; + latch.countDown(); + return STATE.ABORT; + } - /* @Override */ - public Integer onCompleted() throws Exception { - whatCalled[COMPLETED] = true; - latch.countDown(); - return status; - } - }); + /* @Override */ + public Integer onCompleted() throws Exception { + whatCalled[COMPLETED] = true; + latch.countDown(); + return status; + } + }); - if (!latch.await(2, TimeUnit.SECONDS)) { - Assert.fail("Timeout"); - return; - } - Integer status = statusCode.get(TIMEOUT, TimeUnit.SECONDS); - Assert.assertEquals((int) status, 200, "Expected status code failed."); + if (!latch.await(2, TimeUnit.SECONDS)) { + Assert.fail("Timeout"); + return; + } + Integer status = statusCode.get(TIMEOUT, TimeUnit.SECONDS); + Assert.assertEquals((int) status, 200, "Expected status code failed."); - if (!whatCalled[STATUS]) { - Assert.fail("onStatusReceived not called."); - } - if (!whatCalled[COMPLETED]) { - Assert.fail("onCompleted not called."); - } - if (whatCalled[OTHER]) { - Assert.fail("Other method of AsyncHandler got called."); + if (!whatCalled[STATUS]) { + Assert.fail("onStatusReceived not called."); + } + if (!whatCalled[COMPLETED]) { + Assert.fail("onCompleted not called."); + } + if (whatCalled[OTHER]) { + Assert.fail("Other method of AsyncHandler got called."); + } + } finally { + client.close(); } - client.close(); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void asyncOptionsTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); - final String[] expected = { - "GET","HEAD","OPTIONS","POST","TRACE" - }; - c.prepareOptions("http://www.apache.org/").execute(new AsyncHandlerAdapter() { - - @Override - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - String[] values = h.get("Allow").get(0).split(",|, "); - Assert.assertNotNull(values); - Assert.assertEquals(values.length, expected.length); - Arrays.sort(values); - Assert.assertEquals(values, expected); - return STATE.ABORT; - } + try { + final String[] expected = { "GET", "HEAD", "OPTIONS", "POST", "TRACE" }; + c.prepareOptions("http://www.apache.org/").execute(new AsyncHandlerAdapter() { - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - return STATE.CONTINUE; - } + @Override + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + FluentCaseInsensitiveStringsMap h = content.getHeaders(); + Assert.assertNotNull(h); + String[] values = h.get("Allow").get(0).split(",|, "); + Assert.assertNotNull(values); + Assert.assertEquals(values.length, expected.length); + Arrays.sort(values); + Assert.assertEquals(values, expected); + return STATE.ABORT; + } - @Override - public String onCompleted() throws Exception { - try { - return "OK"; - } finally { - l.countDown(); + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + return STATE.CONTINUE; } - } - }); - if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + @Override + public String onCompleted() throws Exception { + try { + return "OK"; + } finally { + l.countDown(); + } + } + }); + + if (!l.await(20, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void closeConnectionTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); + try { + Response r = c.prepareGet(getTargetUrl()).execute(new AsyncHandler() { - Response r = c.prepareGet(getTargetUrl()).execute(new AsyncHandler() { - - private Response.ResponseBuilder builder = new Response.ResponseBuilder(); + private Response.ResponseBuilder builder = new Response.ResponseBuilder(); - public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { - builder.accumulate(content); - return STATE.CONTINUE; - } + public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { + builder.accumulate(content); + return STATE.CONTINUE; + } - public void onThrowable(Throwable t) { - } + public void onThrowable(Throwable t) { + } - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - builder.accumulate(content); + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + builder.accumulate(content); - if (content.isLast()) { - content.markUnderlyingConnectionAsClosed(); + if (content.isLast()) { + content.markUnderlyingConnectionAsClosed(); + } + return STATE.CONTINUE; } - return STATE.CONTINUE; - } - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - builder.accumulate(responseStatus); + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + builder.accumulate(responseStatus); - return STATE.CONTINUE; - } + return STATE.CONTINUE; + } - public Response onCompleted() throws Exception { - return builder.build(); - } - }).get(); + public Response onCompleted() throws Exception { + return builder.build(); + } + }).get(); - Assert.assertNotNull(r); - Assert.assertEquals(r.getStatusCode(), 200); - c.close(); + Assert.assertNotNull(r); + Assert.assertEquals(r.getStatusCode(), 200); + } finally { + c.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java b/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java index faeaee7cc2..c495e98c67 100644 --- a/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java @@ -47,7 +47,7 @@ /** * Tests default asynchronous life cycle. - * + * * @author Hubert Iwaniuk */ public abstract class AsyncStreamLifecycleTest extends AbstractBasicTest { @@ -63,8 +63,7 @@ public void tearDownGlobal() throws Exception { @Override public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { - public void handle(String s, Request request, HttpServletRequest req, final HttpServletResponse resp) - throws IOException, ServletException { + public void handle(String s, Request request, HttpServletRequest req, final HttpServletResponse resp) throws IOException, ServletException { resp.setContentType("text/plain;charset=utf-8"); resp.setStatus(200); final Continuation continuation = ContinuationSupport.getContinuation(req); @@ -100,62 +99,64 @@ public void run() { }; } - //TODO Netty only. + // TODO Netty only. - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testStream() throws IOException { AsyncHttpClient ahc = getAsyncHttpClient(null); - final AtomicBoolean err = new AtomicBoolean(false); - final LinkedBlockingQueue queue = new LinkedBlockingQueue(); - final AtomicBoolean status = new AtomicBoolean(false); - final AtomicInteger headers = new AtomicInteger(0); - final CountDownLatch latch = new CountDownLatch(1); - ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build(), new AsyncHandler() { - public void onThrowable(Throwable t) { - fail("Got throwable.", t); - err.set(true); - } + try { + final AtomicBoolean err = new AtomicBoolean(false); + final LinkedBlockingQueue queue = new LinkedBlockingQueue(); + final AtomicBoolean status = new AtomicBoolean(false); + final AtomicInteger headers = new AtomicInteger(0); + final CountDownLatch latch = new CountDownLatch(1); + ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build(), new AsyncHandler() { + public void onThrowable(Throwable t) { + fail("Got throwable.", t); + err.set(true); + } - public STATE onBodyPartReceived(HttpResponseBodyPart e) throws Exception { - String s = new String(e.getBodyPartBytes()); - log.info("got part: {}", s); - if (s.equals("")) { - //noinspection ThrowableInstanceNeverThrown - log.warn("Sampling stacktrace.", - new Throwable("trace that, we should not get called for empty body.")); + public STATE onBodyPartReceived(HttpResponseBodyPart e) throws Exception { + String s = new String(e.getBodyPartBytes()); + log.info("got part: {}", s); + if (s.equals("")) { + // noinspection ThrowableInstanceNeverThrown + log.warn("Sampling stacktrace.", new Throwable("trace that, we should not get called for empty body.")); + } + queue.put(s); + return STATE.CONTINUE; } - queue.put(s); - return STATE.CONTINUE; - } - public STATE onStatusReceived(HttpResponseStatus e) throws Exception { - status.set(true); - return STATE.CONTINUE; - } + public STATE onStatusReceived(HttpResponseStatus e) throws Exception { + status.set(true); + return STATE.CONTINUE; + } - public STATE onHeadersReceived(HttpResponseHeaders e) throws Exception { - if (headers.incrementAndGet() == 2) { - throw new Exception("Analyze this."); + public STATE onHeadersReceived(HttpResponseHeaders e) throws Exception { + if (headers.incrementAndGet() == 2) { + throw new Exception("Analyze this."); + } + return STATE.CONTINUE; } - return STATE.CONTINUE; - } - public Object onCompleted() throws Exception { - latch.countDown(); - return null; + public Object onCompleted() throws Exception { + latch.countDown(); + return null; + } + }); + try { + assertTrue(latch.await(1, TimeUnit.SECONDS), "Latch failed."); + } catch (InterruptedException e) { + fail("Interrupted.", e); } - }); - try { - assertTrue(latch.await(1, TimeUnit.SECONDS), "Latch failed."); - } catch (InterruptedException e) { - fail("Interrupted.", e); + assertFalse(err.get()); + assertEquals(queue.size(), 2); + assertTrue(queue.contains("part1")); + assertTrue(queue.contains("part2")); + assertTrue(status.get()); + assertEquals(headers.get(), 1); + } finally { + ahc.close(); } - assertFalse(err.get()); - assertEquals(queue.size(), 2); - assertTrue(queue.contains("part1")); - assertTrue(queue.contains("part2")); - assertTrue(status.get()); - assertEquals(headers.get(), 1); - ahc.close(); } } diff --git a/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java index 13a9ef5299..6de01f31f9 100644 --- a/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java @@ -49,8 +49,7 @@ import static org.testng.Assert.assertNotNull; import static org.testng.Assert.fail; -public abstract class AuthTimeoutTest - extends AbstractBasicTest { +public abstract class AuthTimeoutTest extends AbstractBasicTest { private final static String user = "user"; @@ -58,8 +57,7 @@ public abstract class AuthTimeoutTest protected AsyncHttpClient client; - public void setUpServer(String auth) - throws Exception { + public void setUpServer(String auth) throws Exception { server = new Server(); Logger root = Logger.getRootLogger(); root.setLevel(Level.DEBUG); @@ -78,7 +76,7 @@ public void setUpServer(String auth) Constraint constraint = new Constraint(); constraint.setName(auth); - constraint.setRoles(new String[]{user, admin}); + constraint.setRoles(new String[] { user, admin }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -105,10 +103,8 @@ public void setUpServer(String auth) log.info("Local HTTP server started successfully"); } - private class SimpleHandler - extends AbstractHandler { - public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { + private class SimpleHandler extends AbstractHandler { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // NOTE: handler sends less bytes than are given in Content-Length, which should lead to timeout @@ -128,150 +124,135 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR } } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void basicAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void basicAuthTimeoutTest() throws Exception { setUpServer(Constraint.__BASIC_AUTH); - - Future f = execute(false); try { + Future f = execute(false); f.get(); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void basicPreemptiveAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void basicPreemptiveAuthTimeoutTest() throws Exception { setUpServer(Constraint.__BASIC_AUTH); - - Future f = execute(true); try { + Future f = execute(true); f.get(); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void digestAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void digestAuthTimeoutTest() throws Exception { setUpServer(Constraint.__DIGEST_AUTH); - Future f = execute(false); try { + Future f = execute(false); f.get(); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void digestPreemptiveAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void digestPreemptiveAuthTimeoutTest() throws Exception { setUpServer(Constraint.__DIGEST_AUTH); - Future f = execute(true); try { + Future f = execute(true); f.get(); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void basicFutureAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void basicFutureAuthTimeoutTest() throws Exception { setUpServer(Constraint.__BASIC_AUTH); - Future f = execute(false); try { + Future f = execute(false); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void basicFuturePreemptiveAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void basicFuturePreemptiveAuthTimeoutTest() throws Exception { setUpServer(Constraint.__BASIC_AUTH); - Future f = execute(true); try { + Future f = execute(true); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void digestFutureAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void digestFutureAuthTimeoutTest() throws Exception { setUpServer(Constraint.__DIGEST_AUTH); - Future f = execute(false); try { + Future f = execute(false); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) - public void digestFuturePreemptiveAuthTimeoutTest() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = false) + public void digestFuturePreemptiveAuthTimeoutTest() throws Exception { setUpServer(Constraint.__DIGEST_AUTH); - Future f = execute(true); try { + Future f = execute(true); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); - } - catch (Exception e) { + } catch (Exception e) { inspectException(e); + } finally { + client.close(); } - client.close(); } protected void inspectException(Throwable t) { assertNotNull(t.getCause()); assertEquals(t.getCause().getClass(), IOException.class); - if (!t.getCause().getMessage().startsWith("Remotely Closed")){ + if (!t.getCause().getMessage().startsWith("Remotely Closed")) { fail(); - }; + } } - protected Future execute(boolean preemptive) - throws IOException { - client = - getAsyncHttpClient( - new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).setConnectionTimeoutInMs(20000).setRequestTimeoutInMs(2000).build()); - AsyncHttpClient.BoundRequestBuilder r = - client.prepareGet(getTargetUrl()).setRealm(realm(preemptive)).setHeader("X-Content", - "Test"); + protected Future execute(boolean preemptive) throws IOException { + client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).setConnectionTimeoutInMs(20000).setRequestTimeoutInMs(2000).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm(realm(preemptive)).setHeader("X-Content", "Test"); Future f = r.execute(); return f; } @@ -286,8 +267,7 @@ protected String getTargetUrl() { } @Override - public AbstractHandler configureHandler() - throws Exception { + public AbstractHandler configureHandler() throws Exception { return new SimpleHandler(); } } diff --git a/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java index 8f3422e817..116d67105a 100644 --- a/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java @@ -79,8 +79,7 @@ public void setUpGlobal() throws Exception { server = new Server(); Logger root = Logger.getRootLogger(); root.setLevel(Level.DEBUG); - root.addAppender(new ConsoleAppender( - new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); + root.addAppender(new ConsoleAppender(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); port1 = findFreePort(); Connector listener = new SelectChannelConnector(); @@ -95,7 +94,7 @@ public void setUpGlobal() throws Exception { Constraint constraint = new Constraint(); constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[]{user, admin}); + constraint.setRoles(new String[] { user, admin }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -134,8 +133,7 @@ private String getFileContent(final File file) { } return sb.toString(); } - throw new IllegalArgumentException("File does not exist or cannot be read: " - + file.getCanonicalPath()); + throw new IllegalArgumentException("File does not exist or cannot be read: " + file.getCanonicalPath()); } catch (IOException ioe) { throw new IllegalStateException(ioe); } finally { @@ -164,7 +162,7 @@ private void setUpSecondServer() throws Exception { Constraint constraint = new Constraint(); constraint.setName(Constraint.__DIGEST_AUTH); - constraint.setRoles(new String[]{user, admin}); + constraint.setRoles(new String[] { user, admin }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -178,8 +176,7 @@ private void setUpSecondServer() throws Exception { ConstraintSecurityHandler security = new ConstraintSecurityHandler() { @Override - public void handle(String arg0, Request arg1, HttpServletRequest arg2, HttpServletResponse arg3) - throws IOException, ServletException { + public void handle(String arg0, Request arg1, HttpServletRequest arg2, HttpServletResponse arg3) throws IOException, ServletException { System.err.println("request in security handler"); System.err.println("Authorization: " + arg2.getHeader("Authorization")); System.err.println("RequestUri: " + arg2.getRequestURI()); @@ -205,10 +202,7 @@ private void stopSecondServer() throws Exception { } private class RedirectHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.err.println("redirecthandler"); System.err.println("request: " + request.getRequestURI()); @@ -235,10 +229,7 @@ public void handle(String s, } private class SimpleHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (request.getHeader("X-401") != null) { response.setStatus(401); @@ -251,7 +242,6 @@ public void handle(String s, response.addHeader("X-Content-Length", String.valueOf(request.getContentLength())); response.setStatus(200); - int size = 10 * 1024; if (request.getContentLength() > 0) { size = request.getContentLength(); @@ -268,28 +258,30 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()) - .setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = null; try { setUpSecondServer(); client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).setMaximumNumberOfRedirects(10).build()); AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl2()) - // .setHeader( "X-302", "/bla" ) + // .setHeader( "X-302", "/bla" ) .setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); Future f = r.execute(); @@ -299,7 +291,8 @@ public void redirectAndBasicAuthTest() throws Exception, ExecutionException, Tim assertNotNull(resp.getHeader("X-Auth")); } finally { - if (client != null) client.close(); + if (client != null) + client.close(); stopSecondServer(); } } @@ -313,152 +306,165 @@ protected String getTargetUrl2() { return "http://127.0.0.1:" + port2 + "/uff"; } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basic401Test() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()) - .setHeader("X-401", "401").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - - Future f = r.execute(new AsyncHandler() { + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setHeader("X-401", "401").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - private HttpResponseStatus status; + Future f = r.execute(new AsyncHandler() { + private HttpResponseStatus status; - public void onThrowable(Throwable t) { + public void onThrowable(Throwable t) { - } + } - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - return STATE.CONTINUE; - } + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + return STATE.CONTINUE; + } - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - this.status = responseStatus; + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + this.status = responseStatus; - if (status.getStatusCode() != 200) { - return STATE.ABORT; + if (status.getStatusCode() != 200) { + return STATE.ABORT; + } + return STATE.CONTINUE; } - return STATE.CONTINUE; - } - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - return STATE.CONTINUE; - } + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + return STATE.CONTINUE; + } - public Integer onCompleted() throws Exception { - return status.getStatusCode(); - } - }); - Integer statusCode = f.get(10, TimeUnit.SECONDS); - assertNotNull(statusCode); - assertEquals(statusCode.intValue(), 401); - client.close(); + public Integer onCompleted() throws Exception { + return status.getStatusCode(); + } + }); + Integer statusCode = f.get(10, TimeUnit.SECONDS); + assertNotNull(statusCode); + assertEquals(statusCode.intValue(), 401); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthTestPreemtiveTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()) - .setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setUsePreemptiveAuth(true).build()); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setUsePreemptiveAuth(true).build()); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthNegativeTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()) - .setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(admin).build()); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), 401); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(admin).build()); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), 401); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthInputStreamTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - ByteArrayInputStream is = new ByteArrayInputStream("test".getBytes()); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()) - .setBody(is).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - - Future f = r.execute(); - Response resp = f.get(30, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "test"); - client.close(); + try { + ByteArrayInputStream is = new ByteArrayInputStream("test".getBytes()); + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(is).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + + Future f = r.execute(); + Response resp = f.get(30, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "test"); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthFileTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final String fileContent = getFileContent(file); - - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()) - .setBody(file).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), fileContent); - client.close(); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + final String fileContent = getFileContent(file); + + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), fileContent); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthAsyncConfigTest() throws Throwable { - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder() - .setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()).build()); - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final String fileContent = getFileContent(file); - - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), fileContent); - client.close(); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()).build()); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + final String fileContent = getFileContent(file); + + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), fileContent); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicAuthFileNoKeepAliveTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(false).build()); - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final String fileContent = getFileContent(file); - - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()) - .setBody(file).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), fileContent); - client.close(); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + final String fileContent = getFileContent(file); + + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), fileContent); + } finally { + client.close(); + } } @Override @@ -466,40 +472,38 @@ public AbstractHandler configureHandler() throws Exception { return new SimpleHandler(); } - @Test(groups = {"standalone", "default_provider"}, enabled = false) + @Test(groups = { "standalone", "default_provider" }, enabled = false) public void StringBufferBodyConsumerTest() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder() - .setRealmPrincipal(user) - .setRealmPassword(admin) - .setUrl(getTargetUrl()) - .setHeader("Content-Type", "text/html").build(); - - StringBuilder s = new StringBuilder(); - Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(s.toString(), MY_MESSAGE); - assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK); - assertNotNull(response.getHeader("X-Auth")); - - client.close(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setRealmPrincipal(user).setRealmPassword(admin).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + try { + StringBuilder s = new StringBuilder(); + Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(s.toString(), MY_MESSAGE); + assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK); + assertNotNull(response.getHeader("X-Auth")); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void noneAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()) - .setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); - - Future f = r.execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertNotNull(resp.getHeader("X-Auth")); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + + Future f = r.execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertNotNull(resp.getHeader("X-Auth")); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } } } - diff --git a/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java b/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java index 6a70d6b0be..8279d56f7c 100644 --- a/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java +++ b/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java @@ -65,10 +65,7 @@ public abstract class BasicHttpsTest extends AbstractBasicTest { public static class EchoHandler extends AbstractHandler { /* @Override */ - public void handle(String pathInContext, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws ServletException, IOException { + public void handle(String pathInContext, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { httpResponse.setContentType("text/html; charset=utf-8"); Enumeration e = httpRequest.getHeaderNames(); @@ -166,8 +163,7 @@ protected int findFreePort() throws IOException { socket = new ServerSocket(0); return socket.getLocalPort(); - } - finally { + } finally { if (socket != null) { socket.close(); } @@ -208,110 +204,96 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void zeroCopyPostTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).build()); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); - Response resp = f.get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); + Response resp = f.get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void multipleSSLRequestsTest() throws Throwable { final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).build()); + try { + String body = "hello there"; - String body = "hello there"; - - // once - Response response = c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); + // once + Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); + assertEquals(response.getResponseBody(), body); - // twice - response = c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); + // twice + response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); - c.close(); + assertEquals(response.getResponseBody(), body); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void multipleSSLWithoutCacheTest() throws Throwable { final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).setAllowSslConnectionPool(false).build()); + try { + String body = "hello there"; + c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute(); - String body = "hello there"; - c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute(); - - c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute(); + c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute(); - Response response = c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(); + Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(); - assertEquals(response.getResponseBody(), body); - c.close(); + assertEquals(response.getResponseBody(), body); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void reconnectsAfterFailedCertificationPath() throws Throwable { final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).build()); - - final String body = "hello there"; - - TRUST_SERVER_CERT.set(false); try { - // first request fails because server certificate is rejected + final String body = "hello there"; + + TRUST_SERVER_CERT.set(false); try { - c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); - } - catch (final ExecutionException e) { - Throwable cause = e.getCause(); - if (cause instanceof ConnectException) { - assertNotNull(cause.getCause()); - assertTrue(cause.getCause() instanceof SSLHandshakeException); - } else { - assertTrue(cause instanceof SSLHandshakeException); + // first request fails because server certificate is rejected + try { + c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (final ExecutionException e) { + Throwable cause = e.getCause(); + if (cause instanceof ConnectException) { + assertNotNull(cause.getCause()); + assertTrue(cause.getCause() instanceof SSLHandshakeException); + } else { + assertTrue(cause instanceof SSLHandshakeException); + } } - } - TRUST_SERVER_CERT.set(true); + TRUST_SERVER_CERT.set(true); - // second request should succeed - final Response response = c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); + // second request should succeed + final Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); - } - finally { - TRUST_SERVER_CERT.set(true); + assertEquals(response.getResponseBody(), body); + } finally { + TRUST_SERVER_CERT.set(true); + } + } finally { + c.close(); } - c.close(); } private static SSLContext createSSLContext() { @@ -328,15 +310,14 @@ private static SSLContext createSSLContext() { // Initialize the SSLContext to work with our key managers. KeyManager[] keyManagers = kmf.getKeyManagers(); - TrustManager[] trustManagers = new TrustManager[]{DUMMY_TRUST_MANAGER}; + TrustManager[] trustManagers = new TrustManager[] { DUMMY_TRUST_MANAGER }; SecureRandom secureRandom = new SecureRandom(); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, secureRandom); return sslContext; - } - catch (Exception e) { + } catch (Exception e) { throw new Error("Failed to initialize the server-side SSLContext", e); } } @@ -347,17 +328,14 @@ public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } - public void checkClientTrusted( - X509Certificate[] chain, String authType) throws CertificateException { + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { } - public void checkServerTrusted( - X509Certificate[] chain, String authType) throws CertificateException { + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { if (!TRUST_SERVER_CERT.get()) { throw new CertificateException("Server certificate not trusted."); } } }; - } diff --git a/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java b/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java index 8db2bfb649..313ebdb2e2 100644 --- a/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java +++ b/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java @@ -31,7 +31,7 @@ public abstract class BodyChunkTest extends AbstractBasicTest { private final static String MY_MESSAGE = "my message"; - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void negativeContentTypeTest() throws Throwable { AsyncHttpClientConfig.Builder confbuilder = new AsyncHttpClientConfig.Builder(); @@ -41,23 +41,21 @@ public void negativeContentTypeTest() throws Throwable { // Create client AsyncHttpClient client = getAsyncHttpClient(confbuilder.build()); + try { - RequestBuilder requestBuilder = new RequestBuilder("POST") - .setUrl(getTargetUrl()) - .setHeader("Content-Type", "message/rfc822"); + RequestBuilder requestBuilder = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeader("Content-Type", "message/rfc822"); - requestBuilder.setBody(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); + requestBuilder.setBody(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); - Future future = client.executeRequest(requestBuilder.build()); + Future future = client.executeRequest(requestBuilder.build()); - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getResponseBody(), MY_MESSAGE); - - client.close(); + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getResponseBody(), MY_MESSAGE); + } finally { + client.close(); + } } } - - diff --git a/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java index 48e1836a65..f76ef6b308 100644 --- a/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java @@ -44,9 +44,7 @@ public abstract class BodyDeferringAsyncHandlerTest extends AbstractBasicTest { public static class SlowAndBigHandler extends AbstractHandler { - public void handle(String pathInContext, Request request, - HttpServletRequest httpRequest, HttpServletResponse httpResponse) - throws IOException, ServletException { + public void handle(String pathInContext, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { // 512MB large download // 512 * 1024 * 1024 = 536870912 @@ -56,8 +54,7 @@ public void handle(String pathInContext, Request request, httpResponse.flushBuffer(); - final boolean wantFailure = httpRequest - .getHeader("X-FAIL-TRANSFER") != null; + final boolean wantFailure = httpRequest.getHeader("X-FAIL-TRANSFER") != null; final boolean wantSlow = httpRequest.getHeader("X-SLOW") != null; OutputStream os = httpResponse.getOutputStream(); @@ -104,8 +101,7 @@ public int getByteCount() { } // simple stream copy just to "consume". It closes streams. - public static void copy(InputStream in, OutputStream out) - throws IOException { + public static void copy(InputStream in, OutputStream out) throws IOException { byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) > 0) { @@ -122,116 +118,103 @@ public AbstractHandler configureHandler() throws Exception { public AsyncHttpClientConfig getAsyncHttpClientConfig() { // for this test brevity's sake, we are limiting to 1 retries - return new AsyncHttpClientConfig.Builder().setMaxRequestRetry(0) - .setRequestTimeoutInMs(10000).build(); + return new AsyncHttpClientConfig.Builder().setMaxRequestRetry(0).setRequestTimeoutInMs(10000).build(); } @Test(groups = { "standalone", "default_provider" }) - public void deferredSimple() throws IOException, ExecutionException, - TimeoutException, InterruptedException { + public void deferredSimple() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - AsyncHttpClient.BoundRequestBuilder r = client - .prepareGet("http://127.0.0.1:" + port1 + "/deferredSimple"); - - CountingOutputStream cos = new CountingOutputStream(); - BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); - Future f = r.execute(bdah); - Response resp = bdah.getResponse(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals( - true, - resp.getHeader("content-length").equals( - String.valueOf(HALF_GIG))); - // we got headers only, it's probably not all yet here (we have BIG file - // downloading) - assertEquals(true, HALF_GIG >= cos.getByteCount()); - - // now be polite and wait for body arrival too (otherwise we would be - // dropping the "line" on server) - f.get(); - // it all should be here now - assertEquals(true, HALF_GIG == cos.getByteCount()); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredSimple"); + + CountingOutputStream cos = new CountingOutputStream(); + BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); + Future f = r.execute(bdah); + Response resp = bdah.getResponse(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + // we got headers only, it's probably not all yet here (we have BIG file + // downloading) + assertEquals(true, HALF_GIG >= cos.getByteCount()); + + // now be polite and wait for body arrival too (otherwise we would be + // dropping the "line" on server) + f.get(); + // it all should be here now + assertEquals(true, HALF_GIG == cos.getByteCount()); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }, enabled = false) - public void deferredSimpleWithFailure() throws IOException, - ExecutionException, TimeoutException, InterruptedException { + public void deferredSimpleWithFailure() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet( - "http://127.0.0.1:" + port1 + "/deferredSimpleWithFailure") - .addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); - - CountingOutputStream cos = new CountingOutputStream(); - BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); - Future f = r.execute(bdah); - Response resp = bdah.getResponse(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals( - true, - resp.getHeader("content-length").equals( - String.valueOf(HALF_GIG))); - // we got headers only, it's probably not all yet here (we have BIG file - // downloading) - assertEquals(true, HALF_GIG >= cos.getByteCount()); - - // now be polite and wait for body arrival too (otherwise we would be - // dropping the "line" on server) try { - f.get(); - Assert.fail("get() should fail with IOException!"); - } catch (Exception e) { - // good + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredSimpleWithFailure").addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); + + CountingOutputStream cos = new CountingOutputStream(); + BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); + Future f = r.execute(bdah); + Response resp = bdah.getResponse(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + // we got headers only, it's probably not all yet here (we have BIG file + // downloading) + assertEquals(true, HALF_GIG >= cos.getByteCount()); + + // now be polite and wait for body arrival too (otherwise we would be + // dropping the "line" on server) + try { + f.get(); + Assert.fail("get() should fail with IOException!"); + } catch (Exception e) { + // good + } + // it's incomplete, there was an error + assertEquals(false, HALF_GIG == cos.getByteCount()); + } finally { + client.close(); } - // it's incomplete, there was an error - assertEquals(false, HALF_GIG == cos.getByteCount()); - client.close(); } @Test(groups = { "standalone", "default_provider" }) - public void deferredInputStreamTrick() throws IOException, - ExecutionException, TimeoutException, InterruptedException { + public void deferredInputStreamTrick() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - AsyncHttpClient.BoundRequestBuilder r = client - .prepareGet("http://127.0.0.1:" + port1 - + "/deferredInputStreamTrick"); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredInputStreamTrick"); - PipedOutputStream pos = new PipedOutputStream(); - PipedInputStream pis = new PipedInputStream(pos); - BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(pos); + PipedOutputStream pos = new PipedOutputStream(); + PipedInputStream pis = new PipedInputStream(pos); + BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(pos); - Future f = r.execute(bdah); + Future f = r.execute(bdah); - BodyDeferringInputStream is = new BodyDeferringInputStream(f, bdah, pis); + BodyDeferringInputStream is = new BodyDeferringInputStream(f, bdah, pis); - Response resp = is.getAsapResponse(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals( - true, - resp.getHeader("content-length").equals( - String.valueOf(HALF_GIG))); - // "consume" the body, but our code needs input stream - CountingOutputStream cos = new CountingOutputStream(); - copy(is, cos); + Response resp = is.getAsapResponse(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + // "consume" the body, but our code needs input stream + CountingOutputStream cos = new CountingOutputStream(); + copy(is, cos); - // now we don't need to be polite, since consuming and closing - // BodyDeferringInputStream does all. - // it all should be here now - assertEquals(true, HALF_GIG == cos.getByteCount()); - client.close(); + // now we don't need to be polite, since consuming and closing + // BodyDeferringInputStream does all. + // it all should be here now + assertEquals(true, HALF_GIG == cos.getByteCount()); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) - public void deferredInputStreamTrickWithFailure() throws IOException, - ExecutionException, TimeoutException, InterruptedException { + public void deferredInputStreamTrickWithFailure() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet( - "http://127.0.0.1:" + port1 - + "/deferredInputStreamTrickWithFailure").addHeader( - "X-FAIL-TRANSFER", Boolean.TRUE.toString()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredInputStreamTrickWithFailure").addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); PipedOutputStream pos = new PipedOutputStream(); PipedInputStream pis = new PipedInputStream(pos); @@ -244,10 +227,7 @@ public void deferredInputStreamTrickWithFailure() throws IOException, Response resp = is.getAsapResponse(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals( - true, - resp.getHeader("content-length").equals( - String.valueOf(HALF_GIG))); + assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); // "consume" the body, but our code needs input stream CountingOutputStream cos = new CountingOutputStream(); try { @@ -260,25 +240,24 @@ public void deferredInputStreamTrickWithFailure() throws IOException, } @Test(groups = { "standalone", "default_provider" }) - public void testConnectionRefused() throws IOException, ExecutionException, - TimeoutException, InterruptedException { + public void testConnectionRefused() throws IOException, ExecutionException, TimeoutException, InterruptedException { int newPortWithoutAnyoneListening = findFreePort(); AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - AsyncHttpClient.BoundRequestBuilder r = client - .prepareGet("http://127.0.0.1:" + newPortWithoutAnyoneListening - + "/testConnectionRefused"); - - CountingOutputStream cos = new CountingOutputStream(); - BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); - r.execute(bdah); try { - bdah.getResponse(); - Assert.fail("IOException should be thrown here!"); - } catch (IOException e) { - // good + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + newPortWithoutAnyoneListening + "/testConnectionRefused"); + + CountingOutputStream cos = new CountingOutputStream(); + BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); + r.execute(bdah); + try { + bdah.getResponse(); + Assert.fail("IOException should be thrown here!"); + } catch (IOException e) { + // good + } + } finally { + client.close(); } - - client.close(); } } diff --git a/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java index 58c36c224d..2c8f9c46fc 100644 --- a/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java @@ -33,15 +33,11 @@ import static org.testng.Assert.*; public abstract class ByteBufferCapacityTest extends AbstractBasicTest { - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" - + UUID.randomUUID().toString().substring(0, 8)); + private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); private class BasicHandler extends AbstractHandler { - public void handle(String s, - org.eclipse.jetty.server.Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { Enumeration e = httpRequest.getHeaderNames(); String param; @@ -75,43 +71,43 @@ public AbstractHandler configureHandler() throws Exception { return new BasicHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicByteBufferTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File largeFile = createTempFile(bytes, (int) repeats); - final AtomicInteger byteReceived = new AtomicInteger(); - try { - Response response = c.preparePut(getTargetUrl()).setBody(largeFile) - .execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ - public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { - byteReceived.addAndGet(content.getBodyByteBuffer().capacity()); - return super.onBodyPartReceived(content); - } - - }).get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertEquals(byteReceived.get(), largeFile.length()); - assertEquals(response.getResponseBody().length(), largeFile.length()); - - } catch (IOException ex) { - fail("Should have timed out"); + byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); + long repeats = (1024 * 100 * 10 / bytes.length) + 1; + File largeFile = createTempFile(bytes, (int) repeats); + final AtomicInteger byteReceived = new AtomicInteger(); + + try { + Response response = c.preparePut(getTargetUrl()).setBody(largeFile).execute(new AsyncCompletionHandlerAdapter() { + /* @Override */ + public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { + byteReceived.addAndGet(content.getBodyByteBuffer().capacity()); + return super.onBodyPartReceived(content); + } + + }).get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(byteReceived.get(), largeFile.length()); + assertEquals(response.getResponseBody().length(), largeFile.length()); + + } catch (IOException ex) { + fail("Should have timed out"); + } + } finally { + c.close(); } - c.close(); } public String getTargetUrl() { return String.format("http://127.0.0.1:%d/foo/test", port1); } - public static File createTempFile(byte[] pattern, int repeat) - throws IOException { + public static File createTempFile(byte[] pattern, int repeat) throws IOException { TMP.mkdirs(); TMP.deleteOnExit(); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); @@ -120,8 +116,7 @@ public static File createTempFile(byte[] pattern, int repeat) return tmpFile; } - public static void write(byte[] pattern, int repeat, File file) - throws IOException { + public static void write(byte[] pattern, int repeat, File file) throws IOException { file.deleteOnExit(); file.getParentFile().mkdirs(); FileOutputStream out = null; @@ -130,8 +125,7 @@ public static void write(byte[] pattern, int repeat, File file) for (int i = 0; i < repeat; i++) { out.write(pattern); } - } - finally { + } finally { if (out != null) { out.close(); } diff --git a/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java b/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java index 6b7a30ffa5..db2c1ab0ce 100644 --- a/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java +++ b/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java @@ -25,44 +25,37 @@ public abstract class ComplexClientTest extends AbstractBasicTest { - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void multipleRequestsTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); + try { + String body = "hello there"; - String body = "hello there"; + // once + Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - // once - Response response = c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); + assertEquals(response.getResponseBody(), body); - assertEquals(response.getResponseBody(), body); + // twice + response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - // twice - response = c.preparePost(getTargetUrl()) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); - - assertEquals(response.getResponseBody(), body); - c.close(); + assertEquals(response.getResponseBody(), body); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void urlWithoutSlashTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); + try { + String body = "hello there"; - String body = "hello there"; - - // once - Response response = c.preparePost(String.format("http://127.0.0.1:%d/foo/test", port1)) - .setBody(body) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); + Response response = c.preparePost(String.format("http://127.0.0.1:%d/foo/test", port1)).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); - c.close(); + assertEquals(response.getResponseBody(), body); + } finally { + c.close(); + } } - } diff --git a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java index 27a5917877..5ac49c8ef2 100644 --- a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java @@ -41,239 +41,232 @@ public abstract class ConnectionPoolTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testMaxTotalConnections() { - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setAllowPoolingConnection(true) - .setMaximumConnectionsTotal(1) - .build() - ); - - String url = getTargetUrl(); - int i; - Exception exception = null; - for (i = 0; i < 3; i++) { - try { - log.info("{} requesting url [{}]...", i, url); - Response response = client.prepareGet(url).execute().get(); - log.info("{} response [{}].", i, response); - } catch (Exception ex) { - exception = ex; + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + try { + String url = getTargetUrl(); + int i; + Exception exception = null; + for (i = 0; i < 3; i++) { + try { + log.info("{} requesting url [{}]...", i, url); + Response response = client.prepareGet(url).execute().get(); + log.info("{} response [{}].", i, response); + } catch (Exception ex) { + exception = ex; + } } + assertNull(exception); + } finally { + client.close(); } - assertNull(exception); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testMaxTotalConnectionsException() { - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setAllowPoolingConnection(true) - .setMaximumConnectionsTotal(1) - .build() - ); - - String url = getTargetUrl(); - int i; - Exception exception = null; - for (i = 0; i < 20; i++) { - try { - log.info("{} requesting url [{}]...", i, url); - - if (i < 5) { - client.prepareGet(url).execute().get(); - } else { - client.prepareGet(url).execute(); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + try { + String url = getTargetUrl(); + int i; + Exception exception = null; + for (i = 0; i < 20; i++) { + try { + log.info("{} requesting url [{}]...", i, url); + + if (i < 5) { + client.prepareGet(url).execute().get(); + } else { + client.prepareGet(url).execute(); + } + } catch (Exception ex) { + exception = ex; + break; } - } catch (Exception ex) { - exception = ex; - break; } + assertNotNull(exception); + assertNotNull(exception.getMessage()); + assertEquals(exception.getMessage(), "Too many connections 1"); + } finally { + client.close(); } - assertNotNull(exception); - assertNotNull(exception.getMessage()); - assertEquals(exception.getMessage(),"Too many connections 1"); } - @Test(groups = {"standalone", "default_provider", "async"}, enabled = true, invocationCount = 10, alwaysRun = true) + @Test(groups = { "standalone", "default_provider", "async" }, enabled = true, invocationCount = 10, alwaysRun = true) public void asyncDoGetKeepAliveHandlerTest_channelClosedDoesNotFail() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); + try { + // Use a l in case the assert fail + final CountDownLatch l = new CountDownLatch(2); - // Use a l in case the assert fail - final CountDownLatch l = new CountDownLatch(2); - - final Map remoteAddresses = new - ConcurrentHashMap(); + final Map remoteAddresses = new ConcurrentHashMap(); - AsyncCompletionHandler handler = new - AsyncCompletionHandlerAdapter() { + AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws - Exception { - System.out.println("ON COMPLETED INVOKED " + - response.getHeader("X-KEEP-ALIVE")); - try { - assertEquals(response.getStatusCode(), 200); - remoteAddresses.put(response.getHeader("X-KEEP-ALIVE"), true); - } finally { - l.countDown(); - } - return response; + @Override + public Response onCompleted(Response response) throws Exception { + System.out.println("ON COMPLETED INVOKED " + response.getHeader("X-KEEP-ALIVE")); + try { + assertEquals(response.getStatusCode(), 200); + remoteAddresses.put(response.getHeader("X-KEEP-ALIVE"), true); + } finally { + l.countDown(); } - }; + return response; + } + }; - client.prepareGet(getTargetUrl()).execute(handler).get(); - server.stop(); - server.start(); - client.prepareGet(getTargetUrl()).execute(handler); + client.prepareGet(getTargetUrl()).execute(handler).get(); + server.stop(); + server.start(); + client.prepareGet(getTargetUrl()).execute(handler); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timed out"); + } - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + assertEquals(remoteAddresses.size(), 2); + } finally { + client.close(); } - - assertEquals(remoteAddresses.size(), 2); - client.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public abstract void testInvalidConnectionsPool(); - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public abstract void testValidConnectionsPool(); - - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void multipleMaxConnectionOpenTest() throws Throwable { - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true) - .setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); + AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + String body = "hello there"; - String body = "hello there"; - - // once - Response response = c.preparePost(getTargetUrl()) - .setBody(body) - .execute().get(TIMEOUT, TimeUnit.SECONDS); + // once + Response response = c.preparePost(getTargetUrl()).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); + assertEquals(response.getResponseBody(), body); - // twice - Exception exception = null; - try { - c.preparePost(String.format("http://127.0.0.1:%d/foo/test", port2)).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); - fail("Should throw exception. Too many connections issued."); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + // twice + Exception exception = null; + try { + c.preparePost(String.format("http://127.0.0.1:%d/foo/test", port2)).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); + fail("Should throw exception. Too many connections issued."); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNotNull(exception); + assertEquals(exception.getMessage(), "Too many connections 1"); + } finally { + c.close(); } - assertNotNull(exception); - assertEquals(exception.getMessage(), "Too many connections 1"); - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void multipleMaxConnectionOpenTestWithQuery() throws Throwable { - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true) - .setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); + AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + String body = "hello there"; - String body = "hello there"; - - // once - Response response = c.preparePost(getTargetUrl() + "?foo=bar") - .setBody(body) - .execute().get(TIMEOUT, TimeUnit.SECONDS); + // once + Response response = c.preparePost(getTargetUrl() + "?foo=bar").setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), "foo_" + body); + assertEquals(response.getResponseBody(), "foo_" + body); - // twice - Exception exception = null; - try { - response = c.preparePost(getTargetUrl()).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + // twice + Exception exception = null; + try { + response = c.preparePost(getTargetUrl()).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNull(exception); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); } - assertNull(exception); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - c.close(); } /** - * This test just make sure the hack used to catch disconnected channel under win7 doesn't throw any exception. - * The onComplete method must be only called once. - * - * @throws Throwable if something wrong happens. + * This test just make sure the hack used to catch disconnected channel under win7 doesn't throw any exception. The onComplete method must be only called once. + * + * @throws Throwable + * if something wrong happens. */ - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void win7DisconnectTest() throws Throwable { final AtomicInteger count = new AtomicInteger(0); AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - AsyncCompletionHandler handler = new - AsyncCompletionHandlerAdapter() { + try { + AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws - Exception { - - count.incrementAndGet(); - StackTraceElement e = new StackTraceElement("sun.nio.ch.SocketDispatcher", "read0", null, -1); - IOException t = new IOException(); - t.setStackTrace(new StackTraceElement[]{e}); - throw t; - } - }; + @Override + public Response onCompleted(Response response) throws Exception { - try { - client.prepareGet(getTargetUrl()).execute(handler).get(); - fail("Must have received an exception"); - } catch (ExecutionException ex) { - assertNotNull(ex); - assertNotNull(ex.getCause()); - assertEquals(ex.getCause().getCause().getClass(), IOException.class); - assertEquals(count.get(), 1); + count.incrementAndGet(); + StackTraceElement e = new StackTraceElement("sun.nio.ch.SocketDispatcher", "read0", null, -1); + IOException t = new IOException(); + t.setStackTrace(new StackTraceElement[] { e }); + throw t; + } + }; + + try { + client.prepareGet(getTargetUrl()).execute(handler).get(); + fail("Must have received an exception"); + } catch (ExecutionException ex) { + assertNotNull(ex); + assertNotNull(ex.getCause()); + assertEquals(ex.getCause().getCause().getClass(), IOException.class); + assertEquals(count.get(), 1); + } + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void asyncHandlerOnThrowableTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final AtomicInteger count = new AtomicInteger(); - final String THIS_IS_NOT_FOR_YOU = "This is not for you"; - final CountDownLatch latch = new CountDownLatch(16); - for (int i = 0; i < 16; i++) { - client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerBase() { - @Override - public Response onCompleted(Response response) throws Exception { - throw new Exception(THIS_IS_NOT_FOR_YOU); - } - }); + try { + final AtomicInteger count = new AtomicInteger(); + final String THIS_IS_NOT_FOR_YOU = "This is not for you"; + final CountDownLatch latch = new CountDownLatch(16); + for (int i = 0; i < 16; i++) { + client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerBase() { + @Override + public Response onCompleted(Response response) throws Exception { + throw new Exception(THIS_IS_NOT_FOR_YOU); + } + }); - client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ - public void onThrowable(Throwable t) { - if (t.getMessage() != null && t.getMessage().equalsIgnoreCase(THIS_IS_NOT_FOR_YOU)) { - count.incrementAndGet(); + client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerBase() { + /* @Override */ + public void onThrowable(Throwable t) { + if (t.getMessage() != null && t.getMessage().equalsIgnoreCase(THIS_IS_NOT_FOR_YOU)) { + count.incrementAndGet(); + } } - } - @Override - public Response onCompleted(Response response) throws Exception { - latch.countDown(); - return response; - } - }); + @Override + public Response onCompleted(Response response) throws Exception { + latch.countDown(); + return response; + } + }); + } + latch.await(TIMEOUT, TimeUnit.SECONDS); + assertEquals(count.get(), 0); + } finally { + client.close(); } - latch.await(TIMEOUT, TimeUnit.SECONDS); - assertEquals(count.get(), 0); - client.close(); } } - diff --git a/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java index 21cbfa91cc..66d1ce3086 100644 --- a/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java @@ -60,8 +60,7 @@ public void setUpGlobal() throws Exception { server = new Server(); Logger root = Logger.getRootLogger(); root.setLevel(Level.DEBUG); - root.addAppender(new ConsoleAppender( - new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); + root.addAppender(new ConsoleAppender(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); port1 = findFreePort(); Connector listener = new SelectChannelConnector(); @@ -76,7 +75,7 @@ public void setUpGlobal() throws Exception { Constraint constraint = new Constraint(); constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[]{user, admin}); + constraint.setRoles(new String[] { user, admin }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -103,10 +102,7 @@ public void setUpGlobal() throws Exception { } private class SimpleHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.addHeader("X-Auth", request.getHeader("Authorization")); response.setStatus(200); @@ -115,50 +111,51 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void digestAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/") - .setRealm((new Realm.RealmBuilder()).setPrincipal(user) - .setPassword(admin) - .setRealmName("MyRealm") - .setScheme(Realm.AuthScheme.DIGEST).build()); - - Future f = r.execute(); - Response resp = f.get(60, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertNotNull(resp.getHeader("X-Auth")); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setRealmName("MyRealm").setScheme(Realm.AuthScheme.DIGEST).build()); + + Future f = r.execute(); + Response resp = f.get(60, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertNotNull(resp.getHeader("X-Auth")); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void digestAuthTestWithoutScheme() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/") - .setRealm((new Realm.RealmBuilder()).setPrincipal(user) - .setPassword(admin) - .setRealmName("MyRealm").build()); - - Future f = r.execute(); - Response resp = f.get(60, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertNotNull(resp.getHeader("X-Auth")); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setRealmName("MyRealm").build()); + + Future f = r.execute(); + Response resp = f.get(60, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertNotNull(resp.getHeader("X-Auth")); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void digestAuthNegativeTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/") - .setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(admin).setScheme(Realm.AuthScheme.DIGEST).build()); - - Future f = r.execute(); - Response resp = f.get(20, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), 401); - client.close(); + try { + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(admin).setScheme(Realm.AuthScheme.DIGEST).build()); + + Future f = r.execute(); + Response resp = f.get(20, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), 401); + } finally { + client.close(); + } } @Override diff --git a/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java b/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java index 873e1bba88..4e226f8f40 100644 --- a/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java +++ b/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java @@ -45,22 +45,17 @@ /** * Tests case where response doesn't have body. - * + * * @author Hubert Iwaniuk */ public abstract class EmptyBodyTest extends AbstractBasicTest { private class NoBodyResponseHandler extends AbstractHandler { - public void handle( - String s, - Request request, - HttpServletRequest req, - HttpServletResponse resp) - throws IOException, ServletException { + public void handle(String s, Request request, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { if (!req.getMethod().equalsIgnoreCase("PUT")) { resp.setStatus(HttpServletResponse.SC_OK); } else { - resp.setStatus(204); + resp.setStatus(204); } request.setHandled(true); } @@ -71,72 +66,76 @@ public AbstractHandler configureHandler() throws Exception { return new NoBodyResponseHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testEmptyBody() throws IOException { AsyncHttpClient ahc = getAsyncHttpClient(null); - final AtomicBoolean err = new AtomicBoolean(false); - final LinkedBlockingQueue queue = new LinkedBlockingQueue(); - final AtomicBoolean status = new AtomicBoolean(false); - final AtomicInteger headers = new AtomicInteger(0); - final CountDownLatch latch = new CountDownLatch(1); - ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build(), new AsyncHandler() { - public void onThrowable(Throwable t) { - fail("Got throwable.", t); - err.set(true); - } + try { + final AtomicBoolean err = new AtomicBoolean(false); + final LinkedBlockingQueue queue = new LinkedBlockingQueue(); + final AtomicBoolean status = new AtomicBoolean(false); + final AtomicInteger headers = new AtomicInteger(0); + final CountDownLatch latch = new CountDownLatch(1); + ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build(), new AsyncHandler() { + public void onThrowable(Throwable t) { + fail("Got throwable.", t); + err.set(true); + } - public STATE onBodyPartReceived(HttpResponseBodyPart e) throws Exception { - String s = new String(e.getBodyPartBytes()); - log.info("got part: {}", s); - if (s.equals("")) { - //noinspection ThrowableInstanceNeverThrown - log.warn("Sampling stacktrace.", - new Throwable("trace that, we should not get called for empty body.")); + public STATE onBodyPartReceived(HttpResponseBodyPart e) throws Exception { + String s = new String(e.getBodyPartBytes()); + log.info("got part: {}", s); + if (s.equals("")) { + // noinspection ThrowableInstanceNeverThrown + log.warn("Sampling stacktrace.", new Throwable("trace that, we should not get called for empty body.")); + } + queue.put(s); + return STATE.CONTINUE; } - queue.put(s); - return STATE.CONTINUE; - } - public STATE onStatusReceived(HttpResponseStatus e) throws Exception { - status.set(true); - return AsyncHandler.STATE.CONTINUE; - } + public STATE onStatusReceived(HttpResponseStatus e) throws Exception { + status.set(true); + return AsyncHandler.STATE.CONTINUE; + } - public STATE onHeadersReceived(HttpResponseHeaders e) throws Exception { - if (headers.incrementAndGet() == 2) { - throw new Exception("Analyze this."); + public STATE onHeadersReceived(HttpResponseHeaders e) throws Exception { + if (headers.incrementAndGet() == 2) { + throw new Exception("Analyze this."); + } + return STATE.CONTINUE; } - return STATE.CONTINUE; - } - public Object onCompleted() throws Exception { - latch.countDown(); - return null; + public Object onCompleted() throws Exception { + latch.countDown(); + return null; + } + }); + try { + assertTrue(latch.await(1, TimeUnit.SECONDS), "Latch failed."); + } catch (InterruptedException e) { + fail("Interrupted.", e); } - }); - try { - assertTrue(latch.await(1, TimeUnit.SECONDS), "Latch failed."); - } catch (InterruptedException e) { - fail("Interrupted.", e); + assertFalse(err.get()); + assertEquals(queue.size(), 0); + assertTrue(status.get()); + assertEquals(headers.get(), 1); + } finally { + ahc.close(); } - assertFalse(err.get()); - assertEquals(queue.size(), 0); - assertTrue(status.get()); - assertEquals(headers.get(), 1); - ahc.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testPutEmptyBody() throws Throwable { AsyncHttpClient ahc = getAsyncHttpClient(null); - Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 204); - assertEquals(response.getResponseBody(), ""); - assertTrue(InputStream.class.isAssignableFrom(response.getResponseBodyAsStream().getClass())); - assertEquals(response.getResponseBodyAsStream().read(), -1); + try { + Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(); - ahc.close(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 204); + assertEquals(response.getResponseBody(), ""); + assertTrue(InputStream.class.isAssignableFrom(response.getResponseBodyAsStream().getClass())); + assertEquals(response.getResponseBodyAsStream().read(), -1); + } finally { + ahc.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java b/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java index 0613c27ef7..3481e10899 100644 --- a/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java +++ b/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java @@ -35,15 +35,14 @@ /** * Tests to reproduce issues with handling of error responses - * + * * @author Tatu Saloranta */ public abstract class ErrorResponseTest extends AbstractBasicTest { final static String BAD_REQUEST_STR = "Very Bad Request! No cookies."; private static class ErrorHandler extends AbstractHandler { - public void handle(String s, Request r, - HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { try { Thread.sleep(210L); } catch (InterruptedException e) { @@ -61,18 +60,18 @@ public AbstractHandler configureHandler() throws Exception { return new ErrorHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testQueryParameters() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); - Future f = client - .prepareGet("http://127.0.0.1:" + port1 + "/foo") - .addHeader("Accepts", "*/*") - .execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), 400); - String respStr = resp.getResponseBody(); - assertEquals(BAD_REQUEST_STR, respStr); - client.close(); + try { + Future f = client.prepareGet("http://127.0.0.1:" + port1 + "/foo").addHeader("Accepts", "*/*").execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), 400); + String respStr = resp.getResponseBody(); + assertEquals(BAD_REQUEST_STR, respStr); + } finally { + client.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java b/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java index 8ebb82d34c..54e128426e 100644 --- a/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java +++ b/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java @@ -38,10 +38,7 @@ public abstract class Expect100ContinueTest extends AbstractBasicTest { private class ZeroCopyHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { int size = 10 * 1024; if (httpRequest.getContentLength() > 0) { @@ -58,21 +55,22 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void Expect100Continue() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); + try { + ClassLoader cl = getClass().getClassLoader(); + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); - ClassLoader cl = getClass().getClassLoader(); - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setHeader("Expect", "100-continue").setBody(file).execute(); - Response resp = f.get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); - client.close(); - + Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setHeader("Expect", "100-continue").setBody(file).execute(); + Response resp = f.get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + } finally { + client.close(); + } } @Override diff --git a/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java index 87dd3aa377..6f844c7d8d 100644 --- a/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java +++ b/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java @@ -35,43 +35,45 @@ import static org.testng.FileAssert.fail; -public abstract class FilePartLargeFileTest - extends AbstractBasicTest { +public abstract class FilePartLargeFileTest extends AbstractBasicTest { private File largeFile; - @Test(groups = {"standalone", "default_provider"}, enabled = true) - public void testPutImageFile() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = true) + public void testPutImageFile() throws Exception { largeFile = getTestFile(); AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build(); AsyncHttpClient client = getAsyncHttpClient(config); - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - - rb.addBodyPart(new FilePart("test", largeFile, "application/octet-stream" , "UTF-8")); + try { + BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - Response response = rb.execute().get(); - Assert.assertEquals(200, response.getStatusCode()); + rb.addBodyPart(new FilePart("test", largeFile, "application/octet-stream", "UTF-8")); - client.close(); + Response response = rb.execute().get(); + Assert.assertEquals(200, response.getStatusCode()); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}, enabled = true) - public void testPutLargeTextFile() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = true) + public void testPutLargeTextFile() throws Exception { byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); long repeats = (1024 * 1024 / bytes.length) + 1; largeFile = createTempFile(bytes, (int) repeats); AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = getAsyncHttpClient(config); - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); + try { + BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - rb.addBodyPart(new FilePart("test", largeFile, "application/octet-stream" , "UTF-8")); + rb.addBodyPart(new FilePart("test", largeFile, "application/octet-stream", "UTF-8")); - Response response = rb.execute().get(); - Assert.assertEquals(200, response.getStatusCode()); - client.close(); + Response response = rb.execute().get(); + Assert.assertEquals(200, response.getStatusCode()); + } finally { + client.close(); + } } private static File getTestFile() { @@ -96,12 +98,10 @@ public void after() { } @Override - public AbstractHandler configureHandler() - throws Exception { + public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { - public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServletResponse resp) - throws IOException, ServletException { + public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { ServletInputStream in = req.getInputStream(); byte[] b = new byte[8192]; @@ -125,11 +125,9 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle }; } - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" - + UUID.randomUUID().toString().substring(0, 8)); + private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); - public static File createTempFile(byte[] pattern, int repeat) - throws IOException { + public static File createTempFile(byte[] pattern, int repeat) throws IOException { TMP.mkdirs(); TMP.deleteOnExit(); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); @@ -139,8 +137,7 @@ public static File createTempFile(byte[] pattern, int repeat) return tmpFile; } - public static void write(byte[] pattern, int repeat, File file) - throws IOException { + public static void write(byte[] pattern, int repeat, File file) throws IOException { file.deleteOnExit(); file.getParentFile().mkdirs(); FileOutputStream out = null; @@ -149,8 +146,7 @@ public static void write(byte[] pattern, int repeat, File file) for (int i = 0; i < repeat; i++) { out.write(pattern); } - } - finally { + } finally { if (out != null) { out.close(); } diff --git a/api/src/test/java/com/ning/http/client/async/FilterTest.java b/api/src/test/java/com/ning/http/client/async/FilterTest.java index b71bb5566a..cf9ac2676a 100644 --- a/api/src/test/java/com/ning/http/client/async/FilterTest.java +++ b/api/src/test/java/com/ning/http/client/async/FilterTest.java @@ -42,10 +42,7 @@ public abstract class FilterTest extends AbstractBasicTest { private class BasicHandler extends AbstractHandler { - public void handle(String s, - org.eclipse.jetty.server.Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { Enumeration e = httpRequest.getHeaderNames(); String param; @@ -65,67 +62,70 @@ public AbstractHandler configureHandler() throws Exception { return new BasicHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addRequestFilter(new ThrottleRequestFilter(100)); AsyncHttpClient c = getAsyncHttpClient(b.build()); - - Response response = c.preparePost(getTargetUrl()) - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - c.close(); + try { + Response response = c.preparePost(getTargetUrl()).execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void loadThrottleTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addRequestFilter(new ThrottleRequestFilter(10)); AsyncHttpClient c = getAsyncHttpClient(b.build()); + try { + List> futures = new ArrayList>(); + for (int i = 0; i < 200; i++) { + futures.add(c.preparePost(getTargetUrl()).execute()); + } - List> futures = new ArrayList>(); - for (int i = 0; i < 200; i++) { - futures.add(c.preparePost(getTargetUrl()).execute()); - } - - for (Future f : futures) { - Response r = f.get(); - assertNotNull(f.get()); - assertEquals(r.getStatusCode(), 200); + for (Future f : futures) { + Response r = f.get(); + assertNotNull(f.get()); + assertEquals(r.getStatusCode(), 200); + } + } finally { + c.close(); } - - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void maxConnectionsText() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addRequestFilter(new ThrottleRequestFilter(0, 1000)); AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - /*Response response =*/ c.preparePost(getTargetUrl()).execute().get(); + /* Response response = */c.preparePost(getTargetUrl()).execute().get(); fail("Should have timed out"); } catch (IOException ex) { assertNotNull(ex); assertEquals(ex.getCause().getClass(), FilterException.class); + } finally { + c.close(); } - c.close(); } public String getTargetUrl() { return String.format("http://127.0.0.1:%d/foo/test", port1); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicResponseFilterTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addResponseFilter(new ResponseFilter() { - //@Override + // @Override public FilterContext filter(FilterContext ctx) throws FilterException { return ctx; } @@ -134,18 +134,18 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()) - .execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); } catch (IOException ex) { fail("Should have timed out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void replayResponseFilterTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); final AtomicBoolean replay = new AtomicBoolean(true); @@ -165,19 +165,19 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()) - .execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-Replay"), "true"); } catch (IOException ex) { fail("Should have timed out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void replayStatusCodeResponseFilterTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); final AtomicBoolean replay = new AtomicBoolean(true); @@ -197,19 +197,19 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()) - .execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-Replay"), "true"); } catch (IOException ex) { fail("Should have timed out"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void replayHeaderResponseFilterTest() throws Throwable { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); final AtomicBoolean replay = new AtomicBoolean(true); @@ -218,16 +218,10 @@ public void replayHeaderResponseFilterTest() throws Throwable { public FilterContext filter(FilterContext ctx) throws FilterException { - if (ctx.getResponseHeaders() != null - && ctx.getResponseHeaders().getHeaders().getFirstValue("Ping").equals("Pong") - && replay.getAndSet(false)) { + if (ctx.getResponseHeaders() != null && ctx.getResponseHeaders().getHeaders().getFirstValue("Ping").equals("Pong") && replay.getAndSet(false)) { Request request = new RequestBuilder(ctx.getRequest()).addHeader("Ping", "Pong").build(); - return new FilterContext.FilterContextBuilder() - .asyncHandler(ctx.getAsyncHandler()) - .request(request) - .replayRequest(true) - .build(); + return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); } return ctx; } @@ -236,15 +230,15 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong") - .execute().get(); + Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("Ping"), "Pong"); } catch (IOException ex) { fail("Should have timed out"); + } finally { + c.close(); } - c.close(); } } diff --git a/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java b/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java index b8de801eb9..82d6c6d95e 100644 --- a/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java +++ b/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java @@ -30,7 +30,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeoutException; - /** * Simple stress test for exercising the follow redirect. */ @@ -38,59 +37,62 @@ public abstract class FollowingThreadTest extends AbstractBasicTest { private final static int COUNT = 10; - @Test(timeOut = 30 * 1000, groups = {"online", "default_provider", "scalability"}) + @Test(timeOut = 30 * 1000, groups = { "online", "default_provider", "scalability" }) public void testFollowRedirect() throws IOException, ExecutionException, TimeoutException, InterruptedException { final CountDownLatch countDown = new CountDownLatch(COUNT); ExecutorService pool = Executors.newCachedThreadPool(); - for (int i = 0; i < COUNT; i++) { - pool.submit(new Runnable() { - - private int status; - - public void run() { - final CountDownLatch l = new CountDownLatch(1); - final AsyncHttpClient ahc = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); - try { - ahc.prepareGet("http://www.google.com/").execute(new AsyncHandler() { - - public void onThrowable(Throwable t) { - t.printStackTrace(); - } - - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - System.out.println(new String(bodyPart.getBodyPartBytes())); - return STATE.CONTINUE; - } - - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - status = responseStatus.getStatusCode(); - System.out.println(responseStatus.getStatusText()); - return STATE.CONTINUE; - } - - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - return STATE.CONTINUE; - } - - public Integer onCompleted() throws Exception { - l.countDown(); - return status; - } - }); - - l.await(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - ahc.close(); - countDown.countDown(); + try { + for (int i = 0; i < COUNT; i++) { + pool.submit(new Runnable() { + + private int status; + + public void run() { + final CountDownLatch l = new CountDownLatch(1); + final AsyncHttpClient ahc = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); + try { + ahc.prepareGet("http://www.google.com/").execute(new AsyncHandler() { + + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + System.out.println(new String(bodyPart.getBodyPartBytes())); + return STATE.CONTINUE; + } + + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + status = responseStatus.getStatusCode(); + System.out.println(responseStatus.getStatusText()); + return STATE.CONTINUE; + } + + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + return STATE.CONTINUE; + } + + public Integer onCompleted() throws Exception { + l.countDown(); + return status; + } + }); + + l.await(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + ahc.close(); + countDown.countDown(); + } } - } - }); + }); + } + countDown.await(); + } finally { + pool.shutdown(); } - countDown.await(); } } \ No newline at end of file diff --git a/api/src/test/java/com/ning/http/client/async/Head302Test.java b/api/src/test/java/com/ning/http/client/async/Head302Test.java index d73397326d..2eef347d36 100644 --- a/api/src/test/java/com/ning/http/client/async/Head302Test.java +++ b/api/src/test/java/com/ning/http/client/async/Head302Test.java @@ -36,7 +36,7 @@ /** * Tests HEAD request that gets 302 response. - * + * * @author Hubert Iwaniuk */ public abstract class Head302Test extends AbstractBasicTest { @@ -44,10 +44,7 @@ public abstract class Head302Test extends AbstractBasicTest { * Handler that does Found (302) in response to HEAD method. */ private class Head302handler extends AbstractHandler { - public void handle(String s, - org.eclipse.jetty.server.Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("HEAD".equalsIgnoreCase(request.getMethod())) { if (request.getPathInfo().endsWith("_moved")) { response.setStatus(HttpServletResponse.SC_OK); @@ -61,24 +58,27 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testHEAD302() throws IOException, BrokenBarrierException, InterruptedException, ExecutionException, TimeoutException { AsyncHttpClient client = getAsyncHttpClient(null); - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("HEAD").setUrl("http://127.0.0.1:" + port1 + "/Test").build(); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("HEAD").setUrl("http://127.0.0.1:" + port1 + "/Test").build(); - client.executeRequest(request, new AsyncCompletionHandlerBase() { - @Override - public Response onCompleted(Response response) throws Exception { - l.countDown(); - return super.onCompleted(response); - } - }).get(3, TimeUnit.SECONDS); + client.executeRequest(request, new AsyncCompletionHandlerBase() { + @Override + public Response onCompleted(Response response) throws Exception { + l.countDown(); + return super.onCompleted(response); + } + }).get(3, TimeUnit.SECONDS); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + client.close(); } - client.close(); } @Override diff --git a/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java index 47311144f2..322ebd0fb1 100644 --- a/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java +++ b/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java @@ -56,10 +56,7 @@ public abstract class HostnameVerifierTest extends AbstractBasicTest { public static class EchoHandler extends AbstractHandler { /* @Override */ - public void handle(String pathInContext, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws ServletException, IOException { + public void handle(String pathInContext, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { httpResponse.setContentType("text/html; charset=utf-8"); Enumeration e = httpRequest.getHeaderNames(); @@ -198,91 +195,106 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void positiveHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new PositiveHostVerifier()).setSSLContext(createSSLContext()).build()); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); - Response resp = f.get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); + Response resp = f.get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void negativeHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new NegativeHostVerifier()).setSSLContext(createSSLContext()).build()); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - try { - client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); - fail("ConnectException expected"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + try { + client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); + } + } finally { + client.close(); } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void remoteIDHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("bouette")).setSSLContext(createSSLContext()).build()); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - try { - client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); - fail("ConnectException expected"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + try { + client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); + } + } finally { + client.close(); } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void remoteNegHostnameVerifierTest() throws Throwable { - // request is made to 127.0.0.1, but cert presented for localhost - this should fail + // request is made to 127.0.0.1, but cert presented for localhost - this should fail final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext()).build()); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - try { - client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); - fail("ConnectException expected"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + try { + client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); + } + } finally { + client.close(); } } - - @Test(groups = {"standalone", "default_provider"}) + + @Test(groups = { "standalone", "default_provider" }) public void remotePosHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext()).build()); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Response resp = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + Response resp = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + } finally { + client.close(); + } } public static class PositiveHostVerifier implements HostnameVerifier { @@ -331,7 +343,7 @@ private static SSLContext createSSLContext() { // Initialize the SSLContext to work with our key managers. KeyManager[] keyManagers = kmf.getKeyManagers(); - TrustManager[] trustManagers = new TrustManager[]{DUMMY_TRUST_MANAGER}; + TrustManager[] trustManagers = new TrustManager[] { DUMMY_TRUST_MANAGER }; SecureRandom secureRandom = new SecureRandom(); SSLContext sslContext = SSLContext.getInstance("TLS"); @@ -349,12 +361,10 @@ public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } - public void checkClientTrusted( - X509Certificate[] chain, String authType) throws CertificateException { + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { } - public void checkServerTrusted( - X509Certificate[] chain, String authType) throws CertificateException { + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { if (!TRUST_SERVER_CERT.get()) { throw new CertificateException("Server certificate not trusted."); } diff --git a/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java b/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java index 7cd04b99bc..f59a68e63d 100644 --- a/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java @@ -45,11 +45,7 @@ public abstract class HttpToHttpsRedirectTest extends AbstractBasicTest { private class Relative302Handler extends AbstractHandler { - - public void handle(String s, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String param; httpResponse.setContentType("text/html; charset=utf-8"); @@ -137,63 +133,61 @@ private static int getPort(URI uri) { return port; } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void httpToHttpsRedirect() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); - - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", getTargetUrl2()) - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-httpToHttps"), "PASS"); - c.close(); + try { + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2()).execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-httpToHttps"), "PASS"); + } finally { + c.close(); + } } public String getTargetUrl2() { return String.format("https://127.0.0.1:%d/foo/test", port2); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void httpToHttpsProperConfig() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); - - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", getTargetUrl2() + "/test2") - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-httpToHttps"), "PASS"); - - // Test if the internal channel is downgraded to clean http. - response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", getTargetUrl2() + "/foo2") - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-httpToHttps"), "PASS"); - c.close(); + try { + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/test2").execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-httpToHttps"), "PASS"); + + // Test if the internal channel is downgraded to clean http. + response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/foo2").execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-httpToHttps"), "PASS"); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void relativeLocationUrl() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); - - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", "/foo/test") - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 302); - assertEquals(response.getUri().toString(), getTargetUrl()); - c.close(); + try { + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "/foo/test").execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 302); + assertEquals(response.getUri().toString(), getTargetUrl()); + } finally { + c.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/InputStreamTest.java b/api/src/test/java/com/ning/http/client/async/InputStreamTest.java index 70ceb4b48e..f6d8c395ae 100644 --- a/api/src/test/java/com/ning/http/client/async/InputStreamTest.java +++ b/api/src/test/java/com/ning/http/client/async/InputStreamTest.java @@ -36,10 +36,7 @@ public abstract class InputStreamTest extends AbstractBasicTest { private class InputStreamHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { byte[] b = new byte[3]; request.getInputStream().read(b, 0, 3); @@ -54,43 +51,46 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testInvalidInputStream() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient c = getAsyncHttpClient(null); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); + try { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + h.add("Content-Type", "application/x-www-form-urlencoded"); - InputStream is = new InputStream() { + InputStream is = new InputStream() { - public int readAllowed; + public int readAllowed; - @Override - public int available() { - return 1; // Fake - } - - @Override - public int read() throws IOException { - int fakeCount = readAllowed++; - if (fakeCount == 0) { - return (int) 'a'; - } else if (fakeCount == 1) { - return (int) 'b'; - } else if (fakeCount == 2) { - return (int) 'c'; - } else { - return -1; + @Override + public int available() { + return 1; // Fake } - } - }; + @Override + public int read() throws IOException { + int fakeCount = readAllowed++; + if (fakeCount == 0) { + return (int) 'a'; + } else if (fakeCount == 1) { + return (int) 'b'; + } else if (fakeCount == 2) { + return (int) 'c'; + } else { + return -1; + } - Response resp = c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute().get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("X-Param"), "abc"); - c.close(); + } + }; + + Response resp = c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute().get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("X-Param"), "abc"); + } finally { + c.close(); + } } @Override diff --git a/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java b/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java index 6de42566a9..f80168bc50 100644 --- a/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java +++ b/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java @@ -27,28 +27,31 @@ public abstract class ListenableFutureTest extends AbstractBasicTest { - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testListenableFuture() throws Throwable { final AtomicInteger statusCode = new AtomicInteger(500); AsyncHttpClient ahc = getAsyncHttpClient(null); - final CountDownLatch latch = new CountDownLatch(1); - final ListenableFuture future = ahc.prepareGet(getTargetUrl()).execute(); - future.addListener(new Runnable(){ + try { + final CountDownLatch latch = new CountDownLatch(1); + final ListenableFuture future = ahc.prepareGet(getTargetUrl()).execute(); + future.addListener(new Runnable() { - public void run() { - try { - statusCode.set(future.get().getStatusCode()); - latch.countDown(); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (ExecutionException e) { - e.printStackTrace(); + public void run() { + try { + statusCode.set(future.get().getStatusCode()); + latch.countDown(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } } - } - }, Executors.newFixedThreadPool(1)); + }, Executors.newFixedThreadPool(1)); - latch.await(10, TimeUnit.SECONDS); - assertEquals(statusCode.get(), 200); - ahc.close(); + latch.await(10, TimeUnit.SECONDS); + assertEquals(statusCode.get(), 200); + } finally { + ahc.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java b/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java index d0dd9ea346..cf5bb10ed9 100644 --- a/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java +++ b/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java @@ -43,96 +43,82 @@ abstract public class MaxConnectionsInThreads extends AbstractBasicTest { private static URI servletEndpointUri; - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testMaxConnectionsWithinThreads() { - String[] urls = new String[]{ - servletEndpointUri.toString(), - servletEndpointUri.toString()}; - - - final AsyncHttpClient client = - getAsyncHttpClient(new AsyncHttpClientConfig.Builder() - .setConnectionTimeoutInMs(1000) - .setRequestTimeoutInMs(5000) - .setAllowPoolingConnection(true) - .setMaximumConnectionsTotal(1) - .setMaximumConnectionsPerHost(1) - .build()); - - - final Boolean[] caughtError = new Boolean[]{Boolean.FALSE}; - List ts = new ArrayList(); - for (int i = 0; i < urls.length; i++) { - final String url = urls[i]; - Thread t = new Thread() { - public void run() { - try { - client.prepareGet(url).execute(); - } catch (IOException e) { - // assert that 2nd request fails, because maxTotalConnections=1 - // System.out.println(i); - caughtError[0] = true; - System.err.println("============"); - e.printStackTrace(); - System.err.println("============"); + String[] urls = new String[] { servletEndpointUri.toString(), servletEndpointUri.toString() }; + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); + + try { + final Boolean[] caughtError = new Boolean[] { Boolean.FALSE }; + List ts = new ArrayList(); + for (int i = 0; i < urls.length; i++) { + final String url = urls[i]; + Thread t = new Thread() { + public void run() { + try { + client.prepareGet(url).execute(); + } catch (IOException e) { + // assert that 2nd request fails, because maxTotalConnections=1 + // System.out.println(i); + caughtError[0] = true; + System.err.println("============"); + e.printStackTrace(); + System.err.println("============"); + + } } + }; + t.start(); + ts.add(t); + } + + for (Thread t : ts) { + try { + t.join(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } - }; - t.start(); - ts.add(t); - } + } - for (Thread t : ts) { + // Let the threads finish try { - t.join(); - } catch (InterruptedException e) { + Thread.sleep(4500); + } catch (InterruptedException e1) { // TODO Auto-generated catch block - e.printStackTrace(); + e1.printStackTrace(); } - } - - - // Let the threads finish - try { - Thread.sleep(4500); - } catch (InterruptedException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - - assertTrue("Max Connections should have been reached", caughtError[0]); - - boolean errorInNotThread = false; - for (int i = 0; i < urls.length; i++) { - final String url = urls[i]; + assertTrue("Max Connections should have been reached", caughtError[0]); + + boolean errorInNotThread = false; + for (int i = 0; i < urls.length; i++) { + final String url = urls[i]; + try { + client.prepareGet(url).execute(); + // client.prepareGet(url).execute(); + } catch (IOException e) { + // assert that 2nd request fails, because maxTotalConnections=1 + // System.out.println(i); + errorInNotThread = true; + System.err.println("============"); + e.printStackTrace(); + System.err.println("============"); + } + } + // Let the request finish try { - client.prepareGet(url).execute(); - // client.prepareGet(url).execute(); - } catch (IOException e) { - // assert that 2nd request fails, because maxTotalConnections=1 - // System.out.println(i); - errorInNotThread = true; - System.err.println("============"); - e.printStackTrace(); - System.err.println("============"); + Thread.sleep(2500); + } catch (InterruptedException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); } + assertTrue("Max Connections should have been reached", errorInNotThread); + } finally { + client.close(); } - // Let the request finish - try { - Thread.sleep(2500); - } catch (InterruptedException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - assertTrue("Max Connections should have been reached", errorInNotThread); - - - client.close(); - - } @Override @@ -149,7 +135,6 @@ public void setUpGlobal() throws Exception { server.addConnector(listener); - ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); @@ -186,8 +171,7 @@ public void service(HttpServletRequest req, HttpServletResponse res) throws Serv try { sleepTime = Integer.parseInt(req.getParameter("timeout")); - } - catch (NumberFormatException e) { + } catch (NumberFormatException e) { sleepTime = DEFAULT_TIMEOUT; } @@ -201,8 +185,7 @@ public void service(HttpServletRequest req, HttpServletResponse res) throws Serv System.out.println("Servlet is awake for"); System.out.println("======================================="); System.out.flush(); - } - catch (Exception e) { + } catch (Exception e) { } diff --git a/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java b/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java index abf99aaf9e..5a3d1d5dce 100644 --- a/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java +++ b/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2010 Ning, Inc. -* -* Ning licenses this file to you under the Apache License, version 2.0 -* (the "License"); you may not use this file except in compliance with the -* License. You may obtain a copy of the License at: -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -* License for the specific language governing permissions and limitations -* under the License. -*/ + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package com.ning.http.client.async; import com.ning.http.client.AsyncHttpClient; @@ -32,124 +32,96 @@ public abstract class MaxTotalConnectionTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testMaxTotalConnectionsExceedingException() { - String[] urls = new String[]{ - "http://google.com", - "http://github.com/"}; - - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionTimeoutInMs(1000) - .setRequestTimeoutInMs(5000) - .setAllowPoolingConnection(false) - .setMaximumConnectionsTotal(1) - .setMaximumConnectionsPerHost(1) - .build() - ); - - boolean caughtError = false; - for (int i = 0; i < urls.length; i++) { - try { - client.prepareGet(urls[i]).execute(); - } catch (IOException e) { - // assert that 2nd request fails, because maxTotalConnections=1 - Assert.assertEquals(1, i); - caughtError = true; + String[] urls = new String[] { "http://google.com", "http://github.com/" }; + + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(false).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); + try { + boolean caughtError = false; + for (int i = 0; i < urls.length; i++) { + try { + client.prepareGet(urls[i]).execute(); + } catch (IOException e) { + // assert that 2nd request fails, because maxTotalConnections=1 + Assert.assertEquals(1, i); + caughtError = true; + } } + Assert.assertTrue(caughtError); + } finally { + client.close(); } - Assert.assertTrue(caughtError); - client.close(); } @Test public void testMaxTotalConnections() { - String[] urls = new String[]{ - "http://google.com", - "http://lenta.ru"}; - - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionTimeoutInMs(1000) - .setRequestTimeoutInMs(5000) - .setAllowPoolingConnection(false) - .setMaximumConnectionsTotal(2) - .setMaximumConnectionsPerHost(1) - .build() - ); - - for (String url : urls) { - try { - client.prepareGet(url).execute(); - } catch (IOException e) { - Assert.fail("Smth wrong with connections handling!"); + String[] urls = new String[] { "http://google.com", "http://lenta.ru" }; + + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(false).setMaximumConnectionsTotal(2).setMaximumConnectionsPerHost(1).build()); + try { + for (String url : urls) { + try { + client.prepareGet(url).execute(); + } catch (IOException e) { + Assert.fail("Smth wrong with connections handling!"); + } } + } finally { + client.close(); } - client.close(); } - /** - * JFA: Disable this test for 1.2.0 release as it can easily fail because a request may complete - * before the second one is made, hence failing. The issue occurs frequently on Linux. + * JFA: Disable this test for 1.2.0 release as it can easily fail because a request may complete before the second one is made, hence failing. The issue occurs frequently on Linux. */ @Test(enabled = false) public void testMaxTotalConnectionsCorrectExceptionHandling() { - String[] urls = new String[]{ - "http://google.com", - "http://github.com/"}; - - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionTimeoutInMs(1000) - .setRequestTimeoutInMs(5000) - .setAllowPoolingConnection(false) - .setMaximumConnectionsTotal(1) - .setMaximumConnectionsPerHost(1) - .build() - ); - - List> futures = new ArrayList>(); - boolean caughtError = false; - for (int i = 0; i < urls.length; i++) { - try { - Future future = client.prepareGet(urls[i]).execute(); - if (future != null) { - futures.add(future); + String[] urls = new String[] { "http://google.com", "http://github.com/" }; + + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(false).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); + try { + List> futures = new ArrayList>(); + boolean caughtError = false; + for (int i = 0; i < urls.length; i++) { + try { + Future future = client.prepareGet(urls[i]).execute(); + if (future != null) { + futures.add(future); + } + } catch (IOException e) { + // assert that 2nd request fails, because maxTotalConnections=1 + Assert.assertEquals(i, 1); + caughtError = true; } - } catch (IOException e) { - // assert that 2nd request fails, because maxTotalConnections=1 - Assert.assertEquals(i, 1); - caughtError = true; } - } - Assert.assertTrue(caughtError); - - // get results of executed requests - for (Future future : futures) { - try { - /*Response res =*/ future.get(); - } catch (InterruptedException e) { - log.error("Error!", e); - } catch (ExecutionException e) { - log.error("Error!", e); + Assert.assertTrue(caughtError); + + // get results of executed requests + for (Future future : futures) { + try { + /* Response res = */future.get(); + } catch (InterruptedException e) { + log.error("Error!", e); + } catch (ExecutionException e) { + log.error("Error!", e); + } } - } - // try to execute once again, expecting that 1 connection is released - caughtError = false; - for (int i = 0; i < urls.length; i++) { - try { - client.prepareGet(urls[i]).execute(); - } catch (IOException e) { - // assert that 2nd request fails, because maxTotalConnections=1 - Assert.assertEquals(i, 1); - caughtError = true; + // try to execute once again, expecting that 1 connection is released + caughtError = false; + for (int i = 0; i < urls.length; i++) { + try { + client.prepareGet(urls[i]).execute(); + } catch (IOException e) { + // assert that 2nd request fails, because maxTotalConnections=1 + Assert.assertEquals(i, 1); + caughtError = true; + } } + Assert.assertTrue(caughtError); + } finally { + client.close(); } - Assert.assertTrue(caughtError); - client.close(); } } - - diff --git a/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java index 70af4c875a..e494012384 100644 --- a/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java +++ b/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java @@ -68,7 +68,7 @@ */ public abstract class MultipartUploadTest extends AbstractBasicTest { private String servletEndpointRedirectUrl; - public static byte GZIPTEXT[] = new byte[]{31, -117, 8, 8, 11, 43, 79, 75, 0, 3, 104, 101, 108, 108, 111, 46, 116, 120, 116, 0, -53, 72, -51, -55, -55, -25, 2, 0, 32, 48, 58, 54, 6, 0, 0, 0}; + public static byte GZIPTEXT[] = new byte[] { 31, -117, 8, 8, 11, 43, 79, 75, 0, 3, 104, 101, 108, 108, 111, 46, 116, 120, 116, 0, -53, 72, -51, -55, -55, -25, 2, 0, 32, 48, 58, 54, 6, 0, 0, 0 }; @BeforeClass public void setUp() throws Exception { @@ -128,7 +128,7 @@ private File getClasspathFile(String file) throws FileNotFoundException { /** * Tests that the streaming of a file works. */ - @Test (enabled = true) + @Test(enabled = true) public void testSendingSmallFilesAndByteArray() { String expectedContents = "filecontent: hello"; String expectedContents2 = "gzipcontent: hello"; @@ -153,7 +153,6 @@ public void testSendingSmallFilesAndByteArray() { fail("unable to find " + testResource2); } - File testResource3File = null; try { testResource3File = getClasspathFile(testResource3); @@ -177,7 +176,6 @@ public void testSendingSmallFilesAndByteArray() { gzipped.add(true); gzipped.add(false); - boolean tmpFileCreated = false; File tmpFile = null; FileOutputStream os = null; @@ -191,7 +189,6 @@ public void testSendingSmallFilesAndByteArray() { expected.add(expectedContents); gzipped.add(false); - } catch (FileNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -208,13 +205,10 @@ public void testSendingSmallFilesAndByteArray() { fail("Unable to test ByteArrayMultiPart, as unable to write to filesystem the tmp test content"); } - - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); + AsyncHttpClientConfig.Builder bc = new AsyncHttpClientConfig.Builder(); bc.setFollowRedirects(true); - AsyncHttpClient c = new AsyncHttpClient(bc.build()); try { @@ -230,8 +224,7 @@ public void testSendingSmallFilesAndByteArray() { builder.addBodyPart(new StringPart("Height", "shrimplike", AsyncHttpProviderUtils.DEFAULT_CHARSET)); builder.addBodyPart(new StringPart("Hair", "ridiculous", AsyncHttpProviderUtils.DEFAULT_CHARSET)); - builder.addBodyPart(new ByteArrayPart("file4", "bytearray.txt", expectedContents.getBytes("UTF-8") ,"text/plain", "UTF-8")); - + builder.addBodyPart(new ByteArrayPart("file4", "bytearray.txt", expectedContents.getBytes("UTF-8"), "text/plain", "UTF-8")); com.ning.http.client.Request r = builder.build(); @@ -246,21 +239,20 @@ public void testSendingSmallFilesAndByteArray() { e.printStackTrace(); fail("Download Exception"); } finally { + c.close(); FileUtils.deleteQuietly(tmpFile); } } - /** * Test that the files were sent, based on the response from the servlet - * + * * @param expectedContents * @param sourceFiles * @param r * @param deflate */ - private void testSentFile(List expectedContents, List sourceFiles, - Response r, List deflate) { + private void testSentFile(List expectedContents, List sourceFiles, Response r, List deflate) { String content = null; try { content = r.getResponseBody(); @@ -281,11 +273,10 @@ private void testSentFile(List expectedContents, List sourceFiles, String[] responseFiles = tmpFiles.split(","); assertNotNull(responseFiles); - assertEquals( sourceFiles.size(), responseFiles.length); - + assertEquals(sourceFiles.size(), responseFiles.length); System.out.println(Arrays.toString(responseFiles)); - //assertTrue("File should exist: " + tmpFile.getAbsolutePath(),tmpFile.exists()); + // assertTrue("File should exist: " + tmpFile.getAbsolutePath(),tmpFile.exists()); int i = 0; for (File sourceFile : sourceFiles) { @@ -313,7 +304,6 @@ private void testSentFile(List expectedContents, List sourceFiles, IOUtils.closeQuietly(instream); } - tmp = new File(responseFiles[i].trim()); System.out.println("=============================="); System.out.println(tmp.getAbsolutePath()); @@ -321,7 +311,6 @@ private void testSentFile(List expectedContents, List sourceFiles, System.out.flush(); assertTrue(tmp.exists()); - instream = new FileInputStream(tmp); ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); byte[] buf = new byte[8092]; @@ -357,7 +346,8 @@ private void testSentFile(List expectedContents, List sourceFiles, e.printStackTrace(); fail("Download Exception"); } finally { - if (tmp != null) FileUtils.deleteQuietly(tmp); + if (tmp != null) + FileUtils.deleteQuietly(tmp); IOUtils.closeQuietly(instream); i++; } @@ -366,7 +356,7 @@ private void testSentFile(List expectedContents, List sourceFiles, /** * Takes the content that is being passed to it, and streams to a file on disk - * + * * @author dominict */ public static class MockMultipartUploadServlet extends HttpServlet { @@ -377,7 +367,6 @@ public static class MockMultipartUploadServlet extends HttpServlet { private int filesProcessed = 0; private int stringsProcessed = 0; - public MockMultipartUploadServlet() { } @@ -409,8 +398,7 @@ public int getStringsProcessed() { } @Override - public void service(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { + public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Check that we have a file upload request boolean isMultipart = ServletFileUpload.isMultipartContent(request); if (isMultipart) { @@ -428,12 +416,10 @@ public void service(HttpServletRequest request, HttpServletResponse response) stream = item.openStream(); if (item.isFormField()) { - System.out.println("Form field " + name + " with value " - + Streams.asString(stream) + " detected."); + System.out.println("Form field " + name + " with value " + Streams.asString(stream) + " detected."); incrementStringsProcessed(); } else { - System.out.println("File field " + name + " with file name " - + item.getName() + " detected."); + System.out.println("File field " + name + " with file name " + item.getName() + " detected."); // Process the input stream OutputStream os = null; try { @@ -478,5 +464,4 @@ public void service(HttpServletRequest request, HttpServletResponse response) } - } diff --git a/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java b/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java index 6bf0b416b9..1e13f6ecc5 100644 --- a/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java +++ b/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java @@ -43,116 +43,118 @@ /** * @author Hubert Iwaniuk */ -public abstract class MultipleHeaderTest extends AbstractBasicTest{ +public abstract class MultipleHeaderTest extends AbstractBasicTest { private ExecutorService executorService; private ServerSocket serverSocket; private Future voidFuture; - @Test(groups = {"standalone", "default_provider"}) - public void testMultipleOtherHeaders() - throws IOException, ExecutionException, TimeoutException, InterruptedException { - final String[] xffHeaders = new String[]{null, null}; + @Test(groups = { "standalone", "default_provider" }) + public void testMultipleOtherHeaders() throws IOException, ExecutionException, TimeoutException, InterruptedException { + final String[] xffHeaders = new String[] { null, null }; AsyncHttpClient ahc = getAsyncHttpClient(null); - Request req = new RequestBuilder("GET").setUrl("http://localhost:" + port1 + "/MultiOther").build(); - final CountDownLatch latch = new CountDownLatch(1); - ahc.executeRequest(req, new AsyncHandler() { - public void onThrowable(Throwable t) { - t.printStackTrace(System.out); - } + try { + Request req = new RequestBuilder("GET").setUrl("http://localhost:" + port1 + "/MultiOther").build(); + final CountDownLatch latch = new CountDownLatch(1); + ahc.executeRequest(req, new AsyncHandler() { + public void onThrowable(Throwable t) { + t.printStackTrace(System.out); + } - public STATE onBodyPartReceived(HttpResponseBodyPart objectHttpResponseBodyPart) throws Exception { - return STATE.CONTINUE; - } + public STATE onBodyPartReceived(HttpResponseBodyPart objectHttpResponseBodyPart) throws Exception { + return STATE.CONTINUE; + } - public STATE onStatusReceived(HttpResponseStatus objectHttpResponseStatus) throws Exception { - return STATE.CONTINUE; - } + public STATE onStatusReceived(HttpResponseStatus objectHttpResponseStatus) throws Exception { + return STATE.CONTINUE; + } - public STATE onHeadersReceived(HttpResponseHeaders response) throws Exception { - int i = 0; - for (String header : response.getHeaders().get("X-Forwarded-For")) { - xffHeaders[i++] = header; + public STATE onHeadersReceived(HttpResponseHeaders response) throws Exception { + int i = 0; + for (String header : response.getHeaders().get("X-Forwarded-For")) { + xffHeaders[i++] = header; + } + latch.countDown(); + return STATE.CONTINUE; } - latch.countDown(); - return STATE.CONTINUE; - } - public Void onCompleted() throws Exception { - return null; - } - }).get(3, TimeUnit.SECONDS); + public Void onCompleted() throws Exception { + return null; + } + }).get(3, TimeUnit.SECONDS); - if (!latch.await(2, TimeUnit.SECONDS)) { - Assert.fail("Time out"); - } - Assert.assertNotNull(xffHeaders[0]); - Assert.assertNotNull(xffHeaders[1]); - try { - Assert.assertEquals(xffHeaders[0], "abc"); - Assert.assertEquals(xffHeaders[1], "def"); - } catch (AssertionError ex) { - Assert.assertEquals(xffHeaders[1], "abc"); - Assert.assertEquals(xffHeaders[0], "def"); + if (!latch.await(2, TimeUnit.SECONDS)) { + Assert.fail("Time out"); + } + Assert.assertNotNull(xffHeaders[0]); + Assert.assertNotNull(xffHeaders[1]); + try { + Assert.assertEquals(xffHeaders[0], "abc"); + Assert.assertEquals(xffHeaders[1], "def"); + } catch (AssertionError ex) { + Assert.assertEquals(xffHeaders[1], "abc"); + Assert.assertEquals(xffHeaders[0], "def"); + } + } finally { + ahc.close(); } - ahc.close(); } - - @Test(groups = {"standalone", "default_provider"}) - public void testMultipleEntityHeaders() - throws IOException, ExecutionException, TimeoutException, InterruptedException { - final String[] clHeaders = new String[]{null, null}; + @Test(groups = { "standalone", "default_provider" }) + public void testMultipleEntityHeaders() throws IOException, ExecutionException, TimeoutException, InterruptedException { + final String[] clHeaders = new String[] { null, null }; AsyncHttpClient ahc = getAsyncHttpClient(null); - Request req = new RequestBuilder("GET").setUrl("http://localhost:" + port1 + "/MultiEnt").build(); - final CountDownLatch latch = new CountDownLatch(1); - ahc.executeRequest(req, new AsyncHandler() { - public void onThrowable(Throwable t) { - t.printStackTrace(System.out); - } + try { + Request req = new RequestBuilder("GET").setUrl("http://localhost:" + port1 + "/MultiEnt").build(); + final CountDownLatch latch = new CountDownLatch(1); + ahc.executeRequest(req, new AsyncHandler() { + public void onThrowable(Throwable t) { + t.printStackTrace(System.out); + } - public STATE onBodyPartReceived(HttpResponseBodyPart objectHttpResponseBodyPart) throws Exception { - return STATE.CONTINUE; - } + public STATE onBodyPartReceived(HttpResponseBodyPart objectHttpResponseBodyPart) throws Exception { + return STATE.CONTINUE; + } - public STATE onStatusReceived(HttpResponseStatus objectHttpResponseStatus) throws Exception { - return STATE.CONTINUE; - } + public STATE onStatusReceived(HttpResponseStatus objectHttpResponseStatus) throws Exception { + return STATE.CONTINUE; + } - public STATE onHeadersReceived(HttpResponseHeaders response) throws Exception { - try { - int i = 0; - for (String header : response.getHeaders().get("Content-Length")) { - clHeaders[i++] = header; + public STATE onHeadersReceived(HttpResponseHeaders response) throws Exception { + try { + int i = 0; + for (String header : response.getHeaders().get("Content-Length")) { + clHeaders[i++] = header; + } + } finally { + latch.countDown(); } - } finally { - latch.countDown(); + return STATE.CONTINUE; } - return STATE.CONTINUE; - } - public Void onCompleted() throws Exception { - return null; - } - }).get(3, TimeUnit.SECONDS); - - if (!latch.await(2, TimeUnit.SECONDS)) { - Assert.fail("Time out"); - } - Assert.assertNotNull(clHeaders[0]); - Assert.assertNotNull(clHeaders[1]); + public Void onCompleted() throws Exception { + return null; + } + }).get(3, TimeUnit.SECONDS); - // We can predict the order - try { - Assert.assertEquals(clHeaders[0], "2"); - Assert.assertEquals(clHeaders[1], "1"); - } catch (Throwable ex) { - Assert.assertEquals(clHeaders[0], "1"); - Assert.assertEquals(clHeaders[1], "2"); + if (!latch.await(2, TimeUnit.SECONDS)) { + Assert.fail("Time out"); + } + Assert.assertNotNull(clHeaders[0]); + Assert.assertNotNull(clHeaders[1]); + + // We can predict the order + try { + Assert.assertEquals(clHeaders[0], "2"); + Assert.assertEquals(clHeaders[1], "1"); + } catch (Throwable ex) { + Assert.assertEquals(clHeaders[0], "1"); + Assert.assertEquals(clHeaders[1], "2"); + } + } finally { + ahc.close(); } - ahc.close(); - } @BeforeClass(alwaysRun = true) @@ -174,23 +176,12 @@ public Void call() throws Exception { socket.shutdownInput(); if (req.endsWith("MultiEnt")) { OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); - outputStreamWriter.append("HTTP/1.0 200 OK\n" + - "Connection: close\n" + - "Content-Type: text/plain; charset=iso-8859-1\n" + - "Content-Length: 2\n" + - "Content-Length: 1\n" + - "\n0\n"); + outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 2\n" + "Content-Length: 1\n" + "\n0\n"); outputStreamWriter.flush(); socket.shutdownOutput(); } else if (req.endsWith("MultiOther")) { OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); - outputStreamWriter.append("HTTP/1.0 200 OK\n" + - "Connection: close\n" + - "Content-Type: text/plain; charset=iso-8859-1\n" + - "Content-Length: 1\n" + - "X-Forwarded-For: abc\n" + - "X-Forwarded-For: def\n" + - "\n0\n"); + outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 1\n" + "X-Forwarded-For: abc\n" + "X-Forwarded-For: def\n" + "\n0\n"); outputStreamWriter.flush(); socket.shutdownOutput(); } diff --git a/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java b/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java index 6c43cef52c..64dcc01802 100644 --- a/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java +++ b/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java @@ -33,40 +33,35 @@ public abstract class NoNullResponseTest extends AbstractBasicTest { private static final String VERISIGN_HTTPS_URL = "https://www.verisign.com"; - @Test(invocationCount = 4, groups = {"online", "default_provider"}) + @Test(invocationCount = 4, groups = { "online", "default_provider" }) public void multipleSslRequestsWithDelayAndKeepAlive() throws Throwable { final AsyncHttpClient client = create(); - final BoundRequestBuilder builder = client.prepareGet(VERISIGN_HTTPS_URL); - final Response response1 = builder.execute().get(); - Thread.sleep(5000); - final Response response2 = builder.execute().get(); - if (response2 != null) { - System.out.println("Success (2nd response was not null)."); - } else { - System.out.println("Failed (2nd response was null)."); + try { + final BoundRequestBuilder builder = client.prepareGet(VERISIGN_HTTPS_URL); + final Response response1 = builder.execute().get(); + Thread.sleep(5000); + final Response response2 = builder.execute().get(); + if (response2 != null) { + System.out.println("Success (2nd response was not null)."); + } else { + System.out.println("Failed (2nd response was null)."); + } + Assert.assertNotNull(response1); + Assert.assertNotNull(response2); + } finally { + client.close(); } - Assert.assertNotNull(response1); - Assert.assertNotNull(response2); - client.close(); } private AsyncHttpClient create() throws GeneralSecurityException { - final AsyncHttpClientConfig.Builder configBuilder = new AsyncHttpClientConfig.Builder() - .setCompressionEnabled(true) - .setFollowRedirects(true) - .setSSLContext(getSSLContext()) - .setAllowPoolingConnection(true) - .setConnectionTimeoutInMs(10000) - .setIdleConnectionInPoolTimeoutInMs(60000) - .setRequestTimeoutInMs(10000) - .setMaximumConnectionsPerHost(-1) - .setMaximumConnectionsTotal(-1); + final AsyncHttpClientConfig.Builder configBuilder = new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setFollowRedirects(true).setSSLContext(getSSLContext()).setAllowPoolingConnection(true).setConnectionTimeoutInMs(10000) + .setIdleConnectionInPoolTimeoutInMs(60000).setRequestTimeoutInMs(10000).setMaximumConnectionsPerHost(-1).setMaximumConnectionsTotal(-1); return getAsyncHttpClient(configBuilder.build()); } private SSLContext getSSLContext() throws GeneralSecurityException { final SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(null, new TrustManager[]{new MockTrustManager()}, null); + sslContext.init(null, new TrustManager[] { new MockTrustManager() }, null); return sslContext; } diff --git a/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java index 80acc7942f..cebeb26e2c 100644 --- a/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java @@ -36,61 +36,62 @@ public abstract class NonAsciiContentLengthTest extends AbstractBasicTest { + public void setUpServer() throws Exception { + server = new Server(); + port1 = findFreePort(); + Connector listener = new SelectChannelConnector(); - public void setUpServer() throws Exception { - server = new Server(); - port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); + listener.setHost("127.0.0.1"); + listener.setPort(port1); + server.addConnector(listener); + server.setHandler(new AbstractHandler() { - listener.setHost("127.0.0.1"); - listener.setPort(port1); - server.addConnector(listener); - server.setHandler(new AbstractHandler() { + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + int MAX_BODY_SIZE = 1024; // Can only handle bodies of up to 1024 bytes. + byte[] b = new byte[MAX_BODY_SIZE]; + int offset = 0; + int numBytesRead; + ServletInputStream is = request.getInputStream(); + try { + while ((numBytesRead = is.read(b, offset, MAX_BODY_SIZE - offset)) != -1) { + offset += numBytesRead; + } + } finally { + is.close(); + } + assertEquals(request.getContentLength(), offset); + response.setStatus(200); + response.setCharacterEncoding(request.getCharacterEncoding()); + response.setContentLength(request.getContentLength()); + ServletOutputStream os = response.getOutputStream(); + try { + os.write(b, 0, offset); + } finally { + os.close(); + } + } + }); + server.start(); + } - public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - int MAX_BODY_SIZE = 1024; //Can only handle bodies of up to 1024 bytes. - byte[] b = new byte[MAX_BODY_SIZE]; - int offset = 0; - int numBytesRead; - ServletInputStream is = request.getInputStream(); - try { - while ((numBytesRead = is.read(b, offset, MAX_BODY_SIZE - offset)) != -1) { - offset += numBytesRead; - } - } finally { - is.close(); - } - assertEquals(request.getContentLength(), offset); - response.setStatus(200); - response.setCharacterEncoding(request.getCharacterEncoding()); - response.setContentLength(request.getContentLength()); - ServletOutputStream os = response.getOutputStream(); - try { - os.write(b, 0, offset); - } finally { - os.close(); - } - } - }); - server.start(); - } + @Test(groups = { "standalone", "default_provider" }) + public void testNonAsciiContentLength() throws Exception { + setUpServer(); + execute("test"); + execute("\u4E00"); // Unicode CJK ideograph for one + } - @Test(groups = { "standalone", "default_provider" }) - public void testNonAsciiContentLength() throws Exception { - setUpServer(); - execute("test"); - execute("\u4E00"); // Unicode CJK ideograph for one - } - - protected void execute(String body) throws IOException, InterruptedException, ExecutionException { - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(body).setBodyEncoding("UTF-8"); - Future f = r.execute(); - Response resp = f.get(); - assertEquals(resp.getStatusCode(), 200); - assertEquals(body, resp.getResponseBody("UTF-8")); - client.close(); - } + protected void execute(String body) throws IOException, InterruptedException, ExecutionException { + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + try { + BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(body).setBodyEncoding("UTF-8"); + Future f = r.execute(); + Response resp = f.get(); + assertEquals(resp.getStatusCode(), 200); + assertEquals(body, resp.getResponseBody("UTF-8")); + } finally { + client.close(); + } + } } diff --git a/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java b/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java index d4f279bf20..4d05037b52 100644 --- a/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java +++ b/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java @@ -37,10 +37,7 @@ public abstract class ParamEncodingTest extends AbstractBasicTest { private class ParamEncoding extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { String p = request.getParameter("test"); if (isNonEmpty(p)) { @@ -57,20 +54,20 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testParameters() throws IOException, ExecutionException, TimeoutException, InterruptedException { String value = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKQLMNOPQRSTUVWXYZ1234567809`~!@#$%^&*()_+-=,.<>/?;:'\"[]{}\\| "; AsyncHttpClient client = getAsyncHttpClient(null); - Future f = client - .preparePost("http://127.0.0.1:" + port1) - .addParameter("test", value) - .execute(); - Response resp = f.get(10, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("X-Param"), value.trim()); - client.close(); + try { + Future f = client.preparePost("http://127.0.0.1:" + port1).addParameter("test", value).execute(); + Response resp = f.get(10, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("X-Param"), value.trim()); + } finally { + client.close(); + } } @Override diff --git a/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java index 756a258339..c58000f6fd 100644 --- a/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java +++ b/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java @@ -45,11 +45,7 @@ public abstract class PerRequestRelative302Test extends AbstractBasicTest { private class Relative302Handler extends AbstractHandler { - - public void handle(String s, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String param; httpResponse.setContentType("text/html; charset=utf-8"); @@ -89,46 +85,39 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void redirected302Test() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + + String anyMicrosoftPage = "http://www.microsoft.com[^:]*:80"; + String baseUrl = getBaseUrl(response.getUri()); - // once - Response response = c.prepareGet(getTargetUrl()) - .setFollowRedirects(true) - .setHeader("X-redirect", "http://www.microsoft.com/") - .execute().get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - - String anyMicrosoftPage = "http://www.microsoft.com[^:]*:80"; - String baseUrl = getBaseUrl(response.getUri()); - - c.close(); - - assertTrue(baseUrl.matches(anyMicrosoftPage), "response does not show redirection to " + anyMicrosoftPage); + assertTrue(baseUrl.matches(anyMicrosoftPage), "response does not show redirection to " + anyMicrosoftPage); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void notRedirected302Test() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(false).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); - - // once - Response response = c.prepareGet(getTargetUrl()) - .setFollowRedirects(false) - .setHeader("X-redirect", "http://www.microsoft.com/") - .execute().get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 302); - - c.close(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 302); + } finally { + c.close(); + } } private String getBaseUrl(URI uri) { @@ -148,41 +137,37 @@ private static int getPort(URI uri) { return port; } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void redirected302InvalidTest() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient c = getAsyncHttpClient(cg); - - // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. try { - Response response = c.preparePost(getTargetUrl()) - .setFollowRedirects(true) - .setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)) - .execute().get(); + // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. + Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 404); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void relativeLocationUrl() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient c = getAsyncHttpClient(cg); - - Response response = c.preparePost(getTargetUrl()) - .setFollowRedirects(true) - .setHeader("X-redirect", "/foo/test") - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 302); - assertEquals(response.getUri().toString(), getTargetUrl()); - c.close(); + try { + Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "/foo/test").execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 302); + assertEquals(response.getUri().toString(), getTargetUrl()); + } finally { + c.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java b/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java index e50bee78de..fc84abde00 100644 --- a/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2010 Ning, Inc. -* -* Ning licenses this file to you under the Apache License, version 2.0 -* (the "License"); you may not use this file except in compliance with the -* License. You may obtain a copy of the License at: -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -* License for the specific language governing permissions and limitations -* under the License. -*/ + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ package com.ning.http.client.async; import com.ning.http.client.AsyncCompletionHandler; @@ -44,7 +44,7 @@ /** * Per request timeout configuration test. - * + * * @author Hubert Iwaniuk */ public abstract class PerRequestTimeoutTest extends AbstractBasicTest { @@ -95,14 +95,13 @@ public void run() { } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testRequestTimeout() throws IOException { AsyncHttpClient client = getAsyncHttpClient(null); - PerRequestConfig requestConfig = new PerRequestConfig(); - requestConfig.setRequestTimeoutInMs(100); - Future responseFuture = - client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(); try { + PerRequestConfig requestConfig = new PerRequestConfig(); + requestConfig.setRequestTimeoutInMs(100); + Future responseFuture = client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(); Response response = responseFuture.get(2000, TimeUnit.MILLISECONDS); assertNull(response); client.close(); @@ -113,18 +112,18 @@ public void testRequestTimeout() throws IOException { assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); } catch (TimeoutException e) { fail("Timeout.", e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testGlobalDefaultPerRequestInfiniteTimeout() throws IOException { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100).build()); - PerRequestConfig requestConfig = new PerRequestConfig(); - requestConfig.setRequestTimeoutInMs(-1); - Future responseFuture = - client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(); try { + PerRequestConfig requestConfig = new PerRequestConfig(); + requestConfig.setRequestTimeoutInMs(-1); + Future responseFuture = client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(); Response response = responseFuture.get(); assertNotNull(response); client.close(); @@ -133,15 +132,16 @@ public void testGlobalDefaultPerRequestInfiniteTimeout() throws IOException { } catch (ExecutionException e) { assertTrue(e.getCause() instanceof TimeoutException); assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testGlobalRequestTimeout() throws IOException { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100).build()); - Future responseFuture = client.prepareGet(getTargetUrl()).execute(); try { + Future responseFuture = client.prepareGet(getTargetUrl()).execute(); Response response = responseFuture.get(2000, TimeUnit.MILLISECONDS); assertNull(response); client.close(); @@ -152,44 +152,45 @@ public void testGlobalRequestTimeout() throws IOException { assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); } catch (TimeoutException e) { fail("Timeout.", e); + } finally { + client.close(); } - client.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testGlobalIdleTimeout() throws IOException { - final long times[] = new long[]{-1, -1}; + final long times[] = new long[] { -1, -1 }; AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).build()); - Future responseFuture = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandler() { - @Override - public Response onCompleted(Response response) throws Exception { - return response; - } + try { + Future responseFuture = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandler() { + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - times[0] = System.currentTimeMillis(); - return super.onBodyPartReceived(content); - } + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { + times[0] = System.currentTimeMillis(); + return super.onBodyPartReceived(content); + } - @Override - public void onThrowable(Throwable t) { - times[1] = System.currentTimeMillis(); - super.onThrowable(t); - } - }); - try { + @Override + public void onThrowable(Throwable t) { + times[1] = System.currentTimeMillis(); + super.onThrowable(t); + } + }); Response response = responseFuture.get(); assertNotNull(response); assertEquals(response.getResponseBody(), MSG + MSG); } catch (InterruptedException e) { fail("Interrupted.", e); } catch (ExecutionException e) { - log.info(String.format("\n@%dms Last body part received\n@%dms Connection killed\n %dms difference.", - times[0], times[1], (times[1] - times[0]))); + log.info(String.format("\n@%dms Last body part received\n@%dms Connection killed\n %dms difference.", times[0], times[1], (times[1] - times[0]))); fail("Timeouted on idle.", e); + } finally { + client.close(); } - client.close(); } } diff --git a/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java b/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java index 9bfac1ff58..6c75c56cb8 100644 --- a/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java +++ b/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java @@ -35,10 +35,8 @@ public abstract class PostRedirectGetTest extends AbstractBasicTest { - // ------------------------------------------------------ Test Configuration - @Override public AbstractHandler configureHandler() throws Exception { return new PostRedirectGetHandler(); @@ -46,123 +44,111 @@ public AbstractHandler configureHandler() throws Exception { // ------------------------------------------------------------ Test Methods - @Test(groups = {"standalone", "post_redirect_get"}) + @Test(groups = { "standalone", "post_redirect_get" }) public void postRedirectGet302Test() throws Exception { doTestPositive(302); } - @Test(groups = {"standalone", "post_redirect_get"}) + @Test(groups = { "standalone", "post_redirect_get" }) public void postRedirectGet302StrictTest() throws Exception { doTestNegative(302, true); } - @Test(groups = {"standalone", "post_redirect_get"}) + @Test(groups = { "standalone", "post_redirect_get" }) public void postRedirectGet303Test() throws Exception { doTestPositive(303); } - @Test(groups = {"standalone", "post_redirect_get"}) + @Test(groups = { "standalone", "post_redirect_get" }) public void postRedirectGet301Test() throws Exception { doTestNegative(301, false); } - @Test(groups = {"standalone", "post_redirect_get"}) + @Test(groups = { "standalone", "post_redirect_get" }) public void postRedirectGet307Test() throws Exception { doTestNegative(307, false); } - // --------------------------------------------------------- Private Methods - private void doTestNegative(final int status, boolean strict) throws Exception { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true). - setStrict302Handling(strict). - addResponseFilter(new ResponseFilter() { - @Override - public FilterContext filter(FilterContext ctx) throws FilterException { - // pass on the x-expect-get and remove the x-redirect - // headers if found in the response - ctx.getResponseHeaders().getHeaders().get("x-expect-post"); - ctx.getRequest().getHeaders().add("x-expect-post", "true"); - ctx.getRequest().getHeaders().remove("x-redirect"); - return ctx; - } - }).build()); - Request request = new RequestBuilder("POST").setUrl(getTargetUrl()) - .addParameter("q", "a b") - .addHeader("x-redirect", +status + "@" + "http://localhost:" + port1 + "/foo/bar/baz") - .addHeader("x-negative", "true") - .build(); - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { - + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).setStrict302Handling(strict).addResponseFilter(new ResponseFilter() { @Override - public Integer onCompleted(Response response) throws Exception { - return response.getStatusCode(); + public FilterContext filter(FilterContext ctx) throws FilterException { + // pass on the x-expect-get and remove the x-redirect + // headers if found in the response + ctx.getResponseHeaders().getHeaders().get("x-expect-post"); + ctx.getRequest().getHeaders().add("x-expect-post", "true"); + ctx.getRequest().getHeaders().remove("x-redirect"); + return ctx; } + }).build()); + try { + Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).addParameter("q", "a b").addHeader("x-redirect", +status + "@" + "http://localhost:" + port1 + "/foo/bar/baz").addHeader("x-negative", "true").build(); + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + + @Override + public Integer onCompleted(Response response) throws Exception { + return response.getStatusCode(); + } - /* @Override */ - public void onThrowable(Throwable t) { - t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); - } + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } - }); - int statusCode = responseFuture.get(); - Assert.assertEquals(statusCode, 200); - p.close(); + }); + int statusCode = responseFuture.get(); + Assert.assertEquals(statusCode, 200); + } finally { + p.close(); + } } - private void doTestPositive(final int status) throws Exception { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true). - addResponseFilter(new ResponseFilter() { - @Override - public FilterContext filter(FilterContext ctx) throws FilterException { - // pass on the x-expect-get and remove the x-redirect - // headers if found in the response - ctx.getResponseHeaders().getHeaders().get("x-expect-get"); - ctx.getRequest().getHeaders().add("x-expect-get", "true"); - ctx.getRequest().getHeaders().remove("x-redirect"); - return ctx; - } - }).build()); - Request request = new RequestBuilder("POST").setUrl(getTargetUrl()) - .addParameter("q", "a b") - .addHeader("x-redirect", +status + "@" + "http://localhost:" + port1 + "/foo/bar/baz") - .build(); - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { - + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).addResponseFilter(new ResponseFilter() { @Override - public Integer onCompleted(Response response) throws Exception { - return response.getStatusCode(); + public FilterContext filter(FilterContext ctx) throws FilterException { + // pass on the x-expect-get and remove the x-redirect + // headers if found in the response + ctx.getResponseHeaders().getHeaders().get("x-expect-get"); + ctx.getRequest().getHeaders().add("x-expect-get", "true"); + ctx.getRequest().getHeaders().remove("x-redirect"); + return ctx; } + }).build()); + try { + Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).addParameter("q", "a b").addHeader("x-redirect", +status + "@" + "http://localhost:" + port1 + "/foo/bar/baz").build(); + Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + + @Override + public Integer onCompleted(Response response) throws Exception { + return response.getStatusCode(); + } - /* @Override */ - public void onThrowable(Throwable t) { - t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); - } + /* @Override */ + public void onThrowable(Throwable t) { + t.printStackTrace(); + Assert.fail("Unexpected exception: " + t.getMessage(), t); + } - }); - int statusCode = responseFuture.get(); - Assert.assertEquals(statusCode, 200); - p.close(); + }); + int statusCode = responseFuture.get(); + Assert.assertEquals(statusCode, 200); + } finally { + p.close(); + } } - // ---------------------------------------------------------- Nested Classes - public static class PostRedirectGetHandler extends AbstractHandler { final AtomicInteger counter = new AtomicInteger(); /* @Override */ - public void handle(String pathInContext, - org.eclipse.jetty.server.Request request, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String pathInContext, org.eclipse.jetty.server.Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { final boolean expectGet = (httpRequest.getHeader("x-expect-get") != null); final boolean expectPost = (httpRequest.getHeader("x-expect-post") != null); @@ -212,7 +198,6 @@ public void handle(String pathInContext, return; } - httpResponse.sendError(500); httpResponse.getOutputStream().flush(); httpResponse.getOutputStream().close(); diff --git a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java index ea1537a929..372233f1d4 100644 --- a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java +++ b/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java @@ -40,7 +40,7 @@ /** * Tests POST request with Query String. - * + * * @author Hubert Iwaniuk */ public abstract class PostWithQSTest extends AbstractBasicTest { @@ -49,10 +49,7 @@ public abstract class PostWithQSTest extends AbstractBasicTest { * POST with QS server part. */ private class PostWithQSHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { String qs = request.getQueryString(); if (isNonEmpty(qs) && request.getContentLength() == 3) { @@ -73,54 +70,63 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void postWithQS() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b").setBody("abc".getBytes()).execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - client.close(); + try { + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b").setBody("abc".getBytes()).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void postWithNulParamQS() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { + try { + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ - public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=")) { - throw new IOException(status.getUrl().toURL().toString()); + /* @Override */ + public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { + if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=")) { + throw new IOException(status.getUrl().toURL().toString()); + } + return super.onStatusReceived(status); } - return super.onStatusReceived(status); - } - }); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - client.close(); + }); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void postWithNulParamsQS() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b&c&d=e").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { + try { + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b&c&d=e").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ - public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { - throw new IOException("failed to parse the query properly"); + /* @Override */ + public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { + if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { + throw new IOException("failed to parse the query properly"); + } + return super.onStatusReceived(status); } - return super.onStatusReceived(status); - } - }); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - client.close(); + }); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } } @Override diff --git a/api/src/test/java/com/ning/http/client/async/ProviderUtil.java b/api/src/test/java/com/ning/http/client/async/ProviderUtil.java deleted file mode 100644 index eb3d77cf15..0000000000 --- a/api/src/test/java/com/ning/http/client/async/ProviderUtil.java +++ /dev/null @@ -1,41 +0,0 @@ -/* -* Copyright 2010 Ning, Inc. -* -* Ning licenses this file to you under the Apache License, version 2.0 -* (the "License"); you may not use this file except in compliance with the -* License. You may obtain a copy of the License at: -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -* License for the specific language governing permissions and limitations -* under the License. -*/ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.providers.jdk.JDKAsyncHttpProvider; - -public class ProviderUtil { - - - public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { - if (config == null) { - return new AsyncHttpClient(); - } else { - return new AsyncHttpClient(config); - } - } - - public static AsyncHttpClient jdkProvider(AsyncHttpClientConfig config) { - if (config == null) { - return new AsyncHttpClient(new JDKAsyncHttpProvider(new AsyncHttpClientConfig.Builder().build())); - } else { - return new AsyncHttpClient(new JDKAsyncHttpProvider(config)); - } - } - -} diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTest.java index 4129a4a729..b05e048121 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/api/src/test/java/com/ning/http/client/async/ProxyTest.java @@ -40,15 +40,12 @@ /** * Proxy usage tests. - * + * * @author Hubert Iwaniuk */ public abstract class ProxyTest extends AbstractBasicTest { private class ProxyHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("GET".equalsIgnoreCase(request.getMethod())) { response.addHeader("target", r.getUri().getPath()); response.setStatus(HttpServletResponse.SC_OK); @@ -64,73 +61,68 @@ public AbstractHandler configureHandler() throws Exception { return new ProxyHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testRequestLevelProxy() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - String target = "http://127.0.0.1:1234/"; - Future f = client - .prepareGet(target) - .setProxyServer(new ProxyServer("127.0.0.1", port1)) - .execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("target"), "/"); - client.close(); + try { + String target = "http://127.0.0.1:1234/"; + Future f = client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1)).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("target"), "/"); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testGlobalProxy() throws IOException, ExecutionException, TimeoutException, InterruptedException { - AsyncHttpClientConfig cfg - = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port1)).build(); + AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port1)).build(); AsyncHttpClient client = getAsyncHttpClient(cfg); - String target = "http://127.0.0.1:1234/"; - Future f = client - .prepareGet(target) - .execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("target"), "/"); - client.close(); + try { + String target = "http://127.0.0.1:1234/"; + Future f = client.prepareGet(target).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("target"), "/"); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testBothProxies() throws IOException, ExecutionException, TimeoutException, InterruptedException { - AsyncHttpClientConfig cfg - = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port1 - 1)).build(); + AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port1 - 1)).build(); AsyncHttpClient client = getAsyncHttpClient(cfg); - String target = "http://127.0.0.1:1234/"; - Future f = client - .prepareGet(target) - .setProxyServer(new ProxyServer("127.0.0.1", port1)) - .execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("target"), "/"); - client.close(); + try { + String target = "http://127.0.0.1:1234/"; + Future f = client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1)).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("target"), "/"); + } finally { + client.close(); + } } - - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testNonProxyHosts() throws IOException, ExecutionException, TimeoutException, InterruptedException { - AsyncHttpClientConfig cfg - = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port1 - 1)).build(); + AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port1 - 1)).build(); AsyncHttpClient client = getAsyncHttpClient(cfg); try { String target = "http://127.0.0.1:1234/"; - client.prepareGet(target) - .setProxyServer(new ProxyServer("127.0.0.1", port1).addNonProxyHost("127.0.0.1")) - .execute().get(); + client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1).addNonProxyHost("127.0.0.1")).execute().get(); assertFalse(true); } catch (Throwable e) { assertNotNull(e.getCause()); assertEquals(e.getCause().getClass(), ConnectException.class); + } finally { + client.close(); } - - client.close(); } @Test(groups = { "standalone", "default_provider" }) @@ -148,29 +140,30 @@ public void testProxyProperties() throws IOException, ExecutionException, Timeou AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().setUseProxyProperties(true).build(); AsyncHttpClient client = getAsyncHttpClient(cfg); - - String target = "http://127.0.0.1:1234/"; - Future f = client.prepareGet(target).execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("target"), "/"); - - target = "http://localhost:1234/"; - f = client.prepareGet(target).execute(); try { - resp = f.get(3, TimeUnit.SECONDS); - fail("should not be able to connect"); - } catch (ExecutionException e) { - // ok, no proxy used + String target = "http://127.0.0.1:1234/"; + Future f = client.prepareGet(target).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("target"), "/"); + + target = "http://localhost:1234/"; + f = client.prepareGet(target).execute(); + try { + resp = f.get(3, TimeUnit.SECONDS); + fail("should not be able to connect"); + } catch (ExecutionException e) { + // ok, no proxy used + } + } finally { + client.close(); } - - client.close(); } finally { System.setProperties(originalProps); } } - + @Test(groups = { "standalone", "default_provider" }) public void testIgnoreProxyPropertiesByDefault() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); @@ -186,22 +179,23 @@ public void testIgnoreProxyPropertiesByDefault() throws IOException, ExecutionEx AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = getAsyncHttpClient(cfg); - - String target = "http://127.0.0.1:1234/"; - Future f = client.prepareGet(target).execute(); try { - f.get(3, TimeUnit.SECONDS); - fail("should not be able to connect"); - } catch (ExecutionException e) { - // ok, no proxy used + String target = "http://127.0.0.1:1234/"; + Future f = client.prepareGet(target).execute(); + try { + f.get(3, TimeUnit.SECONDS); + fail("should not be able to connect"); + } catch (ExecutionException e) { + // ok, no proxy used + } + } finally { + client.close(); } - - client.close(); } finally { System.setProperties(originalProps); } } - + @Test(groups = { "standalone", "default_provider" }) public void testProxyActivationProperty() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); @@ -218,27 +212,28 @@ public void testProxyActivationProperty() throws IOException, ExecutionException AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = getAsyncHttpClient(cfg); - - String target = "http://127.0.0.1:1234/"; - Future f = client.prepareGet(target).execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("target"), "/"); - - target = "http://localhost:1234/"; - f = client.prepareGet(target).execute(); try { - resp = f.get(3, TimeUnit.SECONDS); - fail("should not be able to connect"); - } catch (ExecutionException e) { - // ok, no proxy used + String target = "http://127.0.0.1:1234/"; + Future f = client.prepareGet(target).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("target"), "/"); + + target = "http://localhost:1234/"; + f = client.prepareGet(target).execute(); + try { + resp = f.get(3, TimeUnit.SECONDS); + fail("should not be able to connect"); + } catch (ExecutionException e) { + // ok, no proxy used + } + } finally { + client.close(); } - - client.close(); } finally { System.setProperties(originalProps); } } - + } diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java index a207828ced..ccfbe65f76 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java +++ b/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java @@ -86,7 +86,7 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testRequestProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.setFollowRedirects(true); @@ -95,28 +95,29 @@ public void testRequestProxy() throws IOException, InterruptedException, Executi AsyncHttpClientConfig config = b.build(); AsyncHttpClient asyncHttpClient = getAsyncHttpClient(config); - - RequestBuilder rb = new RequestBuilder("GET").setProxyServer(ps).setUrl(getTargetUrl2()); - Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { - - public void onThrowable(Throwable t) { - t.printStackTrace(); - log.debug(t.getMessage(), t); - } - - @Override - public Response onCompleted(Response response) throws Exception { - return response; - } - }); - Response r = responseFuture.get(); - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); - - asyncHttpClient.close(); + try { + RequestBuilder rb = new RequestBuilder("GET").setProxyServer(ps).setUrl(getTargetUrl2()); + Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { + + public void onThrowable(Throwable t) { + t.printStackTrace(); + log.debug(t.getMessage(), t); + } + + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } + }); + Response r = responseFuture.get(); + assertEquals(r.getStatusCode(), 200); + assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); + } finally { + asyncHttpClient.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.setFollowRedirects(true); @@ -126,44 +127,39 @@ public void testConfigProxy() throws IOException, InterruptedException, Executio AsyncHttpClientConfig config = b.build(); AsyncHttpClient asyncHttpClient = getAsyncHttpClient(config); - - RequestBuilder rb = new RequestBuilder("GET").setUrl(getTargetUrl2()); - Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { - - public void onThrowable(Throwable t) { - t.printStackTrace(); - log.debug(t.getMessage(), t); - } - - @Override - public Response onCompleted(Response response) throws Exception { - return response; - } - }); - Response r = responseFuture.get(); - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); - - asyncHttpClient.close(); + try { + RequestBuilder rb = new RequestBuilder("GET").setUrl(getTargetUrl2()); + Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { + + public void onThrowable(Throwable t) { + t.printStackTrace(); + log.debug(t.getMessage(), t); + } + + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } + }); + Response r = responseFuture.get(); + assertEquals(r.getStatusCode(), 200); + assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); + } finally { + asyncHttpClient.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder() - .setProxyProtocol(ProxyServer.Protocol.HTTPS) - .setProxyHost("127.0.0.1") - .setProxyPort(port1) - .setFollowRedirects(true) - .setUrl(getTargetUrl2()) - .setHeader("Content-Type", "text/html").build(); - - Response r = client.get().get(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProxyProtocol(ProxyServer.Protocol.HTTPS).setProxyHost("127.0.0.1").setProxyPort(port1).setFollowRedirects(true).setUrl(getTargetUrl2()).setHeader("Content-Type", "text/html").build(); + try { + Response r = client.get().get(); - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); - - client.close(); + assertEquals(r.getStatusCode(), 200); + assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); + } finally { + client.close(); + } } } - diff --git a/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java index 728ab012fd..62846bcfbb 100644 --- a/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java +++ b/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java @@ -34,46 +34,49 @@ /** * @author Benjamin Hanzelmann */ -public abstract class PutLargeFileTest - extends AbstractBasicTest { +public abstract class PutLargeFileTest extends AbstractBasicTest { private File largeFile; - @Test(groups = {"standalone", "default_provider"}, enabled = true) - public void testPutLargeFile() - throws Exception { + @Test(groups = { "standalone", "default_provider" }, enabled = true) + public void testPutLargeFile() throws Exception { byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); long repeats = (1024 * 1024 * 100 / bytes.length) + 1; largeFile = createTempFile(bytes, (int) repeats); int timeout = (int) (largeFile.length() / 1000); AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build(); AsyncHttpClient client = getAsyncHttpClient(config); - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); + try { + BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - rb.setBody(largeFile); + rb.setBody(largeFile); - Response response = rb.execute().get(); - Assert.assertEquals(200, response.getStatusCode()); - client.close(); + Response response = rb.execute().get(); + Assert.assertEquals(200, response.getStatusCode()); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) - public void testPutSmallFile() - throws Exception { + @Test(groups = { "standalone", "default_provider" }) + public void testPutSmallFile() throws Exception { byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); long repeats = (1024 / bytes.length) + 1; -// int timeout = (5000); + // int timeout = (5000); largeFile = createTempFile(bytes, (int) repeats); AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = getAsyncHttpClient(config); - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); + try { + BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - rb.setBody(largeFile); + rb.setBody(largeFile); - Response response = rb.execute().get(); - Assert.assertEquals(200, response.getStatusCode()); - client.close(); + Response response = rb.execute().get(); + Assert.assertEquals(200, response.getStatusCode()); + } finally { + client.close(); + } } @AfterMethod @@ -82,12 +85,10 @@ public void after() { } @Override - public AbstractHandler configureHandler() - throws Exception { + public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { - public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServletResponse resp) - throws IOException, ServletException { + public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { ServletInputStream in = req.getInputStream(); byte[] b = new byte[8092]; @@ -110,11 +111,9 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle }; } - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" - + UUID.randomUUID().toString().substring(0, 8)); + private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); - public static File createTempFile(byte[] pattern, int repeat) - throws IOException { + public static File createTempFile(byte[] pattern, int repeat) throws IOException { TMP.mkdirs(); TMP.deleteOnExit(); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); @@ -124,8 +123,7 @@ public static File createTempFile(byte[] pattern, int repeat) return tmpFile; } - public static void write(byte[] pattern, int repeat, File file) - throws IOException { + public static void write(byte[] pattern, int repeat, File file) throws IOException { file.deleteOnExit(); file.getParentFile().mkdirs(); FileOutputStream out = null; @@ -134,8 +132,7 @@ public static void write(byte[] pattern, int repeat, File file) for (int i = 0; i < repeat; i++) { out.write(pattern); } - } - finally { + } finally { if (out != null) { out.close(); } diff --git a/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java b/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java index a7879a944a..0554ecd268 100644 --- a/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java +++ b/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java @@ -39,15 +39,12 @@ /** * Testing query parameters support. - * + * * @author Hubert Iwaniuk */ public abstract class QueryParametersTest extends AbstractBasicTest { private class QueryStringHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest request, - HttpServletResponse response) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("GET".equalsIgnoreCase(request.getMethod())) { String qs = request.getQueryString(); if (isNonEmpty(qs)) { @@ -71,61 +68,62 @@ public AbstractHandler configureHandler() throws Exception { return new QueryStringHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testQueryParameters() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); - Future f = client - .prepareGet("http://127.0.0.1:" + port1) - .addQueryParameter("a", "1") - .addQueryParameter("b", "2") - .execute(); - Response resp = f.get(3, TimeUnit.SECONDS); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getHeader("a"), "1"); - assertEquals(resp.getHeader("b"), "2"); - client.close(); + try { + Future f = client.prepareGet("http://127.0.0.1:" + port1).addQueryParameter("a", "1").addQueryParameter("b", "2").execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("a"), "1"); + assertEquals(resp.getHeader("b"), "2"); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testUrlRequestParametersEncoding() throws IOException, ExecutionException, InterruptedException { String URL = getTargetUrl() + "?q="; String REQUEST_PARAM = "github github \ngithub"; AsyncHttpClient client = getAsyncHttpClient(null); - String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); - LoggerFactory.getLogger(QueryParametersTest.class).info("Executing request [{}] ...", requestUrl2); - Response response = client.prepareGet(requestUrl2).execute().get(); - String s = URLDecoder.decode(response.getHeader("q"), "UTF-8"); - assertEquals(s, REQUEST_PARAM); - client.close(); + try { + String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); + LoggerFactory.getLogger(QueryParametersTest.class).info("Executing request [{}] ...", requestUrl2); + Response response = client.prepareGet(requestUrl2).execute().get(); + String s = URLDecoder.decode(response.getHeader("q"), "UTF-8"); + assertEquals(s, REQUEST_PARAM); + } finally { + client.close(); + } } - - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void urlWithColonTest_Netty() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); + try { + String query = "test:colon:"; + Response response = c.prepareGet(String.format("http://127.0.0.1:%d/foo/test/colon?q=%s", port1, query)).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - String query = "test:colon:"; - Response response = c.prepareGet(String.format("http://127.0.0.1:%d/foo/test/colon?q=%s", port1, query)) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); - - assertEquals(response.getHeader("q"), URLEncoder.encode(query, "UTF-8")); - c.close(); + assertEquals(response.getHeader("q"), URLEncoder.encode(query, "UTF-8")); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void urlWithColonTest_JDK() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); + try { + String query = "test:colon:"; + Response response = c.prepareGet(String.format("http://127.0.0.1:%d/foo/test/colon?q=%s", port1, query)).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - String query = "test:colon:"; - Response response = c.prepareGet(String.format("http://127.0.0.1:%d/foo/test/colon?q=%s", port1, query)) - .setHeader("Content-Type", "text/html") - .execute().get(TIMEOUT, TimeUnit.SECONDS); - - assertEquals(response.getHeader("q"), URLEncoder.encode(query, "UTF-8")); - c.close(); + assertEquals(response.getHeader("q"), URLEncoder.encode(query, "UTF-8")); + } finally { + c.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/RC10KTest.java b/api/src/test/java/com/ning/http/client/async/RC10KTest.java index 51a1e09602..7859f2141c 100644 --- a/api/src/test/java/com/ning/http/client/async/RC10KTest.java +++ b/api/src/test/java/com/ning/http/client/async/RC10KTest.java @@ -46,7 +46,7 @@ /** * Reverse C10K Problem test. - * + * * @author Hubert Iwaniuk */ public abstract class RC10KTest extends AbstractBasicTest { @@ -102,20 +102,22 @@ public void handle(String s, Request r, HttpServletRequest req, HttpServletRespo @Test(timeOut = 10 * 60 * 1000, groups = "scalability") public void rc10kProblem() throws IOException, ExecutionException, TimeoutException, InterruptedException { - AsyncHttpClient ahc = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder().setMaximumConnectionsPerHost(C10K).setAllowPoolingConnection(true).build()); - List> resps = new ArrayList>(C10K); - int i = 0; - while (i < C10K) { - resps.add(ahc.prepareGet(String.format("http://127.0.0.1:%d/%d", ports[i % SRV_COUNT], i)).execute(new MyAsyncHandler(i++))); - } - i = 0; - for (Future fResp : resps) { - Integer resp = fResp.get(); - assertNotNull(resp); - assertEquals(resp.intValue(), i++); + AsyncHttpClient ahc = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setMaximumConnectionsPerHost(C10K).setAllowPoolingConnection(true).build()); + try { + List> resps = new ArrayList>(C10K); + int i = 0; + while (i < C10K) { + resps.add(ahc.prepareGet(String.format("http://127.0.0.1:%d/%d", ports[i % SRV_COUNT], i)).execute(new MyAsyncHandler(i++))); + } + i = 0; + for (Future fResp : resps) { + Integer resp = fResp.get(); + assertNotNull(resp); + assertEquals(resp.intValue(), i++); + } + } finally { + ahc.close(); } - ahc.close(); } private class MyAsyncHandler implements AsyncHandler { diff --git a/api/src/test/java/com/ning/http/client/async/Relative302Test.java b/api/src/test/java/com/ning/http/client/async/Relative302Test.java index 9d1f63c98f..1c06a2e202 100644 --- a/api/src/test/java/com/ning/http/client/async/Relative302Test.java +++ b/api/src/test/java/com/ning/http/client/async/Relative302Test.java @@ -45,11 +45,7 @@ public abstract class Relative302Test extends AbstractBasicTest { private class Relative302Handler extends AbstractHandler { - - public void handle(String s, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String param; httpResponse.setContentType("text/html; charset=utf-8"); @@ -89,26 +85,25 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void redirected302Test() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); - // once - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", "http://www.google.com/") - .execute().get(); + try { + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "http://www.google.com/").execute().get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - - String anyGoogleSubdomain = "http://www\\.google\\.[a-z]+(\\.[a-z]+)*:80"; - String baseUrl = getBaseUrl( response.getUri() ); - - assertTrue(baseUrl.matches( anyGoogleSubdomain ), "response does not show redirection to " + anyGoogleSubdomain); + String anyGoogleSubdomain = "http://www\\.google\\.[a-z]+(\\.[a-z]+)*:80"; + String baseUrl = getBaseUrl(response.getUri()); - c.close(); + assertTrue(baseUrl.matches(anyGoogleSubdomain), "response does not show redirection to " + anyGoogleSubdomain); + } finally { + c.close(); + } } private String getBaseUrl(URI uri) { @@ -128,7 +123,7 @@ private static int getPort(URI uri) { return port; } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void redirected302InvalidTest() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); @@ -136,59 +131,56 @@ public void redirected302InvalidTest() throws Throwable { // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. try { - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)) - .execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 404); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void absolutePathRedirectTest() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + String redirectTarget = "/bar/test"; + String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - String redirectTarget = "/bar/test"; - String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", redirectTarget) - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getUri().toString(), destinationUrl); - - log.debug("{} was redirected to {}", redirectTarget, destinationUrl); - - c.close(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getUri().toString(), destinationUrl); + + log.debug("{} was redirected to {}", redirectTarget, destinationUrl); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void relativePathRedirectTest() throws Throwable { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + String redirectTarget = "bar/test1"; + String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - String redirectTarget = "bar/test1"; - String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - - Response response = c.prepareGet(getTargetUrl()) - .setHeader("X-redirect", redirectTarget) - .execute().get(); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getUri().toString(), destinationUrl); - - log.debug("{} was redirected to {}", redirectTarget, destinationUrl); - - c.close(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getUri().toString(), destinationUrl); + + log.debug("{} was redirected to {}", redirectTarget, destinationUrl); + } finally { + c.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java index 25f1c3680e..11a6382355 100644 --- a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java +++ b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java @@ -41,103 +41,109 @@ * Unit tests for remote site. *

* see http://github.com/MSch/ning-async-http-client-bug/tree/master - * + * * @author Martin Schurrer */ -public abstract class RemoteSiteTest extends AbstractBasicTest{ +public abstract class RemoteSiteTest extends AbstractBasicTest { public static final String URL = "http://google.com?q="; - public static final String REQUEST_PARAM = "github github \n" + - "github"; - - @Test(groups = {"online", "default_provider"}) + public static final String REQUEST_PARAM = "github github \n" + "github"; + + @Test(groups = { "online", "default_provider" }) public void testGoogleCom() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - // Works - Response response = c.prepareGet("http://www.google.com/").execute().get(10,TimeUnit.SECONDS); - assertNotNull(response); + try { + Response response = c.prepareGet("http://www.google.com/").execute().get(10, TimeUnit.SECONDS); + assertNotNull(response); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testMailGoogleCom() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - - Response response = c.prepareGet("http://mail.google.com/").execute().get(10,TimeUnit.SECONDS); - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); + try { + Response response = c.prepareGet("http://mail.google.com/").execute().get(10, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testMicrosoftCom() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - - // Works - Response response = c.prepareGet("http://microsoft.com/").execute().get(10,TimeUnit.SECONDS); - assertNotNull(response); - assertEquals(response.getStatusCode(), 301); + try { + Response response = c.prepareGet("http://microsoft.com/").execute().get(10, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(response.getStatusCode(), 301); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testWwwMicrosoftCom() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - - Response response = c.prepareGet("http://www.microsoft.com/").execute().get(10,TimeUnit.SECONDS); + + Response response = c.prepareGet("http://www.microsoft.com/").execute().get(10, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 302); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testUpdateMicrosoftCom() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - - Response response = c.prepareGet("http://update.microsoft.com/").execute().get(10,TimeUnit.SECONDS); - assertNotNull(response); - assertEquals(response.getStatusCode(), 302); + try { + Response response = c.prepareGet("http://update.microsoft.com/").execute().get(10, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(response.getStatusCode(), 302); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testGoogleComWithTimeout() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - - // Works - Response response = c.prepareGet("http://google.com/").execute().get(10,TimeUnit.SECONDS); - assertNotNull(response); - assertEquals(response.getStatusCode(), 301); + try { + Response response = c.prepareGet("http://google.com/").execute().get(10, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(response.getStatusCode(), 301); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void asyncStatusHEADContentLenghtTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); - - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("HEAD") - .setUrl("http://www.google.com/") - .build(); - - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - Assert.assertEquals(response.getStatusCode(), 200); - l.countDown(); - return response; + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("HEAD").setUrl("http://www.google.com/").build(); + + p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + Assert.assertEquals(response.getStatusCode(), 200); + l.countDown(); + return response; + } + }).get(); + + if (!l.await(5, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - - if (!l.await(5, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + p.close(); } - p.close(); } - @Test(groups = {"online", "default_provider"}, enabled = false) + @Test(groups = { "online", "default_provider" }, enabled = false) public void invalidStreamTest2() throws Throwable { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder() - .setRequestTimeoutInMs(10000) - .setFollowRedirects(true) - .setAllowPoolingConnection(false) - .setMaximumNumberOfRedirects(6) - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).setFollowRedirects(true).setAllowPoolingConnection(false).setMaximumNumberOfRedirects(6).build(); AsyncHttpClient c = getAsyncHttpClient(config); try { @@ -149,131 +155,145 @@ public void invalidStreamTest2() throws Throwable { t.printStackTrace(); assertNotNull(t.getCause()); assertEquals(t.getCause().getMessage(), "invalid version format: ICY"); + } finally { + c.close(); } - c.close(); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void asyncFullBodyProperlyRead() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); + try { + Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); - InputStream stream = r.getResponseBodyAsStream(); - int available = stream.available(); - int[] lengthWrapper = new int[1]; - /*byte[] bytes =*/ AsyncHttpProviderUtils.readFully(stream, lengthWrapper); - int byteToRead = lengthWrapper[0]; + InputStream stream = r.getResponseBodyAsStream(); + int available = stream.available(); + int[] lengthWrapper = new int[1]; + /* byte[] bytes = */AsyncHttpProviderUtils.readFully(stream, lengthWrapper); + int byteToRead = lengthWrapper[0]; - Assert.assertEquals(available, byteToRead); - client.close(); + Assert.assertEquals(available, byteToRead); + } finally { + client.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testUrlRequestParametersEncoding() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); - String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); - log.info(String.format("Executing request [%s] ...", requestUrl2)); - Response response = client.prepareGet(requestUrl2).execute().get(); - Assert.assertEquals(response.getStatusCode(), 301); + try { + String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); + log.info(String.format("Executing request [%s] ...", requestUrl2)); + Response response = client.prepareGet(requestUrl2).execute().get(); + Assert.assertEquals(response.getStatusCode(), 301); + } finally { + client.close(); + } } /** - * See https://issues.sonatype.org/browse/AHC-61 + * See https://issues.sonatype.org/browse/AHC-61 + * * @throws Throwable */ - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void testAHC60() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); - Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(); - Assert.assertEquals(response.getStatusCode(), 200); + try { + Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(); + Assert.assertEquals(response.getStatusCode(), 200); + } finally { + client.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void stripQueryStringTest() throws Throwable { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(); - Response response = c.prepareGet("http://www.freakonomics.com/?p=55846") - .execute().get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - - - c.close(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void stripQueryStringNegativeTest() throws Throwable { - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder() - .setRemoveQueryParamsOnRedirect(false).setFollowRedirects(true).build(); + AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setRemoveQueryParamsOnRedirect(false).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(); - Response response = c.prepareGet("http://www.freakonomics.com/?p=55846") - .execute().get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 301); - - - c.close(); + assertNotNull(response); + assertEquals(response.getStatusCode(), 301); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void evilCoookieTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - RequestBuilder builder2 = new RequestBuilder("GET"); - builder2.setFollowRedirects(true); - builder2.setUrl("http://www.google.com/"); - builder2.addHeader("Content-Type", "text/plain"); - builder2.addCookie(new com.ning.http.client.Cookie(".google.com", "evilcookie", "test", "/", 10, false)); - com.ning.http.client.Request request2 = builder2.build(); - Response response = c.executeRequest(request2).get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - c.close(); + try { + RequestBuilder builder2 = new RequestBuilder("GET"); + builder2.setFollowRedirects(true); + builder2.setUrl("http://www.google.com/"); + builder2.addHeader("Content-Type", "text/plain"); + builder2.addCookie(new com.ning.http.client.Cookie(".google.com", "evilcookie", "test", "/", 10, false)); + com.ning.http.client.Request request2 = builder2.build(); + Response response = c.executeRequest(request2).get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + } finally { + c.close(); + } } - @Test(groups = {"online", "default_provider"}, enabled = false) + @Test(groups = { "online", "default_provider" }, enabled = false) public void testAHC62Com() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); - // Works - Response response = c.prepareGet("http://api.crunchbase.com/v/1/financial-organization/kinsey-hills-group.js").execute(new AsyncHandler() { - - private Response.ResponseBuilder builder = new Response.ResponseBuilder(); - - public void onThrowable(Throwable t) { - t.printStackTrace(); - } - - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - System.out.println(bodyPart.getBodyPartBytes().length); - builder.accumulate(bodyPart); - - return STATE.CONTINUE; - } - - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - builder.accumulate(responseStatus); - return STATE.CONTINUE; - } - - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - builder.accumulate(headers); - return STATE.CONTINUE; - } - - public Response onCompleted() throws Exception { - return builder.build(); - } - }).get(10, TimeUnit.SECONDS); - assertNotNull(response); - assertTrue(response.getResponseBody().length() >= 3870); + try { + Response response = c.prepareGet("http://api.crunchbase.com/v/1/financial-organization/kinsey-hills-group.js").execute(new AsyncHandler() { + + private Response.ResponseBuilder builder = new Response.ResponseBuilder(); + + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + System.out.println(bodyPart.getBodyPartBytes().length); + builder.accumulate(bodyPart); + + return STATE.CONTINUE; + } + + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + builder.accumulate(responseStatus); + return STATE.CONTINUE; + } + + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + builder.accumulate(headers); + return STATE.CONTINUE; + } + + public Response onCompleted() throws Exception { + return builder.build(); + } + }).get(10, TimeUnit.SECONDS); + assertNotNull(response); + assertTrue(response.getResponseBody().length() >= 3870); + } finally { + c.close(); + } } } - diff --git a/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java b/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java index 3cd92523ba..6b6ccd86bd 100644 --- a/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java +++ b/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java @@ -29,9 +29,7 @@ public abstract class RetryRequestTest extends AbstractBasicTest { public static class SlowAndBigHandler extends AbstractHandler { - public void handle(String pathInContext, Request request, - HttpServletRequest httpRequest, HttpServletResponse httpResponse) - throws IOException, ServletException { + public void handle(String pathInContext, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { int load = 100; httpResponse.setStatus(200); @@ -40,7 +38,6 @@ public void handle(String pathInContext, Request request, httpResponse.flushBuffer(); - OutputStream os = httpResponse.getOutputStream(); for (int i = 0; i < load; i++) { os.write(i % 255); @@ -51,7 +48,6 @@ public void handle(String pathInContext, Request request, // nuku } - if (i > load / 10) { httpResponse.sendError(500); } @@ -71,8 +67,7 @@ public AbstractHandler configureHandler() throws Exception { return new SlowAndBigHandler(); } - - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testMaxRetry() throws Throwable { AsyncHttpClient ahc = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setMaxRequestRetry(0).build()); try { @@ -84,8 +79,8 @@ public void testMaxRetry() throws Throwable { if (!t.getCause().getMessage().startsWith("Remotely Closed")) { fail(); } + } finally { + ahc.close(); } - - ahc.close(); } } diff --git a/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java index 4206f6b96d..064b472e09 100644 --- a/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java @@ -34,60 +34,57 @@ /** * @author Benjamin Hanzelmann - * + * */ public class SimpleAsyncClientErrorBehaviourTest extends AbstractBasicTest { - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testAccumulateErrorBody() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour( ErrorDocumentBehaviour.ACCUMULATE ).build(); - - ByteArrayOutputStream o = new ByteArrayOutputStream(10); - Future future = client.get(new OutputStreamBodyConsumer(o)); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 404); - assertEquals(o.toString(), ""); - assertTrue(response.getResponseBody().startsWith("")); - - client.close(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.ACCUMULATE).build(); + try { + ByteArrayOutputStream o = new ByteArrayOutputStream(10); + Future future = client.get(new OutputStreamBodyConsumer(o)); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 404); + assertEquals(o.toString(), ""); + assertTrue(response.getResponseBody().startsWith("")); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testOmitErrorBody() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour( ErrorDocumentBehaviour.OMIT ).build(); - - ByteArrayOutputStream o = new ByteArrayOutputStream(10); - Future future = client.get(new OutputStreamBodyConsumer(o)); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 404); - assertEquals(o.toString(), ""); - assertEquals(response.getResponseBody(), ""); - client.close(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.OMIT).build(); + try { + ByteArrayOutputStream o = new ByteArrayOutputStream(10); + Future future = client.get(new OutputStreamBodyConsumer(o)); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 404); + assertEquals(o.toString(), ""); + assertEquals(response.getResponseBody(), ""); + } finally { + client.close(); + } } @Override - public AsyncHttpClient getAsyncHttpClient( AsyncHttpClientConfig config ) - { + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { // disabled return null; } @Override - public AbstractHandler configureHandler() - throws Exception - { + public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { - - public void handle( String target, org.eclipse.jetty.server.Request baseRequest, - HttpServletRequest request, HttpServletResponse response ) - throws IOException, ServletException - { - response.sendError( 404 ); - baseRequest.setHandled( true ); + + public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + response.sendError(404); + baseRequest.setHandled(true); } }; } diff --git a/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java index 9697ffcb59..a0ba20249e 100644 --- a/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java @@ -43,67 +43,68 @@ public abstract class SimpleAsyncHttpClientTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }) public void inpuStreamBodyConsumerTest() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50) - .setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); - - Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getResponseBody(), MY_MESSAGE); - - client.close(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + try { + Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getResponseBody(), MY_MESSAGE); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) public void StringBufferBodyConsumerTest() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50) - .setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); - - StringBuilder s = new StringBuilder(); - Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(s.toString(), MY_MESSAGE); - - client.close(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + try { + StringBuilder s = new StringBuilder(); + Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(s.toString(), MY_MESSAGE); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) public void ByteArrayOutputStreamBodyConsumerTest() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50) - .setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); - - ByteArrayOutputStream o = new ByteArrayOutputStream(10); - Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(o.toString(), MY_MESSAGE); - - client.close(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + try { + ByteArrayOutputStream o = new ByteArrayOutputStream(10); + Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(o.toString(), MY_MESSAGE); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) public void RequestByteArrayOutputStreamBodyConsumerTest() throws Throwable { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl()).build(); - - ByteArrayOutputStream o = new ByteArrayOutputStream(10); - Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); - - System.out.println("waiting for response"); - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(o.toString(), MY_MESSAGE); - - client.close(); + try { + ByteArrayOutputStream o = new ByteArrayOutputStream(10); + Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); + + System.out.println("waiting for response"); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(o.toString(), MY_MESSAGE); + } finally { + client.close(); + } } /** @@ -111,31 +112,35 @@ public void RequestByteArrayOutputStreamBodyConsumerTest() throws Throwable { */ @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutZeroBytesFileTest() throws Throwable { - System.err.println("setting up client"); - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50) - .setRequestTimeoutInMs(5 * 1000).setUrl(getTargetUrl() + "/testPutZeroBytesFileTest.txt").setHeader("Content-Type", "text/plain").build(); - - File tmpfile = File.createTempFile("testPutZeroBytesFile", ".tmp"); - tmpfile.deleteOnExit(); - - Future future = client.put(new FileBodyGenerator(tmpfile)); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 1000).setUrl(getTargetUrl() + "/testPutZeroBytesFileTest.txt").setHeader("Content-Type", "text/plain") + .build(); + try { + File tmpfile = File.createTempFile("testPutZeroBytesFile", ".tmp"); + tmpfile.deleteOnExit(); - System.out.println("waiting for response"); - Response response = future.get(); + Future future = client.put(new FileBodyGenerator(tmpfile)); - tmpfile.delete(); + System.out.println("waiting for response"); + Response response = future.get(); - assertEquals(response.getStatusCode(), 200); + tmpfile.delete(); - client.close(); + assertEquals(response.getStatusCode(), 200); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) public void testDerive() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().build(); SimpleAsyncHttpClient derived = client.derive().build(); - - assertNotSame(derived, client); + try { + assertNotSame(derived, client); + } finally { + client.close(); + derived.close(); + } } @Test(groups = { "standalone", "default_provider" }) @@ -147,15 +152,16 @@ public void testDeriveOverrideURL() throws Exception { OutputStreamBodyConsumer consumer = new OutputStreamBodyConsumer(o); SimpleAsyncHttpClient derived = client.derive().setUrl(getTargetUrl()).build(); - - Future future = derived.post(generator, consumer); - - Response response = future.get(); - assertEquals(response.getStatusCode(), 200); - assertEquals(o.toString(), MY_MESSAGE); - - client.close(); - derived.close(); + try { + Future future = derived.post(generator, consumer); + + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(o.toString(), MY_MESSAGE); + } finally { + client.close(); + derived.close(); + } } @Test(groups = { "standalone", "default_provider" }) @@ -192,17 +198,20 @@ public void onBytesReceived(String url, long amount, long current, long total) { }; SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl()).setHeader("Custom", "custom").setListener(listener).build(); - ByteArrayOutputStream o = new ByteArrayOutputStream(10); + try { + ByteArrayOutputStream o = new ByteArrayOutputStream(10); - InputStreamBodyGenerator generator = new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())); - OutputStreamBodyConsumer consumer = new OutputStreamBodyConsumer(o); + InputStreamBodyGenerator generator = new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())); + OutputStreamBodyConsumer consumer = new OutputStreamBodyConsumer(o); - Future future = client.post(generator, consumer); + Future future = client.post(generator, consumer); - Response response = future.get(); - client.close(); - assertEquals(response.getStatusCode(), 200); - assertEquals(o.toString(), MY_MESSAGE); + Response response = future.get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(o.toString(), MY_MESSAGE); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) @@ -219,14 +228,17 @@ public void testNullUrl() throws Exception { public void testCloseDerivedValidMaster() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl()).build(); SimpleAsyncHttpClient derived = client.derive().build(); + try { + derived.get().get(); - derived.get().get(); - - derived.close(); + derived.close(); - Response response = client.get().get(); + Response response = client.get().get(); - assertEquals(response.getStatusCode(), 200); + assertEquals(response.getStatusCode(), 200); + } finally { + client.close(); + } } @Test(groups = { "standalone", "default_provider" }) @@ -251,45 +263,49 @@ public void testCloseMasterInvalidDerived() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void testMultiPartPut() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/multipart").build(); - - Response response = client.put(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); - - String body = response.getResponseBody(); - String contentType = response.getHeader("X-Content-Type"); - - assertTrue(contentType.contains("multipart/form-data")); - - String boundary = contentType.substring(contentType.lastIndexOf("=") + 1); - - assertTrue(body.startsWith("--" + boundary)); - assertTrue(body.trim().endsWith("--" + boundary + "--")); - assertTrue(body.contains("Content-Disposition:")); - assertTrue(body.contains("Content-Type: application/test")); - assertTrue(body.contains("name=\"baPart")); - assertTrue(body.contains("filename=\"fileName")); - + try { + Response response = client.put(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); + + String body = response.getResponseBody(); + String contentType = response.getHeader("X-Content-Type"); + + assertTrue(contentType.contains("multipart/form-data")); + + String boundary = contentType.substring(contentType.lastIndexOf("=") + 1); + + assertTrue(body.startsWith("--" + boundary)); + assertTrue(body.trim().endsWith("--" + boundary + "--")); + assertTrue(body.contains("Content-Disposition:")); + assertTrue(body.contains("Content-Type: application/test")); + assertTrue(body.contains("name=\"baPart")); + assertTrue(body.contains("filename=\"fileName")); + } finally { + client.close(); + } } - + @Test(groups = { "standalone", "default_provider" }) public void testMultiPartPost() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/multipart").build(); - - Response response = client.post(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); - - String body = response.getResponseBody(); - String contentType = response.getHeader("X-Content-Type"); - - assertTrue(contentType.contains("multipart/form-data")); - - String boundary = contentType.substring(contentType.lastIndexOf("=") + 1); - - assertTrue(body.startsWith("--" + boundary)); - assertTrue(body.trim().endsWith("--" + boundary + "--")); - assertTrue(body.contains("Content-Disposition:")); - assertTrue(body.contains("Content-Type: application/test")); - assertTrue(body.contains("name=\"baPart")); - assertTrue(body.contains("filename=\"fileName")); - + try { + Response response = client.post(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); + + String body = response.getResponseBody(); + String contentType = response.getHeader("X-Content-Type"); + + assertTrue(contentType.contains("multipart/form-data")); + + String boundary = contentType.substring(contentType.lastIndexOf("=") + 1); + + assertTrue(body.startsWith("--" + boundary)); + assertTrue(body.trim().endsWith("--" + boundary + "--")); + assertTrue(body.contains("Content-Disposition:")); + assertTrue(body.contains("Content-Type: application/test")); + assertTrue(body.contains("name=\"baPart")); + assertTrue(body.contains("filename=\"fileName")); + } finally { + client.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java b/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java index e2b80690c7..fe461336fd 100644 --- a/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java +++ b/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java @@ -40,15 +40,11 @@ import static org.testng.Assert.fail; public abstract class TransferListenerTest extends AbstractBasicTest { - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" - + UUID.randomUUID().toString().substring(0, 8)); + private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); private class BasicHandler extends AbstractHandler { - public void handle(String s, - org.eclipse.jetty.server.Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { Enumeration e = httpRequest.getHeaderNames(); String param; @@ -78,185 +74,187 @@ public AbstractHandler configureHandler() throws Exception { return new BasicHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicGetTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - final AtomicReference throwable = new AtomicReference(); - final AtomicReference hSent = new AtomicReference(); - final AtomicReference hRead = new AtomicReference(); - final AtomicReference bb = new AtomicReference(); - final AtomicBoolean completed = new AtomicBoolean(false); - - TransferCompletionHandler tl = new TransferCompletionHandler(); - tl.addTransferListener(new TransferListener() { - - public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) { - hSent.set(headers); - } - - public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { - hRead.set(headers); - } - - public void onBytesReceived(ByteBuffer buffer) { - bb.set(buffer); - } - - public void onBytesSent(ByteBuffer buffer) { - } - - public void onRequestResponseCompleted() { - completed.set(true); - } - - public void onThrowable(Throwable t) { - throwable.set(t); - } - }); - try { - Response response = c.prepareGet(getTargetUrl()) - .execute(tl).get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertNotNull(hRead.get()); - assertNotNull(hSent.get()); - assertNotNull(bb.get()); - assertNull(throwable.get()); - } catch (IOException ex) { - fail("Should have timed out"); + final AtomicReference throwable = new AtomicReference(); + final AtomicReference hSent = new AtomicReference(); + final AtomicReference hRead = new AtomicReference(); + final AtomicReference bb = new AtomicReference(); + final AtomicBoolean completed = new AtomicBoolean(false); + + TransferCompletionHandler tl = new TransferCompletionHandler(); + tl.addTransferListener(new TransferListener() { + + public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) { + hSent.set(headers); + } + + public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { + hRead.set(headers); + } + + public void onBytesReceived(ByteBuffer buffer) { + bb.set(buffer); + } + + public void onBytesSent(ByteBuffer buffer) { + } + + public void onRequestResponseCompleted() { + completed.set(true); + } + + public void onThrowable(Throwable t) { + throwable.set(t); + } + }); + + try { + Response response = c.prepareGet(getTargetUrl()).execute(tl).get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertNotNull(hRead.get()); + assertNotNull(hSent.get()); + assertNotNull(bb.get()); + assertNull(throwable.get()); + } catch (IOException ex) { + fail("Should have timed out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicPutTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - final AtomicReference throwable = new AtomicReference(); - final AtomicReference hSent = new AtomicReference(); - final AtomicReference hRead = new AtomicReference(); - final AtomicInteger bbReceivedLenght = new AtomicInteger(0); - final AtomicInteger bbSentLenght = new AtomicInteger(0); - - final AtomicBoolean completed = new AtomicBoolean(false); - - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File largeFile = createTempFile(bytes, (int) repeats); - - TransferCompletionHandler tl = new TransferCompletionHandler(); - tl.addTransferListener(new TransferListener() { - - public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) { - hSent.set(headers); - } - - public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { - hRead.set(headers); - } - - public void onBytesReceived(ByteBuffer buffer) { - bbReceivedLenght.addAndGet(buffer.capacity()); - } - - public void onBytesSent(ByteBuffer buffer) { - bbSentLenght.addAndGet(buffer.capacity()); - } - - public void onRequestResponseCompleted() { - completed.set(true); - } - - public void onThrowable(Throwable t) { - throwable.set(t); - } - }); - try { - Response response = c.preparePut(getTargetUrl()).setBody(largeFile) - .execute(tl).get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertNotNull(hRead.get()); - assertNotNull(hSent.get()); - assertEquals(bbReceivedLenght.get(), largeFile.length()); - assertEquals(bbSentLenght.get(), largeFile.length()); - } catch (IOException ex) { - fail("Should have timed out"); + final AtomicReference throwable = new AtomicReference(); + final AtomicReference hSent = new AtomicReference(); + final AtomicReference hRead = new AtomicReference(); + final AtomicInteger bbReceivedLenght = new AtomicInteger(0); + final AtomicInteger bbSentLenght = new AtomicInteger(0); + + final AtomicBoolean completed = new AtomicBoolean(false); + + byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); + long repeats = (1024 * 100 * 10 / bytes.length) + 1; + File largeFile = createTempFile(bytes, (int) repeats); + + TransferCompletionHandler tl = new TransferCompletionHandler(); + tl.addTransferListener(new TransferListener() { + + public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) { + hSent.set(headers); + } + + public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { + hRead.set(headers); + } + + public void onBytesReceived(ByteBuffer buffer) { + bbReceivedLenght.addAndGet(buffer.capacity()); + } + + public void onBytesSent(ByteBuffer buffer) { + bbSentLenght.addAndGet(buffer.capacity()); + } + + public void onRequestResponseCompleted() { + completed.set(true); + } + + public void onThrowable(Throwable t) { + throwable.set(t); + } + }); + + try { + Response response = c.preparePut(getTargetUrl()).setBody(largeFile).execute(tl).get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertNotNull(hRead.get()); + assertNotNull(hSent.get()); + assertEquals(bbReceivedLenght.get(), largeFile.length()); + assertEquals(bbSentLenght.get(), largeFile.length()); + } catch (IOException ex) { + fail("Should have timed out"); + } + } finally { + c.close(); } - c.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicPutBodyTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); - - final AtomicReference throwable = new AtomicReference(); - final AtomicReference hSent = new AtomicReference(); - final AtomicReference hRead = new AtomicReference(); - final AtomicInteger bbReceivedLenght = new AtomicInteger(0); - final AtomicInteger bbSentLenght = new AtomicInteger(0); - - final AtomicBoolean completed = new AtomicBoolean(false); - - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File largeFile = createTempFile(bytes, (int) repeats); - - TransferCompletionHandler tl = new TransferCompletionHandler(); - tl.addTransferListener(new TransferListener() { - - public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) { - hSent.set(headers); - } - - public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { - hRead.set(headers); - } - - public void onBytesReceived(ByteBuffer buffer) { - bbReceivedLenght.addAndGet(buffer.capacity()); - } - - public void onBytesSent(ByteBuffer buffer) { - bbSentLenght.addAndGet(buffer.capacity()); - } - - public void onRequestResponseCompleted() { - completed.set(true); - } - - public void onThrowable(Throwable t) { - throwable.set(t); - } - }); - try { - Response response = c.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(largeFile)) - .execute(tl).get(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 200); - assertNotNull(hRead.get()); - assertNotNull(hSent.get()); - assertEquals(bbReceivedLenght.get(), largeFile.length()); - assertEquals(bbSentLenght.get(), largeFile.length()); - } catch (IOException ex) { - fail("Should have timed out"); + final AtomicReference throwable = new AtomicReference(); + final AtomicReference hSent = new AtomicReference(); + final AtomicReference hRead = new AtomicReference(); + final AtomicInteger bbReceivedLenght = new AtomicInteger(0); + final AtomicInteger bbSentLenght = new AtomicInteger(0); + + final AtomicBoolean completed = new AtomicBoolean(false); + + byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); + long repeats = (1024 * 100 * 10 / bytes.length) + 1; + File largeFile = createTempFile(bytes, (int) repeats); + + TransferCompletionHandler tl = new TransferCompletionHandler(); + tl.addTransferListener(new TransferListener() { + + public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) { + hSent.set(headers); + } + + public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { + hRead.set(headers); + } + + public void onBytesReceived(ByteBuffer buffer) { + bbReceivedLenght.addAndGet(buffer.capacity()); + } + + public void onBytesSent(ByteBuffer buffer) { + bbSentLenght.addAndGet(buffer.capacity()); + } + + public void onRequestResponseCompleted() { + completed.set(true); + } + + public void onThrowable(Throwable t) { + throwable.set(t); + } + }); + + try { + Response response = c.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(largeFile)).execute(tl).get(); + + assertNotNull(response); + assertEquals(response.getStatusCode(), 200); + assertNotNull(hRead.get()); + assertNotNull(hSent.get()); + assertEquals(bbReceivedLenght.get(), largeFile.length()); + assertEquals(bbSentLenght.get(), largeFile.length()); + } catch (IOException ex) { + fail("Should have timed out"); + } + } finally { + c.close(); } - c.close(); } public String getTargetUrl() { return String.format("http://127.0.0.1:%d/foo/test", port1); } - public static File createTempFile(byte[] pattern, int repeat) - throws IOException { + public static File createTempFile(byte[] pattern, int repeat) throws IOException { TMP.mkdirs(); TMP.deleteOnExit(); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); @@ -265,8 +263,7 @@ public static File createTempFile(byte[] pattern, int repeat) return tmpFile; } - public static void write(byte[] pattern, int repeat, File file) - throws IOException { + public static void write(byte[] pattern, int repeat, File file) throws IOException { file.deleteOnExit(); file.getParentFile().mkdirs(); FileOutputStream out = null; @@ -275,8 +272,7 @@ public static void write(byte[] pattern, int repeat, File file) for (int i = 0; i < repeat; i++) { out.write(pattern); } - } - finally { + } finally { if (out != null) { out.close(); } diff --git a/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java b/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java index 77b69dcf67..709b459649 100644 --- a/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java @@ -38,7 +38,6 @@ import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; - public abstract class WebDavBasicTest extends AbstractBasicTest { public Embedded embedded; @@ -94,91 +93,101 @@ public void tearDownGlobal() throws InterruptedException, Exception { embedded.stop(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void mkcolWebDavTest1() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); - Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(); - - assertEquals(response.getStatusCode(), 201); - - c.close(); + try { + Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); + Response response = c.executeRequest(mkcolRequest).get(); + + assertEquals(response.getStatusCode(), 201); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void mkcolWebDavTest2() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); - - Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl() + "/folder2").build(); - Response response = c.executeRequest(mkcolRequest).get(); - assertEquals(response.getStatusCode(), 409); - c.close(); + try { + Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl() + "/folder2").build(); + Response response = c.executeRequest(mkcolRequest).get(); + assertEquals(response.getStatusCode(), 409); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void basicPropFindWebDavTest() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); - Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(propFindRequest).get(); - - assertEquals(response.getStatusCode(), 404); - c.close(); + try { + Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); + Response response = c.executeRequest(propFindRequest).get(); + + assertEquals(response.getStatusCode(), 404); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void propFindWebDavTest() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); - - Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(); - assertEquals(response.getStatusCode(), 201); - - Request putRequest = new RequestBuilder("PUT").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).setBody("this is a test").build(); - response = c.executeRequest(putRequest).get(); - assertEquals(response.getStatusCode(), 201); - - Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).build(); - response = c.executeRequest(propFindRequest).get(); - - assertEquals(response.getStatusCode(), 207); - assertTrue(response.getResponseBody().contains("HTTP/1.1 200 OK")); - c.close(); - + try { + Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); + Response response = c.executeRequest(mkcolRequest).get(); + assertEquals(response.getStatusCode(), 201); + + Request putRequest = new RequestBuilder("PUT").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).setBody("this is a test").build(); + response = c.executeRequest(putRequest).get(); + assertEquals(response.getStatusCode(), 201); + + Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).build(); + response = c.executeRequest(propFindRequest).get(); + + assertEquals(response.getStatusCode(), 207); + assertTrue(response.getResponseBody().contains("HTTP/1.1 200 OK")); + } finally { + c.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void propFindCompletionHandlerWebDavTest() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); - - Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(); - assertEquals(response.getStatusCode(), 201); - - Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); - WebDavResponse webDavResponse = c.executeRequest(propFindRequest, new WebDavCompletionHandlerBase() { - /** - * {@inheritDoc} - */ - /* @Override */ - public void onThrowable(Throwable t) { - - t.printStackTrace(); - } - - @Override - public WebDavResponse onCompleted(WebDavResponse response) throws Exception { - return response; - } - }).get(); - - assertNotNull(webDavResponse); - assertEquals(webDavResponse.getStatusCode(), 200); - c.close(); + try { + Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); + Response response = c.executeRequest(mkcolRequest).get(); + assertEquals(response.getStatusCode(), 201); + + Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); + WebDavResponse webDavResponse = c.executeRequest(propFindRequest, new WebDavCompletionHandlerBase() { + /** + * {@inheritDoc} + */ + /* @Override */ + public void onThrowable(Throwable t) { + + t.printStackTrace(); + } + + @Override + public WebDavResponse onCompleted(WebDavResponse response) throws Exception { + return response; + } + }).get(); + + assertNotNull(webDavResponse); + assertEquals(webDavResponse.getStatusCode(), 200); + } finally { + c.close(); + } } } diff --git a/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java index 987e9d6c93..b5400b183e 100644 --- a/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java +++ b/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java @@ -47,10 +47,7 @@ public abstract class ZeroCopyFileTest extends AbstractBasicTest { private class ZeroCopyHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { int size = 10 * 1024; if (httpRequest.getContentLength() > 0) { @@ -67,59 +64,62 @@ public void handle(String s, } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void zeroCopyPostTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + final AtomicBoolean headerSent = new AtomicBoolean(false); + final AtomicBoolean operationCompleted = new AtomicBoolean(false); + + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncCompletionHandler() { + + public STATE onHeaderWriteCompleted() { + headerSent.set(true); + return STATE.CONTINUE; + } - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final AtomicBoolean headerSent = new AtomicBoolean(false); - final AtomicBoolean operationCompleted = new AtomicBoolean(false); - - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncCompletionHandler() { - - public STATE onHeaderWriteCompleted() { - headerSent.set(true); - return STATE.CONTINUE; - } - - public STATE onContentWriteCompleted() { - operationCompleted.set(true); - return STATE.CONTINUE; - } + public STATE onContentWriteCompleted() { + operationCompleted.set(true); + return STATE.CONTINUE; + } - @Override - public Response onCompleted(Response response) throws Exception { - return response; - } - }); - Response resp = f.get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); - assertTrue(operationCompleted.get()); - assertTrue(headerSent.get()); - client.close(); + @Override + public Response onCompleted(Response response) throws Exception { + return response; + } + }); + Response resp = f.get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertTrue(operationCompleted.get()); + assertTrue(headerSent.get()); + } finally { + client.close(); + } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void zeroCopyPutTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setBody(file).execute(); - Response resp = f.get(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); - client.close(); - + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setBody(file).execute(); + Response resp = f.get(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getResponseBody(), "This is a simple test file"); + } finally { + client.close(); + } } @Override @@ -127,92 +127,92 @@ public AbstractHandler configureHandler() throws Exception { return new ZeroCopyHandler(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void zeroCopyFileTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); + tmp.deleteOnExit(); + final FileOutputStream stream = new FileOutputStream(tmp); + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncHandler() { + public void onThrowable(Throwable t) { + } - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); - tmp.deleteOnExit(); - final FileOutputStream stream = new FileOutputStream(tmp); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncHandler() { - public void onThrowable(Throwable t) { - } - - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - bodyPart.writeTo(stream); - return STATE.CONTINUE; - } - - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - return STATE.CONTINUE; - } + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + bodyPart.writeTo(stream); + return STATE.CONTINUE; + } - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - return STATE.CONTINUE; - } + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + return STATE.CONTINUE; + } - public Response onCompleted() throws Exception { - return null; - } - }); - Response resp = f.get(); - stream.close(); - assertNull(resp); - assertEquals(file.length(), tmp.length()); - client.close(); + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + return STATE.CONTINUE; + } + public Response onCompleted() throws Exception { + return null; + } + }); + Response resp = f.get(); + stream.close(); + assertNull(resp); + assertEquals(file.length(), tmp.length()); + } finally { + client.close(); + } } - - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void zeroCopyFileWithBodyManipulationTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); + try { + ClassLoader cl = getClass().getClassLoader(); + // override system properties + URL url = cl.getResource("SimpleTextFile.txt"); + File file = new File(url.toURI()); + + File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); + tmp.deleteOnExit(); + final FileOutputStream stream = new FileOutputStream(tmp); + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncHandler() { + public void onThrowable(Throwable t) { + } - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); - tmp.deleteOnExit(); - final FileOutputStream stream = new FileOutputStream(tmp); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncHandler() { - public void onThrowable(Throwable t) { - } + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { + bodyPart.writeTo(stream); - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - bodyPart.writeTo(stream); + if (bodyPart.getBodyPartBytes().length == 0) { + return STATE.ABORT; + } - if (bodyPart.getBodyPartBytes().length == 0) { - return STATE.ABORT; + return STATE.CONTINUE; } - - return STATE.CONTINUE; - } - - public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { - return STATE.CONTINUE; - } - public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { - return STATE.CONTINUE; - } + public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { + return STATE.CONTINUE; + } - public Response onCompleted() throws Exception { - return null; - } - }); - Response resp = f.get(); - stream.close(); - assertNull(resp); - assertEquals(file.length(), tmp.length()); - client.close(); + public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { + return STATE.CONTINUE; + } + public Response onCompleted() throws Exception { + return null; + } + }); + Response resp = f.get(); + stream.close(); + assertNull(resp); + assertEquals(file.length(), tmp.length()); + } finally { + client.close(); + } } - } diff --git a/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java b/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java index a2c3937839..6ba078d2ba 100644 --- a/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java +++ b/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java @@ -22,7 +22,6 @@ import java.util.Random; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; /** * @author Bryan Davis bpd@keynetics.com diff --git a/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index 11442de993..047147e8bc 100644 --- a/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -67,183 +67,190 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque @Test public void echoByte() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(new byte[0]); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(new byte[0]); - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - @Override - public void onOpen(WebSocket websocket) { - } + @Override + public void onOpen(WebSocket websocket) { + } - @Override - public void onClose(WebSocket websocket) { - latch.countDown(); - } + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } - @Override - public void onMessage(byte[] message) { - text.set(message); - latch.countDown(); - } + @Override + public void onMessage(byte[] message) { + text.set(message); + latch.countDown(); + } - @Override - public void onFragment(byte[] fragment, boolean last) { - } - }).build()).get(); + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); - websocket.sendMessage("ECHO".getBytes()); + websocket.sendMessage("ECHO".getBytes()); - latch.await(); - assertEquals(text.get(), "ECHO".getBytes()); + latch.await(); + assertEquals(text.get(), "ECHO".getBytes()); + } finally { + c.close(); + } } @Test public void echoTwoMessagesTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(2); - final AtomicReference text = new AtomicReference(null); + try { + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(null); - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - @Override - public void onOpen(WebSocket websocket) { - } + @Override + public void onOpen(WebSocket websocket) { + } - @Override - public void onClose(WebSocket websocket) { - latch.countDown(); - } + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } - @Override - public void onMessage(byte[] message) { - if (text.get() == null) { - text.set(message); - } else { - byte[] n = new byte[text.get().length + message.length]; - System.arraycopy(text.get(), 0, n, 0, text.get().length); - System.arraycopy(message, 0, n, text.get().length, message.length); - text.set(n); - } - latch.countDown(); + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); } + latch.countDown(); + } - @Override - public void onFragment(byte[] fragment, boolean last) { - } - }).build()).get(); + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); - websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); + websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); - latch.await(); - assertEquals(text.get(), "ECHOECHO".getBytes()); + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); + } finally { + c.close(); + } } @Test public void echoOnOpenMessagesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + try { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(null); - /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - - @Override - public void onOpen(WebSocket websocket) { - websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); - } - - @Override - public void onClose(WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - - @Override - public void onMessage(byte[] message) { - if (text.get() == null) { - text.set(message); - } else { - byte[] n = new byte[text.get().length + message.length]; - System.arraycopy(text.get(), 0, n, 0, text.get().length); - System.arraycopy(message, 0, n, text.get().length, message.length); - text.set(n); - } - latch.countDown(); - } - - @Override - public void onFragment(byte[] fragment, boolean last) { - } - }).build()).get(); + /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { + websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); + } + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); + } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); latch.await(); assertEquals(text.get(), "ECHOECHO".getBytes()); + } finally { + c.close(); + } } - public void echoFragments() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(null); - - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - - @Override - public void onOpen(WebSocket websocket) { - } - - @Override - public void onClose(WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - - @Override - public void onMessage(byte[] message) { - if (text.get() == null) { - text.set(message); - } else { - byte[] n = new byte[text.get().length + message.length]; - System.arraycopy(text.get(), 0, n, 0, text.get().length); - System.arraycopy(message, 0, n, text.get().length, message.length); - text.set(n); - } - latch.countDown(); - } - - @Override - public void onFragment(byte[] fragment, boolean last) { - } - }).build()).get(); - websocket.stream("ECHO".getBytes(), false); - websocket.stream("ECHO".getBytes(), true); - latch.await(); - assertEquals(text.get(), "ECHOECHO".getBytes()); + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(null); + + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { + } + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); + } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); + websocket.stream("ECHO".getBytes(), false); + websocket.stream("ECHO".getBytes(), true); + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); } } diff --git a/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java index 4fc1a19f04..83ecaa0fa3 100644 --- a/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java @@ -27,35 +27,41 @@ public abstract class CloseCodeReasonMessageTest extends TextMessageTest { @Test(timeOut = 60000) public void onCloseWithCode() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); - websocket.close(); + websocket.close(); - latch.await(); - assertTrue(text.get().startsWith("1000")); + latch.await(); + assertTrue(text.get().startsWith("1000")); + } finally { + c.close(); + } } @Test(timeOut = 60000) public void onCloseWithCodeServerClose() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); - - c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); - - latch.await(); - final String[] parts = text.get().split(" "); - assertEquals(parts.length, 5); - assertEquals(parts[0], "1000-Idle"); - assertEquals(parts[1], "for"); - assertTrue(Integer.parseInt(parts[2].substring(0, parts[2].indexOf('m'))) > 10000); - assertEquals(parts[3], ">"); - assertEquals(parts[4], "10000ms"); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); + + latch.await(); + final String[] parts = text.get().split(" "); + assertEquals(parts.length, 5); + assertEquals(parts[0], "1000-Idle"); + assertEquals(parts[1], "for"); + assertTrue(Integer.parseInt(parts[2].substring(0, parts[2].indexOf('m'))) > 10000); + assertEquals(parts[3], ">"); + assertEquals(parts[4], "10000ms"); + } finally { + c.close(); + } } public final static class Listener implements WebSocketListener, WebSocketCloseCodeReasonListener { @@ -68,11 +74,11 @@ public Listener(CountDownLatch latch, AtomicReference text) { this.text = text; } - //@Override + // @Override public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { } - //@Override + // @Override public void onClose(com.ning.http.client.websocket.WebSocket websocket) { } @@ -81,7 +87,7 @@ public void onClose(WebSocket websocket, int code, String reason) { latch.countDown(); } - //@Override + // @Override public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); diff --git a/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java b/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java index 40d106516b..b127aa8acc 100644 --- a/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java @@ -13,7 +13,6 @@ package com.ning.http.client.websocket; - import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import org.eclipse.jetty.server.Request; @@ -48,9 +47,6 @@ public void setUpGlobal() throws Exception { addConnector(_connector); - - - port2 = findFreePort(); final SelectChannelConnector connector2 = new SelectChannelConnector(); connector2.setPort(port2); @@ -58,13 +54,13 @@ public void setUpGlobal() throws Exception { WebSocketHandler _wsHandler = getWebSocketHandler(); HandlerList list = new HandlerList(); list.addHandler(new AbstractHandler() { - @Override - public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { - if (request.getLocalPort() == port2) { - httpServletResponse.sendRedirect(getTargetUrl()); - } - } - }); + @Override + public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException { + if (request.getLocalPort() == port2) { + httpServletResponse.sendRedirect(getTargetUrl()); + } + } + }); list.addHandler(_wsHandler); setHandler(list); @@ -87,39 +83,39 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque @Test(timeOut = 60000) public void testRedirectToWSResource() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); - - WebSocket websocket = c.prepareGet(getRedirectURL()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - text.set("OnOpen"); - latch.countDown(); - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); - - - latch.await(); - assertEquals(text.get(), "OnOpen"); - websocket.close(); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getRedirectURL()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "OnOpen"); + websocket.close(); + } finally { + c.close(); + } } - // --------------------------------------------------------- Private Methods - private String getRedirectURL() { return String.format("ws://127.0.0.1:%d/", port2); } diff --git a/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 3130674fde..1d732ed71a 100644 --- a/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -66,318 +66,338 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque }; } - - @Test(timeOut = 60000) public void onOpen() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); - - /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - text.set("OnOpen"); - latch.countDown(); - } + /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - } + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + } + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); - latch.await(); - assertEquals(text.get(), "OnOpen"); + latch.await(); + assertEquals(text.get(), "OnOpen"); + } finally { + c.close(); + } } @Test(timeOut = 60000) public void onEmptyListenerTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - - WebSocket websocket = null; try { - websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().build()).get(); - } catch (Throwable t) { - fail(); + WebSocket websocket = null; + try { + websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().build()).get(); + } catch (Throwable t) { + fail(); + } + assertTrue(websocket != null); + } finally { + c.close(); } - assertTrue(websocket != null); } @Test(timeOut = 60000) public void onFailureTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); -// final AtomicReference text = new AtomicReference(""); - - Throwable t = null; try { - /* WebSocket websocket =*/ c.prepareGet("ws://abcdefg") - .execute(new WebSocketUpgradeHandler.Builder().build()).get(); - } catch (Throwable t2) { - t = t2; + Throwable t = null; + try { + /* WebSocket websocket = */c.prepareGet("ws://abcdefg").execute(new WebSocketUpgradeHandler.Builder().build()).get(); + } catch (Throwable t2) { + t = t2; + } + assertTrue(t != null); + } finally { + c.close(); } - assertTrue(t != null); } @Test(timeOut = 60000) public void onTimeoutCloseTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); - - /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - text.set("OnClose"); - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); - - latch.await(); - assertEquals(text.get(), "OnClose"); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnClose"); + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "OnClose"); + } finally { + c.close(); + } } @Test(timeOut = 60000) public void onClose() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - } + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - text.set("OnClose"); - latch.countDown(); - } + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + text.set("OnClose"); + latch.countDown(); + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); - websocket.close(); + websocket.close(); - latch.await(); - assertEquals(text.get(), "OnClose"); + latch.await(); + assertEquals(text.get(), "OnClose"); + } finally { + c.close(); + } } @Test(timeOut = 60000) public void echoText() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); - - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { - - @Override - public void onMessage(String message) { - text.set(message); - latch.countDown(); - } - - @Override - public void onFragment(String fragment, boolean last) { - } - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); - - websocket.sendTextMessage("ECHO"); - - latch.await(); - assertEquals(text.get(), "ECHO"); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(message); + latch.countDown(); + } + + @Override + public void onFragment(String fragment, boolean last) { + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.sendTextMessage("ECHO"); + + latch.await(); + assertEquals(text.get(), "ECHO"); + } finally { + c.close(); + } } @Test(timeOut = 60000) public void echoDoubleListenerText() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(2); - final AtomicReference text = new AtomicReference(""); - - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { - - @Override - public void onMessage(String message) { - text.set(message); - latch.countDown(); - } - - @Override - public void onFragment(String fragment, boolean last) { - } - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).addWebSocketListener(new WebSocketTextListener() { - - @Override - public void onMessage(String message) { - text.set(text.get() + message); - latch.countDown(); - } - - @Override - public void onFragment(String fragment, boolean last) { - } - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); - - websocket.sendTextMessage("ECHO"); - - latch.await(); - assertEquals(text.get(), "ECHOECHO"); + try { + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(message); + latch.countDown(); + } + + @Override + public void onFragment(String fragment, boolean last) { + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(text.get() + message); + latch.countDown(); + } + + @Override + public void onFragment(String fragment, boolean last) { + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.sendTextMessage("ECHO"); + + latch.await(); + assertEquals(text.get(), "ECHOECHO"); + } finally { + c.close(); + } } @Test public void echoTwoMessagesTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(2); - final AtomicReference text = new AtomicReference(""); - - /*WebSocket websocket =*/ c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { - - @Override - public void onMessage(String message) { - text.set(text.get() + message); - latch.countDown(); - } - - @Override - public void onFragment(String fragment, boolean last) { - } - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - websocket.sendTextMessage("ECHO").sendTextMessage("ECHO"); - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); - - latch.await(); - assertEquals(text.get(), "ECHOECHO"); - } + try { + final CountDownLatch latch = new CountDownLatch(2); + final AtomicReference text = new AtomicReference(""); + + /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + @Override + public void onMessage(String message) { + text.set(text.get() + message); + latch.countDown(); + } + + @Override + public void onFragment(String fragment, boolean last) { + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + websocket.sendTextMessage("ECHO").sendTextMessage("ECHO"); + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + latch.await(); + assertEquals(text.get(), "ECHOECHO"); + } finally { + c.close(); + } + } public void echoFragments() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(""); - - WebSocket websocket = c.prepareGet(getTargetUrl()) - .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { - - @Override - public void onMessage(String message) { - text.set(message); - latch.countDown(); - } - - @Override - public void onFragment(String fragment, boolean last) { - } - - @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { - } - - @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); - - websocket.streamText("ECHO", false); - websocket.streamText("ECHO", true); - - latch.await(); - assertEquals(text.get(), "ECHOECHO"); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(""); + + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketTextListener() { + + @Override + public void onMessage(String message) { + text.set(message); + latch.countDown(); + } + + @Override + public void onFragment(String fragment, boolean last) { + } + + @Override + public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + } + + @Override + public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); + + websocket.streamText("ECHO", false); + websocket.streamText("ECHO", true); + + latch.await(); + assertEquals(text.get(), "ECHOECHO"); + } finally { + c.close(); + } } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java index bef44f90ce..76f5d1235e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -29,10 +29,7 @@ public class GrizzlyAsyncProviderBasicTest extends AsyncProvidersBasicTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Override diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java index e660fa7440..2b5f6409da 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java @@ -21,10 +21,7 @@ public class GrizzlyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java index 23edd588a9..e182096511 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java @@ -21,10 +21,7 @@ public class GrizzlyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java index b71e0a54a1..3525c042a2 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java @@ -22,10 +22,7 @@ public class GrizzlyAuthTimeoutTest extends AuthTimeoutTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java index cd194f46f1..35bfafeac0 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java @@ -22,10 +22,7 @@ public class GrizzlyBasicAuthTest extends BasicAuthTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java index 7fe5f20c44..94cbab8596 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java @@ -21,10 +21,7 @@ public class GrizzlyBasicHttpsTest extends BasicHttpsTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Override diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java index 7eee2c22b2..2079ddc1d0 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java @@ -21,10 +21,7 @@ public class GrizzlyBodyChunkTest extends BodyChunkTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java index e002420535..693ce8eaa7 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java @@ -21,9 +21,6 @@ public class GrizzlyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHand @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java index d7397a6861..af12183e26 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java @@ -22,10 +22,7 @@ public class GrizzlyByteBufferCapacityTest extends ByteBufferCapacityTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Test(groups = {"standalone", "default_provider"}, enabled=false) diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java index f8fac44596..33fe2a50b8 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java @@ -21,10 +21,7 @@ public class GrizzlyChunkingTest extends ChunkingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java index 9eea582924..331d20b152 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java @@ -21,10 +21,7 @@ public class GrizzlyComplexClientTest extends ComplexClientTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java index 4c34cb8bb0..7687753b44 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -33,42 +33,36 @@ public class GrizzlyConnectionPoolTest extends ConnectionPoolTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Override @Test public void testMaxTotalConnectionsException() { - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setAllowPoolingConnection(true) - .setMaximumConnectionsTotal(1) - .build() - ); - - String url = getTargetUrl(); - int i; - Exception exception = null; - for (i = 0; i < 20; i++) { - try { - log.info("{} requesting url [{}]...", i, url); - - if (i < 5) { - client.prepareGet(url).execute().get(); - } else { - client.prepareGet(url).execute(); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + try { + String url = getTargetUrl(); + int i; + Exception exception = null; + for (i = 0; i < 20; i++) { + try { + log.info("{} requesting url [{}]...", i, url); + + if (i < 5) { + client.prepareGet(url).execute().get(); + } else { + client.prepareGet(url).execute(); + } + } catch (Exception ex) { + exception = ex; + break; } - } catch (Exception ex) { - exception = ex; - break; } + assertNotNull(exception); + assertNotNull(exception.getMessage()); + } finally { + client.close(); } - assertNotNull(exception); - assertNotNull(exception.getMessage()); - } @Override @@ -96,24 +90,22 @@ public void destroy() { } }; - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNull(exception); + } finally { + client.close(); } - assertNull(exception); - client.close(); } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void testInvalidConnectionsPool() { ConnectionsPool cp = new ConnectionsPool() { @@ -139,75 +131,69 @@ public void destroy() { } }; - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNotNull(exception); + } finally { + client.close(); } - assertNotNull(exception); - client.close(); } @Override @Test public void multipleMaxConnectionOpenTest() throws Throwable { - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true) - .setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); + AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); AsyncHttpClient c = getAsyncHttpClient(cg); + try { + String body = "hello there"; - String body = "hello there"; - - // once - Response response = c.preparePost(getTargetUrl()) - .setBody(body) - .execute().get(TIMEOUT, TimeUnit.SECONDS); + // once + Response response = c.preparePost(getTargetUrl()).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); + assertEquals(response.getResponseBody(), body); - // twice - Exception exception = null; - try { - c.preparePost(String.format("http://127.0.0.1:%d/foo/test", port2)).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); - fail("Should throw exception. Too many connections issued."); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + // twice + Exception exception = null; + try { + c.preparePost(String.format("http://127.0.0.1:%d/foo/test", port2)).setBody(body).execute().get(TIMEOUT, TimeUnit.SECONDS); + fail("Should throw exception. Too many connections issued."); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNotNull(exception); + } finally { + c.close(); } - assertNotNull(exception); - c.close(); } - @Override @Test public void win7DisconnectTest() throws Throwable { final AtomicInteger count = new AtomicInteger(0); AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); - AsyncCompletionHandler handler = new - AsyncCompletionHandlerAdapter() { - - @Override - public Response onCompleted(Response response) throws - Exception { - - count.incrementAndGet(); - StackTraceElement e = new StackTraceElement("sun.nio.ch.SocketDispatcher", "read0", null, -1); - IOException t = new IOException(); - t.setStackTrace(new StackTraceElement[]{e}); - throw t; - } - }; - try { + AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { + + @Override + public Response onCompleted(Response response) throws Exception { + + count.incrementAndGet(); + StackTraceElement e = new StackTraceElement("sun.nio.ch.SocketDispatcher", "read0", null, -1); + IOException t = new IOException(); + t.setStackTrace(new StackTraceElement[] { e }); + throw t; + } + }; + client.prepareGet(getTargetUrl()).execute(handler).get(); fail("Must have received an exception"); } catch (ExecutionException ex) { @@ -215,8 +201,9 @@ public Response onCompleted(Response response) throws assertNotNull(ex.getCause()); assertEquals(ex.getCause().getClass(), IOException.class); assertEquals(count.get(), 1); + } finally { + client.close(); } - client.close(); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java index 74f09dcbea..919a572327 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java @@ -21,10 +21,7 @@ public class GrizzlyDigestAuthTest extends DigestAuthTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java index 77a925056b..bbb14e5d08 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java @@ -21,10 +21,7 @@ public class GrizzlyEmptyBodyTest extends EmptyBodyTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java index 0ae9beb704..27556b34f5 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java @@ -21,10 +21,7 @@ public class GrizzlyErrorResponseTest extends ErrorResponseTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java index f8a8a66bcd..45d856e4bb 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java @@ -21,10 +21,7 @@ public class GrizzlyExpectContinue100Test extends Expect100ContinueTest{ @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java index 424dded0d2..26a7b1bf11 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java @@ -21,10 +21,7 @@ public class GrizzlyFilterTest extends FilterTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java index 981aa35993..866c2ddce9 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java @@ -21,10 +21,7 @@ public class GrizzlyFollowingThreadTest extends FollowingThreadTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java index 9a875bc5c3..401192e07b 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java @@ -21,10 +21,7 @@ public class GrizzlyHead302Test extends Head302Test { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java index ea96de47d1..cec8f1460f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java @@ -21,10 +21,7 @@ public class GrizzlyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java index a05c56e23d..4d240fd2a3 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java @@ -21,10 +21,7 @@ public class GrizzlyIdleStateHandlerTest extends IdleStateHandlerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java index 4f3f5f3a86..6ad86e1438 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java @@ -21,10 +21,7 @@ public class GrizzlyInputStreamTest extends InputStreamTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java index ac589af94e..789861dc75 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java @@ -21,10 +21,7 @@ public class GrizzlyListenableFutureTest extends ListenableFutureTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java index f3280bd330..8314745a76 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java @@ -21,10 +21,7 @@ public class GrizzlyMaxConnectionsInThreadsTest extends MaxConnectionsInThreads @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java index de2261707b..2c77932ea2 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java @@ -21,9 +21,6 @@ public class GrizzlyMaxTotalConnectionTest extends MaxTotalConnectionTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java index 34915238c9..e5f12017dc 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java @@ -21,10 +21,7 @@ public class GrizzlyMultipleHeaderTest extends MultipleHeaderTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java index f46ae7fe2c..6be836d120 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java @@ -21,10 +21,7 @@ public class GrizzlyNoNullResponseTest extends NoNullResponseTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java index db3bae924a..5c8ef74bbd 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java @@ -21,10 +21,7 @@ public class GrizzlyNonAsciiContentLengthTest extends NonAsciiContentLengthTest @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java index 54adef05a2..ec5462c3ed 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java @@ -21,10 +21,7 @@ public class GrizzlyParamEncodingTest extends ParamEncodingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java index 09f4e05964..013a710ac8 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java @@ -21,10 +21,7 @@ public class GrizzlyPerRequestRelative302Test extends PerRequestRelative302Test @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java index a0b433d774..796f28acd7 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -26,10 +26,7 @@ protected String getExpectedTimeoutMessage() { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java index c74918f403..64d89f533d 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java @@ -21,9 +21,6 @@ public class GrizzlyPostRedirectGetTest extends PostRedirectGetTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java index 9405d06a34..372e6cb482 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java @@ -21,10 +21,7 @@ public class GrizzlyPostWithQSTest extends PostWithQSTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java new file mode 100644 index 0000000000..2993d05dfb --- /dev/null +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java @@ -0,0 +1,29 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.grizzly; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; + +public class GrizzlyProviderUtil { + + public static AsyncHttpClient grizzlyProvider(AsyncHttpClientConfig config) { + if (config == null) { + config = new AsyncHttpClientConfig.Builder().build(); + } + return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + } +} diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java index 2a46f1a59d..d075b42ed3 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java @@ -21,10 +21,7 @@ public class GrizzlyProxyTest extends ProxyTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java index 8d370ee356..1c690c7f35 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -16,21 +16,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProxyTunnellingTest; -import org.testng.annotations.Test; - -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; - public class GrizzlyProxyTunnelingTest extends ProxyTunnellingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java index 249582521b..2cbcb371de 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java @@ -21,10 +21,7 @@ public class GrizzlyPutLargeFileTest extends PutLargeFileTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java index fe0f07e497..936547bf17 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java @@ -21,10 +21,7 @@ public class GrizzlyQueryParametersTest extends QueryParametersTest{ @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java index db40c23e0b..e94e6d11ba 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java @@ -21,9 +21,6 @@ public class GrizzlyRC10KTest extends RC10KTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java index 1fa6381861..6553855c0d 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java @@ -27,10 +27,7 @@ public class GrizzlyRedirectConnectionUsageTest extends RedirectConnectionUsageT @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Override diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java index 840f370c8b..c876c51e93 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java @@ -21,10 +21,7 @@ public class GrizzlyRelative302Test extends Relative302Test { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java index 8e81e3d3b7..a5804d9a0f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java @@ -21,10 +21,7 @@ public class GrizzlyRemoteSiteTest extends RemoteSiteTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java index 9acea4b787..ae45cf25aa 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java @@ -21,10 +21,7 @@ public class GrizzlyRetryRequestTest extends RetryRequestTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java index 5cd94e47fe..261a57d141 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -21,10 +21,7 @@ public class GrizzlySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java index ec8fefc081..bed4d51f3b 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java @@ -21,10 +21,7 @@ public class GrizzlyTransferListenerTest extends TransferListenerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java index 753e4ed11d..3cb45f0447 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java @@ -48,10 +48,7 @@ protected String getExpectedTimeoutMessage() { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Override @@ -78,45 +75,47 @@ public void run() { } } - @Test(groups = {"standalone", "default_provider"}) + @Test(groups = { "standalone", "default_provider" }) public void unexpectingTimeoutTest() throws IOException { final AtomicInteger counts = new AtomicInteger(); final int timeout = 100; final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(timeout).build()); - Future responseFuture = - client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandler() { - @Override - public Response onCompleted(Response response) throws Exception { - counts.incrementAndGet(); - return response; - } - - @Override - public void onThrowable(Throwable t) { - counts.incrementAndGet(); - super.onThrowable(t); - } - }); - // currently, an exception is expected - // because the grizzly provider would throw IllegalStateException if WWW-Authenticate header doesn't exist with 401 response status. try { - Response response = responseFuture.get(); - assertNull(response); - } catch (InterruptedException e) { - fail("Interrupted.", e); - } catch (ExecutionException e) { - assertFalse(e.getCause() instanceof TimeoutException); - assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); - } - // wait for timeout again. - try { - Thread.sleep(timeout*2); - } catch (InterruptedException e) { - fail("Interrupted.", e); + Future responseFuture = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandler() { + @Override + public Response onCompleted(Response response) throws Exception { + counts.incrementAndGet(); + return response; + } + + @Override + public void onThrowable(Throwable t) { + counts.incrementAndGet(); + super.onThrowable(t); + } + }); + // currently, an exception is expected + // because the grizzly provider would throw IllegalStateException if WWW-Authenticate header doesn't exist with 401 response status. + try { + Response response = responseFuture.get(); + assertNull(response); + } catch (InterruptedException e) { + fail("Interrupted.", e); + } catch (ExecutionException e) { + assertFalse(e.getCause() instanceof TimeoutException); + assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); + } + // wait for timeout again. + try { + Thread.sleep(timeout * 2); + } catch (InterruptedException e) { + fail("Interrupted.", e); + } + // the result should be either onCompleted or onThrowable. + assertEquals(1, counts.get(), "result should be one"); + } finally { + client.close(); } - // the result should be either onCompleted or onThrowable. - assertEquals(1, counts.get(), "result should be one"); - client.close(); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java index 7733969cea..3949d1367e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java @@ -15,16 +15,14 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; import com.ning.http.client.websocket.ByteMessageTest; import org.testng.annotations.Test; public class GrizzlyByteMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Test(timeOut = 60000) diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java index cd4d190cbd..f45f6542df 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java @@ -16,6 +16,7 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; import com.ning.http.client.websocket.CloseCodeReasonMessageTest; import org.testng.annotations.Test; @@ -23,10 +24,7 @@ public class GrizzlyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Override diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java index b88787a947..0eec9e3fc8 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java @@ -16,15 +16,13 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; import com.ning.http.client.websocket.RedirectTest; public class GrizzlyRedirectTest extends RedirectTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } } diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java index 7ddb492777..3fa62d06b1 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java @@ -15,16 +15,14 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; +import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; import com.ning.http.client.websocket.ByteMessageTest; import org.testng.annotations.Test; public class GrizzlyTextMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); + return GrizzlyProviderUtil.grizzlyProvider(config); } @Test(timeOut = 60000) diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java index 87d47a6634..fc16f4cad4 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java @@ -12,16 +12,16 @@ */ package com.ning.http.client.providers.netty; +import static org.testng.Assert.assertEquals; + +import java.util.concurrent.Executors; + +import org.testng.annotations.Test; + import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.Response; import com.ning.http.client.async.AbstractBasicTest; -import com.ning.http.client.async.ProviderUtil; -import org.testng.annotations.Test; - -import java.util.concurrent.Executors; - -import static org.testng.Assert.assertEquals; public class NettyAsyncHttpProviderTest extends AbstractBasicTest { @@ -32,14 +32,16 @@ public void bossThreadPoolExecutor() throws Throwable { AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setAsyncHttpClientProviderConfig(conf).build(); AsyncHttpClient c = getAsyncHttpClient(cf); - - Response r = c.prepareGet(getTargetUrl()).execute().get(); - assertEquals(r.getStatusCode(), 200); + try { + Response r = c.prepareGet(getTargetUrl()).execute().get(); + assertEquals(r.getStatusCode(), 200); + } finally { + c.close(); + } } - @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java index 54cf25301c..2d23644716 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java @@ -12,23 +12,24 @@ */ package com.ning.http.client.providers.netty; +import org.testng.annotations.Test; + import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; import com.ning.http.client.async.AsyncProvidersBasicTest; -import com.ning.http.client.async.ProviderUtil; +@Test public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } @Override protected AsyncHttpProviderConfig getProviderConfig() { - final NettyAsyncHttpProviderConfig config = - new NettyAsyncHttpProviderConfig(); + final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); config.addProperty("tcpNoDelay", true); return config; } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java index 7024c9c48c..90ee1da0ef 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java @@ -25,7 +25,6 @@ import org.jboss.netty.channel.SimpleChannelHandler; import org.jboss.netty.handler.codec.http.HttpMessage; import org.testng.Assert; -import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import com.ning.http.client.AsyncHttpClient; @@ -42,35 +41,37 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return new AsyncHttpClient(new CopyEncodingNettyAsyncHttpProvider(config), config); } - @Test(groups = {"standalone", "netty_provider"}) + @Test(groups = { "standalone", "netty_provider" }) public void asyncPipelineTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder() - .setCompressionEnabled(true).build()); - - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-Original-Content-Encoding"), ""); - } finally { - l.countDown(); + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build()); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); + p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-Original-Content-Encoding"), ""); + } finally { + l.countDown(); + } + return response; } - return response; + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + } finally { + p.close(); } - p.close(); } private static class CopyEncodingNettyAsyncHttpProvider extends NettyAsyncHttpProvider { public CopyEncodingNettyAsyncHttpProvider(AsyncHttpClientConfig config) { super(config); } + protected ChannelPipelineFactory createPlainPipelineFactory() { final ChannelPipelineFactory pipelineFactory = super.createPlainPipelineFactory(); return new ChannelPipelineFactory() { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java index 284ca9bd9e..0b59867f6f 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.AsyncStreamHandlerTest; -import com.ning.http.client.async.ProviderUtil; public class NettyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java index 169863f3f7..ab10afbcc9 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.AsyncStreamLifecycleTest; -import com.ning.http.client.async.ProviderUtil; public class NettyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java index 567ee39dc4..94dcab0e91 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java @@ -15,13 +15,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.AuthTimeoutTest; -import com.ning.http.client.async.ProviderUtil; public class NettyAuthTimeoutTest extends AuthTimeoutTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java index 9f78d99d33..f706659e8a 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java @@ -12,25 +12,25 @@ */ package com.ning.http.client.providers.netty; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +import org.testng.annotations.Test; + import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BasicAuthTest; -import com.ning.http.client.async.ProviderUtil; -import org.testng.annotations.Test; - -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; public class NettyBasicAuthTest extends BasicAuthTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } @Override @Test public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { - super.redirectAndBasicAuthTest(); //To change body of overridden methods use File | Settings | File Templates. + super.redirectAndBasicAuthTest(); // To change body of overridden methods use File | Settings | File Templates. } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java index 665fa4601f..45025647eb 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BasicHttpsTest; -import com.ning.http.client.async.ProviderUtil; public class NettyBasicHttpsTest extends BasicHttpsTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java index cce596998e..908b733ca9 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BodyChunkTest; -import com.ning.http.client.async.ProviderUtil; public class NettyBodyChunkTest extends BodyChunkTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java index 91627853f2..54631c7586 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -15,14 +15,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.BodyDeferringAsyncHandlerTest; -import com.ning.http.client.async.ProviderUtil; -public class NettyBodyDeferringAsyncHandlerTest extends - BodyDeferringAsyncHandlerTest { +public class NettyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java index 7f52d79555..739821b277 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ByteBufferCapacityTest; -import com.ning.http.client.async.ProviderUtil; public class NettyByteBufferCapacityTest extends ByteBufferCapacityTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java index f52a7a45f9..186a5184c0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java @@ -3,11 +3,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ChunkingTest; -import com.ning.http.client.async.ProviderUtil; public class NettyChunkingTest extends ChunkingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java index 934b825456..73c37ce246 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ComplexClientTest; -import com.ning.http.client.async.ProviderUtil; public class NettyComplexClientTest extends ComplexClientTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java index 97505a9123..51ede7aa77 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java @@ -12,24 +12,24 @@ */ package com.ning.http.client.providers.netty; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; + +import java.util.concurrent.TimeUnit; + +import org.jboss.netty.channel.Channel; + import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; import com.ning.http.client.async.ConnectionPoolTest; -import com.ning.http.client.async.ProviderUtil; -import org.jboss.netty.channel.Channel; - -import java.util.concurrent.TimeUnit; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; public class NettyConnectionPoolTest extends ConnectionPoolTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } @Override @@ -57,22 +57,20 @@ public void destroy() { } }; - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNotNull(exception); + assertEquals(exception.getMessage(), "Too many connections -1"); + } finally { + client.close(); } - assertNotNull(exception); - assertEquals(exception.getMessage(), "Too many connections -1"); - client.close(); } @Override @@ -100,20 +98,18 @@ public void destroy() { } }; - AsyncHttpClient client = getAsyncHttpClient( - new AsyncHttpClientConfig.Builder() - .setConnectionsPool(cp) - .build() - ); - - Exception exception = null; + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNull(exception); + } finally { + client.close(); } - assertNull(exception); - client.close(); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java index 9cf9fa79d2..005948931e 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.DigestAuthTest; -import com.ning.http.client.async.ProviderUtil; public class NettyDigestAuthTest extends DigestAuthTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java index 9e1cd09d49..3c501757f3 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.EmptyBodyTest; -import com.ning.http.client.async.ProviderUtil; public class NettyEmptyBodyTest extends EmptyBodyTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java index 1836e8b5d1..0347132555 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ErrorResponseTest; -import com.ning.http.client.async.ProviderUtil; public class NettyErrorResponseTest extends ErrorResponseTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java index 9cb5485557..698ea253c1 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.Expect100ContinueTest; -import com.ning.http.client.async.ProviderUtil; public class NettyExpect100ContinueTest extends Expect100ContinueTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java index aef426f8f2..459d425140 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.FilePartLargeFileTest; -import com.ning.http.client.async.ProviderUtil; public class NettyFilePartLargeFileTest extends FilePartLargeFileTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java index 515862db85..97f0534c00 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.FilterTest; -import com.ning.http.client.async.ProviderUtil; public class NettyFilterTest extends FilterTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java index faa1d7cef2..a980551662 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java @@ -15,13 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.FollowingThreadTest; -import com.ning.http.client.async.ProviderUtil; public class NettyFollowingThreadTest extends FollowingThreadTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } - diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java index 4ab927e4f9..d734236157 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.Head302Test; -import com.ning.http.client.async.ProviderUtil; public class NettyHead302Test extends Head302Test { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java index fa52d4e2bc..30e7397633 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.HostnameVerifierTest; -import com.ning.http.client.async.ProviderUtil; public class NettyHostnameVerifierTest extends HostnameVerifierTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java index 6ccfbc22ee..e9afb6598b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.HttpToHttpsRedirectTest; -import com.ning.http.client.async.ProviderUtil; public class NettyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java index 04480e9c6a..eb51fa21a9 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.IdleStateHandlerTest; -import com.ning.http.client.async.ProviderUtil; public class NettyIdleStateHandlerTest extends IdleStateHandlerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java index ea8dc48acc..d963695dd3 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.InputStreamTest; -import com.ning.http.client.async.ProviderUtil; public class NettyInputStreamTest extends InputStreamTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java index 4e078caf73..6df542b88c 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java @@ -15,13 +15,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ListenableFutureTest; -import com.ning.http.client.async.ProviderUtil; public class NettyListenableFutureTest extends ListenableFutureTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java index b9444c5b8f..e7bd9d4b48 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java @@ -14,11 +14,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MaxConnectionsInThreads; -import com.ning.http.client.async.ProviderUtil; public class NettyMaxConnectionsInThreads extends MaxConnectionsInThreads { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java index 0fc74fb3f1..80f48e755d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MaxTotalConnectionTest; -import com.ning.http.client.async.ProviderUtil; public class NettyMaxTotalConnectionTest extends MaxTotalConnectionTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java index ae77c2d315..b0496db3e5 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java @@ -15,7 +15,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MultipartUploadTest; -import com.ning.http.client.async.ProviderUtil; /** * @author dominict @@ -24,8 +23,7 @@ public class NettyMultipartUploadTest extends MultipartUploadTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java index 345ad73e0f..602755130a 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.MultipleHeaderTest; -import com.ning.http.client.async.ProviderUtil; public class NettyMultipleHeaderTest extends MultipleHeaderTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java index b1766aa480..4d19e4b1a2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.NoNullResponseTest; -import com.ning.http.client.async.ProviderUtil; public class NettyNoNullResponseTest extends NoNullResponseTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java index 10f229522c..c6e1aedb92 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java @@ -15,12 +15,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.NonAsciiContentLengthTest; -import com.ning.http.client.async.ProviderUtil; public class NettyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); - } + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java index 6bda57840f..a8c2b0e3f7 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ParamEncodingTest; -import com.ning.http.client.async.ProviderUtil; public class NettyParamEncodingTest extends ParamEncodingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java index b9fbf68650..13dbd1fea2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PerRequestRelative302Test; -import com.ning.http.client.async.ProviderUtil; public class NettyPerRequestRelative302Test extends PerRequestRelative302Test { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java index 236bb90027..9e7199ea68 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PerRequestTimeoutTest; -import com.ning.http.client.async.ProviderUtil; public class NettyPerRequestTimeoutTest extends PerRequestTimeoutTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java index c414e5752c..138bf45d03 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java @@ -16,13 +16,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PostRedirectGetTest; -import com.ning.http.client.async.ProviderUtil; public class NettyPostRedirectGetTest extends PostRedirectGetTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java index caf7330c73..b1e47660ea 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java @@ -15,11 +15,10 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.PostWithQSTest; -import com.ning.http.client.async.ProviderUtil; public class NettyPostWithQSTest extends PostWithQSTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java new file mode 100644 index 0000000000..a37b4bf5d3 --- /dev/null +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java @@ -0,0 +1,36 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; + +public class NettyProviderUtil { + + public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { + // FIXME why do tests fail with this set up? Seems like we have a race condition + // if (config == null) { + // config = new AsyncHttpClientConfig.Builder().build(); + // } + // return new AsyncHttpClient(new NettyAsyncHttpProvider(config), config); + + if (config == null) { + return new AsyncHttpClient(); + } else { + return new AsyncHttpClient(config); + } + } +} diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java index 3f17d942bc..3f82fbea20 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java @@ -14,16 +14,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.ProxyTest; public class NettyProxyTest extends ProxyTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } - - - diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java index ebbf5a77cb..7c24784de0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.ProxyTunnellingTest; public class NettyProxyTunnellingTest extends ProxyTunnellingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java index e452dbfe9e..e2fbc403ad 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.PutLargeFileTest; public class NettyPutLargeFileTest extends PutLargeFileTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java index c253dc0ee6..659a910648 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.QueryParametersTest; public class NettyQueryParametersTest extends QueryParametersTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java index fa16414f45..5f79e9861c 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.RC10KTest; public class NettyRC10KTest extends RC10KTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java index 411669af82..a3731a6a0d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java @@ -15,19 +15,17 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.RedirectConnectionUsageTest; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } @Override protected AsyncHttpProviderConfig getProviderConfig() { - final NettyAsyncHttpProviderConfig config = - new NettyAsyncHttpProviderConfig(); + final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); if (System.getProperty("blockingio") != null) { config.addProperty(NettyAsyncHttpProviderConfig.USE_BLOCKING_IO, "true"); } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java index e40a064acb..89c098bbc6 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java @@ -14,13 +14,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.Relative302Test; public class NettyRelative302Test extends Relative302Test { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java index f1c3928d32..438b322319 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java @@ -17,14 +17,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.RemoteSiteTest; public class NettyRemoteSiteTest extends RemoteSiteTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java index 066990482d..287466c64c 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -12,25 +12,33 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.*; -import com.ning.http.client.async.AbstractBasicTest; -import com.ning.http.client.async.ProviderUtil; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Future; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.*; - -import static org.testng.Assert.*; -import static org.testng.Assert.fail; +import com.ning.http.client.AsyncCompletionHandler; +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.PerRequestConfig; +import com.ning.http.client.Response; +import com.ning.http.client.async.AbstractBasicTest; public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { private static final String MSG = "Enough is enough."; @@ -38,7 +46,7 @@ public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } @Override @@ -69,68 +77,64 @@ public void run() { } } - @Test(groups = {"standalone", "netty_provider"}) + @Test(groups = { "standalone", "netty_provider" }) public void testRequestTimeout() throws IOException { final Semaphore requestThrottle = new Semaphore(1); - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder() - .setCompressionEnabled(true) - .setAllowPoolingConnection(true) - .setMaximumConnectionsTotal(1).build()); - - final CountDownLatch latch = new CountDownLatch(2); + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + try { + final CountDownLatch latch = new CountDownLatch(2); - final List tooManyConnections = new ArrayList(2); - for(int i=0;i<2;i++) { - final int threadNumber = i; - new Thread(new Runnable() { + final List tooManyConnections = new ArrayList(2); + for (int i = 0; i < 2; i++) { + final int threadNumber = i; + new Thread(new Runnable() { - public void run() { - try { - requestThrottle.acquire(); - PerRequestConfig requestConfig = new PerRequestConfig(); - requestConfig.setRequestTimeoutInMs(SLEEPTIME_MS/2); - Future responseFuture = null; + public void run() { try { - responseFuture = - client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(new AsyncCompletionHandler() { - - @Override - public Response onCompleted(Response response) throws Exception { - requestThrottle.release(); - return response; - } - - @Override - public void onThrowable(Throwable t) { - requestThrottle.release(); - } - }); - } catch(Exception e) { - tooManyConnections.add(e); + requestThrottle.acquire(); + PerRequestConfig requestConfig = new PerRequestConfig(); + requestConfig.setRequestTimeoutInMs(SLEEPTIME_MS / 2); + Future responseFuture = null; + try { + responseFuture = client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(new AsyncCompletionHandler() { + + @Override + public Response onCompleted(Response response) throws Exception { + requestThrottle.release(); + return response; + } + + @Override + public void onThrowable(Throwable t) { + requestThrottle.release(); + } + }); + } catch (Exception e) { + tooManyConnections.add(e); + } + + if (responseFuture != null) + responseFuture.get(); + } catch (Exception e) { + } finally { + latch.countDown(); } - if(responseFuture!=null) - responseFuture.get(); - } catch (Exception e) { - } finally { - latch.countDown(); } + }).start(); - } - }).start(); - + } - } + try { + latch.await(30, TimeUnit.SECONDS); + } catch (Exception e) { + fail("failed to wait for requests to complete"); + } - try { - latch.await(30,TimeUnit.SECONDS); - } catch (Exception e) { - fail("failed to wait for requests to complete"); + assertTrue(tooManyConnections.size() == 0, "Should not have any connection errors where too many connections have been attempted"); + } finally { + client.close(); } - - assertTrue(tooManyConnections.size()==0,"Should not have any connection errors where too many connections have been attempted"); - - client.close(); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java index 4ce24d43b8..0e5779b9fa 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java @@ -18,12 +18,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.RetryRequestTest; public class NettyRetryRequestTest extends RetryRequestTest{ @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java index e1e0361a21..4508b550a1 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.TransferListenerTest; public class NettyTransferListenerTest extends TransferListenerTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java index 16825ffc0d..7251633ed4 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.WebDavBasicTest; public class NettyWebDavBasicTest extends WebDavBasicTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java index bd7a593b8f..a1731a5235 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java @@ -14,12 +14,11 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.ZeroCopyFileTest; public class NettyZeroCopyFileTest extends ZeroCopyFileTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java index 7e00324497..ef4d8d606f 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java @@ -14,12 +14,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.providers.netty.NettyProviderUtil; import com.ning.http.client.websocket.ByteMessageTest; public class NettyByteMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index b67a880115..3e764e3d8e 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -15,14 +15,14 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.providers.netty.NettyProviderUtil; import com.ning.http.client.websocket.CloseCodeReasonMessageTest; public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java index 16bde58189..a30eacbc52 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java @@ -14,14 +14,14 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.providers.netty.NettyProviderUtil; import com.ning.http.client.websocket.RedirectTest; public class NettyRedirectTest extends RedirectTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java index 091eb703c1..b62c77cd2e 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java @@ -14,12 +14,12 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProviderUtil; +import com.ning.http.client.providers.netty.NettyProviderUtil; import com.ning.http.client.websocket.TextMessageTest; public class NettyTextMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return ProviderUtil.nettyProvider(config); + return NettyProviderUtil.nettyProvider(config); } } From 5756f837c3f6275e3f7af51d3f2477e78b96a557 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Mar 2013 10:55:33 +0100 Subject: [PATCH 0305/2844] Re-enable PropertiesBasedResumableProcesserTest, close #53 --- .../resumable/PropertiesBasedResumableProcesserTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java b/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java index 41d0d68947..d3e876a4fb 100644 --- a/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java +++ b/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java @@ -23,9 +23,8 @@ * @author Benjamin Hanzelmann */ public class PropertiesBasedResumableProcesserTest { - @Test (enabled = false) - public void testSaveLoad() - throws Exception { + @Test + public void testSaveLoad() throws Exception { PropertiesBasedResumableProcessor p = new PropertiesBasedResumableProcessor(); p.put("http://localhost/test.url", 15L); p.put("http://localhost/test2.url", 50L); From 94f49622aee8f369ad5340077a99371cd4f4f4bf Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Mar 2013 10:55:46 +0100 Subject: [PATCH 0306/2844] Minor clean up --- .../http/client/async/ConnectionPoolTest.java | 4 ++-- .../client/async/FilePartLargeFileTest.java | 3 +-- .../async/NonAsciiContentLengthTest.java | 3 +-- .../async/PerRequestRelative302Test.java | 9 +++------ .../com/ning/http/client/async/ProxyTest.java | 6 ++---- .../http/client/async/PutLargeFileTest.java | 3 +-- .../http/client/async/RemoteSiteTest.java | 2 +- .../client/websocket/ByteMessageTest.java | 9 ++++----- .../websocket/CloseCodeReasonMessageTest.java | 5 ++--- .../client/websocket/TextMessageTest.java | 19 +++++++++---------- .../grizzly/GrizzlyConnectionPoolTest.java | 2 +- 11 files changed, 27 insertions(+), 38 deletions(-) diff --git a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java index 5ac49c8ef2..7d0c7eed30 100644 --- a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java @@ -203,7 +203,7 @@ public void multipleMaxConnectionOpenTestWithQuery() throws Throwable { public void win7DisconnectTest() throws Throwable { final AtomicInteger count = new AtomicInteger(0); - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient client = getAsyncHttpClient(null); try { AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { @@ -234,7 +234,7 @@ public Response onCompleted(Response response) throws Exception { @Test(groups = { "standalone", "default_provider" }) public void asyncHandlerOnThrowableTest() throws Throwable { - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicInteger count = new AtomicInteger(); final String THIS_IS_NOT_FOR_YOU = "This is not for you"; diff --git a/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java index 6f844c7d8d..905fd0f625 100644 --- a/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java +++ b/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java @@ -62,8 +62,7 @@ public void testPutLargeTextFile() throws Exception { long repeats = (1024 * 1024 / bytes.length) + 1; largeFile = createTempFile(bytes, (int) repeats); - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient client = getAsyncHttpClient(config); + AsyncHttpClient client = getAsyncHttpClient(null); try { BoundRequestBuilder rb = client.preparePut(getTargetUrl()); diff --git a/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java index cebeb26e2c..b8401491d5 100644 --- a/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java @@ -14,7 +14,6 @@ import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; -import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; @@ -82,7 +81,7 @@ public void testNonAsciiContentLength() throws Exception { } protected void execute(String body) throws IOException, InterruptedException, ExecutionException { - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient client = getAsyncHttpClient(null); try { BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(body).setBodyEncoding("UTF-8"); Future f = r.execute(); diff --git a/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java index c58000f6fd..bd1ea2e18e 100644 --- a/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java +++ b/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java @@ -88,8 +88,7 @@ public void setUpGlobal() throws Exception { @Test(groups = { "online", "default_provider" }) public void redirected302Test() throws Throwable { isSet.getAndSet(false); - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient c = getAsyncHttpClient(cg); + AsyncHttpClient c = getAsyncHttpClient(null); try { Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); @@ -140,8 +139,7 @@ private static int getPort(URI uri) { @Test(groups = { "standalone", "default_provider" }) public void redirected302InvalidTest() throws Throwable { isSet.getAndSet(false); - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient c = getAsyncHttpClient(cg); + AsyncHttpClient c = getAsyncHttpClient(null); try { // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); @@ -159,8 +157,7 @@ public void redirected302InvalidTest() throws Throwable { public void relativeLocationUrl() throws Throwable { isSet.getAndSet(false); - AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient c = getAsyncHttpClient(cg); + AsyncHttpClient c = getAsyncHttpClient(null); try { Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "/foo/test").execute().get(); assertNotNull(response); diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTest.java index b05e048121..6314c1b5fd 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/api/src/test/java/com/ning/http/client/async/ProxyTest.java @@ -177,8 +177,7 @@ public void testIgnoreProxyPropertiesByDefault() throws IOException, ExecutionEx System.setProperty("http.proxyPort", String.valueOf(port1)); System.setProperty("http.nonProxyHosts", "localhost"); - AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient client = getAsyncHttpClient(cfg); + AsyncHttpClient client = getAsyncHttpClient(null); try { String target = "http://127.0.0.1:1234/"; Future f = client.prepareGet(target).execute(); @@ -210,8 +209,7 @@ public void testProxyActivationProperty() throws IOException, ExecutionException System.setProperty("http.nonProxyHosts", "localhost"); System.setProperty("com.ning.http.client.AsyncHttpClientConfig.useProxyProperties", "true"); - AsyncHttpClientConfig cfg = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient client = getAsyncHttpClient(cfg); + AsyncHttpClient client = getAsyncHttpClient(null); try { String target = "http://127.0.0.1:1234/"; Future f = client.prepareGet(target).execute(); diff --git a/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java index 62846bcfbb..43f1807190 100644 --- a/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java +++ b/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java @@ -65,8 +65,7 @@ public void testPutSmallFile() throws Exception { // int timeout = (5000); largeFile = createTempFile(bytes, (int) repeats); - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); - AsyncHttpClient client = getAsyncHttpClient(config); + AsyncHttpClient client = getAsyncHttpClient(null); try { BoundRequestBuilder rb = client.preparePut(getTargetUrl()); diff --git a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java index 11a6382355..4134b31962 100644 --- a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java +++ b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java @@ -162,7 +162,7 @@ public void invalidStreamTest2() throws Throwable { @Test(groups = { "online", "default_provider" }) public void asyncFullBodyProperlyRead() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + final AsyncHttpClient client = getAsyncHttpClient(null); try { Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); diff --git a/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java index 047147e8bc..134673821b 100644 --- a/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java @@ -13,7 +13,6 @@ package com.ning.http.client.websocket; import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; import org.testng.annotations.Test; import javax.servlet.http.HttpServletRequest; @@ -66,7 +65,7 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque @Test public void echoByte() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(new byte[0]); @@ -110,7 +109,7 @@ public void onFragment(byte[] fragment, boolean last) { @Test public void echoTwoMessagesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(null); @@ -161,7 +160,7 @@ public void onFragment(byte[] fragment, boolean last) { @Test public void echoOnOpenMessagesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(null); @@ -210,7 +209,7 @@ public void onFragment(byte[] fragment, boolean last) { } public void echoFragments() throws Exception { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(null); diff --git a/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java index 83ecaa0fa3..9cc899b5d5 100644 --- a/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java @@ -13,7 +13,6 @@ package com.ning.http.client.websocket; import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; import org.testng.annotations.Test; import java.util.concurrent.CountDownLatch; @@ -26,7 +25,7 @@ public abstract class CloseCodeReasonMessageTest extends TextMessageTest { @Test(timeOut = 60000) public void onCloseWithCode() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); @@ -44,7 +43,7 @@ public void onCloseWithCode() throws Throwable { @Test(timeOut = 60000) public void onCloseWithCodeServerClose() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); diff --git a/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java index 1d732ed71a..bf6eac9c56 100644 --- a/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java @@ -13,7 +13,6 @@ package com.ning.http.client.websocket; import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; import org.testng.annotations.Test; import javax.servlet.http.HttpServletRequest; @@ -68,7 +67,7 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque @Test(timeOut = 60000) public void onOpen() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); @@ -101,7 +100,7 @@ public void onError(Throwable t) { @Test(timeOut = 60000) public void onEmptyListenerTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { WebSocket websocket = null; try { @@ -117,7 +116,7 @@ public void onEmptyListenerTest() throws Throwable { @Test(timeOut = 60000) public void onFailureTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { Throwable t = null; try { @@ -133,7 +132,7 @@ public void onFailureTest() throws Throwable { @Test(timeOut = 60000) public void onTimeoutCloseTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); @@ -166,7 +165,7 @@ public void onError(Throwable t) { @Test(timeOut = 60000) public void onClose() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); @@ -201,7 +200,7 @@ public void onError(Throwable t) { @Test(timeOut = 60000) public void echoText() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); @@ -245,7 +244,7 @@ public void onError(Throwable t) { @Test(timeOut = 60000) public void echoDoubleListenerText() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(""); @@ -315,7 +314,7 @@ public void onError(Throwable t) { @Test public void echoTwoMessagesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); final AtomicReference text = new AtomicReference(""); @@ -357,7 +356,7 @@ public void onError(Throwable t) { } public void echoFragments() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java index 7687753b44..e43fcee168 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -179,7 +179,7 @@ public void multipleMaxConnectionOpenTest() throws Throwable { public void win7DisconnectTest() throws Throwable { final AtomicInteger count = new AtomicInteger(0); - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().build()); + AsyncHttpClient client = getAsyncHttpClient(null); try { AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { From 40b84d1ce4184cefe0e3ada34989a45f212ed21c Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Mar 2013 11:57:53 +0100 Subject: [PATCH 0307/2844] Optimize and clean up NettyFuture.done, close #141 --- .../http/client/async/ConnectionPoolTest.java | 2 +- .../grizzly/GrizzlyConnectionPoolTest.java | 37 ------------------- .../providers/netty/NettyResponseFuture.java | 12 +++++- 3 files changed, 11 insertions(+), 40 deletions(-) diff --git a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java index 7d0c7eed30..89e546d2c4 100644 --- a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java @@ -224,7 +224,7 @@ public Response onCompleted(Response response) throws Exception { } catch (ExecutionException ex) { assertNotNull(ex); assertNotNull(ex.getCause()); - assertEquals(ex.getCause().getCause().getClass(), IOException.class); + assertEquals(ex.getCause().getClass(), IOException.class); assertEquals(count.get(), 1); } } finally { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java index e43fcee168..7be2046d54 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -13,7 +13,6 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; @@ -22,10 +21,7 @@ import org.glassfish.grizzly.Connection; import org.testng.annotations.Test; -import java.io.IOException; -import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; import static org.testng.Assert.*; @@ -173,37 +169,4 @@ public void multipleMaxConnectionOpenTest() throws Throwable { c.close(); } } - - @Override - @Test - public void win7DisconnectTest() throws Throwable { - final AtomicInteger count = new AtomicInteger(0); - - AsyncHttpClient client = getAsyncHttpClient(null); - try { - AsyncCompletionHandler handler = new AsyncCompletionHandlerAdapter() { - - @Override - public Response onCompleted(Response response) throws Exception { - - count.incrementAndGet(); - StackTraceElement e = new StackTraceElement("sun.nio.ch.SocketDispatcher", "read0", null, -1); - IOException t = new IOException(); - t.setStackTrace(new StackTraceElement[] { e }); - throw t; - } - }; - - client.prepareGet(getTargetUrl()).execute(handler).get(); - fail("Must have received an exception"); - } catch (ExecutionException ex) { - assertNotNull(ex); - assertNotNull(ex.getCause()); - assertEquals(ex.getCause().getClass(), IOException.class); - assertEquals(count.get(), 1); - } finally { - client.close(); - } - } - } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index f77c3b3354..67da6d8b45 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -278,6 +278,9 @@ V getContent() throws ExecutionException { } public final void done(Callable callable) { + + Throwable exception = null; + try { cancelReaper(); @@ -290,16 +293,21 @@ public final void done(Callable callable) { try { callable.call(); } catch (Exception ex) { - throw new RuntimeException(ex); + exception = ex; } } } catch (ExecutionException t) { return; } catch (RuntimeException t) { - exEx.compareAndSet(null, new ExecutionException(t)); + exception = t.getCause() != null ? t.getCause() : t; + } finally { latch.countDown(); } + + if (exception != null) + exEx.compareAndSet(null, new ExecutionException(exception)); + super.done(); } From d482eca72032cf5a41f05c0d8bc654b0deb963c3 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Mar 2013 12:39:06 +0100 Subject: [PATCH 0308/2844] Mention that RequestBuilder is mutable and not threadsafe, close #238 --- api/src/main/java/com/ning/http/client/RequestBuilder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilder.java b/api/src/main/java/com/ning/http/client/RequestBuilder.java index 50aaad585f..7bf55ee1a5 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilder.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilder.java @@ -23,6 +23,8 @@ /** * Builder for a {@link Request}. + * Warning: mutable and not thread-safe! Beware that it holds a reference on the Request instance it builds, + * so modifying the builder will modify the request even after it has been built. */ public class RequestBuilder extends RequestBuilderBase { From ab36119b831e83b9b3b63a133c345f97a66a8671 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Mar 2013 15:18:28 +0100 Subject: [PATCH 0309/2844] Refactor NettyAsyncHttpProviderConfig, make non Netty properties explicit members, close #164 --- .../netty/NettyAsyncHttpProvider.java | 60 ++++-------- .../netty/NettyAsyncHttpProviderConfig.java | 95 ++++++++++++++----- .../netty/NettyAsyncHttpProviderTest.java | 2 +- .../NettyRedirectConnectionUsageTest.java | 2 +- .../netty/RetryNonBlockingIssue.java | 4 +- 5 files changed, 94 insertions(+), 69 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index b0cd8b3a7d..4567e4c647 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -193,23 +193,20 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { asyncHttpProviderConfig = new NettyAsyncHttpProviderConfig(); } - if (asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.USE_BLOCKING_IO) != null) { + if (asyncHttpProviderConfig.isUseBlockingIO()) { socketChannelFactory = new OioClientSocketChannelFactory(config.executorService()); this.allowReleaseSocketChannelFactory = true; } else { // check if external NioClientSocketChannelFactory is defined - Object oo = asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.SOCKET_CHANNEL_FACTORY); - if (oo != null && NioClientSocketChannelFactory.class.isAssignableFrom(oo.getClass())) { - this.socketChannelFactory = NioClientSocketChannelFactory.class.cast(oo); + NioClientSocketChannelFactory scf = asyncHttpProviderConfig.getSocketChannelFactory(); + if (scf != null) { + this.socketChannelFactory = scf; // cannot allow releasing shared channel factory this.allowReleaseSocketChannelFactory = false; } else { - ExecutorService e = null; - Object o = asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.BOSS_EXECUTOR_SERVICE); - if (o != null && ExecutorService.class.isAssignableFrom(o.getClass())) { - e = ExecutorService.class.cast(o); - } else { + ExecutorService e = asyncHttpProviderConfig.getBossExecutorService(); + if (e == null) { e = Executors.newCachedThreadPool(); } int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); @@ -256,7 +253,12 @@ public String toString() { void configureNetty() { if (asyncHttpProviderConfig != null) { for (Entry entry : asyncHttpProviderConfig.propertiesSet()) { - plainBootstrap.setOption(entry.getKey(), entry.getValue()); + String key = entry.getKey(); + Object value = entry.getValue(); + plainBootstrap.setOption(key, value); + webSocketBootstrap.setOption(key, value); + secureBootstrap.setOption(key, value); + secureWebSocketBootstrap.setOption(key, value); } } @@ -264,10 +266,8 @@ void configureNetty() { DefaultChannelFuture.setUseDeadLockChecker(false); if (asyncHttpProviderConfig != null) { - Object value = asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.EXECUTE_ASYNC_CONNECT); - if (value != null && Boolean.class.isAssignableFrom(value.getClass())) { - executeConnectAsync = Boolean.class.cast(value); - } else if (asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.DISABLE_NESTED_REQUEST) != null) { + executeConnectAsync = asyncHttpProviderConfig.isAsyncConnect(); + if (!executeConnectAsync) { DefaultChannelFuture.setUseDeadLockChecker(true); } } @@ -352,13 +352,6 @@ public ChannelPipeline getPipeline() throws Exception { return pipeline; } }); - - if (asyncHttpProviderConfig != null) { - for (Entry entry : asyncHttpProviderConfig.propertiesSet()) { - secureBootstrap.setOption(entry.getKey(), entry.getValue()); - secureWebSocketBootstrap.setOption(entry.getKey(), entry.getValue()); - } - } } private Channel lookupInCache(URI uri, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { @@ -1012,11 +1005,6 @@ private ListenableFuture doConnect(final Request request, final AsyncHand ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); - // Do no enable this with win. - if (System.getProperty("os.name").toLowerCase().indexOf("win") == -1) { - bootstrap.setOption("reuseAddress", asyncHttpProviderConfig.getProperty(NettyAsyncHttpProviderConfig.REUSE_ADDRESS)); - } - try { InetSocketAddress remoteAddress; if (request.getInetAddress() != null) { @@ -1694,10 +1682,10 @@ public static NettyResponseFuture newFuture(URI uri, private class ProgressListener implements ChannelFutureProgressListener { private final boolean notifyHeaders; - private final AsyncHandler asyncHandler; + private final AsyncHandler asyncHandler; private final NettyResponseFuture future; - public ProgressListener(boolean notifyHeaders, AsyncHandler asyncHandler, NettyResponseFuture future) { + public ProgressListener(boolean notifyHeaders, AsyncHandler asyncHandler, NettyResponseFuture future) { this.notifyHeaders = notifyHeaders; this.asyncHandler = asyncHandler; this.future = future; @@ -2166,14 +2154,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); if (newRealm == null) return; } else { - Realm.RealmBuilder realmBuilder; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) - ; - } else { - realmBuilder = new Realm.RealmBuilder(); - } - newRealm = realmBuilder + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) .setUri(request.getURI().getPath()) .setMethodName(request.getMethod()) .setUsePreemptiveAuth(true) @@ -2325,18 +2306,15 @@ public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { } private final class WebSocketProtocol implements Protocol { - private static final byte OPCODE_CONT = 0x0; private static final byte OPCODE_TEXT = 0x1; private static final byte OPCODE_BINARY = 0x2; private static final byte OPCODE_UNKNOWN = -1; - protected ChannelBuffer byteBuffer = null; - protected StringBuilder textBuffer = null; protected byte pendingOpcode = OPCODE_UNKNOWN; // @Override public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { - NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); + NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); Request request = future.getRequest(); @@ -2345,7 +2323,7 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder() + FilterContext fc = new FilterContext.FilterContextBuilder() .asyncHandler(h) .request(request) .responseStatus(s) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java index 7ecbb5e979..24e51ccf2c 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java @@ -16,73 +16,88 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpProviderConfig; - +import java.util.HashMap; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; + +import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.ning.http.client.AsyncHttpProviderConfig; /** * This class can be used to pass Netty's internal configuration options. See Netty documentation for more information. */ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig { + private final static Logger LOGGER = LoggerFactory.getLogger(NettyAsyncHttpProviderConfig.class); + /** * Use Netty's blocking IO stategy. */ - public final static String USE_BLOCKING_IO = "useBlockingIO"; + private boolean useBlockingIO; /** - * Use direct {@link java.nio.ByteBuffer} + * Allow configuring the Netty's socket channel factory. */ - public final static String USE_DIRECT_BYTEBUFFER = "bufferFactory"; + private NioClientSocketChannelFactory socketChannelFactory; /** - * Execute the connect operation asynchronously. + * Allow configuring the Netty's boss executor service. */ - public final static String EXECUTE_ASYNC_CONNECT = "asyncConnect"; + private ExecutorService bossExecutorService; /** - * Allow nested request from any {@link com.ning.http.client.AsyncHandler} + * Execute the connect operation asynchronously. */ - public final static String DISABLE_NESTED_REQUEST = "disableNestedRequest"; + private boolean asyncConnect; /** - * Allow configuring the Netty's boss executor service. + * Use direct {@link java.nio.ByteBuffer} */ - public final static String BOSS_EXECUTOR_SERVICE = "bossExecutorService"; - + public final static String USE_DIRECT_BYTEBUFFER = "bufferFactory"; + /** - * Allow configuring the Netty's socket channel factory. + * Allow nested request from any {@link com.ning.http.client.AsyncHandler} */ - public final static String SOCKET_CHANNEL_FACTORY = "socketChannelFactory"; + public final static String DISABLE_NESTED_REQUEST = "disableNestedRequest"; /** * See {@link java.net.Socket#setReuseAddress(boolean)} */ public final static String REUSE_ADDRESS = "reuseAddress"; - private final ConcurrentHashMap properties = new ConcurrentHashMap(); + private final Map properties = new HashMap(); public NettyAsyncHttpProviderConfig() { - properties.put(REUSE_ADDRESS, "false"); + properties.put(REUSE_ADDRESS, Boolean.FALSE); } /** * Add a property that will be used when the AsyncHttpClient initialize its {@link com.ning.http.client.AsyncHttpProvider} - * - * @param name the name of the property - * @param value the value of the property + * + * @param name + * the name of the property + * @param value + * the value of the property * @return this instance of AsyncHttpProviderConfig */ public NettyAsyncHttpProviderConfig addProperty(String name, Object value) { - properties.put(name, value); + + if (name.equals(REUSE_ADDRESS) && value == Boolean.TRUE && System.getProperty("os.name").toLowerCase().contains("win")) { + LOGGER.warn("Can't enable {} on Windows", REUSE_ADDRESS); + } else { + properties.put(name, value); + } + return this; } /** * Return the value associated with the property's name - * + * * @param name * @return this instance of AsyncHttpProviderConfig */ @@ -92,7 +107,7 @@ public Object getProperty(String name) { /** * Remove the value associated with the property's name - * + * * @param name * @return true if removed */ @@ -102,10 +117,42 @@ public Object removeProperty(String name) { /** * Return the curent entry set. - * + * * @return a the curent entry set. */ public Set> propertiesSet() { return properties.entrySet(); } + + public boolean isUseBlockingIO() { + return useBlockingIO; + } + + public void setUseBlockingIO(boolean useBlockingIO) { + this.useBlockingIO = useBlockingIO; + } + + public NioClientSocketChannelFactory getSocketChannelFactory() { + return socketChannelFactory; + } + + public void setSocketChannelFactory(NioClientSocketChannelFactory socketChannelFactory) { + this.socketChannelFactory = socketChannelFactory; + } + + public ExecutorService getBossExecutorService() { + return bossExecutorService; + } + + public void setBossExecutorService(ExecutorService bossExecutorService) { + this.bossExecutorService = bossExecutorService; + } + + public boolean isAsyncConnect() { + return asyncConnect; + } + + public void setAsyncConnect(boolean asyncConnect) { + this.asyncConnect = asyncConnect; + } } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java index fc16f4cad4..8e29dd08bf 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java @@ -28,7 +28,7 @@ public class NettyAsyncHttpProviderTest extends AbstractBasicTest { @Test public void bossThreadPoolExecutor() throws Throwable { NettyAsyncHttpProviderConfig conf = new NettyAsyncHttpProviderConfig(); - conf.addProperty(NettyAsyncHttpProviderConfig.BOSS_EXECUTOR_SERVICE, Executors.newSingleThreadExecutor()); + conf.setBossExecutorService(Executors.newSingleThreadExecutor()); AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setAsyncHttpClientProviderConfig(conf).build(); AsyncHttpClient c = getAsyncHttpClient(cf); diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java index a3731a6a0d..b43a5029e7 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java @@ -27,7 +27,7 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { protected AsyncHttpProviderConfig getProviderConfig() { final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); if (System.getProperty("blockingio") != null) { - config.addProperty(NettyAsyncHttpProviderConfig.USE_BLOCKING_IO, "true"); + config.setUseBlockingIO(true); } return config; } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java index 1f58881fbd..19a227e667 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java @@ -185,7 +185,7 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); - config.addProperty(NettyAsyncHttpProviderConfig.EXECUTE_ASYNC_CONNECT, "true"); + config.setAsyncConnect(true); bc.setAsyncHttpClientProviderConfig(config); c = new AsyncHttpClient(bc.build()); @@ -230,7 +230,7 @@ public void testRetryBlocking() throws IOException, InterruptedException, NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); - config.addProperty(NettyAsyncHttpProviderConfig.USE_BLOCKING_IO, "true"); + config.setUseBlockingIO(true); bc.setAsyncHttpClientProviderConfig(config); c = new AsyncHttpClient(bc.build()); From b3c118e20f3ba897994eb1199bff250cd7687ac7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 11 Mar 2013 17:17:02 +0100 Subject: [PATCH 0310/2844] Expose HttpClientCodec params in NettyAsyncHttpProviderConfig, partial fix for #162 --- .../netty/NettyAsyncHttpProvider.java | 19 ++++++--- .../netty/NettyAsyncHttpProviderConfig.java | 39 +++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4567e4c647..59d3c520b0 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -285,6 +285,15 @@ public ChannelPipeline getPipeline() throws Exception { }); } + protected HttpClientCodec newHttpClientCodec() { + if (asyncHttpProviderConfig != null) { + return new HttpClientCodec(asyncHttpProviderConfig.getMaxInitialLineLength(), asyncHttpProviderConfig.getMaxHeaderSize(), asyncHttpProviderConfig.getMaxChunkSize(), false); + + } else { + return new HttpClientCodec(); + } + } + protected ChannelPipelineFactory createPlainPipelineFactory() { return new ChannelPipelineFactory() { @@ -292,7 +301,7 @@ protected ChannelPipelineFactory createPlainPipelineFactory() { public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = pipeline(); - pipeline.addLast(HTTP_HANDLER, new HttpClientCodec()); + pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); if (config.getRequestCompressionLevel() > 0) { pipeline.addLast("deflater", new HttpContentCompressor(config.getRequestCompressionLevel())); @@ -322,7 +331,7 @@ public ChannelPipeline getPipeline() throws Exception { abort(cl.future(), ex); } - pipeline.addLast(HTTP_HANDLER, new HttpClientCodec()); + pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); if (config.isCompressionEnabled()) { pipeline.addLast("inflater", new HttpContentDecompressor()); @@ -1356,14 +1365,14 @@ private void upgradeProtocol(ChannelPipeline p, String scheme) throws IOExceptio if (isSecure(scheme)) { if (p.get(SSL_HANDLER) == null) { - p.addFirst(HTTP_HANDLER, new HttpClientCodec()); + p.addFirst(HTTP_HANDLER, newHttpClientCodec()); p.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); } else { - p.addAfter(SSL_HANDLER, HTTP_HANDLER, new HttpClientCodec()); + p.addAfter(SSL_HANDLER, HTTP_HANDLER, newHttpClientCodec()); } } else { - p.addFirst(HTTP_HANDLER, new HttpClientCodec()); + p.addFirst(HTTP_HANDLER, newHttpClientCodec()); } } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java index 24e51ccf2c..b22cba0a9a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java @@ -54,6 +54,21 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig Date: Tue, 12 Mar 2013 14:02:41 +0100 Subject: [PATCH 0311/2844] Port #250 to master, close #202 --- .../providers/jdk/JDKAsyncHttpProvider.java | 12 +++---- .../java/com/ning/http/util/ProxyUtils.java | 20 +++++++++-- .../com/ning/http/client/async/ProxyTest.java | 15 ++++++++ .../apache/ApacheAsyncHttpProvider.java | 5 ++- .../grizzly/GrizzlyAsyncHttpProvider.java | 31 ++++------------- .../grizzly/GrizzlyResponseFuture.java | 11 ++++-- .../netty/NettyAsyncHttpProvider.java | 34 ++++++++----------- .../providers/netty/NettyConnectListener.java | 27 +++++++++------ .../providers/netty/NettyResponseFuture.java | 10 +++++- 9 files changed, 94 insertions(+), 71 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index ff82708731..b315695c17 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -136,7 +136,7 @@ public ListenableFuture execute(Request request, AsyncHandler handler, boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, request); if (!avoidProxy && (proxyServer != null || realm != null)) { try { - /*Proxy proxy =*/ configureProxyAndAuth(proxyServer, realm); + configureProxyAndAuth(proxyServer, realm); } catch (AuthenticationException e) { throw new IOException(e.getMessage()); } @@ -163,11 +163,10 @@ public ListenableFuture execute(Request request, AsyncHandler handler, } private HttpURLConnection createUrlConnection(Request request) throws IOException { - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, request); Proxy proxy = null; - if (!avoidProxy && proxyServer != null || realm != null) { + if (proxyServer != null || realm != null) { try { proxy = configureProxyAndAuth(proxyServer, realm); } catch (AuthenticationException e) { @@ -496,9 +495,8 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request String ka = config.getAllowPoolingConnection() ? "keep-alive" : "close"; urlConnection.setRequestProperty("Connection", ka); - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, uri.getHost()); - if (!avoidProxy) { + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); + if (proxyServer != null) { urlConnection.setRequestProperty("Proxy-Connection", ka); if (proxyServer.getPrincipal() != null) { urlConnection.setRequestProperty("Proxy-Authorization", AuthenticatorUtils.computeBasicAuthentication(proxyServer)); diff --git a/api/src/main/java/com/ning/http/util/ProxyUtils.java b/api/src/main/java/com/ning/http/util/ProxyUtils.java index a135122149..e53bfff8d8 100644 --- a/api/src/main/java/com/ning/http/util/ProxyUtils.java +++ b/api/src/main/java/com/ning/http/util/ProxyUtils.java @@ -14,13 +14,14 @@ import static com.ning.http.util.MiscUtil.isNonEmpty; +import java.util.List; +import java.util.Properties; + +import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ProxyServer; import com.ning.http.client.ProxyServer.Protocol; import com.ning.http.client.Request; -import java.util.List; -import java.util.Properties; - /** * Utilities for Proxy handling. * @@ -60,6 +61,19 @@ public class ProxyUtils { */ public static final String PROXY_PASSWORD = PROPERTY_PREFIX + "password"; + /** + * @param config the global config + * @param request the request + * @return the proxy server to be used for this request (can be null) + */ + public static ProxyServer getProxyServer(AsyncHttpClientConfig config, Request request) { + ProxyServer proxyServer = request.getProxyServer(); + if (proxyServer == null) { + proxyServer = config.getProxyServer(); + } + return ProxyUtils.avoidProxy(proxyServer, request) ? null : proxyServer; + } + /** * Checks whether proxy should be used according to nonProxyHosts settings of it, or we want to go directly to * target host. If null proxy is passed in, this method returns true -- since there is NO proxy, we diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTest.java b/api/src/test/java/com/ning/http/client/async/ProxyTest.java index 6314c1b5fd..a8dbf8883c 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/api/src/test/java/com/ning/http/client/async/ProxyTest.java @@ -125,6 +125,21 @@ public void testNonProxyHosts() throws IOException, ExecutionException, TimeoutE } } + @Test(groups = { "standalone", "default_provider" }) + public void testNonProxyHostIssue202() throws IOException, ExecutionException, TimeoutException, InterruptedException { + AsyncHttpClient client = getAsyncHttpClient(null); + try { + String target = "http://127.0.0.1:" + port1 + "/"; + Future f = client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1 - 1).addNonProxyHost("127.0.0.1")).execute(); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(resp.getHeader("target"), "/"); + } finally { + client.close(); + } + } + @Test(groups = { "standalone", "default_provider" }) public void testProxyProperties() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index eecd271fac..c8d9da3982 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -341,9 +341,8 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I throw new IllegalStateException(String.format("Invalid Method", methodName)); } - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, request); - if (!avoidProxy) { + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); + if (proxyServer != null) { if (proxyServer.getPrincipal() != null) { Credentials defaultcreds = new UsernamePasswordCredentials(proxyServer.getPrincipal(), proxyServer.getPassword()); diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 2c1f8abf46..0a3f81059a 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -201,8 +201,8 @@ public GrizzlyAsyncHttpProvider(final AsyncHttpClientConfig clientConfig) { public ListenableFuture execute(final Request request, final AsyncHandler handler) throws IOException { - final GrizzlyResponseFuture future = - new GrizzlyResponseFuture(this, request, handler); + final ProxyServer proxy = ProxyUtils.getProxyServer(clientConfig, request); + final GrizzlyResponseFuture future = new GrizzlyResponseFuture(this, request, handler, proxy); future.setDelegate(SafeFutureImpl.create()); final CompletionHandler connectHandler = new CompletionHandler() { @Override @@ -862,8 +862,8 @@ private boolean sendAsGrizzlyRequest(final Request request, builder.header(Header.Host, uri.getHost() + ':' + uri.getPort()); } } - final ProxyServer proxy = getProxyServer(request); - final boolean useProxy = (proxy != null); + final ProxyServer proxy = ProxyUtils.getProxyServer(config, request); + final boolean useProxy = proxy != null; if (useProxy) { if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) { ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(false, ctx.getConnection())); @@ -959,18 +959,6 @@ private void convertToUpgradeRequest(final HttpTransactionContext ctx) { ctx.requestUrl = sb.toString(); } - - private ProxyServer getProxyServer(Request request) { - - ProxyServer proxyServer = request.getProxyServer(); - if (proxyServer == null) { - proxyServer = config.getProxyServer(); - } - return proxyServer; - - } - - private void addHeaders(final Request request, final HttpRequestPacket requestPacket) { @@ -2436,11 +2424,9 @@ Connection obtainConnection(final Request request, final GrizzlyResponseFuture requestFuture) throws IOException, ExecutionException, InterruptedException, TimeoutException { - final Connection c = (obtainConnection0(request, - requestFuture)); + final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); DO_NOT_CACHE.set(c, Boolean.TRUE); return c; - } void doAsyncConnect(final Request request, @@ -2466,14 +2452,11 @@ void doAsyncConnect(final Request request, } private Connection obtainConnection0(final Request request, - final GrizzlyResponseFuture requestFuture) + final GrizzlyResponseFuture requestFuture, + final ProxyServer proxy) throws IOException, ExecutionException, InterruptedException, TimeoutException { final URI uri = request.getURI(); - ProxyServer proxy = getProxyServer(request); - if (ProxyUtils.avoidProxy(proxy, request)) { - proxy = null; - } String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java index c93d52094f..7ff989f07e 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java @@ -14,6 +14,7 @@ package com.ning.http.client.providers.grizzly; import com.ning.http.client.AsyncHandler; +import com.ning.http.client.ProxyServer; import com.ning.http.client.Request; import com.ning.http.client.listenable.AbstractListenableFuture; @@ -41,7 +42,7 @@ public class GrizzlyResponseFuture extends AbstractListenableFuture { private final AsyncHandler handler; private final GrizzlyAsyncHttpProvider provider; private final Request request; - + private final ProxyServer proxyServer; private Connection connection; FutureImpl delegate; @@ -52,12 +53,13 @@ public class GrizzlyResponseFuture extends AbstractListenableFuture { GrizzlyResponseFuture(final GrizzlyAsyncHttpProvider provider, final Request request, - final AsyncHandler handler) { + final AsyncHandler handler, + final ProxyServer proxyServer) { this.provider = provider; this.request = request; this.handler = handler; - + this.proxyServer = proxyServer; } @@ -204,4 +206,7 @@ private void closeConnection() { } + public ProxyServer getProxyServer() { + return proxyServer; + } } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 59d3c520b0..f59f0f3e79 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -559,18 +559,14 @@ public void operationComplete(ChannelFuture cf) { } - private static boolean isProxyServer(AsyncHttpClientConfig config, Request request) { - return request.getProxyServer() != null || config.getProxyServer() != null; - } - protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, - boolean allowConnect, ChannelBuffer buffer) throws IOException { + boolean allowConnect, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { String method = request.getMethod(); - if (allowConnect && (isProxyServer(config, request) && isSecure(uri))) { + if (allowConnect && proxyServer != null && isSecure(uri)) { method = HttpMethod.CONNECT.toString(); } - return construct(config, request, new HttpMethod(method), uri, buffer); + return construct(config, request, new HttpMethod(method), uri, buffer, proxyServer); } private static SpnegoEngine getSpnegoEngine() { @@ -583,7 +579,8 @@ private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, URI uri, - ChannelBuffer buffer) throws IOException { + ChannelBuffer buffer, + ProxyServer proxyServer) throws IOException { String host = AsyncHttpProviderUtils.getHost(uri); boolean webSocket = isWebSocket(uri); @@ -597,7 +594,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { String path = null; - if (isProxyServer(config, request)) + if (proxyServer != null) path = uri.toString(); else if (uri.getRawQuery() != null) path = uri.getRawPath() + "?" + uri.getRawQuery(); @@ -648,7 +645,6 @@ else if (uri.getRawQuery() != null) nettyRequest.addHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, auth.get(0)); } } - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); if (realm != null && realm.getUsePreemptiveAuth()) { @@ -712,8 +708,7 @@ else if (uri.getRawQuery() != null) nettyRequest.setHeader(HttpHeaders.Names.CONNECTION, "keep-alive"); } - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, request); - if (!avoidProxy) { + if (proxyServer != null) { if (!request.getHeaders().containsKey("Proxy-Connection")) { nettyRequest.setHeader("Proxy-Connection", "keep-alive"); } @@ -914,7 +909,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand throw new IOException("WebSocket method must be a GET"); } - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); URI uri; if (useRawUrl) { uri = request.getRawURI(); @@ -939,12 +934,12 @@ private ListenableFuture doConnect(final Request request, final AsyncHand boolean useSSl = isSecure(uri) && proxyServer == null; if (channel != null && channel.isOpen() && channel.isConnected()) { - HttpRequest nettyRequest = buildRequest(config, request, uri, f == null ? false : f.isConnectAllowed(), bufferedBytes); + HttpRequest nettyRequest = buildRequest(config, request, uri, f == null ? false : f.isConnectAllowed(), bufferedBytes, proxyServer); if (f == null) { - f = newFuture(uri, request, asyncHandler, nettyRequest, config, this); + f = newFuture(uri, request, asyncHandler, nettyRequest, config, this, proxyServer); } else { - nettyRequest = buildRequest(config, request, uri, f.isConnectAllowed(), bufferedBytes); + nettyRequest = buildRequest(config, request, uri, f.isConnectAllowed(), bufferedBytes, proxyServer); f.setNettyRequest(nettyRequest); } f.setState(NettyResponseFuture.STATE.POOLED); @@ -1676,10 +1671,11 @@ public static NettyResponseFuture newFuture(URI uri, AsyncHandler asyncHandler, HttpRequest nettyRequest, AsyncHttpClientConfig config, - NettyAsyncHttpProvider provider) { + NettyAsyncHttpProvider provider, + ProxyServer proxyServer) { NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, - requestTimeout(config, request.getPerRequestConfig()), config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy()); + requestTimeout(config, request.getPerRequestConfig()), config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy(), proxyServer); if (request.getHeaders().getFirstValue("Expect") != null && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { @@ -2092,6 +2088,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws HttpRequest nettyRequest = future.getNettyRequest(); AsyncHandler handler = future.getAsyncHandler(); Request request = future.getRequest(); + ProxyServer proxyServer = future.getProxyServer(); HttpResponse response = null; try { if (e.getMessage() instanceof HttpResponse) { @@ -2141,7 +2138,6 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws } Realm newRealm = null; - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); final RequestBuilder builder = new RequestBuilder(future.getRequest()); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java index 2c34c92978..c7a2a8f115 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java @@ -16,9 +16,14 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Request; +import java.io.IOException; +import java.net.ConnectException; +import java.net.URI; +import java.nio.channels.ClosedChannelException; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.net.ssl.HostnameVerifier; + import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; @@ -28,12 +33,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.net.ssl.HostnameVerifier; -import java.io.IOException; -import java.net.ConnectException; -import java.net.URI; -import java.nio.channels.ClosedChannelException; -import java.util.concurrent.atomic.AtomicBoolean; +import com.ning.http.client.AsyncHandler; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.ProxyServer; +import com.ning.http.client.Request; +import com.ning.http.util.ProxyUtils; /** @@ -135,9 +139,10 @@ public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler as } public NettyConnectListener build(final URI uri) throws IOException { - HttpRequest nettyRequest = NettyAsyncHttpProvider.buildRequest(config, request, uri, true, buffer); + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); + HttpRequest nettyRequest = NettyAsyncHttpProvider.buildRequest(config, request, uri, true, buffer, proxyServer); if (future == null) { - future = NettyAsyncHttpProvider.newFuture(uri, request, asyncHandler, nettyRequest, config, provider); + future = NettyAsyncHttpProvider.newFuture(uri, request, asyncHandler, nettyRequest, config, provider, proxyServer); } else { future.setNettyRequest(nettyRequest); future.setRequest(request); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index 67da6d8b45..dc6929b753 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -17,6 +17,7 @@ import com.ning.http.client.AsyncHandler; import com.ning.http.client.ConnectionPoolKeyStrategy; +import com.ning.http.client.ProxyServer; import com.ning.http.client.Request; import com.ning.http.client.listenable.AbstractListenableFuture; import org.jboss.netty.channel.Channel; @@ -87,6 +88,7 @@ enum STATE { private final AtomicBoolean throwableCalled = new AtomicBoolean(false); private boolean allowConnect = false; private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; + private final ProxyServer proxyServer; public NettyResponseFuture(URI uri, Request request, @@ -95,7 +97,8 @@ public NettyResponseFuture(URI uri, int responseTimeoutInMs, int idleConnectionTimeoutInMs, NettyAsyncHttpProvider asyncHttpProvider, - ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { + ConnectionPoolKeyStrategy connectionPoolKeyStrategy, + ProxyServer proxyServer) { this.asyncHandler = asyncHandler; this.responseTimeoutInMs = responseTimeoutInMs; @@ -105,6 +108,7 @@ public NettyResponseFuture(URI uri, this.uri = uri; this.asyncHttpProvider = asyncHttpProvider; this.connectionPoolKeyStrategy = connectionPoolKeyStrategy; + this.proxyServer = proxyServer; if (System.getProperty(MAX_RETRY) != null) { maxRetry = Integer.valueOf(System.getProperty(MAX_RETRY)); @@ -127,6 +131,10 @@ public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { return connectionPoolKeyStrategy; } + public ProxyServer getProxyServer() { + return proxyServer; + } + /** * {@inheritDoc} */ From b5cecbf584222b33841355d8a01df154827b4194 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 12 Mar 2013 14:49:48 +0100 Subject: [PATCH 0312/2844] When using a proxy, Netty provider should send relative urls once connected, not absolute ones, fix #251 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index f59f0f3e79..fe3f05cc7c 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -594,7 +594,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { String path = null; - if (proxyServer != null) + if (proxyServer != null && !isSecure(uri)) path = uri.toString(); else if (uri.getRawQuery() != null) path = uri.getRawPath() + "?" + uri.getRawQuery(); From f7a6c68a274969213429111590d306ddc916ab84 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 12 Mar 2013 15:42:56 +0100 Subject: [PATCH 0313/2844] Rollback #251 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index fe3f05cc7c..f59f0f3e79 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -594,7 +594,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { String path = null; - if (proxyServer != null && !isSecure(uri)) + if (proxyServer != null) path = uri.toString(); else if (uri.getRawQuery() != null) path = uri.getRawPath() + "?" + uri.getRawQuery(); From 6deae2eb498572f958c352c9589fd68fad1f0e47 Mon Sep 17 00:00:00 2001 From: sunwei Date: Wed, 13 Mar 2013 07:37:58 -0700 Subject: [PATCH 0314/2844] Fix the connection channel issue at proxy mode --- .../ning/http/client/providers/jdk/JDKAsyncHttpProvider.java | 2 +- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 3 ++- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index ff82708731..022698a487 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -180,7 +180,7 @@ private HttpURLConnection createUrlConnection(Request request) throws IOExceptio urlConnection = (HttpURLConnection) AsyncHttpProviderUtils.createUri(request.getUrl()).toURL().openConnection(Proxy.NO_PROXY); } else { - urlConnection = (HttpURLConnection) AsyncHttpProviderUtils.createUri(request.getUrl()).toURL().openConnection(proxy); + urlConnection = (HttpURLConnection) AsyncHttpProviderUtils.createUri(proxyServer.toString()).toURL().openConnection(proxy); } if (request.getUrl().startsWith("https")) { diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 2c1f8abf46..2917a2680a 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2566,7 +2566,8 @@ public void updated(Connection result) { private static String getPoolKey(final Request request) { final ConnectionPoolKeyStrategy keyStrategy = request.getConnectionPoolKeyStrategy(); - return keyStrategy.getKey(request.getURI()); + String savedUrlInConnPool = request.getProxyServer() != null ? request.getProxyServer().toString() : request.getUrl(); + return keyStrategy.getKey(AsyncHttpProviderUtils.createUri(AsyncHttpProviderUtils.getBaseUrl(savedUrlInConnPool))); } // ------------------------------------------------------ Nested Classes diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 59d3c520b0..bd5e75a2ec 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1284,7 +1284,8 @@ private Realm ntlmProxyChallenge(List wwwAuth, private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future, final boolean keepAlive, final URI uri) { ctx.setAttachment(new AsyncCallable(future) { public Object call() throws Exception { - if (keepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(uri), ctx.getChannel())) { + URI connUrl = future.getRequest().getProxyServer() == null ? future.getURI() : AsyncHttpProviderUtils.createUri(future.getRequest().getProxyServer().toString()); + if (keepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(connUrl), ctx.getChannel())) { return null; } @@ -1481,7 +1482,7 @@ private void finishUpdate(final NettyResponseFuture future, final ChannelHand drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); } else { if (future.getKeepAlive() && ctx.getChannel().isReadable() && - connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(future.getURI()), ctx.getChannel())) { + (connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(future.getRequest().getProxyServer() == null ? future.getURI() : AsyncHttpProviderUtils.createUri(future.getRequest().getProxyServer().toString())), ctx.getChannel()))){ markAsDone(future, ctx); return; } From 6866b1dc73ecc5748bd9d93492b64a2c035ce96b Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 14 Mar 2013 13:57:06 +0100 Subject: [PATCH 0315/2844] Add getURI method on ProxyServer, close #253 --- .../java/com/ning/http/client/ProxyServer.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/ProxyServer.java b/api/src/main/java/com/ning/http/client/ProxyServer.java index f0551329a5..8f2da732d6 100644 --- a/api/src/main/java/com/ning/http/client/ProxyServer.java +++ b/api/src/main/java/com/ning/http/client/ProxyServer.java @@ -16,10 +16,13 @@ */ package com.ning.http.client; +import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import com.ning.http.util.AsyncHttpProviderUtils; + /** * Represents a proxy server. */ @@ -44,13 +47,14 @@ public String toString() { } } - private String encoding = "UTF-8"; private final List nonProxyHosts = new ArrayList(); private final Protocol protocol; private final String host; private final String principal; private final String password; - private int port; + private final int port; + private final URI uri; + private String encoding = "UTF-8"; private String ntlmDomain = System.getProperty("http.auth.ntlm.domain", ""); private boolean isBasic = true; @@ -69,6 +73,7 @@ public ProxyServer(final Protocol protocol, final String host, final int port, S this.port = port; this.principal = principal; this.password = password; + this.uri = AsyncHttpProviderUtils.createUri(toString()); } public ProxyServer(final String host, final int port, String principal, String password) { @@ -116,6 +121,10 @@ public String getEncoding() { return encoding; } + public URI getURI() { + return uri; + } + public ProxyServer addNonProxyHost(String uri) { nonProxyHosts.add(uri); return this; @@ -141,7 +150,7 @@ public String getNtlmDomain() { @Override public String toString() { - return String.format("%s://%s:%d", protocol.toString(), host, port); + return protocol + "://" + host + ":" + port; } } From be058298b0d61e69bc169d94039b954bcb8d70c9 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 14 Mar 2013 14:04:42 +0100 Subject: [PATCH 0316/2844] Introduce useRelativeURIsWithSSLProxies, close #236, close #251 --- .../http/client/AsyncHttpClientConfig.java | 33 +++++++++++++++++-- .../grizzly/GrizzlyAsyncHttpProvider.java | 2 ++ .../netty/NettyAsyncHttpProvider.java | 2 +- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 677b2c4aa1..2ebdc29f42 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -109,6 +109,7 @@ public class AsyncHttpClientConfig { protected int ioThreadMultiplier; protected boolean strict302Handling; protected int maxConnectionLifeTimeInMs; + protected boolean useRelativeURIsWithSSLProxies; protected AsyncHttpClientConfig() { } @@ -143,7 +144,8 @@ private AsyncHttpClientConfig(int maxTotalConnections, boolean removeQueryParamOnRedirect, HostnameVerifier hostnameVerifier, int ioThreadMultiplier, - boolean strict302Handling) { + boolean strict302Handling, + boolean useRelativeURIsWithSSLProxies) { this.maxTotalConnections = maxTotalConnections; this.maxConnectionPerHost = maxConnectionPerHost; @@ -174,6 +176,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.hostnameVerifier = hostnameVerifier; this.ioThreadMultiplier = ioThreadMultiplier; this.strict302Handling = strict302Handling; + this.useRelativeURIsWithSSLProxies = useRelativeURIsWithSSLProxies; if (applicationThreadPool == null) { this.applicationThreadPool = Executors.newCachedThreadPool(); @@ -503,6 +506,16 @@ public boolean isStrict302Handling() { return strict302Handling; } + /** + * @returntrue if AHC should use relative URIs instead of absolute ones when talking with a SSL proxy, + * otherwise false. + * + * @since 1.7.12 + */ + public boolean isUseRelativeURIsWithSSLProxies() { + return useRelativeURIsWithSSLProxies; + } + /** * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. * @@ -530,6 +543,7 @@ public static class Builder { private String userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "AsyncHttpClient/" + AHC_VERSION); private boolean useProxyProperties = Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties"); private boolean allowPoolingConnection = true; + private boolean useRelativeURIsWithSSLProxies = Boolean.getBoolean(ASYNC_CLIENT + "useRelativeURIsWithSSLProxies"); private ScheduledExecutorService reaper = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors(), new ThreadFactory() { public Thread newThread(Runnable r) { Thread t = new Thread(r, "AsyncHttpClient-Reaper"); @@ -1004,6 +1018,19 @@ public Builder setMaxConnectionLifeTimeInMs(int maxConnectionLifeTimeInMs) { return this; } + /** + * Configures this AHC instance to use relative URIs instead of absolute ones when talking with a SSL proxy. + * + * @param useRelativeURIsWithSSLProxies + * @return this + * + * @since 1.7.2 + */ + public Builder setUseRelativeURIsWithSSLProxies(boolean useRelativeURIsWithSSLProxies) { + this.useRelativeURIsWithSSLProxies = useRelativeURIsWithSSLProxies; + return this; + } + /** * Create a config builder with values taken from the given prototype configuration. * @@ -1047,6 +1074,7 @@ public Builder(AsyncHttpClientConfig prototype) { removeQueryParamOnRedirect = prototype.isRemoveQueryParamOnRedirect(); hostnameVerifier = prototype.getHostnameVerifier(); strict302Handling = prototype.isStrict302Handling(); + useRelativeURIsWithSSLProxies = prototype.isUseRelativeURIsWithSSLProxies(); } /** @@ -1095,7 +1123,8 @@ public AsyncHttpClientConfig build() { removeQueryParamOnRedirect, hostnameVerifier, ioThreadMultiplier, - strict302Handling); + strict302Handling, + useRelativeURIsWithSSLProxies); } } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 306bae61ac..12429d56c3 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -871,6 +871,8 @@ private boolean sendAsGrizzlyRequest(final Request request, httpCtx.establishingTunnel = true; builder.method(Method.CONNECT); builder.uri(AsyncHttpProviderUtils.getAuthority(uri)); + } else if (secure && config.isUseRelativeURIsWithSSLProxies()){ + builder.uri(uri.getPath()); } else { builder.uri(uri.toString()); } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index fe2c723026..c055555fcb 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -594,7 +594,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { String path = null; - if (proxyServer != null) + if (proxyServer != null && !(isSecure(uri) && config.isUseRelativeURIsWithSSLProxies())) path = uri.toString(); else if (uri.getRawQuery() != null) path = uri.getRawPath() + "?" + uri.getRawQuery(); From f3e5fbd296235f88041c4dfde5d4d5d2ca2af53f Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 14 Mar 2013 14:34:57 +0100 Subject: [PATCH 0317/2844] Reduce URI creation in fix #115 --- .../providers/jdk/JDKAsyncHttpProvider.java | 10 ++-- .../grizzly/GrizzlyAsyncHttpProvider.java | 60 ++++--------------- .../netty/NettyAsyncHttpProvider.java | 33 +++++----- 3 files changed, 34 insertions(+), 69 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 1d1448c34e..498146ca08 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -131,10 +131,9 @@ public ListenableFuture execute(Request request, AsyncHandler handler, throw new IOException(String.format("Too many connections %s", config.getMaxTotalConnections())); } - ProxyServer proxyServer = request.getProxyServer() != null ? request.getProxyServer() : config.getProxyServer(); + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, request); - if (!avoidProxy && (proxyServer != null || realm != null)) { + if (proxyServer != null || realm != null) { try { configureProxyAndAuth(proxyServer, realm); } catch (AuthenticationException e) { @@ -176,10 +175,9 @@ private HttpURLConnection createUrlConnection(Request request) throws IOExceptio HttpURLConnection urlConnection = null; if (proxy == null) { - urlConnection = - (HttpURLConnection) AsyncHttpProviderUtils.createUri(request.getUrl()).toURL().openConnection(Proxy.NO_PROXY); + urlConnection = (HttpURLConnection) request.getURI().toURL().openConnection(Proxy.NO_PROXY); } else { - urlConnection = (HttpURLConnection) AsyncHttpProviderUtils.createUri(proxyServer.toString()).toURL().openConnection(proxy); + urlConnection = (HttpURLConnection) proxyServer.getURI().toURL().openConnection(proxy); } if (request.getUrl().startsWith("https")) { diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 12429d56c3..8b2ab85da1 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -448,29 +448,6 @@ void touchConnection(final Connection c, final Request request) { // --------------------------------------------------------- Private Methods - - - private static boolean configSendFileSupport() { - - return !((System.getProperty("os.name").equalsIgnoreCase("linux") - && !linuxSendFileSupported()) - || System.getProperty("os.name").equalsIgnoreCase("HP-UX")); - } - - - private static boolean linuxSendFileSupported() { - final String version = System.getProperty("java.version"); - if (version.startsWith("1.6")) { - int idx = version.indexOf('_'); - if (idx == -1) { - return false; - } - final int patchRev = Integer.parseInt(version.substring(idx + 1)); - return (patchRev >= 18); - } else { - return version.startsWith("1.7") || version.startsWith("1.8"); - } - } private void doDefaultTransportConfig() { final ExecutorService service = clientConfig.executorService(); @@ -2409,7 +2386,7 @@ void doAsyncTrackedConnection(final Request request, final GrizzlyResponseFuture requestFuture, final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { - Connection c = pool.poll(getPoolKey(request)); + Connection c = pool.poll(getPoolKey(request, requestFuture.getProxyServer())); if (c == null) { if (!connectionMonitor.acquire()) { throw new IOException("Max connections exceeded"); @@ -2436,14 +2413,11 @@ void doAsyncConnect(final Request request, final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { - ProxyServer proxy = getProxyServer(request); - if (ProxyUtils.avoidProxy(proxy, request)) { - proxy = null; - } + ProxyServer proxy = requestFuture.getProxyServer(); final URI uri = request.getURI(); - String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); - int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); - if(request.getLocalAddress()!=null) { + String host = proxy != null ? proxy.getHost() : uri.getHost(); + int port = proxy != null ? proxy.getPort() : uri.getPort(); + if (request.getLocalAddress() != null) { connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), new InetSocketAddress(request.getLocalAddress(), 0), createConnectionCompletionHandler(request, requestFuture, connectHandler)); } else { @@ -2459,8 +2433,8 @@ private Connection obtainConnection0(final Request request, throws IOException, ExecutionException, InterruptedException, TimeoutException { final URI uri = request.getURI(); - String host = ((proxy != null) ? proxy.getHost() : uri.getHost()); - int port = ((proxy != null) ? proxy.getPort() : uri.getPort()); + String host = proxy != null ? proxy.getHost() : uri.getHost(); + int port = proxy != null ? proxy.getPort() : uri.getPort(); int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); FutureImpl future = Futures.createSafeFuture(); CompletionHandler ch = Futures.toCompletionHandler(future, @@ -2476,26 +2450,16 @@ private Connection obtainConnection0(final Request request, } } - private ProxyServer getProxyServer(Request request) { - - ProxyServer proxyServer = request.getProxyServer(); - if (proxyServer == null) { - proxyServer = provider.clientConfig.getProxyServer(); - } - return proxyServer; - - } - boolean returnConnection(final Request request, final Connection c) { + ProxyServer proxyServer = ProxyUtils.getProxyServer(provider.clientConfig, request); final boolean result = (DO_NOT_CACHE.get(c) == null - && pool.offer(getPoolKey(request), c)); + && pool.offer(getPoolKey(request, proxyServer), c)); if (result) { if (provider.resolver != null) { provider.resolver.setTimeoutMillis(c, IdleTimeoutFilter.FOREVER); } } return result; - } @@ -2549,10 +2513,10 @@ public void updated(Connection result) { }; } - private static String getPoolKey(final Request request) { + private static String getPoolKey(final Request request, ProxyServer proxyServer) { final ConnectionPoolKeyStrategy keyStrategy = request.getConnectionPoolKeyStrategy(); - String savedUrlInConnPool = request.getProxyServer() != null ? request.getProxyServer().toString() : request.getUrl(); - return keyStrategy.getKey(AsyncHttpProviderUtils.createUri(AsyncHttpProviderUtils.getBaseUrl(savedUrlInConnPool))); + URI uri = proxyServer != null? proxyServer.getURI(): request.getURI(); + return keyStrategy.getKey(uri); } // ------------------------------------------------------ Nested Classes diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index c055555fcb..bc1cbc6d8a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -910,6 +910,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); + boolean useProxy = proxyServer != null; URI uri; if (useRawUrl) { uri = request.getRawURI(); @@ -922,7 +923,8 @@ private ListenableFuture doConnect(final Request request, final AsyncHand if (f != null && f.reuseChannel() && f.channel() != null) { channel = f.channel(); } else { - channel = lookupInCache(uri, request.getConnectionPoolKeyStrategy()); + URI connectionKeyUri = useProxy? proxyServer.getURI() : uri; + channel = lookupInCache(connectionKeyUri, request.getConnectionPoolKeyStrategy()); } } @@ -932,7 +934,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand bufferedBytes = f.getNettyRequest().getContent(); } - boolean useSSl = isSecure(uri) && proxyServer == null; + boolean useSSl = isSecure(uri) && !useProxy; if (channel != null && channel.isOpen() && channel.isConnected()) { HttpRequest nettyRequest = buildRequest(config, request, uri, f == null ? false : f.isConnectAllowed(), bufferedBytes, proxyServer); @@ -1275,12 +1277,16 @@ private Realm ntlmProxyChallenge(List wwwAuth, return newRealm; } + + private String getPoolKey(NettyResponseFuture future) throws MalformedURLException { + URI uri = future.getProxyServer() != null ? future.getProxyServer().getURI() : future.getURI(); + return future.getConnectionPoolKeyStrategy().getKey(uri); + } - private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future, final boolean keepAlive, final URI uri) { + private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future) { ctx.setAttachment(new AsyncCallable(future) { public Object call() throws Exception { - URI connUrl = future.getRequest().getProxyServer() == null ? future.getURI() : AsyncHttpProviderUtils.createUri(future.getRequest().getProxyServer().toString()); - if (keepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(future.getConnectionPoolKeyStrategy().getKey(connUrl), ctx.getChannel())) { + if (future.getKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { return null; } @@ -1316,7 +1322,7 @@ private void replayRequest(final NettyResponseFuture future, FilterContext fc future.touch(); log.debug("\n\nReplaying Request {}\n for Future {}\n", newRequest, future); - drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); + drainChannel(ctx, future); nextRequest(newRequest, future); return; } @@ -1474,10 +1480,9 @@ private void markAsDone(final NettyResponseFuture future, final ChannelHandle private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { if (lastValidChunk && future.getKeepAlive()) { - drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); + drainChannel(ctx, future); } else { - if (future.getKeepAlive() && ctx.getChannel().isReadable() && - (connectionsPool.offer(AsyncHttpProviderUtils.getBaseUrl(future.getRequest().getProxyServer() == null ? future.getURI() : AsyncHttpProviderUtils.createUri(future.getRequest().getProxyServer().toString())), ctx.getChannel()))){ + if (future.getKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { markAsDone(future, ctx); return; } @@ -2027,8 +2032,8 @@ private boolean redirect(Request request, && config.isStrict302Handling())) { nBuilder.setMethod("GET"); } - final URI initialConnectionUri = future.getURI(); final boolean initialConnectionKeepAlive = future.getKeepAlive(); + final String initialPoolKey = getPoolKey(future); future.setURI(uri); String newUrl = uri.toString(); if (request.getUrl().startsWith(WEBSOCKET)) { @@ -2046,11 +2051,9 @@ private boolean redirect(Request request, nBuilder.addOrReplaceCookie(c); } - final String connectionPoolKey = future.getConnectionPoolKeyStrategy().getKey(initialConnectionUri); AsyncCallable ac = new AsyncCallable(future) { public Object call() throws Exception { - if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && - connectionsPool.offer(connectionPoolKey, ctx.getChannel())) { + if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(initialPoolKey, ctx.getChannel())) { return null; } finishChannel(ctx); @@ -2174,7 +2177,7 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws log.debug("Sending authentication to {}", request.getUrl()); AsyncCallable ac = new AsyncCallable(future) { public Object call() throws Exception { - drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); + drainChannel(ctx, future); nextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); return null; } @@ -2264,7 +2267,7 @@ public Object call() throws Exception { if (nettyRequest.getMethod().equals(HttpMethod.HEAD)) { updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); markAsDone(future, ctx); - drainChannel(ctx, future, future.getKeepAlive(), future.getURI()); + drainChannel(ctx, future); } } else if (e.getMessage() instanceof HttpChunk) { From 14667e0b199e3961dfa941a2e2598dcf991486e7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 14 Mar 2013 15:38:43 +0100 Subject: [PATCH 0318/2844] Set Connection header as close when connection pooling is disabled, partial fix for #254 Grizzly provider fails on GrizzlyBasicAuthTest.basicAuthFileNoKeepAliveTest --- .../ning/http/client/providers/jdk/JDKAsyncHttpProvider.java | 2 +- .../main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 4 ++++ .../http/client/providers/netty/NettyAsyncHttpProvider.java | 4 ++-- .../ning/http/client/providers/netty/NettyBasicAuthTest.java | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 498146ca08..15397e0a5f 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -491,7 +491,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request } } - String ka = config.getAllowPoolingConnection() ? "keep-alive" : "close"; + String ka = AsyncHttpProviderUtils.keepAliveHeaderValue(config); urlConnection.setRequestProperty("Connection", ka); ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); if (proxyServer != null) { diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index bc8dc9d2ef..eebcea2c23 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -599,4 +599,8 @@ public static void checkBodyParts(int statusCode, Collection Date: Thu, 14 Mar 2013 20:07:42 +0100 Subject: [PATCH 0319/2844] [Fix] HMAC-SHA1 key was not correctly encoding according to specs http://oauth.net/core/1.0/#anchor16 --- .../main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java b/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java index 0157a9df77..966e64ce05 100644 --- a/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java +++ b/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java @@ -16,6 +16,7 @@ */ package com.ning.http.client.oauth; +import com.ning.http.util.UTF8UrlEncoder; import com.ning.http.util.UTF8Codec; import javax.crypto.Mac; @@ -36,7 +37,7 @@ public class ThreadSafeHMAC { private final Mac mac; public ThreadSafeHMAC(ConsumerKey consumerAuth, RequestToken userAuth) { - byte[] keyBytes = UTF8Codec.toUTF8(consumerAuth.getSecret() + "&" + userAuth.getSecret()); + byte[] keyBytes = UTF8Codec.toUTF8(UTF8UrlEncoder.encode(consumerAuth.getSecret()) + "&" + UTF8UrlEncoder.encode(userAuth.getSecret())); SecretKeySpec signingKey = new SecretKeySpec(keyBytes, HMAC_SHA1_ALGORITHM); // Get an hmac_sha1 instance and initialize with the signing key From d64a6136fd26ef2f7183b4556e64121632f97037 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Thu, 14 Mar 2013 18:04:11 -0300 Subject: [PATCH 0320/2844] Bump version. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 640a41e10e..3e60f566a3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.8 + 1.7.12 ``` From 51315300ba16e27dd55caa9cba9500d886555c99 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 15:43:29 +0100 Subject: [PATCH 0321/2844] What's this doing here?! --- .../client/providers/netty/NettyResponse.java | 221 ------------------ 1 file changed, 221 deletions(-) delete mode 100644 src/main/java/com/ning/http/client/providers/netty/NettyResponse.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java deleted file mode 100644 index 65870b0ca0..0000000000 --- a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client.providers.netty; - -import static com.ning.http.util.MiscUtil.isNonEmpty; - -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; -import com.ning.http.util.AsyncHttpProviderUtils; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBufferInputStream; -import org.jboss.netty.buffer.ChannelBuffers; - -/** - * Wrapper around the {@link com.ning.http.client.Response} API. - */ -public class NettyResponse implements Response { - private final static Charset DEFAULT_CHARSET = Charset.forName("ISO-8859-1"); - - private final List bodyParts; - private final HttpResponseHeaders headers; - private final HttpResponseStatus status; - private List cookies; - - public NettyResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) { - - this.status = status; - this.headers = headers; - this.bodyParts = bodyParts; - } - - /* @Override */ - - public int getStatusCode() { - return status.getStatusCode(); - } - - /* @Override */ - - public String getStatusText() { - return status.getStatusText(); - } - - /* @Override */ - public byte[] getResponseBodyAsBytes() throws IOException { - return getResponseBodyAsByteBuffer().array(); - } - - public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { - return getResponseBodyAsChannelBuffer().toByteBuffer(); - } - - /* @Override */ - public String getResponseBody() throws IOException { - return getResponseBody(null); - } - - public String getResponseBody(String charset) throws IOException { - return getResponseBodyAsChannelBuffer().toString(computeCharset(charset)); - } - - /* @Override */ - public InputStream getResponseBodyAsStream() throws IOException { - return new ChannelBufferInputStream(getResponseBodyAsChannelBuffer()); - } - - public ChannelBuffer getResponseBodyAsChannelBuffer() throws IOException { - ChannelBuffer b = null; - switch (bodyParts.size()) { - case 0: - b = ChannelBuffers.EMPTY_BUFFER; - break; - case 1: - b = ResponseBodyPart.class.cast(bodyParts.get(0)).getChannelBuffer(); - break; - default: - ChannelBuffer[] channelBuffers = new ChannelBuffer[bodyParts.size()]; - for (int i = 0; i < bodyParts.size(); i++) { - channelBuffers[i] = ResponseBodyPart.class.cast(bodyParts.get(i)).getChannelBuffer(); - } - b = ChannelBuffers.wrappedBuffer(channelBuffers); - } - - return b; - } - - /* @Override */ - - public String getResponseBodyExcerpt(int maxLength) throws IOException { - return getResponseBodyExcerpt(maxLength, null); - } - - public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - String response = getResponseBody(charset); - return response.length() <= maxLength ? response : response.substring(0, maxLength); - } - - private Charset computeCharset(String charset) { - if (charset == null) { - String contentType = getContentType(); - if (contentType != null) - charset = AsyncHttpProviderUtils.parseCharset(contentType); // parseCharset can return null - } - return charset != null ? Charset.forName(charset) : DEFAULT_CHARSET; - } - - /* @Override */ - - public URI getUri() throws MalformedURLException { - return status.getUrl(); - } - - /* @Override */ - - public String getContentType() { - return getHeader("Content-Type"); - } - - /* @Override */ - - public String getHeader(String name) { - return headers != null ? headers.getHeaders().getFirstValue(name) : null; - } - - /* @Override */ - - public List getHeaders(String name) { - return headers != null ? headers.getHeaders().get(name) : Collections. emptyList(); - } - - /* @Override */ - - public FluentCaseInsensitiveStringsMap getHeaders() { - return headers != null ? headers.getHeaders() : new FluentCaseInsensitiveStringsMap(); - } - - /* @Override */ - - public boolean isRedirected() { - return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); - } - - /* @Override */ - - public List getCookies() { - if (headers == null) { - return Collections.emptyList(); - } - if (cookies == null) { - List localCookies = new ArrayList(); - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - localCookies.add(cookie); - } - } - } - cookies = Collections.unmodifiableList(localCookies); - } - return cookies; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseStatus() { - return status != null; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseHeaders() { - return headers != null; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean hasResponseBody() { - return isNonEmpty(bodyParts); - } - -} From 1a9f167e6c7d6ce6e1a78f85ce9af4cac1cc5893 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 15:47:39 +0100 Subject: [PATCH 0322/2844] Rename NettyResponseFuture getKeepAlive into isKeepAlive --- .../providers/netty/NettyAsyncHttpProvider.java | 14 +++++++------- .../providers/netty/NettyResponseFuture.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 2b9478914c..c4dc686a26 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -1286,7 +1286,7 @@ private String getPoolKey(NettyResponseFuture future) throws MalformedURLExce private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future) { ctx.setAttachment(new AsyncCallable(future) { public Object call() throws Exception { - if (future.getKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { + if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { return null; } @@ -1473,16 +1473,16 @@ private void markAsDone(final NettyResponseFuture future, final ChannelHandle log.debug(t.getMessage(), t); } - if (!future.getKeepAlive() || !ctx.getChannel().isReadable()) { + if (!future.isKeepAlive() || !ctx.getChannel().isReadable()) { closeChannel(ctx); } } private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { - if (lastValidChunk && future.getKeepAlive()) { + if (lastValidChunk && future.isKeepAlive()) { drainChannel(ctx, future); } else { - if (future.getKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { + if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { markAsDone(future, ctx); return; } @@ -2032,7 +2032,7 @@ private boolean redirect(Request request, && config.isStrict302Handling())) { nBuilder.setMethod("GET"); } - final boolean initialConnectionKeepAlive = future.getKeepAlive(); + final boolean initialConnectionKeepAlive = future.isKeepAlive(); final String initialPoolKey = getPoolKey(future); future.setURI(uri); String newUrl = uri.toString(); @@ -2183,7 +2183,7 @@ public Object call() throws Exception { } }; - if (future.getKeepAlive() && response.isChunked()) { + if (future.isKeepAlive() && response.isChunked()) { // We must make sure there is no bytes left before executing the next request. ctx.setAttachment(ac); } else { @@ -2231,7 +2231,7 @@ public Object call() throws Exception { log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); - if (future.getKeepAlive()) { + if (future.isKeepAlive()) { future.attachChannel(ctx.getChannel(), true); } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index dc6929b753..0b26ca79a9 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -358,7 +358,7 @@ protected final AsyncHandler getAsyncHandler() { return asyncHandler; } - protected final boolean getKeepAlive() { + protected final boolean isKeepAlive() { return keepAlive; } From 2871f21a801a240512710605c50fca29b9a63f24 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 15:51:28 +0100 Subject: [PATCH 0323/2844] Don't use format where a simple concat is enough --- .../client/providers/netty/NettyAsyncHttpProvider.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index c4dc686a26..4117b0f8c5 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -700,7 +700,7 @@ else if (uri.getRawQuery() != null) case NONE: break; default: - throw new IllegalStateException(String.format("Invalid Authentication %s", realm.toString())); + throw new IllegalStateException("Invalid Authentication " + realm); } } @@ -973,7 +973,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand // Do not throw an exception when we need an extra connection for a redirect. if (!reclaimCache && !connectionsPool.canCacheConnection()) { - IOException ex = new IOException(String.format("Too many connections %s", config.getMaxTotalConnections())); + IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); try { asyncHandler.onThrowable(ex); } catch (Throwable t) { @@ -987,7 +987,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand if (trackConnections) { if (!reclaimCache) { if (!freeConnections.tryAcquire()) { - IOException ex = new IOException(String.format("Too many connections %s", config.getMaxTotalConnections())); + IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); try { asyncHandler.onThrowable(ex); } catch (Throwable t) { @@ -1296,7 +1296,7 @@ public Object call() throws Exception { @Override public String toString() { - return String.format("Draining task for channel %s", ctx.getChannel()); + return "Draining task for channel " + ctx.getChannel(); } }); } @@ -1838,7 +1838,7 @@ public synchronized void run() { requestTimeout = p.getRequestTimeoutInMs(); } - abort(nettyResponseFuture, new TimeoutException(String.format("No response received after %s", requestTimeout))); + abort(nettyResponseFuture, new TimeoutException("No response received after " + requestTimeout)); nettyResponseFuture = null; } From 4a7da539caf178276cee20b8e257aad96c22a924 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 15:57:33 +0100 Subject: [PATCH 0324/2844] Have animal-sniffer check 1.6 compat as 1.8 will emit JDK6 bytecode --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8e6eda0a3b..cd1a3087ed 100644 --- a/pom.xml +++ b/pom.xml @@ -156,13 +156,13 @@ org.codehaus.mojo.signature - java15 + java16 1.0 - check-java-1.5-compat + check-java-1.6-compat process-classes check From 62ea85151cf008667794c19909bb524809c16154 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 15:58:03 +0100 Subject: [PATCH 0325/2844] Use String.isEmpty --- api/src/main/java/com/ning/http/util/MiscUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/util/MiscUtil.java b/api/src/main/java/com/ning/http/util/MiscUtil.java index 31cc531735..965bec14d9 100644 --- a/api/src/main/java/com/ning/http/util/MiscUtil.java +++ b/api/src/main/java/com/ning/http/util/MiscUtil.java @@ -21,7 +21,7 @@ private MiscUtil() { } public static boolean isNonEmpty(String string) { - return string != null && string.length() != 0; + return string != null && !string.isEmpty(); } public static boolean isNonEmpty(Object[] array) { From 15f558d263be596380ce2378b1fb640975d2b880 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 16:23:07 +0100 Subject: [PATCH 0326/2844] Resources should be in src/main/resources --- .../com/ning/http/client/version.properties | 0 pom.xml | 5 +---- 2 files changed, 1 insertion(+), 4 deletions(-) rename api/src/main/{java => resources}/com/ning/http/client/version.properties (100%) diff --git a/api/src/main/java/com/ning/http/client/version.properties b/api/src/main/resources/com/ning/http/client/version.properties similarity index 100% rename from api/src/main/java/com/ning/http/client/version.properties rename to api/src/main/resources/com/ning/http/client/version.properties diff --git a/pom.xml b/pom.xml index cd1a3087ed..61b928e52b 100644 --- a/pom.xml +++ b/pom.xml @@ -97,10 +97,7 @@ true - src/main/java/ - - **/*.java - + src/main/resources/ From 0aeb247428b07875d9f2a76ca69859dc86d141bc Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 16:27:32 +0100 Subject: [PATCH 0327/2844] Have modules inherit groupId and version from parent --- api/pom.xml | 3 --- extras/guava/pom.xml | 3 --- extras/pom.xml | 2 -- providers/apache/pom.xml | 3 --- providers/grizzly/pom.xml | 3 --- providers/netty/pom.xml | 3 --- providers/pom.xml | 2 -- 7 files changed, 19 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 5890a3e223..05c0ddf70a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -7,11 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-api Asynchronous Http Client API - 1.8.0-SNAPSHOT - jar The Async Http Client (AHC) API classes. diff --git a/extras/guava/pom.xml b/extras/guava/pom.xml index 21b5756ed9..595d212d0d 100644 --- a/extras/guava/pom.xml +++ b/extras/guava/pom.xml @@ -7,11 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-extras-guava Asynchronous Http Client Guava Extras - 1.8.0-SNAPSHOT - jar The Async Http Client Guava Extras. diff --git a/extras/pom.xml b/extras/pom.xml index fc51307e0a..a2802b6372 100644 --- a/extras/pom.xml +++ b/extras/pom.xml @@ -7,10 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-extras-parent Asynchronous Http Client Extras Parent - 1.8.0-SNAPSHOT pom The Async Http Client extras library parent. diff --git a/providers/apache/pom.xml b/providers/apache/pom.xml index 5b976d74e8..7f9e0725e2 100644 --- a/providers/apache/pom.xml +++ b/providers/apache/pom.xml @@ -7,11 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-apache-provider Asynchronous Http Client Apache Provider - 1.8.0-SNAPSHOT - jar The Async Http Client Apache Provider. diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index a5e3526aa0..8b01db595d 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -7,11 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-grizzly-provider Asynchronous Http Client Grizzly Provider - 1.8.0-SNAPSHOT - jar The Async Http Client Grizzly Provider. diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 744809da2e..fa766d4a6d 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -7,11 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-netty-provider Asynchronous Http Client Netty Provider - 1.8.0-SNAPSHOT - jar The Async Http Client Netty Provider. diff --git a/providers/pom.xml b/providers/pom.xml index a33f23dc5d..9607ca51a4 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -7,10 +7,8 @@ 1.8.0-SNAPSHOT 4.0.0 - com.ning async-http-client-providers-parent Asynchronous Http Client Providers Parent - 1.8.0-SNAPSHOT pom The Async Http Client providers library parent. From 9c14ba05a52c841c12678bacdd46d8b8e6962fb5 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 16:44:50 +0100 Subject: [PATCH 0328/2844] Remove deprecated Request getReqType --- api/src/main/java/com/ning/http/client/Request.java | 8 -------- .../java/com/ning/http/client/RequestBuilderBase.java | 4 ---- 2 files changed, 12 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/Request.java b/api/src/main/java/com/ning/http/client/Request.java index 8871dd6cc8..854d468cc6 100644 --- a/api/src/main/java/com/ning/http/client/Request.java +++ b/api/src/main/java/com/ning/http/client/Request.java @@ -45,14 +45,6 @@ public static interface EntityWriter { public void writeEntity(OutputStream out) throws IOException; } - /** - * Return the request's type (GET, POST, etc.) - * - * @return the request's type (GET, POST, etc.) - * @deprecated - use getMethod - */ - public String getReqType(); - /** * Return the request's method name (GET, POST, etc.) * diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 1c2aeab821..0fa126c117 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -112,10 +112,6 @@ public RequestImpl(Request prototype) { /* @Override */ - public String getReqType() { - return getMethod(); - } - public String getMethod() { return method; } From 27e0f00de9387bc558bbe6007f8e8770ae80c9f3 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 18 Mar 2013 17:48:47 +0100 Subject: [PATCH 0329/2844] Remove deprecated PerRequestConfig --- .../ning/http/client/PerRequestConfig.java | 48 ------------------- .../java/com/ning/http/client/Request.java | 6 +-- .../ning/http/client/RequestBuilderBase.java | 26 +++++----- .../providers/jdk/JDKAsyncHttpProvider.java | 23 +++------ .../http/util/AsyncHttpProviderUtils.java | 5 ++ .../client/async/PerRequestTimeoutTest.java | 12 +---- .../apache/ApacheAsyncHttpProvider.java | 30 ++---------- .../grizzly/GrizzlyAsyncHttpProvider.java | 34 ++++--------- .../netty/NettyAsyncHttpProvider.java | 28 +++-------- .../NettyRequestThrottleTimeoutTest.java | 6 +-- 10 files changed, 50 insertions(+), 168 deletions(-) delete mode 100644 api/src/main/java/com/ning/http/client/PerRequestConfig.java diff --git a/api/src/main/java/com/ning/http/client/PerRequestConfig.java b/api/src/main/java/com/ning/http/client/PerRequestConfig.java deleted file mode 100644 index 9f0d84395d..0000000000 --- a/api/src/main/java/com/ning/http/client/PerRequestConfig.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.client; - -/** - * Per request configuration. - * - * @author Hubert Iwaniuk - * @deprecated Per request properties are set on request directly or via builder. This class will be gone in next major release. - */ -public class PerRequestConfig { - private final ProxyServer proxyServer; - private int requestTimeoutInMs; - - public PerRequestConfig() { - this(null, 0); - } - - public PerRequestConfig(ProxyServer proxyServer, int requestTimeoutInMs) { - this.proxyServer = proxyServer; - this.requestTimeoutInMs = requestTimeoutInMs; - } - - public ProxyServer getProxyServer() { - return proxyServer; - } - - public int getRequestTimeoutInMs() { - return requestTimeoutInMs; - } - - public void setRequestTimeoutInMs(int requestTimeoutInMs) { - this.requestTimeoutInMs = requestTimeoutInMs; - } -} diff --git a/api/src/main/java/com/ning/http/client/Request.java b/api/src/main/java/com/ning/http/client/Request.java index 854d468cc6..d2106a95c2 100644 --- a/api/src/main/java/com/ning/http/client/Request.java +++ b/api/src/main/java/com/ning/http/client/Request.java @@ -207,11 +207,11 @@ public static interface EntityWriter { public boolean isRedirectOverrideSet(); /** - * Return Per request configuration. + * Return the request time out in milliseconds. * - * @return Per request configuration. + * @return requestTimeoutInMs. */ - public PerRequestConfig getPerRequestConfig(); + public int getRequestTimeoutInMs(); /** * Return the HTTP Range header value, or diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 0fa126c117..6aa0efeb3f 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -49,11 +49,11 @@ public abstract class RequestBuilderBase> { private static final class RequestImpl implements Request { private String method; - private URI originalUri = null; - private URI uri = null; - private URI rawUri = null; - private InetAddress address = null; - private InetAddress localAddress = null; + private URI originalUri; + private URI uri; + private URI rawUri; + private InetAddress address; + private InetAddress localAddress; private FluentCaseInsensitiveStringsMap headers = new FluentCaseInsensitiveStringsMap(); private Collection cookies = new ArrayList(); private byte[] byteData; @@ -70,10 +70,10 @@ private static final class RequestImpl implements Request { private Realm realm; private File file; private Boolean followRedirects; - private PerRequestConfig perRequestConfig; - private long rangeOffset = 0; + private int requestTimeoutInMs; + private long rangeOffset; public String charset; - private boolean useRawUrl = false; + private boolean useRawUrl; private ConnectionPoolKeyStrategy connectionPoolKeyStrategy = DefaultConnectionPoolStrategy.INSTANCE; public RequestImpl(boolean useRawUrl) { @@ -102,7 +102,7 @@ public RequestImpl(Request prototype) { this.realm = prototype.getRealm(); this.file = prototype.getFile(); this.followRedirects = prototype.isRedirectOverrideSet()? prototype.isRedirectEnabled() : null; - this.perRequestConfig = prototype.getPerRequestConfig(); + this.requestTimeoutInMs = prototype.getRequestTimeoutInMs(); this.rangeOffset = prototype.getRangeOffset(); this.charset = prototype.getBodyEncoding(); this.useRawUrl = prototype.isUseRawUrl(); @@ -299,8 +299,8 @@ public boolean isRedirectOverrideSet(){ return followRedirects != null; } - public PerRequestConfig getPerRequestConfig() { - return perRequestConfig; + public int getRequestTimeoutInMs() { + return requestTimeoutInMs; } public long getRangeOffset() { @@ -610,8 +610,8 @@ public T setFollowRedirects(boolean followRedirects) { return derived.cast(this); } - public T setPerRequestConfig(PerRequestConfig perRequestConfig) { - request.perRequestConfig = perRequestConfig; + public T setRequestTimeoutInMs(int requestTimeoutInMs) { + request.requestTimeoutInMs = requestTimeoutInMs; return derived.cast(this); } diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 15397e0a5f..0acf1861ed 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -25,7 +25,6 @@ import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.ListenableFuture; import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.PerRequestConfig; import com.ning.http.client.ProgressAsyncHandler; import com.ning.http.client.ProxyServer; import com.ning.http.client.Realm; @@ -143,9 +142,7 @@ public ListenableFuture execute(Request request, AsyncHandler handler, HttpURLConnection urlConnection = createUrlConnection(request); - PerRequestConfig conf = request.getPerRequestConfig(); - int requestTimeout = (conf != null && conf.getRequestTimeoutInMs() != 0) ? - conf.getRequestTimeoutInMs() : config.getRequestTimeoutInMs(); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); JDKDelegateFuture delegate = null; if (future != null) { @@ -428,12 +425,8 @@ private Throwable filterException(Throwable t) { } if (SocketTimeoutException.class.isAssignableFrom(t.getClass())) { - int responseTimeoutInMs = config.getRequestTimeoutInMs(); - - if (request.getPerRequestConfig() != null && request.getPerRequestConfig().getRequestTimeoutInMs() != -1) { - responseTimeoutInMs = request.getPerRequestConfig().getRequestTimeoutInMs(); - } - t = new TimeoutException(String.format("No response received after %s", responseTimeoutInMs)); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); + t = new TimeoutException("No response received after " + requestTimeout); } if (SSLHandshakeException.class.isAssignableFrom(t.getClass())) { @@ -447,14 +440,12 @@ private Throwable filterException(Throwable t) { private void configure(URI uri, HttpURLConnection urlConnection, Request request) throws IOException, AuthenticationException { - PerRequestConfig conf = request.getPerRequestConfig(); - int requestTimeout = (conf != null && conf.getRequestTimeoutInMs() != 0) ? - conf.getRequestTimeoutInMs() : config.getRequestTimeoutInMs(); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - urlConnection.setConnectTimeout(config.getConnectionTimeoutInMs()); - - if (requestTimeout != -1) + if (requestTimeout != 0) { + urlConnection.setConnectTimeout(requestTimeout); urlConnection.setReadTimeout(requestTimeout); + } urlConnection.setInstanceFollowRedirects(false); String host = uri.getHost(); diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index eebcea2c23..86cc95b230 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -20,6 +20,7 @@ import com.ning.http.client.FluentStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.Part; +import com.ning.http.client.Request; import com.ning.http.client.StringPart; import com.ning.http.multipart.ByteArrayPartSource; import com.ning.http.multipart.MultipartRequestEntity; @@ -603,4 +604,8 @@ public static void checkBodyParts(int statusCode, Collection responseFuture = client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(); + Future responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(100).execute(); Response response = responseFuture.get(2000, TimeUnit.MILLISECONDS); assertNull(response); - client.close(); } catch (InterruptedException e) { fail("Interrupted.", e); } catch (ExecutionException e) { @@ -121,12 +117,9 @@ public void testRequestTimeout() throws IOException { public void testGlobalDefaultPerRequestInfiniteTimeout() throws IOException { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100).build()); try { - PerRequestConfig requestConfig = new PerRequestConfig(); - requestConfig.setRequestTimeoutInMs(-1); - Future responseFuture = client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(); + Future responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(-1).execute(); Response response = responseFuture.get(); assertNotNull(response); - client.close(); } catch (InterruptedException e) { fail("Interrupted.", e); } catch (ExecutionException e) { @@ -144,7 +137,6 @@ public void testGlobalRequestTimeout() throws IOException { Future responseFuture = client.prepareGet(getTargetUrl()).execute(); Response response = responseFuture.get(2000, TimeUnit.MILLISECONDS); assertNull(response); - client.close(); } catch (InterruptedException e) { fail("Interrupted.", e); } catch (ExecutionException e) { diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index c8d9da3982..1291eb086f 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -28,7 +28,6 @@ import com.ning.http.client.ListenableFuture; import com.ning.http.client.MaxRedirectException; import com.ning.http.client.Part; -import com.ning.http.client.PerRequestConfig; import com.ning.http.client.ProgressAsyncHandler; import com.ning.http.client.ProxyServer; import com.ning.http.client.Realm; @@ -185,7 +184,7 @@ public ListenableFuture execute(Request request, AsyncHandler handler) idleConnectionTimeoutThread = null; } - int requestTimeout = requestTimeout(config, request.getPerRequestConfig()); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); if (config.getIdleConnectionTimeoutInMs() > 0 && requestTimeout != -1 && requestTimeout < config.getIdleConnectionTimeoutInMs()) { idleConnectionTimeoutThread = new IdleConnectionTimeoutThread(); idleConnectionTimeoutThread.setConnectionTimeout(config.getIdleConnectionTimeoutInMs()); @@ -453,7 +452,7 @@ public T call() { uri = AsyncHttpProviderUtils.createUri(request.getUrl()); } - int delay = requestTimeout(config, future.getRequest().getPerRequestConfig()); + int delay = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); if (delay != -1) { ReaperFuture reaperFuture = new ReaperFuture(future); Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, delay, 500, TimeUnit.MILLISECONDS); @@ -649,12 +648,8 @@ private Throwable filterException(Throwable t) { } if (NoHttpResponseException.class.isAssignableFrom(t.getClass())) { - int responseTimeoutInMs = config.getRequestTimeoutInMs(); - - if (request.getPerRequestConfig() != null && request.getPerRequestConfig().getRequestTimeoutInMs() != -1) { - responseTimeoutInMs = request.getPerRequestConfig().getRequestTimeoutInMs(); - } - t = new TimeoutException(String.format("No response received after %s", responseTimeoutInMs)); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); + t = new TimeoutException(String.format("No response received after %s", requestTimeout)); } if (SSLHandshakeException.class.isAssignableFrom(t.getClass())) { @@ -861,26 +856,11 @@ public synchronized void run() { if (this.apacheResponseFuture != null && this.apacheResponseFuture.hasExpired()) { logger.debug("Request Timeout expired for {}", this.apacheResponseFuture); - int requestTimeout = config.getRequestTimeoutInMs(); - PerRequestConfig p = this.apacheResponseFuture.getRequest().getPerRequestConfig(); - if (p != null && p.getRequestTimeoutInMs() != -1) { - requestTimeout = p.getRequestTimeoutInMs(); - } + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, apacheResponseFuture.getRequest()); apacheResponseFuture.abort(new TimeoutException(String.format("No response received after %s", requestTimeout))); this.apacheResponseFuture = null; } } } - - protected static int requestTimeout(AsyncHttpClientConfig config, PerRequestConfig perRequestConfig) { - int result; - if (perRequestConfig != null) { - int prRequestTimeout = perRequestConfig.getRequestTimeoutInMs(); - result = (prRequestTimeout != 0 ? prRequestTimeout : config.getRequestTimeoutInMs()); - } else { - result = config.getRequestTimeoutInMs(); - } - return result; - } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 8b2ab85da1..9a93f039fa 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -30,7 +30,6 @@ import com.ning.http.client.ListenableFuture; import com.ning.http.client.MaxRedirectException; import com.ning.http.client.Part; -import com.ning.http.client.PerRequestConfig; import com.ning.http.client.ProxyServer; import com.ning.http.client.Realm; import com.ning.http.client.Request; @@ -340,12 +339,9 @@ public long getTimeout(FilterChainContext ctx) { if (context.isWSRequest) { return clientConfig.getWebSocketIdleTimeoutInMs(); } - final PerRequestConfig config = context.request.getPerRequestConfig(); - if (config != null) { - final long timeout = config.getRequestTimeoutInMs(); - if (timeout > 0) { - return timeout; - } + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(clientConfig, context.request); + if (requestTimeout > 0) { + return requestTimeout; } } return timeout; @@ -426,21 +422,10 @@ public void onTimeout(Connection connection) { void touchConnection(final Connection c, final Request request) { - final PerRequestConfig config = request.getPerRequestConfig(); - if (config != null) { - final long timeout = config.getRequestTimeoutInMs(); - if (timeout > 0) { - final long newTimeout = System.currentTimeMillis() + timeout; - if (resolver != null) { - resolver.setTimeoutMillis(c, newTimeout); - } - } - } else { - final long timeout = clientConfig.getRequestTimeoutInMs(); - if (timeout > 0) { - if (resolver != null) { - resolver.setTimeoutMillis(c, System.currentTimeMillis() + timeout); - } + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(clientConfig, request); + if (requestTimeout > 0) { + if (resolver != null) { + resolver.setTimeoutMillis(c, System.currentTimeMillis() + requestTimeout); } } @@ -2935,7 +2920,4 @@ public int hashCode() { } } // END AHCWebSocketListenerAdapter -} - - - +} \ No newline at end of file diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4117b0f8c5..4bf1076a21 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -30,7 +30,6 @@ import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.ListenableFuture; import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.PerRequestConfig; import com.ning.http.client.ProgressAsyncHandler; import com.ning.http.client.ProxyServer; import com.ning.http.client.RandomAccessBody; @@ -546,10 +545,10 @@ public void operationComplete(ChannelFuture cf) { try { future.touch(); - int delay = requestTimeout(config, future.getRequest().getPerRequestConfig()); - if (delay != -1 && !future.isDone() && !future.isCancelled()) { + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); + if (requestTimeout != -1 && !future.isDone() && !future.isCancelled()) { ReaperFuture reaperFuture = new ReaperFuture(future); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, delay, TimeUnit.MILLISECONDS); + Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, requestTimeout, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); } @@ -1078,17 +1077,6 @@ private ListenableFuture doConnect(final Request request, final AsyncHand return c.future(); } - protected static int requestTimeout(AsyncHttpClientConfig config, PerRequestConfig perRequestConfig) { - int result; - if (perRequestConfig != null) { - int prRequestTimeout = perRequestConfig.getRequestTimeoutInMs(); - result = (prRequestTimeout != 0 ? prRequestTimeout : config.getRequestTimeoutInMs()); - } else { - result = config.getRequestTimeoutInMs(); - } - return result; - } - private void closeChannel(final ChannelHandlerContext ctx) { connectionsPool.removeAll(ctx.getChannel()); finishChannel(ctx); @@ -1680,8 +1668,8 @@ public static NettyResponseFuture newFuture(URI uri, NettyAsyncHttpProvider provider, ProxyServer proxyServer) { - NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, - requestTimeout(config, request.getPerRequestConfig()), config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy(), proxyServer); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); + NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, requestTimeout, config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy(), proxyServer); if (request.getHeaders().getFirstValue("Expect") != null && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { @@ -1832,11 +1820,7 @@ public synchronized void run() { && !nettyResponseFuture.isDone() && !nettyResponseFuture.isCancelled()) { log.debug("Request Timeout expired for {}\n", nettyResponseFuture); - int requestTimeout = config.getRequestTimeoutInMs(); - PerRequestConfig p = nettyResponseFuture.getRequest().getPerRequestConfig(); - if (p != null && p.getRequestTimeoutInMs() != -1) { - requestTimeout = p.getRequestTimeoutInMs(); - } + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, nettyResponseFuture.getRequest()); abort(nettyResponseFuture, new TimeoutException("No response received after " + requestTimeout)); diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java index 287466c64c..991d2003d2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -36,7 +36,6 @@ import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.PerRequestConfig; import com.ning.http.client.Response; import com.ning.http.client.async.AbstractBasicTest; @@ -87,17 +86,14 @@ public void testRequestTimeout() throws IOException { final List tooManyConnections = new ArrayList(2); for (int i = 0; i < 2; i++) { - final int threadNumber = i; new Thread(new Runnable() { public void run() { try { requestThrottle.acquire(); - PerRequestConfig requestConfig = new PerRequestConfig(); - requestConfig.setRequestTimeoutInMs(SLEEPTIME_MS / 2); Future responseFuture = null; try { - responseFuture = client.prepareGet(getTargetUrl()).setPerRequestConfig(requestConfig).execute(new AsyncCompletionHandler() { + responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(SLEEPTIME_MS / 2).execute(new AsyncCompletionHandler() { @Override public Response onCompleted(Response response) throws Exception { From b3805999f0f01341ce4033c69c39b0735f593419 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 18 Mar 2013 12:28:25 -0700 Subject: [PATCH 0330/2844] Incremental fox for #258. Update logic for basicPutTest. We need to calculate the transfer deltas ourselves as Grizzly only provides the total written. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 53 ++++++++++++++----- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 9a93f039fa..54f5bb3d49 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -155,7 +155,7 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { private final static Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); private static final boolean SEND_FILE_SUPPORT; static { - SEND_FILE_SUPPORT = /*configSendFileSupport();*/ false; + SEND_FILE_SUPPORT = configSendFileSupport(); } private final Attribute REQUEST_STATE_ATTR = Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTransactionContext.class.getName()); @@ -398,7 +398,7 @@ public void onTimeout(Connection connection) { } fcb.add(eventFilter); fcb.add(clientFilter); - + if (providerConfig != null) { final TransportCustomizer customizer = (TransportCustomizer) providerConfig.getProperty(TRANSPORT_CUSTOMIZER); @@ -433,7 +433,29 @@ void touchConnection(final Connection c, final Request request) { // --------------------------------------------------------- Private Methods - + + private static boolean configSendFileSupport() { + + return !((System.getProperty("os.name").equalsIgnoreCase("linux") + && !linuxSendFileSupported()) + || System.getProperty("os.name").equalsIgnoreCase("HP-UX")); + } + + + private static boolean linuxSendFileSupported() { + final String version = System.getProperty("java.version"); + if (version.startsWith("1.6")) { + int idx = version.indexOf('_'); + if (idx == -1) { + return false; + } + final int patchRev = Integer.parseInt(version.substring(idx + 1)); + return (patchRev >= 18); + } else { + return version.startsWith("1.7") || version.startsWith("1.8"); + } + } + private void doDefaultTransportConfig() { final ExecutorService service = clientConfig.executorService(); if (service != null) { @@ -515,7 +537,7 @@ boolean sendRequest(final FilterChainContext ctx, throws IOException { boolean isWriteComplete = true; - + if (requestHasEntityBody(request)) { final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); BodyHandler handler = bodyHandlerFactory.getBodyHandler(request); @@ -529,7 +551,7 @@ boolean sendRequest(final FilterChainContext ctx, ctx.write(requestPacket, ctx.getTransportContext().getCompletionHandler()); } LOGGER.debug("REQUEST: {}", requestPacket); - + return isWriteComplete; } @@ -585,7 +607,7 @@ final class HttpTransactionContext { String lastRedirectURI; AtomicLong totalBodyWritten = new AtomicLong(); AsyncHandler.STATE currentState; - + String wsRequestURI; boolean isWSRequest; HandShake handshake; @@ -883,9 +905,9 @@ private boolean sendAsGrizzlyRequest(final Request request, } if (proxy.getPrincipal() != null && proxy.isBasic()) { - requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); + requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); } - + } } final AsyncHandler h = httpCtx.handler; @@ -909,7 +931,7 @@ private boolean isWSRequest(final String requestUri) { return (requestUri.charAt(0) == 'w' && requestUri.charAt(1) == 's'); } - + private void convertToUpgradeRequest(final HttpTransactionContext ctx) { final int colonIdx = ctx.requestUrl.indexOf(':'); @@ -1224,7 +1246,7 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } } final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); - + if (httpHeader.isSkipRemainder() || (context.establishingTunnel && context.statusHandler==null)) { return; } @@ -2132,7 +2154,7 @@ public boolean doHandle(final FilterChainContext ctx, content.setLast(true); ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); } - + return true; } @@ -2197,7 +2219,9 @@ public boolean doHandle(final FilterChainContext ctx, final File f = request.getFile(); requestPacket.setContentLengthLong(f.length()); final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); - if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { + if (!SEND_FILE_SUPPORT + || requestPacket.isSecure()) { + //|| requestPacket.getHeaders().contains(Header.TransferEncoding)) { final FileInputStream fis = new FileInputStream(request.getFile()); final MemoryManager mm = ctx.getMemoryManager(); AtomicInteger written = new AtomicInteger(); @@ -2236,7 +2260,10 @@ public void updated(WriteResult result) { final AsyncHandler handler = context.handler; if (handler != null) { if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { - final long written = result.getWrittenSize(); + // WriteResult keeps a track of the total amount written, + // so we need to calculate the delta ourselves. + final long resultTotal = result.getWrittenSize(); + final long written = resultTotal - context.totalBodyWritten.get(); final long total = context.totalBodyWritten.addAndGet(written); ((TransferCompletionHandler) handler).onContentWriteProgress( written, From 6ce7fb015ae69c105a980704d48feb002543bee4 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 18 Mar 2013 12:49:02 -0700 Subject: [PATCH 0331/2844] Incremental fox for #258. --- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 54f5bb3d49..a4aadcd776 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2220,8 +2220,8 @@ public boolean doHandle(final FilterChainContext ctx, requestPacket.setContentLengthLong(f.length()); final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); if (!SEND_FILE_SUPPORT - || requestPacket.isSecure()) { - //|| requestPacket.getHeaders().contains(Header.TransferEncoding)) { + || requestPacket.isSecure() + || requestPacket.getHeaders().contains(Header.TransferEncoding)) { final FileInputStream fis = new FileInputStream(request.getFile()); final MemoryManager mm = ctx.getMemoryManager(); AtomicInteger written = new AtomicInteger(); From 5b7ae6a921ec01dd510f31fa2452ea73ccd13477 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 18 Mar 2013 12:56:36 -0700 Subject: [PATCH 0332/2844] Final changes for #258. When dealing with http expectations, check to see if we're writing a file and if so, set the content-length then as the FileBodyHandler invocation is delayed in this scenario. --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index a4aadcd776..090a30c8a8 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -543,6 +543,14 @@ boolean sendRequest(final FilterChainContext ctx, BodyHandler handler = bodyHandlerFactory.getBodyHandler(request); if (requestPacket.getHeaders().contains(Header.Expect) && requestPacket.getHeaders().getValue(1).equalsIgnoreCase("100-Continue")) { + // We have to set the content-length now as the headers will be flushed + // before the FileBodyHandler is invoked. If we don't do it here, and + // the user didn't explicitly set the length, then the transfer-encoding + // will be chunked and zero-copy file transfer will not occur. + final File f = request.getFile(); + if (f != null) { + requestPacket.setContentLengthLong(f.length()); + } handler = new ExpectHandler(handler); } context.bodyHandler = handler; @@ -2219,9 +2227,7 @@ public boolean doHandle(final FilterChainContext ctx, final File f = request.getFile(); requestPacket.setContentLengthLong(f.length()); final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); - if (!SEND_FILE_SUPPORT - || requestPacket.isSecure() - || requestPacket.getHeaders().contains(Header.TransferEncoding)) { + if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { final FileInputStream fis = new FileInputStream(request.getFile()); final MemoryManager mm = ctx.getMemoryManager(); AtomicInteger written = new AtomicInteger(); From d2c35511aa0f51178b56582df1c05ca75593cc05 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 18 Mar 2013 14:54:59 -0700 Subject: [PATCH 0333/2844] Integrate Grizzly 2.3-rc6. --- providers/grizzly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index 8b01db595d..c53b5ed6a1 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -17,7 +17,7 @@ org.glassfish.grizzly grizzly-websockets - 2.3-rc4 + 2.3-rc6 com.ning From 4865e37be8bb839bf0bc5bc3eaf01f6711b98485 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 19 Mar 2013 11:54:10 -0700 Subject: [PATCH 0334/2844] Minor cleanup to the grizzly provider. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 99 +++++++++---------- 1 file changed, 47 insertions(+), 52 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 090a30c8a8..a4ad037f3d 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -54,6 +54,9 @@ import com.ning.http.util.SslUtils; import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.CloseListener; +import org.glassfish.grizzly.CloseType; +import org.glassfish.grizzly.Closeable; import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.EmptyCompletionHandler; @@ -219,7 +222,7 @@ public void completed(final Connection c) { try { execute(c, request, handler, future); } catch (Exception e) { - if (e instanceof RuntimeException || e instanceof IOException) { + if (e instanceof IOException) { failed(e); } if (LOGGER.isWarnEnabled()) { @@ -299,9 +302,7 @@ protected ListenableFuture execute(final Connection c, } c.write(request, createWriteCompletionHandler(future)); } catch (Exception e) { - if (e instanceof RuntimeException) { - throw (RuntimeException) e; - } else if (e instanceof IOException) { + if (e instanceof IOException) { throw (IOException) e; } if (LOGGER.isWarnEnabled()) { @@ -740,7 +741,6 @@ public void failed(Throwable throwable) { if (throwable instanceof EOFException) { context.abort(new IOException("Remotely Closed")); } - context.abort(throwable); } @Override @@ -808,23 +808,6 @@ public NextAction handleEvent(final FilterChainContext ctx, } -// @Override -// public NextAction handleRead(FilterChainContext ctx) throws IOException { -// Object message = ctx.getMessage(); -// if (HttpPacket.isHttp(message)) { -// final HttpPacket packet = (HttpPacket) message; -// HttpResponsePacket responsePacket; -// if (HttpContent.isContent(packet)) { -// responsePacket = (HttpResponsePacket) ((HttpContent) packet).getHttpHeader(); -// } else { -// responsePacket = (HttpResponsePacket) packet; -// } -// if (HttpStatus.SWITCHING_PROTOCOLS_101.statusMatches(responsePacket.getStatus())) { -// return ctx.getStopAction(); -// } -// } -// return super.handleRead(ctx); -// } // ----------------------------------------------------- Private Methods @@ -841,19 +824,10 @@ private boolean sendAsGrizzlyRequest(final Request request, final URI uri = httpCtx.request.getURI(); final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); final String scheme = uri.getScheme(); - boolean secure = "https".equals(scheme) || "wss".equals(scheme); + boolean secure = isSecure(scheme); builder.method(request.getMethod()); builder.protocol(Protocol.HTTP_1_1); - String host = request.getVirtualHost(); - if (host != null) { - builder.header(Header.Host, host); - } else { - if (uri.getPort() == -1) { - builder.header(Header.Host, uri.getHost()); - } else { - builder.header(Header.Host, uri.getHost() + ':' + uri.getPort()); - } - } + addHostHeader(request, uri, builder); final ProxyServer proxy = ProxyUtils.getProxyServer(config, request); final boolean useProxy = proxy != null; if (useProxy) { @@ -902,22 +876,9 @@ private boolean sendAsGrizzlyRequest(final Request request, if (!useProxy && !httpCtx.isWSRequest) { addQueryString(request, requestPacket); } - addHeaders(request, requestPacket); + addHeaders(request, requestPacket, proxy); addCookies(request, requestPacket); - if (useProxy) { - boolean avoidProxy = ProxyUtils.avoidProxy(proxy, request); - if (!avoidProxy) { - if (!requestPacket.getHeaders().contains(Header.ProxyConnection)) { - requestPacket.setHeader(Header.ProxyConnection, "keep-alive"); - } - - if (proxy.getPrincipal() != null && proxy.isBasic()) { - requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); - } - - } - } final AsyncHandler h = httpCtx.handler; if (h != null) { if (TransferCompletionHandler.class.isAssignableFrom(h.getClass())) { @@ -930,6 +891,25 @@ private boolean sendAsGrizzlyRequest(final Request request, } + private boolean isSecure(String scheme) { + return "https".equals(scheme) || "wss".equals(scheme); + } + + private void addHostHeader(final Request request, + final URI uri, + final HttpRequestPacket.Builder builder) { + String host = request.getVirtualHost(); + if (host != null) { + builder.header(Header.Host, host); + } else { + if (uri.getPort() == -1) { + builder.header(Header.Host, uri.getHost()); + } else { + builder.header(Header.Host, uri.getHost() + ':' + uri.getPort()); + } + } + } + private boolean isUpgradeRequest(final AsyncHandler handler) { return (handler instanceof UpgradeHandler); } @@ -954,7 +934,8 @@ private void convertToUpgradeRequest(final HttpTransactionContext ctx) { } private void addHeaders(final Request request, - final HttpRequestPacket requestPacket) { + final HttpRequestPacket requestPacket, + final ProxyServer proxy) throws IOException { final FluentCaseInsensitiveStringsMap map = request.getHeaders(); if (isNonEmpty(map)) { @@ -971,7 +952,8 @@ private void addHeaders(final Request request, final MimeHeaders headers = requestPacket.getHeaders(); if (!headers.contains(Header.Connection)) { - requestPacket.addHeader(Header.Connection, "keep-alive"); + //final boolean canCache = context.provider.clientConfig.getAllowPoolingConnection(); + requestPacket.addHeader(Header.Connection, /*(canCache ? */"keep-alive" /*: "close")*/); } if (!headers.contains(Header.Accept)) { @@ -982,6 +964,18 @@ private void addHeaders(final Request request, requestPacket.addHeader(Header.UserAgent, config.getUserAgent()); } + boolean avoidProxy = ProxyUtils.avoidProxy(proxy, request); + if (!avoidProxy) { + if (!requestPacket.getHeaders().contains(Header.ProxyConnection)) { + requestPacket.setHeader(Header.ProxyConnection, "keep-alive"); + } + + if (proxy.getPrincipal() != null && proxy.isBasic()) { + requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); + } + + } + } @@ -2422,7 +2416,7 @@ Connection obtainConnection(final Request request, throws IOException, ExecutionException, InterruptedException, TimeoutException { final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); - DO_NOT_CACHE.set(c, Boolean.TRUE); + markConnectionAsDoNotCache(c); return c; } @@ -2539,7 +2533,7 @@ private static String getPoolKey(final Request request, ProxyServer proxyServer) // ------------------------------------------------------ Nested Classes - private static class ConnectionMonitor implements Connection.CloseListener { + private static class ConnectionMonitor implements CloseListener { private final Semaphore connections; @@ -2564,7 +2558,7 @@ public boolean acquire() { } @Override - public void onClosed(Connection connection, Connection.CloseType closeType) throws IOException { + public void onClosed(Closeable closeable, CloseType closeType) throws IOException { if (connections != null) { connections.release(); @@ -2939,6 +2933,7 @@ public boolean equals(Object o) { if (ahcListener != null ? !ahcListener.equals(that.ahcListener) : that.ahcListener != null) return false; + //noinspection RedundantIfStatement if (webSocket != null ? !webSocket.equals(that.webSocket) : that.webSocket != null) return false; From d13f741b7e4893ad7083d43e0fffc9b5fafb7744 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 19 Mar 2013 12:08:26 -0700 Subject: [PATCH 0335/2844] More cleanup - replace deprecated api usages. --- .../client/providers/grizzly/GrizzlyConnectionsPool.java | 9 +++++---- .../client/providers/grizzly/GrizzlyResponseFuture.java | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index ee2377150c..3156ca0cf4 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -16,11 +16,12 @@ import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; +import org.glassfish.grizzly.CloseListener; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.attributes.Attribute; -import org.glassfish.grizzly.attributes.NullaryFunction; import org.glassfish.grizzly.utils.DataStructures; +import org.glassfish.grizzly.utils.NullaryFunction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,7 +58,7 @@ public class GrizzlyConnectionsPool implements ConnectionsPool delegate) { private void closeConnection() { if (connection != null && connection.isOpen()) { - connection.close().markForRecycle(true); + connection.close().recycle(true); } } From f9086ab05a198d4442ba530a59303eb4933ecf89 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 21 Mar 2013 17:15:19 +1100 Subject: [PATCH 0336/2844] Stage Netty 3 provider so that we may use it to work on the Netty 4 implementation. --- providers/netty-4/pom.xml | 24 + .../providers/netty_4/BodyChunkedInput.java | 93 + .../providers/netty_4/BodyFileRegion.java | 57 + .../netty_4/FeedableBodyGenerator.java | 119 + .../netty_4/NettyAsyncHttpProvider.java | 2492 +++++++++++++++++ .../netty_4/NettyAsyncHttpProviderConfig.java | 197 ++ .../netty_4/NettyConnectListener.java | 153 + .../netty_4/NettyConnectionsPool.java | 288 ++ .../providers/netty_4/NettyResponse.java | 120 + .../netty_4/NettyResponseFuture.java | 514 ++++ .../providers/netty_4/NettyWebSocket.java | 219 ++ .../client/providers/netty_4/Protocol.java | 27 + .../providers/netty_4/ResponseBodyPart.java | 132 + .../providers/netty_4/ResponseHeaders.java | 77 + .../providers/netty_4/ResponseStatus.java | 75 + .../providers/netty_4/WebSocketUtil.java | 72 + .../netty_4/spnego/SpnegoEngine.java | 172 ++ .../netty_4/spnego/SpnegoTokenGenerator.java | 55 + .../netty_4/util/CleanupChannelGroup.java | 110 + .../netty/NettyAsyncHttpProviderTest.java | 48 + .../netty/NettyAsyncProviderBasicTest.java | 37 + .../netty/NettyAsyncProviderPipelineTest.java | 101 + .../netty/NettyAsyncResponseTest.java | 93 + .../netty/NettyAsyncStreamHandlerTest.java | 25 + .../netty/NettyAsyncStreamLifecycleTest.java | 24 + .../providers/netty/NettyAuthTimeoutTest.java | 26 + .../providers/netty/NettyBasicAuthTest.java | 37 + .../providers/netty/NettyBasicHttpsTest.java | 25 + .../providers/netty/NettyBodyChunkTest.java | 25 + .../NettyBodyDeferringAsyncHandlerTest.java | 26 + .../netty/NettyByteBufferCapacityTest.java | 25 + .../providers/netty/NettyChunkingTest.java | 12 + .../netty/NettyComplexClientTest.java | 25 + .../netty/NettyConnectionPoolTest.java | 115 + .../providers/netty/NettyDigestAuthTest.java | 24 + .../providers/netty/NettyEmptyBodyTest.java | 25 + .../netty/NettyErrorResponseTest.java | 25 + .../netty/NettyExpect100ContinueTest.java | 25 + .../netty/NettyFilePartLargeFileTest.java | 24 + .../providers/netty/NettyFilterTest.java | 24 + .../netty/NettyFollowingThreadTest.java | 25 + .../providers/netty/NettyHead302Test.java | 25 + .../netty/NettyHostnameVerifierTest.java | 25 + .../netty/NettyHttpToHttpsRedirectTest.java | 24 + .../netty/NettyIdleStateHandlerTest.java | 24 + .../providers/netty/NettyInputStreamTest.java | 24 + .../netty/NettyListenableFutureTest.java | 26 + .../netty/NettyMaxConnectionsInThreads.java | 23 + .../netty/NettyMaxTotalConnectionTest.java | 24 + .../netty/NettyMultipartUploadTest.java | 29 + .../netty/NettyMultipleHeaderTest.java | 24 + .../netty/NettyNoNullResponseTest.java | 24 + .../netty/NettyNonAsciiContentLengthTest.java | 25 + .../netty/NettyParamEncodingTest.java | 24 + .../netty/NettyPerRequestRelative302Test.java | 24 + .../netty/NettyPerRequestTimeoutTest.java | 24 + .../netty/NettyPostRedirectGetTest.java | 27 + .../providers/netty/NettyPostWithQSTest.java | 24 + .../providers/netty/NettyProviderUtil.java | 36 + .../providers/netty/NettyProxyTest.java | 25 + .../netty/NettyProxyTunnellingTest.java | 24 + .../netty/NettyPutLargeFileTest.java | 24 + .../netty/NettyQueryParametersTest.java | 24 + .../providers/netty/NettyRC10KTest.java | 24 + .../NettyRedirectConnectionUsageTest.java | 35 + .../providers/netty/NettyRelative302Test.java | 25 + .../providers/netty/NettyRemoteSiteTest.java | 28 + .../NettyRequestThrottleTimeoutTest.java | 136 + .../netty/NettyRetryRequestTest.java | 28 + .../netty/NettySimpleAsyncHttpClientTest.java | 31 + .../netty/NettyTransferListenerTest.java | 24 + .../providers/netty/NettyWebDavBasicTest.java | 24 + .../netty/NettyZeroCopyFileTest.java | 24 + .../netty/RetryNonBlockingIssue.java | 332 +++ .../netty/websocket/NettyByteMessageTest.java | 25 + .../NettyCloseCodeReasonMsgTest.java | 28 + .../netty/websocket/NettyRedirectTest.java | 27 + .../netty/websocket/NettyTextMessageTest.java | 25 + providers/netty-4/src/test/resources/300k.png | Bin 0 -> 265495 bytes .../src/test/resources/SimpleTextFile.txt | 1 + .../src/test/resources/client.keystore | Bin 0 -> 1277 bytes .../netty-4/src/test/resources/gzip.txt.gz | Bin 0 -> 47 bytes .../src/test/resources/logback-test.xml | 13 + .../src/test/resources/realm.properties | 1 + .../src/test/resources/ssltest-cacerts.jks | Bin 0 -> 29888 bytes .../src/test/resources/ssltest-keystore.jks | Bin 0 -> 1445 bytes .../netty-4/src/test/resources/textfile.txt | 1 + .../netty-4/src/test/resources/textfile2.txt | 1 + 88 files changed, 7198 insertions(+) create mode 100644 providers/netty-4/pom.xml create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java create mode 100644 providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java create mode 100644 providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java create mode 100644 providers/netty-4/src/test/resources/300k.png create mode 100644 providers/netty-4/src/test/resources/SimpleTextFile.txt create mode 100644 providers/netty-4/src/test/resources/client.keystore create mode 100644 providers/netty-4/src/test/resources/gzip.txt.gz create mode 100644 providers/netty-4/src/test/resources/logback-test.xml create mode 100644 providers/netty-4/src/test/resources/realm.properties create mode 100644 providers/netty-4/src/test/resources/ssltest-cacerts.jks create mode 100644 providers/netty-4/src/test/resources/ssltest-keystore.jks create mode 100644 providers/netty-4/src/test/resources/textfile.txt create mode 100644 providers/netty-4/src/test/resources/textfile2.txt diff --git a/providers/netty-4/pom.xml b/providers/netty-4/pom.xml new file mode 100644 index 0000000000..fa766d4a6d --- /dev/null +++ b/providers/netty-4/pom.xml @@ -0,0 +1,24 @@ + + + com.ning + async-http-client-providers-parent + 1.8.0-SNAPSHOT + + 4.0.0 + async-http-client-netty-provider + Asynchronous Http Client Netty Provider + + The Async Http Client Netty Provider. + + + + + io.netty + netty + 3.6.3.Final + + + + \ No newline at end of file diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java new file mode 100644 index 0000000000..7d2cad912a --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.Body; +import org.jboss.netty.buffer.ChannelBuffers; +import org.jboss.netty.handler.stream.ChunkedInput; + +import java.io.IOException; +import java.nio.ByteBuffer; + +/** + * Adapts a {@link Body} to Netty's {@link ChunkedInput}. + */ +class BodyChunkedInput + implements ChunkedInput { + + private final Body body; + + private final int chunkSize = 1024 * 8; + + private ByteBuffer nextChunk; + + private static final ByteBuffer EOF = ByteBuffer.allocate(0); + + private boolean endOfInput = false; + + public BodyChunkedInput(Body body) { + if (body == null) { + throw new IllegalArgumentException("no body specified"); + } + this.body = body; + } + + private ByteBuffer peekNextChunk() + throws IOException { + + if (nextChunk == null) { + ByteBuffer buffer = ByteBuffer.allocate(chunkSize); + long length = body.read(buffer); + if (length < 0) { + // Negative means this is finished + buffer.flip(); + nextChunk = buffer; + endOfInput = true; + } else if (length == 0) { + // Zero means we didn't get anything this time, but may get next time + buffer.flip(); + nextChunk = null; + } else { + buffer.flip(); + nextChunk = buffer; + } + } + return nextChunk; + } + + /** + * Having no next chunk does not necessarily means end of input, other chunks may arrive later + */ + public boolean hasNextChunk() throws Exception { + return peekNextChunk() != null; + } + + public Object nextChunk() throws Exception { + ByteBuffer buffer = peekNextChunk(); + if (buffer == null || buffer == EOF) { + return null; + } + nextChunk = null; + + return ChannelBuffers.wrappedBuffer(buffer); + } + + public boolean isEndOfInput() throws Exception { + return endOfInput; + } + + public void close() throws Exception { + body.close(); + } + +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java new file mode 100644 index 0000000000..985e9a4694 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.RandomAccessBody; +import org.jboss.netty.channel.FileRegion; + +import java.io.IOException; +import java.nio.channels.WritableByteChannel; + +/** + * Adapts a {@link RandomAccessBody} to Netty's {@link FileRegion}. + */ +class BodyFileRegion + implements FileRegion { + + private final RandomAccessBody body; + + public BodyFileRegion(RandomAccessBody body) { + if (body == null) { + throw new IllegalArgumentException("no body specified"); + } + this.body = body; + } + + public long getPosition() { + return 0; + } + + public long getCount() { + return body.getContentLength(); + } + + public long transferTo(WritableByteChannel target, long position) + throws IOException { + return body.transferTo(position, Long.MAX_VALUE, target); + } + + public void releaseExternalResources() { + try { + body.close(); + } catch (IOException e) { + // we tried + } + } + +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java new file mode 100644 index 0000000000..84ba2bdf61 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicInteger; + +import com.ning.http.client.Body; +import com.ning.http.client.BodyGenerator; + +/** + * {@link BodyGenerator} which may return just part of the payload at the time + * handler is requesting it. If it happens - PartialBodyGenerator becomes responsible + * for finishing payload transferring asynchronously. + */ +public class FeedableBodyGenerator implements BodyGenerator { + private final static byte[] END_PADDING = "\r\n".getBytes(); + private final static byte[] ZERO = "0".getBytes(); + private final Queue queue = new ConcurrentLinkedQueue(); + private final AtomicInteger queueSize = new AtomicInteger(); + private FeedListener listener; + + @Override + public Body createBody() throws IOException { + return new PushBody(); + } + + public void feed(final ByteBuffer buffer, final boolean isLast) throws IOException { + queue.offer(new BodyPart(buffer, isLast)); + queueSize.incrementAndGet(); + if (listener != null) { + listener.onContentAdded(); + } + } + + public static interface FeedListener { + public void onContentAdded(); + } + + public void setListener(FeedListener listener) { + this.listener = listener; + } + + private final class PushBody implements Body { + private final int ONGOING = 0; + private final int CLOSING = 1; + private final int FINISHED = 2; + + private int finishState = 0; + + @Override + public long getContentLength() { + return -1; + } + + @Override + public long read(final ByteBuffer buffer) throws IOException { + BodyPart nextPart = queue.peek(); + if (nextPart == null) { + // Nothing in the queue + switch (finishState) { + case ONGOING: + return 0; + case CLOSING: + buffer.put(ZERO); + buffer.put(END_PADDING); + finishState = FINISHED; + return buffer.position(); + case FINISHED: + buffer.put(END_PADDING); + return -1; + } + } + int capacity = buffer.remaining() - 10; // be safe (we'll have to add size, ending, etc.) + int size = Math.min(nextPart.buffer.remaining(), capacity); + buffer.put(Integer.toHexString(size).getBytes()); + buffer.put(END_PADDING); + for (int i=0; i < size; i++) { + buffer.put(nextPart.buffer.get()); + } + buffer.put(END_PADDING); + if (!nextPart.buffer.hasRemaining()) { + if (nextPart.isLast) { + finishState = CLOSING; + } + queue.remove(); + } + return size; + } + + @Override + public void close() throws IOException { + } + + } + + private final static class BodyPart { + private final boolean isLast; + private final ByteBuffer buffer; + + public BodyPart(final ByteBuffer buffer, final boolean isLast) { + this.buffer = buffer; + this.isLast = isLast; + } + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java new file mode 100644 index 0000000000..e706c51204 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java @@ -0,0 +1,2492 @@ +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.AsyncHandler; +import com.ning.http.client.AsyncHandler.STATE; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.Body; +import com.ning.http.client.BodyGenerator; +import com.ning.http.client.ConnectionPoolKeyStrategy; +import com.ning.http.client.ConnectionsPool; +import com.ning.http.client.Cookie; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.ListenableFuture; +import com.ning.http.client.MaxRedirectException; +import com.ning.http.client.ProgressAsyncHandler; +import com.ning.http.client.ProxyServer; +import com.ning.http.client.RandomAccessBody; +import com.ning.http.client.Realm; +import com.ning.http.client.Request; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.filter.FilterContext; +import com.ning.http.client.filter.FilterException; +import com.ning.http.client.filter.IOExceptionFilter; +import com.ning.http.client.filter.ResponseFilter; +import com.ning.http.client.generators.InputStreamBodyGenerator; +import com.ning.http.client.listener.TransferCompletionHandler; +import com.ning.http.client.ntlm.NTLMEngine; +import com.ning.http.client.ntlm.NTLMEngineException; +import com.ning.http.client.providers.netty_4.FeedableBodyGenerator.FeedListener; +import com.ning.http.client.providers.netty_4.spnego.SpnegoEngine; +import com.ning.http.client.websocket.WebSocketUpgradeHandler; +import com.ning.http.multipart.MultipartBody; +import com.ning.http.multipart.MultipartRequestEntity; +import com.ning.http.util.AsyncHttpProviderUtils; +import com.ning.http.util.AuthenticatorUtils; +import com.ning.http.client.providers.netty_4.util.CleanupChannelGroup; +import com.ning.http.util.ProxyUtils; +import com.ning.http.util.SslUtils; +import com.ning.http.util.UTF8UrlEncoder; +import org.jboss.netty.bootstrap.ClientBootstrap; +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBufferOutputStream; +import org.jboss.netty.buffer.ChannelBuffers; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFuture; +import org.jboss.netty.channel.ChannelFutureProgressListener; +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ChannelPipeline; +import org.jboss.netty.channel.ChannelPipelineFactory; +import org.jboss.netty.channel.ChannelStateEvent; +import org.jboss.netty.channel.DefaultChannelFuture; +import org.jboss.netty.channel.ExceptionEvent; +import org.jboss.netty.channel.FileRegion; +import org.jboss.netty.channel.MessageEvent; +import org.jboss.netty.channel.SimpleChannelUpstreamHandler; +import org.jboss.netty.channel.group.ChannelGroup; +import org.jboss.netty.channel.socket.ClientSocketChannelFactory; +import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; +import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory; +import org.jboss.netty.handler.codec.http.CookieEncoder; +import org.jboss.netty.handler.codec.http.DefaultCookie; +import org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer; +import org.jboss.netty.handler.codec.http.DefaultHttpRequest; +import org.jboss.netty.handler.codec.http.HttpChunk; +import org.jboss.netty.handler.codec.http.HttpChunkTrailer; +import org.jboss.netty.handler.codec.http.HttpClientCodec; +import org.jboss.netty.handler.codec.http.HttpContentCompressor; +import org.jboss.netty.handler.codec.http.HttpContentDecompressor; +import org.jboss.netty.handler.codec.http.HttpHeaders; +import org.jboss.netty.handler.codec.http.HttpMethod; +import org.jboss.netty.handler.codec.http.HttpRequest; +import org.jboss.netty.handler.codec.http.HttpRequestEncoder; +import org.jboss.netty.handler.codec.http.HttpResponse; +import org.jboss.netty.handler.codec.http.HttpResponseDecoder; +import org.jboss.netty.handler.codec.http.HttpVersion; +import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; +import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; +import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame; +import org.jboss.netty.handler.ssl.SslHandler; +import org.jboss.netty.handler.stream.ChunkedFile; +import org.jboss.netty.handler.stream.ChunkedWriteHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.net.ssl.SSLEngine; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.net.ConnectException; +import java.net.InetSocketAddress; +import java.net.MalformedURLException; +import java.net.URI; +import java.nio.channels.ClosedChannelException; +import java.nio.channels.FileChannel; +import java.nio.channels.WritableByteChannel; +import java.nio.charset.Charset; +import java.security.GeneralSecurityException; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map.Entry; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; + +import static com.ning.http.util.MiscUtil.isNonEmpty; +import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; +import static org.jboss.netty.channel.Channels.pipeline; + +public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { + private final static String WEBSOCKET_KEY = "Sec-WebSocket-Key"; + private final static String HTTP_HANDLER = "httpHandler"; + protected final static String SSL_HANDLER = "sslHandler"; + private final static String HTTPS = "https"; + private final static String HTTP = "http"; + private static final String WEBSOCKET = "ws"; + private static final String WEBSOCKET_SSL = "wss"; + + private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); + private final static Charset UTF8 = Charset.forName("UTF-8"); + + private final ClientBootstrap plainBootstrap; + private final ClientBootstrap secureBootstrap; + private final ClientBootstrap webSocketBootstrap; + private final ClientBootstrap secureWebSocketBootstrap; + private final static int MAX_BUFFERED_BYTES = 8192; + private final AsyncHttpClientConfig config; + private final AtomicBoolean isClose = new AtomicBoolean(false); + private final ClientSocketChannelFactory socketChannelFactory; + private final boolean allowReleaseSocketChannelFactory; + + private final ChannelGroup openChannels = new + CleanupChannelGroup("asyncHttpClient") { + @Override + public boolean remove(Object o) { + boolean removed = super.remove(o); + if (removed && trackConnections) { + freeConnections.release(); + } + return removed; + } + }; + private final ConnectionsPool connectionsPool; + private Semaphore freeConnections = null; + private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; + private boolean executeConnectAsync = true; + public static final ThreadLocal IN_IO_THREAD = new ThreadLocalBoolean(); + private final boolean trackConnections; + private final boolean useRawUrl; + private final static NTLMEngine ntlmEngine = new NTLMEngine(); + private static SpnegoEngine spnegoEngine = null; + private final Protocol httpProtocol = new HttpProtocol(); + private final Protocol webSocketProtocol = new WebSocketProtocol(); + + public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { + + if (config.getAsyncHttpProviderConfig() != null + && NettyAsyncHttpProviderConfig.class.isAssignableFrom(config.getAsyncHttpProviderConfig().getClass())) { + asyncHttpProviderConfig = NettyAsyncHttpProviderConfig.class.cast(config.getAsyncHttpProviderConfig()); + } else { + asyncHttpProviderConfig = new NettyAsyncHttpProviderConfig(); + } + + if (asyncHttpProviderConfig.isUseBlockingIO()) { + socketChannelFactory = new OioClientSocketChannelFactory(config.executorService()); + this.allowReleaseSocketChannelFactory = true; + } else { + // check if external NioClientSocketChannelFactory is defined + NioClientSocketChannelFactory scf = asyncHttpProviderConfig.getSocketChannelFactory(); + if (scf != null) { + this.socketChannelFactory = scf; + + // cannot allow releasing shared channel factory + this.allowReleaseSocketChannelFactory = false; + } else { + ExecutorService e = asyncHttpProviderConfig.getBossExecutorService(); + if (e == null) { + e = Executors.newCachedThreadPool(); + } + int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); + log.debug("Number of application's worker threads is {}", numWorkers); + socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); + this.allowReleaseSocketChannelFactory = true; + } + } + plainBootstrap = new ClientBootstrap(socketChannelFactory); + secureBootstrap = new ClientBootstrap(socketChannelFactory); + webSocketBootstrap = new ClientBootstrap(socketChannelFactory); + secureWebSocketBootstrap = new ClientBootstrap(socketChannelFactory); + configureNetty(); + + this.config = config; + + // This is dangerous as we can't catch a wrong typed ConnectionsPool + ConnectionsPool cp = (ConnectionsPool) config.getConnectionsPool(); + if (cp == null && config.getAllowPoolingConnection()) { + cp = new NettyConnectionsPool(this); + } else if (cp == null) { + cp = new NonConnectionsPool(); + } + this.connectionsPool = cp; + + if (config.getMaxTotalConnections() != -1) { + trackConnections = true; + freeConnections = new Semaphore(config.getMaxTotalConnections()); + } else { + trackConnections = false; + } + + useRawUrl = config.isUseRawUrl(); + } + + @Override + public String toString() { + return String.format("NettyAsyncHttpProvider:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", + config.getMaxTotalConnections() - freeConnections.availablePermits(), + openChannels.toString(), + connectionsPool.toString()); + } + + void configureNetty() { + if (asyncHttpProviderConfig != null) { + for (Entry entry : asyncHttpProviderConfig.propertiesSet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + plainBootstrap.setOption(key, value); + webSocketBootstrap.setOption(key, value); + secureBootstrap.setOption(key, value); + secureWebSocketBootstrap.setOption(key, value); + } + } + + plainBootstrap.setPipelineFactory(createPlainPipelineFactory()); + DefaultChannelFuture.setUseDeadLockChecker(false); + + if (asyncHttpProviderConfig != null) { + executeConnectAsync = asyncHttpProviderConfig.isAsyncConnect(); + if (!executeConnectAsync) { + DefaultChannelFuture.setUseDeadLockChecker(true); + } + } + + webSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + pipeline.addLast("ws-decoder", new HttpResponseDecoder()); + pipeline.addLast("ws-encoder", new HttpRequestEncoder()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + return pipeline; + } + }); + } + + protected HttpClientCodec newHttpClientCodec() { + if (asyncHttpProviderConfig != null) { + return new HttpClientCodec(asyncHttpProviderConfig.getMaxInitialLineLength(), asyncHttpProviderConfig.getMaxHeaderSize(), asyncHttpProviderConfig.getMaxChunkSize(), false); + + } else { + return new HttpClientCodec(); + } + } + + protected ChannelPipelineFactory createPlainPipelineFactory() { + return new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + + pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); + + if (config.getRequestCompressionLevel() > 0) { + pipeline.addLast("deflater", new HttpContentCompressor(config.getRequestCompressionLevel())); + } + + if (config.isCompressionEnabled()) { + pipeline.addLast("inflater", new HttpContentDecompressor()); + } + pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + return pipeline; + } + }; + } + + void constructSSLPipeline(final NettyConnectListener cl) { + + secureBootstrap.setPipelineFactory(new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + + try { + pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); + } catch (Throwable ex) { + abort(cl.future(), ex); + } + + pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); + + if (config.isCompressionEnabled()) { + pipeline.addLast("inflater", new HttpContentDecompressor()); + } + pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + return pipeline; + } + }); + + secureWebSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { + + /* @Override */ + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipeline(); + + try { + pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); + } catch (Throwable ex) { + abort(cl.future(), ex); + } + + pipeline.addLast("ws-decoder", new HttpResponseDecoder()); + pipeline.addLast("ws-encoder", new HttpRequestEncoder()); + pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); + + return pipeline; + } + }); + } + + private Channel lookupInCache(URI uri, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { + final Channel channel = connectionsPool.poll(connectionPoolKeyStrategy.getKey(uri)); + + if (channel != null) { + log.debug("Using cached Channel {}\n for uri {}\n", channel, uri); + + try { + // Always make sure the channel who got cached support the proper protocol. It could + // only occurs when a HttpMethod.CONNECT is used agains a proxy that require upgrading from http to + // https. + return verifyChannelPipeline(channel, uri.getScheme()); + } catch (Exception ex) { + log.debug(ex.getMessage(), ex); + } + } + return null; + } + + private SSLEngine createSSLEngine() throws IOException, GeneralSecurityException { + SSLEngine sslEngine = config.getSSLEngineFactory().newSSLEngine(); + if (sslEngine == null) { + sslEngine = SslUtils.getSSLEngine(); + } + return sslEngine; + } + + private Channel verifyChannelPipeline(Channel channel, String scheme) throws IOException, GeneralSecurityException { + + if (channel.getPipeline().get(SSL_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { + channel.getPipeline().remove(SSL_HANDLER); + } else if (channel.getPipeline().get(HTTP_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { + return channel; + } else if (channel.getPipeline().get(SSL_HANDLER) == null && isSecure(scheme)) { + channel.getPipeline().addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); + } + return channel; + } + + protected final void writeRequest(final Channel channel, + final AsyncHttpClientConfig config, + final NettyResponseFuture future, + final HttpRequest nettyRequest) { + try { + /** + * If the channel is dead because it was pooled and the remote server decided to close it, + * we just let it go and the closeChannel do it's work. + */ + if (!channel.isOpen() || !channel.isConnected()) { + return; + } + + Body body = null; + if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) { + BodyGenerator bg = future.getRequest().getBodyGenerator(); + if (bg != null) { + // Netty issue with chunking. + if (InputStreamBodyGenerator.class.isAssignableFrom(bg.getClass())) { + InputStreamBodyGenerator.class.cast(bg).patchNettyChunkingIssue(true); + } + + try { + body = bg.createBody(); + } catch (IOException ex) { + throw new IllegalStateException(ex); + } + long length = body.getContentLength(); + if (length >= 0) { + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, length); + } else { + nettyRequest.setHeader(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); + } + } else { + body = null; + } + } + + if (TransferCompletionHandler.class.isAssignableFrom(future.getAsyncHandler().getClass())) { + + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + for (String s : future.getNettyRequest().getHeaderNames()) { + for (String header : future.getNettyRequest().getHeaders(s)) { + h.add(s, header); + } + } + + TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter( + new NettyTransferAdapter(h, nettyRequest.getContent(), future.getRequest().getFile())); + } + + // Leave it to true. + if (future.getAndSetWriteHeaders(true)) { + try { + channel.write(nettyRequest).addListener(new ProgressListener(true, future.getAsyncHandler(), future)); + } catch (Throwable cause) { + log.debug(cause.getMessage(), cause); + try { + channel.close(); + } catch (RuntimeException ex) { + log.debug(ex.getMessage(), ex); + } + return; + } + } + + if (future.getAndSetWriteBody(true)) { + if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) { + + if (future.getRequest().getFile() != null) { + final File file = future.getRequest().getFile(); + long fileLength = 0; + final RandomAccessFile raf = new RandomAccessFile(file, "r"); + + try { + fileLength = raf.length(); + + ChannelFuture writeFuture; + if (channel.getPipeline().get(SslHandler.class) != null) { + writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, 8192)); + } else { + final FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); + writeFuture = channel.write(region); + } + writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future)); + } catch (IOException ex) { + if (raf != null) { + try { + raf.close(); + } catch (IOException e) { + } + } + throw ex; + } + } else if (body != null || future.getRequest().getParts() != null) { + /** + * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. + */ + if (future.getRequest().getParts() != null) { + String boundary = future.getNettyRequest().getHeader("Content-Type"); + String length = future.getNettyRequest().getHeader("Content-Length"); + body = new MultipartBody(future.getRequest().getParts(), boundary, length); + } + + ChannelFuture writeFuture; + if (channel.getPipeline().get(SslHandler.class) == null && (body instanceof RandomAccessBody)) { + BodyFileRegion bodyFileRegion = new BodyFileRegion((RandomAccessBody) body); + writeFuture = channel.write(bodyFileRegion); + } else { + BodyChunkedInput bodyChunkedInput = new BodyChunkedInput(body); + BodyGenerator bg = future.getRequest().getBodyGenerator(); + if (bg instanceof FeedableBodyGenerator) { + ((FeedableBodyGenerator)bg).setListener(new FeedListener() { + @Override public void onContentAdded() { + channel.getPipeline().get(ChunkedWriteHandler.class).resumeTransfer(); + } + }); + } + writeFuture = channel.write(bodyChunkedInput); + } + + final Body b = body; + writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future) { + public void operationComplete(ChannelFuture cf) { + try { + b.close(); + } catch (IOException e) { + log.warn("Failed to close request body: {}", e.getMessage(), e); + } + super.operationComplete(cf); + } + }); + } + } + } + } catch (Throwable ioe) { + try { + channel.close(); + } catch (RuntimeException ex) { + log.debug(ex.getMessage(), ex); + } + } + + try { + future.touch(); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); + if (requestTimeout != -1 && !future.isDone() && !future.isCancelled()) { + ReaperFuture reaperFuture = new ReaperFuture(future); + Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, requestTimeout, TimeUnit.MILLISECONDS); + reaperFuture.setScheduledFuture(scheduledFuture); + future.setReaperFuture(reaperFuture); + } + } catch (RejectedExecutionException ex) { + abort(future, ex); + } + + } + + protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, + boolean allowConnect, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { + + String method = request.getMethod(); + if (allowConnect && proxyServer != null && isSecure(uri)) { + method = HttpMethod.CONNECT.toString(); + } + return construct(config, request, new HttpMethod(method), uri, buffer, proxyServer); + } + + private static SpnegoEngine getSpnegoEngine() { + if(spnegoEngine == null) + spnegoEngine = new SpnegoEngine(); + return spnegoEngine; + } + + private static HttpRequest construct(AsyncHttpClientConfig config, + Request request, + HttpMethod m, + URI uri, + ChannelBuffer buffer, + ProxyServer proxyServer) throws IOException { + + String host = AsyncHttpProviderUtils.getHost(uri); + boolean webSocket = isWebSocket(uri); + + if (request.getVirtualHost() != null) { + host = request.getVirtualHost(); + } + + HttpRequest nettyRequest; + if (m.equals(HttpMethod.CONNECT)) { + nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); + } else { + String path = null; + if (proxyServer != null && !(isSecure(uri) && config.isUseRelativeURIsWithSSLProxies())) + path = uri.toString(); + else if (uri.getRawQuery() != null) + path = uri.getRawPath() + "?" + uri.getRawQuery(); + else + path = uri.getRawPath(); + nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path); + } + + if (webSocket) { + nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); + nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); + nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" + + (uri.getPort() == -1 ? isSecure(uri.getScheme()) ? 443 : 80 : uri.getPort())); + nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); + nettyRequest.addHeader("Sec-WebSocket-Version", "13"); + } + + if (host != null) { + if (uri.getPort() == -1) { + nettyRequest.setHeader(HttpHeaders.Names.HOST, host); + } else if (request.getVirtualHost() != null) { + nettyRequest.setHeader(HttpHeaders.Names.HOST, host); + } else { + nettyRequest.setHeader(HttpHeaders.Names.HOST, host + ":" + uri.getPort()); + } + } else { + host = "127.0.0.1"; + } + + if (!m.equals(HttpMethod.CONNECT)) { + FluentCaseInsensitiveStringsMap h = request.getHeaders(); + if (h != null) { + for (String name : h.keySet()) { + if (!"host".equalsIgnoreCase(name)) { + for (String value : h.get(name)) { + nettyRequest.addHeader(name, value); + } + } + } + } + + if (config.isCompressionEnabled()) { + nettyRequest.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP); + } + } else { + List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); + if (isNonEmpty(auth) && auth.get(0).startsWith("NTLM")) { + nettyRequest.addHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, auth.get(0)); + } + } + Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); + + if (realm != null && realm.getUsePreemptiveAuth()) { + + String domain = realm.getNtlmDomain(); + if (proxyServer != null && proxyServer.getNtlmDomain() != null) { + domain = proxyServer.getNtlmDomain(); + } + + String authHost = realm.getNtlmHost(); + if (proxyServer != null && proxyServer.getHost() != null) { + host = proxyServer.getHost(); + } + + switch (realm.getAuthScheme()) { + case BASIC: + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, + AuthenticatorUtils.computeBasicAuthentication(realm)); + break; + case DIGEST: + if (isNonEmpty(realm.getNonce())) { + try { + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, + AuthenticatorUtils.computeDigestAuthentication(realm)); + } catch (NoSuchAlgorithmException e) { + throw new SecurityException(e); + } + } + break; + case NTLM: + try { + String msg = ntlmEngine.generateType1Msg("NTLM " + domain, authHost); + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); + } catch (NTLMEngineException e) { + IOException ie = new IOException(); + ie.initCause(e); + throw ie; + } + break; + case KERBEROS: + case SPNEGO: + String challengeHeader = null; + String server = proxyServer == null ? host : proxyServer.getHost(); + try { + challengeHeader = getSpnegoEngine().generateToken(server); + } catch (Throwable e) { + IOException ie = new IOException(); + ie.initCause(e); + throw ie; + } + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); + break; + case NONE: + break; + default: + throw new IllegalStateException("Invalid Authentication " + realm); + } + } + + if (!webSocket && !request.getHeaders().containsKey(HttpHeaders.Names.CONNECTION)) { + nettyRequest.setHeader(HttpHeaders.Names.CONNECTION, AsyncHttpProviderUtils.keepAliveHeaderValue(config)); + } + + if (proxyServer != null) { + if (!request.getHeaders().containsKey("Proxy-Connection")) { + nettyRequest.setHeader("Proxy-Connection", AsyncHttpProviderUtils.keepAliveHeaderValue(config)); + } + + if (proxyServer.getPrincipal() != null) { + if (isNonEmpty(proxyServer.getNtlmDomain())) { + + List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); + if (!(isNonEmpty(auth) && auth.get(0).startsWith("NTLM"))) { + try { + String msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), + proxyServer.getHost()); + nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + msg); + } catch (NTLMEngineException e) { + IOException ie = new IOException(); + ie.initCause(e); + throw ie; + } + } + } else { + nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, + AuthenticatorUtils.computeBasicAuthentication(proxyServer)); + } + } + } + + // Add default accept headers. + if (request.getHeaders().getFirstValue("Accept") == null) { + nettyRequest.setHeader(HttpHeaders.Names.ACCEPT, "*/*"); + } + + if (request.getHeaders().getFirstValue("User-Agent") != null) { + nettyRequest.setHeader("User-Agent", request.getHeaders().getFirstValue("User-Agent")); + } else if (config.getUserAgent() != null) { + nettyRequest.setHeader("User-Agent", config.getUserAgent()); + } else { + nettyRequest.setHeader("User-Agent", + AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class, + config)); + } + + if (!m.equals(HttpMethod.CONNECT)) { + if (isNonEmpty(request.getCookies())) { + CookieEncoder httpCookieEncoder = new CookieEncoder(false); + Iterator ic = request.getCookies().iterator(); + Cookie c; + org.jboss.netty.handler.codec.http.Cookie cookie; + while (ic.hasNext()) { + c = ic.next(); + cookie = new DefaultCookie(c.getName(), c.getValue()); + cookie.setPath(c.getPath()); + cookie.setMaxAge(c.getMaxAge()); + cookie.setDomain(c.getDomain()); + httpCookieEncoder.addCookie(cookie); + } + nettyRequest.setHeader(HttpHeaders.Names.COOKIE, httpCookieEncoder.encode()); + } + + String reqType = request.getMethod(); + if (!"HEAD".equals(reqType) && !"OPTION".equals(reqType) && !"TRACE".equals(reqType)) { + + String bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : request.getBodyEncoding(); + + // We already have processed the body. + if (buffer != null && buffer.writerIndex() != 0) { + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, buffer.writerIndex()); + nettyRequest.setContent(buffer); + } else if (request.getByteData() != null) { + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getByteData().length)); + nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getByteData())); + } else if (request.getStringData() != null) { + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getStringData().getBytes(bodyCharset).length)); + nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getStringData().getBytes(bodyCharset))); + } else if (request.getStreamData() != null) { + int[] lengthWrapper = new int[1]; + byte[] bytes = AsyncHttpProviderUtils.readFully(request.getStreamData(), lengthWrapper); + int length = lengthWrapper[0]; + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); + nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes, 0, length)); + } else if (isNonEmpty(request.getParams())) { + StringBuilder sb = new StringBuilder(); + for (final Entry> paramEntry : request.getParams()) { + final String key = paramEntry.getKey(); + for (final String value : paramEntry.getValue()) { + if (sb.length() > 0) { + sb.append("&"); + } + UTF8UrlEncoder.appendEncoded(sb, key); + sb.append("="); + UTF8UrlEncoder.appendEncoded(sb, value); + } + } + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(sb.length())); + nettyRequest.setContent(ChannelBuffers.wrappedBuffer(sb.toString().getBytes(bodyCharset))); + + if (!request.getHeaders().containsKey(HttpHeaders.Names.CONTENT_TYPE)) { + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, "application/x-www-form-urlencoded"); + } + + } else if (request.getParts() != null) { + int lenght = computeAndSetContentLength(request, nettyRequest); + + if (lenght == -1) { + lenght = MAX_BUFFERED_BYTES; + } + + MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getParams()); + + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(mre.getContentLength())); + + /** + * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. + */ + + if (isSecure(uri)) { + ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); + mre.writeRequest(new ChannelBufferOutputStream(b)); + nettyRequest.setContent(b); + } + } else if (request.getEntityWriter() != null) { + int lenght = computeAndSetContentLength(request, nettyRequest); + + if (lenght == -1) { + lenght = MAX_BUFFERED_BYTES; + } + + ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); + request.getEntityWriter().writeEntity(new ChannelBufferOutputStream(b)); + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, b.writerIndex()); + nettyRequest.setContent(b); + } else if (request.getFile() != null) { + File file = request.getFile(); + if (!file.isFile()) { + throw new IOException(String.format("File %s is not a file or doesn't exist", file.getAbsolutePath())); + } + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, file.length()); + } + } + } + return nettyRequest; + } + + public void close() { + isClose.set(true); + try { + connectionsPool.destroy(); + openChannels.close(); + + for (Channel channel : openChannels) { + ChannelHandlerContext ctx = channel.getPipeline().getContext(NettyAsyncHttpProvider.class); + if (ctx.getAttachment() instanceof NettyResponseFuture) { + NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + future.setReaperFuture(null); + } + } + + config.executorService().shutdown(); + config.reaper().shutdown(); + if (this.allowReleaseSocketChannelFactory) { + socketChannelFactory.releaseExternalResources(); + plainBootstrap.releaseExternalResources(); + secureBootstrap.releaseExternalResources(); + webSocketBootstrap.releaseExternalResources(); + secureWebSocketBootstrap.releaseExternalResources(); + } + } catch (Throwable t) { + log.warn("Unexpected error on close", t); + } + } + + /* @Override */ + + public Response prepareResponse(final HttpResponseStatus status, + final HttpResponseHeaders headers, + final List bodyParts) { + return new NettyResponse(status, headers, bodyParts); + } + + /* @Override */ + + public ListenableFuture execute(Request request, final AsyncHandler asyncHandler) throws IOException { + return doConnect(request, asyncHandler, null, true, executeConnectAsync, false); + } + + private void execute(final Request request, final NettyResponseFuture f, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { + doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, reclaimCache); + } + + private ListenableFuture doConnect(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture f, + boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { + + if (isClose.get()) { + throw new IOException("Closed"); + } + + if (request.getUrl().startsWith(WEBSOCKET) && !validateWebSocketRequest(request, asyncHandler)) { + throw new IOException("WebSocket method must be a GET"); + } + + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); + boolean useProxy = proxyServer != null; + URI uri; + if (useRawUrl) { + uri = request.getRawURI(); + } else { + uri = request.getURI(); + } + Channel channel = null; + + if (useCache) { + if (f != null && f.reuseChannel() && f.channel() != null) { + channel = f.channel(); + } else { + URI connectionKeyUri = useProxy? proxyServer.getURI() : uri; + channel = lookupInCache(connectionKeyUri, request.getConnectionPoolKeyStrategy()); + } + } + + ChannelBuffer bufferedBytes = null; + if (f != null && f.getRequest().getFile() == null && + !f.getNettyRequest().getMethod().getName().equals(HttpMethod.CONNECT.getName())) { + bufferedBytes = f.getNettyRequest().getContent(); + } + + boolean useSSl = isSecure(uri) && !useProxy; + if (channel != null && channel.isOpen() && channel.isConnected()) { + HttpRequest nettyRequest = buildRequest(config, request, uri, f == null ? false : f.isConnectAllowed(), bufferedBytes, proxyServer); + + if (f == null) { + f = newFuture(uri, request, asyncHandler, nettyRequest, config, this, proxyServer); + } else { + nettyRequest = buildRequest(config, request, uri, f.isConnectAllowed(), bufferedBytes, proxyServer); + f.setNettyRequest(nettyRequest); + } + f.setState(NettyResponseFuture.STATE.POOLED); + f.attachChannel(channel, false); + + log.debug("\nUsing cached Channel {}\n for request \n{}\n", channel, nettyRequest); + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(f); + + try { + writeRequest(channel, config, f, nettyRequest); + } catch (Exception ex) { + log.debug("writeRequest failure", ex); + if (useSSl && ex.getMessage() != null && ex.getMessage().contains("SSLEngine")) { + log.debug("SSLEngine failure", ex); + f = null; + } else { + try { + asyncHandler.onThrowable(ex); + } catch (Throwable t) { + log.warn("doConnect.writeRequest()", t); + } + IOException ioe = new IOException(ex.getMessage()); + ioe.initCause(ex); + throw ioe; + } + } + return f; + } + + // Do not throw an exception when we need an extra connection for a redirect. + if (!reclaimCache && !connectionsPool.canCacheConnection()) { + IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); + try { + asyncHandler.onThrowable(ex); + } catch (Throwable t) { + log.warn("!connectionsPool.canCacheConnection()", t); + } + throw ex; + } + + boolean acquiredConnection = false; + + if (trackConnections) { + if (!reclaimCache) { + if (!freeConnections.tryAcquire()) { + IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); + try { + asyncHandler.onThrowable(ex); + } catch (Throwable t) { + log.warn("!connectionsPool.canCacheConnection()", t); + } + throw ex; + } else { + acquiredConnection = true; + } + } + } + + NettyConnectListener c = new NettyConnectListener.Builder(config, request, asyncHandler, f, this, bufferedBytes).build(uri); + boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, uri.getHost()); + + if (useSSl) { + constructSSLPipeline(c); + } + + ChannelFuture channelFuture; + ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); + bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); + + try { + InetSocketAddress remoteAddress; + if (request.getInetAddress() != null) { + remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); + } else if (proxyServer == null || avoidProxy) { + remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); + } else { + remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); + } + + if(request.getLocalAddress() != null){ + channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); + }else{ + channelFuture = bootstrap.connect(remoteAddress); + } + + } catch (Throwable t) { + if (acquiredConnection) { + freeConnections.release(); + } + abort(c.future(), t.getCause() == null ? t : t.getCause()); + return c.future(); + } + + boolean directInvokation = true; + if (IN_IO_THREAD.get() && DefaultChannelFuture.isUseDeadLockChecker()) { + directInvokation = false; + } + + if (directInvokation && !asyncConnect && request.getFile() == null) { + int timeOut = config.getConnectionTimeoutInMs() > 0 ? config.getConnectionTimeoutInMs() : Integer.MAX_VALUE; + if (!channelFuture.awaitUninterruptibly(timeOut, TimeUnit.MILLISECONDS)) { + if (acquiredConnection) { + freeConnections.release(); + } + channelFuture.cancel(); + abort(c.future(), new ConnectException(String.format("Connect operation to %s timeout %s", uri, timeOut))); + } + + try { + c.operationComplete(channelFuture); + } catch (Exception e) { + if (acquiredConnection) { + freeConnections.release(); + } + IOException ioe = new IOException(e.getMessage()); + ioe.initCause(e); + try { + asyncHandler.onThrowable(ioe); + } catch (Throwable t) { + log.warn("c.operationComplete()", t); + } + throw ioe; + } + } else { + channelFuture.addListener(c); + } + + log.debug("\nNon cached request \n{}\n\nusing Channel \n{}\n", c.future().getNettyRequest(), channelFuture.getChannel()); + + if (!c.future().isCancelled() || !c.future().isDone()) { + openChannels.add(channelFuture.getChannel()); + c.future().attachChannel(channelFuture.getChannel(), false); + } + return c.future(); + } + + private void closeChannel(final ChannelHandlerContext ctx) { + connectionsPool.removeAll(ctx.getChannel()); + finishChannel(ctx); + } + + private void finishChannel(final ChannelHandlerContext ctx) { + ctx.setAttachment(new DiscardEvent()); + + // The channel may have already been removed if a timeout occurred, and this method may be called just after. + if (ctx.getChannel() == null) { + return; + } + + log.debug("Closing Channel {} ", ctx.getChannel()); + + + try { + ctx.getChannel().close(); + } catch (Throwable t) { + log.debug("Error closing a connection", t); + } + + if (ctx.getChannel() != null) { + openChannels.remove(ctx.getChannel()); + } + + } + + @Override + public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) throws Exception { + //call super to reset the read timeout + super.messageReceived(ctx, e); + IN_IO_THREAD.set(Boolean.TRUE); + if (ctx.getAttachment() == null) { + log.debug("ChannelHandlerContext wasn't having any attachment"); + } + + if (ctx.getAttachment() instanceof DiscardEvent) { + return; + } else if (ctx.getAttachment() instanceof AsyncCallable) { + if (e.getMessage() instanceof HttpChunk) { + HttpChunk chunk = (HttpChunk) e.getMessage(); + if (chunk.isLast()) { + AsyncCallable ac = (AsyncCallable) ctx.getAttachment(); + ac.call(); + } else { + return; + } + } else { + AsyncCallable ac = (AsyncCallable) ctx.getAttachment(); + ac.call(); + } + ctx.setAttachment(new DiscardEvent()); + return; + } else if (!(ctx.getAttachment() instanceof NettyResponseFuture)) { + try { + ctx.getChannel().close(); + } catch (Throwable t) { + log.trace("Closing an orphan channel {}", ctx.getChannel()); + } + return; + } + + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.handle(ctx, e); + } + + private Realm kerberosChallenge(List proxyAuth, + Request request, + ProxyServer proxyServer, + FluentCaseInsensitiveStringsMap headers, + Realm realm, + NettyResponseFuture future) throws NTLMEngineException { + + URI uri = request.getURI(); + String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); + String server = proxyServer == null ? host : proxyServer.getHost(); + try { + String challengeHeader = getSpnegoEngine().generateToken(server); + headers.remove(HttpHeaders.Names.AUTHORIZATION); + headers.add(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); + + Realm.RealmBuilder realmBuilder; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm); + } else { + realmBuilder = new Realm.RealmBuilder(); + } + return realmBuilder.setUri(uri.getRawPath()) + .setMethodName(request.getMethod()) + .setScheme(Realm.AuthScheme.KERBEROS) + .build(); + } catch (Throwable throwable) { + if (proxyAuth.contains("NTLM")) { + return ntlmChallenge(proxyAuth, request, proxyServer, headers, realm, future); + } + abort(future, throwable); + return null; + } + } + + private Realm ntlmChallenge(List wwwAuth, + Request request, + ProxyServer proxyServer, + FluentCaseInsensitiveStringsMap headers, + Realm realm, + NettyResponseFuture future) throws NTLMEngineException { + + boolean useRealm = (proxyServer == null && realm != null); + + String ntlmDomain = useRealm ? realm.getNtlmDomain() : proxyServer.getNtlmDomain(); + String ntlmHost = useRealm ? realm.getNtlmHost() : proxyServer.getHost(); + String principal = useRealm ? realm.getPrincipal() : proxyServer.getPrincipal(); + String password = useRealm ? realm.getPassword() : proxyServer.getPassword(); + + Realm newRealm; + if (realm != null && !realm.isNtlmMessageType2Received()) { + String challengeHeader = ntlmEngine.generateType1Msg(ntlmDomain, ntlmHost); + + URI uri = request.getURI(); + headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) + .setUri(uri.getRawPath()) + .setMethodName(request.getMethod()) + .setNtlmMessageType2Received(true) + .build(); + future.getAndSetAuth(false); + } else { + headers.remove(HttpHeaders.Names.AUTHORIZATION); + + if (wwwAuth.get(0).startsWith("NTLM ")) { + String serverChallenge = wwwAuth.get(0).trim().substring("NTLM ".length()); + String challengeHeader = ntlmEngine.generateType3Msg(principal, password, + ntlmDomain, ntlmHost, serverChallenge); + + headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); + } + + Realm.RealmBuilder realmBuilder; + Realm.AuthScheme authScheme; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm); + authScheme = realm.getAuthScheme(); + } else { + realmBuilder = new Realm.RealmBuilder(); + authScheme = Realm.AuthScheme.NTLM; + } + newRealm = realmBuilder.setScheme(authScheme) + .setUri(request.getURI().getPath()) + .setMethodName(request.getMethod()) + .build(); + } + + return newRealm; + } + + private Realm ntlmProxyChallenge(List wwwAuth, + Request request, + ProxyServer proxyServer, + FluentCaseInsensitiveStringsMap headers, + Realm realm, + NettyResponseFuture future) throws NTLMEngineException { + future.getAndSetAuth(false); + headers.remove(HttpHeaders.Names.PROXY_AUTHORIZATION); + + if (wwwAuth.get(0).startsWith("NTLM ")) { + String serverChallenge = wwwAuth.get(0).trim().substring("NTLM ".length()); + String challengeHeader = ntlmEngine.generateType3Msg(proxyServer.getPrincipal(), + proxyServer.getPassword(), + proxyServer.getNtlmDomain(), + proxyServer.getHost(), + serverChallenge); + headers.add(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + challengeHeader); + } + Realm newRealm; + Realm.RealmBuilder realmBuilder; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm); + } else { + realmBuilder = new Realm.RealmBuilder(); + } + newRealm = realmBuilder//.setScheme(realm.getAuthScheme()) + .setUri(request.getURI().getPath()) + .setMethodName(request.getMethod()) + .build(); + + return newRealm; + } + + private String getPoolKey(NettyResponseFuture future) throws MalformedURLException { + URI uri = future.getProxyServer() != null ? future.getProxyServer().getURI() : future.getURI(); + return future.getConnectionPoolKeyStrategy().getKey(uri); + } + + private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future) { + ctx.setAttachment(new AsyncCallable(future) { + public Object call() throws Exception { + if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { + return null; + } + + finishChannel(ctx); + return null; + } + + @Override + public String toString() { + return "Draining task for channel " + ctx.getChannel(); + } + }); + } + + private FilterContext handleIoException(FilterContext fc, NettyResponseFuture future) { + for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + abort(future, efe); + } + } + return fc; + } + + private void replayRequest(final NettyResponseFuture future, FilterContext fc, HttpResponse response, ChannelHandlerContext ctx) throws IOException { + final Request newRequest = fc.getRequest(); + future.setAsyncHandler(fc.getAsyncHandler()); + future.setState(NettyResponseFuture.STATE.NEW); + future.touch(); + + log.debug("\n\nReplaying Request {}\n for Future {}\n", newRequest, future); + drainChannel(ctx, future); + nextRequest(newRequest, future); + return; + } + + private List getAuthorizationToken(List> list, String headerAuth) { + ArrayList l = new ArrayList(); + for (Entry e : list) { + if (e.getKey().equalsIgnoreCase(headerAuth)) { + l.add(e.getValue().trim()); + } + } + return l; + } + + private void nextRequest(final Request request, final NettyResponseFuture future) throws IOException { + nextRequest(request, future, true); + } + + private void nextRequest(final Request request, final NettyResponseFuture future, final boolean useCache) throws IOException { + execute(request, future, useCache, true, true); + } + + private void abort(NettyResponseFuture future, Throwable t) { + Channel channel = future.channel(); + if (channel != null && openChannels.contains(channel)) { + closeChannel(channel.getPipeline().getContext(NettyAsyncHttpProvider.class)); + openChannels.remove(channel); + } + + if (!future.isCancelled() && !future.isDone()) { + log.debug("Aborting Future {}\n", future); + log.debug(t.getMessage(), t); + } + + future.abort(t); + } + + private void upgradeProtocol(ChannelPipeline p, String scheme) throws IOException, GeneralSecurityException { + if (p.get(HTTP_HANDLER) != null) { + p.remove(HTTP_HANDLER); + } + + if (isSecure(scheme)) { + if (p.get(SSL_HANDLER) == null) { + p.addFirst(HTTP_HANDLER, newHttpClientCodec()); + p.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); + } else { + p.addAfter(SSL_HANDLER, HTTP_HANDLER, newHttpClientCodec()); + } + + } else { + p.addFirst(HTTP_HANDLER, newHttpClientCodec()); + } + } + + public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { + + if (isClose.get()) { + return; + } + + connectionsPool.removeAll(ctx.getChannel()); + try { + super.channelClosed(ctx, e); + } catch (Exception ex) { + log.trace("super.channelClosed", ex); + } + + log.debug("Channel Closed: {} with attachment {}", e.getChannel(), ctx.getAttachment()); + + if (ctx.getAttachment() instanceof AsyncCallable) { + AsyncCallable ac = (AsyncCallable) ctx.getAttachment(); + ctx.setAttachment(ac.future()); + ac.call(); + return; + } + + if (ctx.getAttachment() instanceof NettyResponseFuture) { + NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + future.touch(); + + if (config.getIOExceptionFilters().size() > 0) { + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) + .request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); + fc = handleIoException(fc, future); + + if (fc.replayRequest() && !future.cannotBeReplay()) { + replayRequest(future, fc, null, ctx); + return; + } + } + + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.onClose(ctx, e); + + if (future != null && !future.isDone() && !future.isCancelled()) { + if (!remotelyClosed(ctx.getChannel(), future)) { + abort(future, new IOException("Remotely Closed " + ctx.getChannel())); + } + } else { + closeChannel(ctx); + } + } + } + + protected boolean remotelyClosed(Channel channel, NettyResponseFuture future) { + + if (isClose.get()) { + return false; + } + + connectionsPool.removeAll(channel); + + if (future == null && channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment() != null + && NettyResponseFuture.class.isAssignableFrom( + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment().getClass())) { + future = (NettyResponseFuture) + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); + } + + if (future == null || future.cannotBeReplay()) { + log.debug("Unable to recover future {}\n", future); + return false; + } + + future.setState(NettyResponseFuture.STATE.RECONNECTED); + future.getAndSetStatusReceived(false); + + log.debug("Trying to recover request {}\n", future.getNettyRequest()); + + try { + nextRequest(future.getRequest(), future); + return true; + } catch (IOException iox) { + future.setState(NettyResponseFuture.STATE.CLOSED); + future.abort(iox); + log.error("Remotely Closed, unable to recover", iox); + } + return false; + } + + private void markAsDone(final NettyResponseFuture future, final ChannelHandlerContext ctx) throws MalformedURLException { + // We need to make sure everything is OK before adding the connection back to the pool. + try { + future.done(null); + } catch (Throwable t) { + // Never propagate exception once we know we are done. + log.debug(t.getMessage(), t); + } + + if (!future.isKeepAlive() || !ctx.getChannel().isReadable()) { + closeChannel(ctx); + } + } + + private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { + if (lastValidChunk && future.isKeepAlive()) { + drainChannel(ctx, future); + } else { + if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { + markAsDone(future, ctx); + return; + } + finishChannel(ctx); + } + markAsDone(future, ctx); + } + + private final boolean updateStatusAndInterrupt(AsyncHandler handler, HttpResponseStatus c) throws Exception { + return handler.onStatusReceived(c) != STATE.CONTINUE; + } + + private final boolean updateHeadersAndInterrupt(AsyncHandler handler, HttpResponseHeaders c) throws Exception { + return handler.onHeadersReceived(c) != STATE.CONTINUE; + } + + private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { + boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; + if (c.closeUnderlyingConnection()) { + future.setKeepAlive(false); + } + return state; + } + + //Simple marker for stopping publishing bytes. + + final static class DiscardEvent { + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) + throws Exception { + Channel channel = e.getChannel(); + Throwable cause = e.getCause(); + NettyResponseFuture future = null; + + /** Issue 81 + if (e.getCause() != null && e.getCause().getClass().isAssignableFrom(PrematureChannelClosureException.class)) { + return; + } + */ + if (e.getCause() != null && e.getCause().getClass().getSimpleName().equals("PrematureChannelClosureException")) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("Unexpected I/O exception on channel {}", channel, cause); + } + + try { + + if (cause != null && ClosedChannelException.class.isAssignableFrom(cause.getClass())) { + return; + } + + if (ctx.getAttachment() instanceof NettyResponseFuture) { + future = (NettyResponseFuture) ctx.getAttachment(); + future.attachChannel(null, false); + future.touch(); + + if (IOException.class.isAssignableFrom(cause.getClass())) { + + if (config.getIOExceptionFilters().size() > 0) { + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) + .request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); + fc = handleIoException(fc, future); + + if (fc.replayRequest()) { + replayRequest(future, fc, null, ctx); + return; + } + } else { + // Close the channel so the recovering can occurs. + try { + ctx.getChannel().close(); + } catch (Throwable t) { + ; // Swallow. + } + return; + } + } + + if (abortOnReadCloseException(cause) || abortOnWriteCloseException(cause)) { + log.debug("Trying to recover from dead Channel: {}", channel); + return; + } + } else if (ctx.getAttachment() instanceof AsyncCallable) { + future = ((AsyncCallable) ctx.getAttachment()).future(); + } + } catch (Throwable t) { + cause = t; + } + + if (future != null) { + try { + log.debug("Was unable to recover Future: {}", future); + abort(future, cause); + } catch (Throwable t) { + log.error(t.getMessage(), t); + } + } + + Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.onError(ctx, e); + + closeChannel(ctx); + ctx.sendUpstream(e); + } + + protected static boolean abortOnConnectCloseException(Throwable cause) { + try { + for (StackTraceElement element : cause.getStackTrace()) { + if (element.getClassName().equals("sun.nio.ch.SocketChannelImpl") + && element.getMethodName().equals("checkConnect")) { + return true; + } + } + + if (cause.getCause() != null) { + return abortOnConnectCloseException(cause.getCause()); + } + + } catch (Throwable t) { + } + return false; + } + + protected static boolean abortOnDisconnectException(Throwable cause) { + try { + for (StackTraceElement element : cause.getStackTrace()) { + if (element.getClassName().equals("org.jboss.netty.handler.ssl.SslHandler") + && element.getMethodName().equals("channelDisconnected")) { + return true; + } + } + + if (cause.getCause() != null) { + return abortOnConnectCloseException(cause.getCause()); + } + + } catch (Throwable t) { + } + return false; + } + + protected static boolean abortOnReadCloseException(Throwable cause) { + + for (StackTraceElement element : cause.getStackTrace()) { + if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") + && element.getMethodName().equals("read")) { + return true; + } + } + + if (cause.getCause() != null) { + return abortOnReadCloseException(cause.getCause()); + } + + return false; + } + + protected static boolean abortOnWriteCloseException(Throwable cause) { + + for (StackTraceElement element : cause.getStackTrace()) { + if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") + && element.getMethodName().equals("write")) { + return true; + } + } + + if (cause.getCause() != null) { + return abortOnReadCloseException(cause.getCause()); + } + + return false; + } + + private final static int computeAndSetContentLength(Request request, HttpRequest r) { + int length = (int) request.getContentLength(); + if (length == -1 && r.getHeader(HttpHeaders.Names.CONTENT_LENGTH) != null) { + length = Integer.valueOf(r.getHeader(HttpHeaders.Names.CONTENT_LENGTH)); + } + + if (length >= 0) { + r.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); + } + return length; + } + + public static NettyResponseFuture newFuture(URI uri, + Request request, + AsyncHandler asyncHandler, + HttpRequest nettyRequest, + AsyncHttpClientConfig config, + NettyAsyncHttpProvider provider, + ProxyServer proxyServer) { + + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); + NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, requestTimeout, config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy(), proxyServer); + + if (request.getHeaders().getFirstValue("Expect") != null + && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { + f.getAndSetWriteBody(false); + } + return f; + } + + private class ProgressListener implements ChannelFutureProgressListener { + + private final boolean notifyHeaders; + private final AsyncHandler asyncHandler; + private final NettyResponseFuture future; + + public ProgressListener(boolean notifyHeaders, AsyncHandler asyncHandler, NettyResponseFuture future) { + this.notifyHeaders = notifyHeaders; + this.asyncHandler = asyncHandler; + this.future = future; + } + + public void operationComplete(ChannelFuture cf) { + // The write operation failed. If the channel was cached, it means it got asynchronously closed. + // Let's retry a second time. + Throwable cause = cf.getCause(); + if (cause != null && future.getState() != NettyResponseFuture.STATE.NEW) { + + if (IllegalStateException.class.isAssignableFrom(cause.getClass())) { + log.debug(cause.getMessage(), cause); + try { + cf.getChannel().close(); + } catch (RuntimeException ex) { + log.debug(ex.getMessage(), ex); + } + return; + } + + if (ClosedChannelException.class.isAssignableFrom(cause.getClass()) + || abortOnReadCloseException(cause) + || abortOnWriteCloseException(cause)) { + + if (log.isDebugEnabled()) { + log.debug(cf.getCause() == null ? "" : cf.getCause().getMessage(), cf.getCause()); + } + + try { + cf.getChannel().close(); + } catch (RuntimeException ex) { + log.debug(ex.getMessage(), ex); + } + return; + } else { + future.abort(cause); + } + return; + } + future.touch(); + + /** + * We need to make sure we aren't in the middle of an authorization process before publishing events + * as we will re-publish again the same event after the authorization, causing unpredictable behavior. + */ + Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : NettyAsyncHttpProvider.this.getConfig().getRealm(); + boolean startPublishing = future.isInAuth() + || realm == null + || realm.getUsePreemptiveAuth() == true; + + if (startPublishing && ProgressAsyncHandler.class.isAssignableFrom(asyncHandler.getClass())) { + if (notifyHeaders) { + ProgressAsyncHandler.class.cast(asyncHandler).onHeaderWriteCompleted(); + } else { + ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteCompleted(); + } + } + } + + public void operationProgressed(ChannelFuture cf, long amount, long current, long total) { + future.touch(); + if (ProgressAsyncHandler.class.isAssignableFrom(asyncHandler.getClass())) { + ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(amount, current, total); + } + } + } + + /** + * Because some implementation of the ThreadSchedulingService do not clean up cancel task until they try to run + * them, we wrap the task with the future so the when the NettyResponseFuture cancel the reaper future + * this wrapper will release the references to the channel and the nettyResponseFuture immediately. Otherwise, + * the memory referenced this way will only be released after the request timeout period which can be arbitrary long. + */ + private final class ReaperFuture implements Future, Runnable { + private Future scheduledFuture; + private NettyResponseFuture nettyResponseFuture; + + public ReaperFuture(NettyResponseFuture nettyResponseFuture) { + this.nettyResponseFuture = nettyResponseFuture; + } + + public void setScheduledFuture(Future scheduledFuture) { + this.scheduledFuture = scheduledFuture; + } + + /** + * @Override + */ + public boolean cancel(boolean mayInterruptIfRunning) { + nettyResponseFuture = null; + return scheduledFuture.cancel(mayInterruptIfRunning); + } + + /** + * @Override + */ + public Object get() throws InterruptedException, ExecutionException { + return scheduledFuture.get(); + } + + /** + * @Override + */ + public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return scheduledFuture.get(timeout, unit); + } + + /** + * @Override + */ + public boolean isCancelled() { + return scheduledFuture.isCancelled(); + } + + /** + * @Override + */ + public boolean isDone() { + return scheduledFuture.isDone(); + } + + /** + * @Override + */ + public synchronized void run() { + if (isClose.get()) { + cancel(true); + return; + } + + if (nettyResponseFuture != null && nettyResponseFuture.hasExpired() + && !nettyResponseFuture.isDone() && !nettyResponseFuture.isCancelled()) { + log.debug("Request Timeout expired for {}\n", nettyResponseFuture); + + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, nettyResponseFuture.getRequest()); + + abort(nettyResponseFuture, new TimeoutException("No response received after " + requestTimeout)); + + nettyResponseFuture = null; + } + + if (nettyResponseFuture == null || nettyResponseFuture.isDone() || nettyResponseFuture.isCancelled()) { + cancel(true); + } + } + } + + private abstract class AsyncCallable implements Callable { + + private final NettyResponseFuture future; + + public AsyncCallable(NettyResponseFuture future) { + this.future = future; + } + + abstract public Object call() throws Exception; + + public NettyResponseFuture future() { + return future; + } + } + + public static class ThreadLocalBoolean extends ThreadLocal { + + private final boolean defaultValue; + + public ThreadLocalBoolean() { + this(false); + } + + public ThreadLocalBoolean(boolean defaultValue) { + this.defaultValue = defaultValue; + } + + @Override + protected Boolean initialValue() { + return defaultValue ? Boolean.TRUE : Boolean.FALSE; + } + } + + public static class OptimizedFileRegion implements FileRegion { + + private final FileChannel file; + private final RandomAccessFile raf; + private final long position; + private final long count; + private long byteWritten; + + public OptimizedFileRegion(RandomAccessFile raf, long position, long count) { + this.raf = raf; + this.file = raf.getChannel(); + this.position = position; + this.count = count; + } + + public long getPosition() { + return position; + } + + public long getCount() { + return count; + } + + public long transferTo(WritableByteChannel target, long position) throws IOException { + long count = this.count - position; + if (count < 0 || position < 0) { + throw new IllegalArgumentException( + "position out of range: " + position + + " (expected: 0 - " + (this.count - 1) + ")"); + } + if (count == 0) { + return 0L; + } + + long bw = file.transferTo(this.position + position, count, target); + byteWritten += bw; + if (byteWritten == raf.length()) { + releaseExternalResources(); + } + return bw; + } + + public void releaseExternalResources() { + try { + file.close(); + } catch (IOException e) { + log.warn("Failed to close a file.", e); + } + + try { + raf.close(); + } catch (IOException e) { + log.warn("Failed to close a file.", e); + } + } + } + + private static class NettyTransferAdapter extends TransferCompletionHandler.TransferAdapter { + + private final ChannelBuffer content; + private final FileInputStream file; + private int byteRead = 0; + + public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ChannelBuffer content, File file) throws IOException { + super(headers); + this.content = content; + if (file != null) { + this.file = new FileInputStream(file); + } else { + this.file = null; + } + } + + @Override + public void getBytes(byte[] bytes) { + if (content.writableBytes() != 0) { + content.getBytes(byteRead, bytes); + byteRead += bytes.length; + } else if (file != null) { + try { + byteRead += file.read(bytes); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + } + } + + protected AsyncHttpClientConfig getConfig() { + return config; + } + + private static class NonConnectionsPool implements ConnectionsPool { + + public boolean offer(String uri, Channel connection) { + return false; + } + + public Channel poll(String uri) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { + } + } + + private static final boolean validateWebSocketRequest(Request request, AsyncHandler asyncHandler) { + if (request.getMethod() != "GET" || !WebSocketUpgradeHandler.class.isAssignableFrom(asyncHandler.getClass())) { + return false; + } + return true; + } + + private boolean redirect(Request request, + NettyResponseFuture future, + HttpResponse response, + final ChannelHandlerContext ctx) throws Exception { + + int statusCode = response.getStatus().getCode(); + boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); + if (redirectEnabled && (statusCode == 302 + || statusCode == 301 + || statusCode == 303 + || statusCode == 307)) { + + if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { + // We must allow 401 handling again. + future.getAndSetAuth(false); + + String location = response.getHeader(HttpHeaders.Names.LOCATION); + URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); + boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); + if (!uri.toString().equals(future.getURI().toString())) { + final RequestBuilder nBuilder = stripQueryString ? + new RequestBuilder(future.getRequest()).setQueryParameters(null) + : new RequestBuilder(future.getRequest()); + + if (!(statusCode < 302 || statusCode > 303) + && !(statusCode == 302 + && config.isStrict302Handling())) { + nBuilder.setMethod("GET"); + } + final boolean initialConnectionKeepAlive = future.isKeepAlive(); + final String initialPoolKey = getPoolKey(future); + future.setURI(uri); + String newUrl = uri.toString(); + if (request.getUrl().startsWith(WEBSOCKET)) { + newUrl = newUrl.replace(HTTP, WEBSOCKET); + } + + log.debug("Redirecting to {}", newUrl); + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { + Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); + nBuilder.addOrReplaceCookie(c); + } + + AsyncCallable ac = new AsyncCallable(future) { + public Object call() throws Exception { + if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(initialPoolKey, ctx.getChannel())) { + return null; + } + finishChannel(ctx); + return null; + } + }; + + if (response.isChunked()) { + // We must make sure there is no bytes left before executing the next request. + ctx.setAttachment(ac); + } else { + ac.call(); + } + nextRequest(nBuilder.setUrl(newUrl).build(), future); + return true; + } + } else { + throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); + } + } + return false; + } + + private final class HttpProtocol implements Protocol { + // @Override + public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { + final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + future.touch(); + + // The connect timeout occured. + if (future.isCancelled() || future.isDone()) { + finishChannel(ctx); + return; + } + + HttpRequest nettyRequest = future.getNettyRequest(); + AsyncHandler handler = future.getAsyncHandler(); + Request request = future.getRequest(); + ProxyServer proxyServer = future.getProxyServer(); + HttpResponse response = null; + try { + if (e.getMessage() instanceof HttpResponse) { + response = (HttpResponse) e.getMessage(); + + log.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); + + // Required if there is some trailing headers. + future.setHttpResponse(response); + + int statusCode = response.getStatus().getCode(); + + String ka = response.getHeader(HttpHeaders.Names.CONNECTION); + future.setKeepAlive(ka == null || ! ka.toLowerCase().equals("close")); + + List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); + Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); + + HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); + FilterContext fc = new FilterContext.FilterContextBuilder() + .asyncHandler(handler) + .request(request) + .responseStatus(status) + .responseHeaders(responseHeaders) + .build(); + + for (ResponseFilter asyncFilter : config.getResponseFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + abort(future, efe); + } + } + + // The handler may have been wrapped. + handler = fc.getAsyncHandler(); + future.setAsyncHandler(handler); + + // The request has changed + if (fc.replayRequest()) { + replayRequest(future, fc, response, ctx); + return; + } + + Realm newRealm = null; + final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); + final RequestBuilder builder = new RequestBuilder(future.getRequest()); + + //if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { + // builder.setUrl(future.getURI().toString()); + //} + + if (statusCode == 401 + && realm != null + && wwwAuth.size() > 0 + && !future.getAndSetAuth(true)) { + + future.setState(NettyResponseFuture.STATE.NEW); + // NTLM + if (!wwwAuth.contains("Kerberos") && (wwwAuth.contains("NTLM") || (wwwAuth.contains("Negotiate")))) { + newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (wwwAuth.contains("Negotiate")) { + newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) return; + } else { + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) + .setUri(request.getURI().getPath()) + .setMethodName(request.getMethod()) + .setUsePreemptiveAuth(true) + .parseWWWAuthenticateHeader(wwwAuth.get(0)) + .build(); + } + + final Realm nr = new Realm.RealmBuilder().clone(newRealm) + .setUri(URI.create(request.getUrl()).getPath()).build(); + + log.debug("Sending authentication to {}", request.getUrl()); + AsyncCallable ac = new AsyncCallable(future) { + public Object call() throws Exception { + drainChannel(ctx, future); + nextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); + return null; + } + }; + + if (future.isKeepAlive() && response.isChunked()) { + // We must make sure there is no bytes left before executing the next request. + ctx.setAttachment(ac); + } else { + ac.call(); + } + return; + } + + if (statusCode == 100) { + future.getAndSetWriteHeaders(false); + future.getAndSetWriteBody(true); + writeRequest(ctx.getChannel(), config, future, nettyRequest); + return; + } + + List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); + if (statusCode == 407 + && realm != null + && proxyAuth.size() > 0 + && !future.getAndSetAuth(true)) { + + log.debug("Sending proxy authentication to {}", request.getUrl()); + + future.setState(NettyResponseFuture.STATE.NEW); + + if (!proxyAuth.contains("Kerberos") && (proxyAuth.get(0).contains("NTLM") || (proxyAuth.contains("Negotiate")))) { + newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (proxyAuth.contains("Negotiate")) { + newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) return; + } else { + newRealm = future.getRequest().getRealm(); + } + + Request req = builder.setHeaders(headers).setRealm(newRealm).build(); + future.setReuseChannel(true); + future.setConnectAllowed(true); + nextRequest(req, future); + return; + } + + if (future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT) + && statusCode == 200) { + + log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); + + if (future.isKeepAlive()) { + future.attachChannel(ctx.getChannel(), true); + } + + try { + log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); + upgradeProtocol(ctx.getChannel().getPipeline(), request.getURI().getScheme()); + } catch (Throwable ex) { + abort(future, ex); + } + Request req = builder.build(); + future.setReuseChannel(true); + future.setConnectAllowed(false); + nextRequest(req, future); + return; + } + + if (redirect(request, future, response, ctx)) return; + + if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { + finishUpdate(future, ctx, response.isChunked()); + return; + } else if (updateHeadersAndInterrupt(handler, responseHeaders)) { + finishUpdate(future, ctx, response.isChunked()); + return; + } else if (!response.isChunked()) { + if (response.getContent().readableBytes() != 0) { + updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); + } + finishUpdate(future, ctx, false); + return; + } + + if (nettyRequest.getMethod().equals(HttpMethod.HEAD)) { + updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); + markAsDone(future, ctx); + drainChannel(ctx, future); + } + + } else if (e.getMessage() instanceof HttpChunk) { + HttpChunk chunk = (HttpChunk) e.getMessage(); + + if (handler != null) { + if (chunk.isLast() || updateBodyAndInterrupt(future, handler, + new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, chunk, chunk.isLast()))) { + if (chunk instanceof DefaultHttpChunkTrailer) { + updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), + future.getHttpResponse(), NettyAsyncHttpProvider.this, (HttpChunkTrailer) chunk)); + } + finishUpdate(future, ctx, !chunk.isLast()); + } + } + } + } catch (Exception t) { + if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) + .request(future.getRequest()).ioException(IOException.class.cast(t)).build(); + fc = handleIoException(fc, future); + + if (fc.replayRequest()) { + replayRequest(future, fc, response, ctx); + return; + } + } + + try { + abort(future, t); + } finally { + finishUpdate(future, ctx, false); + throw t; + } + } + } + + // @Override + public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { + } + + // @Override + public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { + } + } + + private final class WebSocketProtocol implements Protocol { + private static final byte OPCODE_TEXT = 0x1; + private static final byte OPCODE_BINARY = 0x2; + private static final byte OPCODE_UNKNOWN = -1; + + protected byte pendingOpcode = OPCODE_UNKNOWN; + + // @Override + public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { + NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); + Request request = future.getRequest(); + + if (e.getMessage() instanceof HttpResponse) { + HttpResponse response = (HttpResponse) e.getMessage(); + + HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); + FilterContext fc = new FilterContext.FilterContextBuilder() + .asyncHandler(h) + .request(request) + .responseStatus(s) + .responseHeaders(responseHeaders) + .build(); + for (ResponseFilter asyncFilter : config.getResponseFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + abort(future, efe); + } + + } + + // The handler may have been wrapped. + future.setAsyncHandler(fc.getAsyncHandler()); + + // The request has changed + if (fc.replayRequest()) { + replayRequest(future, fc, response, ctx); + return; + } + + future.setHttpResponse(response); + if (redirect(request, future, response, ctx)) return; + + final org.jboss.netty.handler.codec.http.HttpResponseStatus status = + new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); + + final boolean validStatus = response.getStatus().equals(status); + final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; + String c = response.getHeader(HttpHeaders.Names.CONNECTION); + if (c == null) { + c = response.getHeader("connection"); + } + + final boolean validConnection = c == null ? false : c.equalsIgnoreCase(HttpHeaders.Values.UPGRADE); + + s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); + final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; + + if (!statusReceived) { + h.onClose(new NettyWebSocket(ctx.getChannel()), 1002, "Bad response status " + response.getStatus().getCode()); + future.done(null); + return; + } + + if (!validStatus || !validUpgrade || !validConnection) { + throw new IOException("Invalid handshake response"); + } + + String accept = response.getHeader("Sec-WebSocket-Accept"); + String key = WebSocketUtil.getAcceptKey(future.getNettyRequest().getHeader(WEBSOCKET_KEY)); + if (accept == null || !accept.equals(key)) { + throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); + } + + ctx.getPipeline().replace("ws-decoder", "ws-decoder", new WebSocket08FrameDecoder(false, false)); + ctx.getPipeline().replace("ws-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); + if (h.onHeadersReceived(responseHeaders) == STATE.CONTINUE) { + h.onSuccess(new NettyWebSocket(ctx.getChannel())); + } + future.done(null); + } else if (e.getMessage() instanceof WebSocketFrame) { + final WebSocketFrame frame = (WebSocketFrame) e.getMessage(); + + if(frame instanceof TextWebSocketFrame) { + pendingOpcode = OPCODE_TEXT; + } + else if(frame instanceof BinaryWebSocketFrame) { + pendingOpcode = OPCODE_BINARY; + } + + HttpChunk webSocketChunk = new HttpChunk() { + private ChannelBuffer content; + + // @Override + public boolean isLast() { + return false; + } + + // @Override + public ChannelBuffer getContent() { + return content; + } + + // @Override + public void setContent(ChannelBuffer content) { + this.content = content; + } + }; + + if (frame.getBinaryData() != null) { + webSocketChunk.setContent(ChannelBuffers.wrappedBuffer(frame.getBinaryData())); + ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, webSocketChunk, true); + h.onBodyPartReceived(rp); + + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + + if(pendingOpcode == OPCODE_BINARY) { + webSocket.onBinaryFragment(rp.getBodyPartBytes(),frame.isFinalFragment()); + } + else { + webSocket.onTextFragment(frame.getBinaryData().toString(UTF8),frame.isFinalFragment()); + } + + if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { + try { + webSocket.onClose(CloseWebSocketFrame.class.cast(frame).getStatusCode(), CloseWebSocketFrame.class.cast(frame).getReasonText()); + } catch (Throwable t) { + // Swallow any exception that may comes from a Netty version released before 3.4.0 + log.trace("", t); + } + } + } + } else { + log.error("Invalid attachment {}", ctx.getAttachment()); + } + } + + //@Override + public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { + try { + log.warn("onError {}", e); + if (ctx.getAttachment() == null || !NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { + return; + } + + NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + webSocket.onError(e.getCause()); + webSocket.close(); + } catch (Throwable t) { + log.error("onError", t); + } + } + + //@Override + public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { + log.trace("onClose {}", e); + if (ctx.getAttachment() == null || !NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { + return; + } + + try { + NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + + webSocket.close(); + } catch (Throwable t) { + log.error("onError", t); + } + } + } + + private static boolean isWebSocket(URI uri) { + return WEBSOCKET.equalsIgnoreCase(uri.getScheme()) || WEBSOCKET_SSL.equalsIgnoreCase(uri.getScheme()); + } + + private static boolean isSecure(String scheme) { + return HTTPS.equalsIgnoreCase(scheme) || WEBSOCKET_SSL.equalsIgnoreCase(scheme); + } + + private static boolean isSecure(URI uri) { + return isSecure(uri.getScheme()); + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java new file mode 100644 index 0000000000..1d064aea74 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java @@ -0,0 +1,197 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + */ +package com.ning.http.client.providers.netty_4; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ExecutorService; + +import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.ning.http.client.AsyncHttpProviderConfig; + +/** + * This class can be used to pass Netty's internal configuration options. See Netty documentation for more information. + */ +public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig { + + private final static Logger LOGGER = LoggerFactory.getLogger(NettyAsyncHttpProviderConfig.class); + + /** + * Use Netty's blocking IO stategy. + */ + private boolean useBlockingIO; + + /** + * Allow configuring the Netty's socket channel factory. + */ + private NioClientSocketChannelFactory socketChannelFactory; + + /** + * Allow configuring the Netty's boss executor service. + */ + private ExecutorService bossExecutorService; + + /** + * Execute the connect operation asynchronously. + */ + private boolean asyncConnect; + + /** + * HttpClientCodec's maxInitialLineLength + */ + private int maxInitialLineLength = 4096; + + /** + * HttpClientCodec's maxHeaderSize + */ + private int maxHeaderSize = 8192; + + /** + * HttpClientCodec's maxChunkSize + */ + private int maxChunkSize = 8192; + + /** + * Use direct {@link java.nio.ByteBuffer} + */ + public final static String USE_DIRECT_BYTEBUFFER = "bufferFactory"; + + /** + * Allow nested request from any {@link com.ning.http.client.AsyncHandler} + */ + public final static String DISABLE_NESTED_REQUEST = "disableNestedRequest"; + + /** + * See {@link java.net.Socket#setReuseAddress(boolean)} + */ + public final static String REUSE_ADDRESS = "reuseAddress"; + + private final Map properties = new HashMap(); + + public NettyAsyncHttpProviderConfig() { + properties.put(REUSE_ADDRESS, Boolean.FALSE); + } + + /** + * Add a property that will be used when the AsyncHttpClient initialize its {@link com.ning.http.client.AsyncHttpProvider} + * + * @param name + * the name of the property + * @param value + * the value of the property + * @return this instance of AsyncHttpProviderConfig + */ + public NettyAsyncHttpProviderConfig addProperty(String name, Object value) { + + if (name.equals(REUSE_ADDRESS) && value == Boolean.TRUE && System.getProperty("os.name").toLowerCase().contains("win")) { + LOGGER.warn("Can't enable {} on Windows", REUSE_ADDRESS); + } else { + properties.put(name, value); + } + + return this; + } + + /** + * Return the value associated with the property's name + * + * @param name + * @return this instance of AsyncHttpProviderConfig + */ + public Object getProperty(String name) { + return properties.get(name); + } + + /** + * Remove the value associated with the property's name + * + * @param name + * @return true if removed + */ + public Object removeProperty(String name) { + return properties.remove(name); + } + + /** + * Return the curent entry set. + * + * @return a the curent entry set. + */ + public Set> propertiesSet() { + return properties.entrySet(); + } + + public boolean isUseBlockingIO() { + return useBlockingIO; + } + + public void setUseBlockingIO(boolean useBlockingIO) { + this.useBlockingIO = useBlockingIO; + } + + public NioClientSocketChannelFactory getSocketChannelFactory() { + return socketChannelFactory; + } + + public void setSocketChannelFactory(NioClientSocketChannelFactory socketChannelFactory) { + this.socketChannelFactory = socketChannelFactory; + } + + public ExecutorService getBossExecutorService() { + return bossExecutorService; + } + + public void setBossExecutorService(ExecutorService bossExecutorService) { + this.bossExecutorService = bossExecutorService; + } + + public boolean isAsyncConnect() { + return asyncConnect; + } + + public void setAsyncConnect(boolean asyncConnect) { + this.asyncConnect = asyncConnect; + } + + public int getMaxInitialLineLength() { + return maxInitialLineLength; + } + + public void setMaxInitialLineLength(int maxInitialLineLength) { + this.maxInitialLineLength = maxInitialLineLength; + } + + public int getMaxHeaderSize() { + return maxHeaderSize; + } + + public void setMaxHeaderSize(int maxHeaderSize) { + this.maxHeaderSize = maxHeaderSize; + } + + public int getMaxChunkSize() { + return maxChunkSize; + } + + public void setMaxChunkSize(int maxChunkSize) { + this.maxChunkSize = maxChunkSize; + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java new file mode 100644 index 0000000000..8136a9f33d --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java @@ -0,0 +1,153 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + */ +package com.ning.http.client.providers.netty_4; + +import java.io.IOException; +import java.net.ConnectException; +import java.net.URI; +import java.nio.channels.ClosedChannelException; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.net.ssl.HostnameVerifier; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFuture; +import org.jboss.netty.channel.ChannelFutureListener; +import org.jboss.netty.handler.codec.http.HttpRequest; +import org.jboss.netty.handler.ssl.SslHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.ning.http.client.AsyncHandler; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.ProxyServer; +import com.ning.http.client.Request; +import com.ning.http.util.ProxyUtils; + + +/** + * Non Blocking connect. + */ +final class NettyConnectListener implements ChannelFutureListener { + private final static Logger logger = LoggerFactory.getLogger(NettyConnectListener.class); + private final AsyncHttpClientConfig config; + private final NettyResponseFuture future; + private final HttpRequest nettyRequest; + private final AtomicBoolean handshakeDone = new AtomicBoolean(false); + + private NettyConnectListener(AsyncHttpClientConfig config, + NettyResponseFuture future, + HttpRequest nettyRequest) { + this.config = config; + this.future = future; + this.nettyRequest = nettyRequest; + } + + public NettyResponseFuture future() { + return future; + } + + public final void operationComplete(ChannelFuture f) throws Exception { + if (f.isSuccess()) { + Channel channel = f.getChannel(); + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(future); + SslHandler sslHandler = (SslHandler) channel.getPipeline().get(NettyAsyncHttpProvider.SSL_HANDLER); + if (!handshakeDone.getAndSet(true) && (sslHandler != null)) { + ((SslHandler) channel.getPipeline().get(NettyAsyncHttpProvider.SSL_HANDLER)).handshake().addListener(this); + return; + } + + HostnameVerifier v = config.getHostnameVerifier(); + if (sslHandler != null) { + if (!v.verify(future.getURI().getHost(), sslHandler.getEngine().getSession())) { + ConnectException exception = new ConnectException("HostnameVerifier exception."); + future.abort(exception); + throw exception; + } + } + + future.provider().writeRequest(f.getChannel(), config, future, nettyRequest); + } else { + Throwable cause = f.getCause(); + + logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", f.getChannel(), future.canRetry()); + if (future.canRetry() && cause != null && (NettyAsyncHttpProvider.abortOnDisconnectException(cause) + || ClosedChannelException.class.isAssignableFrom(cause.getClass()) + || future.getState() != NettyResponseFuture.STATE.NEW)) { + + logger.debug("Retrying {} ", nettyRequest); + if (future.provider().remotelyClosed(f.getChannel(), future)) { + return; + } + } + + logger.debug("Failed to recover from exception: {} with channel {}", cause, f.getChannel()); + + boolean printCause = f.getCause() != null && cause.getMessage() != null; + ConnectException e = new ConnectException(printCause ? cause.getMessage() + " to " + future.getURI().toString() : future.getURI().toString()); + if (cause != null) { + e.initCause(cause); + } + future.abort(e); + } + } + + public static class Builder { + private final AsyncHttpClientConfig config; + + private final Request request; + private final AsyncHandler asyncHandler; + private NettyResponseFuture future; + private final NettyAsyncHttpProvider provider; + private final ChannelBuffer buffer; + + public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler asyncHandler, + NettyAsyncHttpProvider provider, ChannelBuffer buffer) { + + this.config = config; + this.request = request; + this.asyncHandler = asyncHandler; + this.future = null; + this.provider = provider; + this.buffer = buffer; + } + + public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler asyncHandler, + NettyResponseFuture future, NettyAsyncHttpProvider provider, ChannelBuffer buffer) { + + this.config = config; + this.request = request; + this.asyncHandler = asyncHandler; + this.future = future; + this.provider = provider; + this.buffer = buffer; + } + + public NettyConnectListener build(final URI uri) throws IOException { + ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); + HttpRequest nettyRequest = NettyAsyncHttpProvider.buildRequest(config, request, uri, true, buffer, proxyServer); + if (future == null) { + future = NettyAsyncHttpProvider.newFuture(uri, request, asyncHandler, nettyRequest, config, provider, proxyServer); + } else { + future.setNettyRequest(nettyRequest); + future.setRequest(request); + } + return new NettyConnectListener(config, future, nettyRequest); + } + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java new file mode 100644 index 0000000000..b49bd5ca31 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.ConnectionsPool; +import org.jboss.netty.channel.Channel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * A simple implementation of {@link com.ning.http.client.ConnectionsPool} based on a {@link java.util.concurrent.ConcurrentHashMap} + */ +public class NettyConnectionsPool implements ConnectionsPool { + + private final static Logger log = LoggerFactory.getLogger(NettyConnectionsPool.class); + private final ConcurrentHashMap> connectionsPool = new ConcurrentHashMap>(); + private final ConcurrentHashMap channel2IdleChannel = new ConcurrentHashMap(); + private final ConcurrentHashMap channel2CreationDate = new ConcurrentHashMap(); + private final AtomicBoolean isClosed = new AtomicBoolean(false); + private final Timer idleConnectionDetector = new Timer(true); + private final boolean sslConnectionPoolEnabled; + private final int maxTotalConnections; + private final int maxConnectionPerHost; + private final int maxConnectionLifeTimeInMs; + private final long maxIdleTime; + + public NettyConnectionsPool(NettyAsyncHttpProvider provider) { + this.maxTotalConnections = provider.getConfig().getMaxTotalConnections(); + this.maxConnectionPerHost = provider.getConfig().getMaxConnectionPerHost(); + this.sslConnectionPoolEnabled = provider.getConfig().isSslConnectionPoolEnabled(); + this.maxIdleTime = provider.getConfig().getIdleConnectionInPoolTimeoutInMs(); + this.maxConnectionLifeTimeInMs = provider.getConfig().getMaxConnectionLifeTimeInMs(); + this.idleConnectionDetector.schedule(new IdleChannelDetector(), maxIdleTime, maxIdleTime); + } + + private static class IdleChannel { + final String uri; + final Channel channel; + final long start; + + IdleChannel(String uri, Channel channel) { + this.uri = uri; + this.channel = channel; + this.start = System.currentTimeMillis(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof IdleChannel)) return false; + + IdleChannel that = (IdleChannel) o; + + if (channel != null ? !channel.equals(that.channel) : that.channel != null) return false; + + return true; + } + + @Override + public int hashCode() { + return channel != null ? channel.hashCode() : 0; + } + } + + private class IdleChannelDetector extends TimerTask { + @Override + public void run() { + try { + if (isClosed.get()) return; + + if (log.isDebugEnabled()) { + Set keys = connectionsPool.keySet(); + + for (String s : keys) { + log.debug("Entry count for : {} : {}", s, connectionsPool.get(s).size()); + } + } + + List channelsInTimeout = new ArrayList(); + long currentTime = System.currentTimeMillis(); + + for (IdleChannel idleChannel : channel2IdleChannel.values()) { + long age = currentTime - idleChannel.start; + if (age > maxIdleTime) { + + log.debug("Adding Candidate Idle Channel {}", idleChannel.channel); + + // store in an unsynchronized list to minimize the impact on the ConcurrentHashMap. + channelsInTimeout.add(idleChannel); + } + } + long endConcurrentLoop = System.currentTimeMillis(); + + for (IdleChannel idleChannel : channelsInTimeout) { + Object attachment = idleChannel.channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); + if (attachment != null) { + if (NettyResponseFuture.class.isAssignableFrom(attachment.getClass())) { + NettyResponseFuture future = (NettyResponseFuture) attachment; + + if (!future.isDone() && !future.isCancelled()) { + log.debug("Future not in appropriate state %s\n", future); + continue; + } + } + } + + if (remove(idleChannel)) { + log.debug("Closing Idle Channel {}", idleChannel.channel); + close(idleChannel.channel); + } + } + + if (log.isTraceEnabled()) { + int openChannels = 0; + for (ConcurrentLinkedQueue hostChannels: connectionsPool.values()) { + openChannels += hostChannels.size(); + } + log.trace(String.format("%d channel open, %d idle channels closed (times: 1st-loop=%d, 2nd-loop=%d).\n", + openChannels, channelsInTimeout.size(), endConcurrentLoop - currentTime, System.currentTimeMillis() - endConcurrentLoop)); + } + } catch (Throwable t) { + log.error("uncaught exception!", t); + } + } + } + + /** + * {@inheritDoc} + */ + public boolean offer(String uri, Channel channel) { + if (isClosed.get()) return false; + + if (!sslConnectionPoolEnabled && uri.startsWith("https")) { + return false; + } + + Long createTime = channel2CreationDate.get(channel); + if (createTime == null){ + channel2CreationDate.putIfAbsent(channel, System.currentTimeMillis()); + } + else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeInMs) < System.currentTimeMillis() ) { + log.debug("Channel {} expired", channel); + return false; + } + + log.debug("Adding uri: {} for channel {}", uri, channel); + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + + ConcurrentLinkedQueue idleConnectionForHost = connectionsPool.get(uri); + if (idleConnectionForHost == null) { + ConcurrentLinkedQueue newPool = new ConcurrentLinkedQueue(); + idleConnectionForHost = connectionsPool.putIfAbsent(uri, newPool); + if (idleConnectionForHost == null) idleConnectionForHost = newPool; + } + + boolean added; + int size = idleConnectionForHost.size(); + if (maxConnectionPerHost == -1 || size < maxConnectionPerHost) { + IdleChannel idleChannel = new IdleChannel(uri, channel); + synchronized (idleConnectionForHost) { + added = idleConnectionForHost.add(idleChannel); + + if (channel2IdleChannel.put(channel, idleChannel) != null) { + log.error("Channel {} already exists in the connections pool!", channel); + } + } + } else { + log.debug("Maximum number of requests per host reached {} for {}", maxConnectionPerHost, uri); + added = false; + } + return added; + } + + /** + * {@inheritDoc} + */ + public Channel poll(String uri) { + if (!sslConnectionPoolEnabled && uri.startsWith("https")) { + return null; + } + + IdleChannel idleChannel = null; + ConcurrentLinkedQueue idleConnectionForHost = connectionsPool.get(uri); + if (idleConnectionForHost != null) { + boolean poolEmpty = false; + while (!poolEmpty && idleChannel == null) { + if (idleConnectionForHost.size() > 0) { + synchronized (idleConnectionForHost) { + idleChannel = idleConnectionForHost.poll(); + if (idleChannel != null) { + channel2IdleChannel.remove(idleChannel.channel); + } + } + } + + if (idleChannel == null) { + poolEmpty = true; + } else if (!idleChannel.channel.isConnected() || !idleChannel.channel.isOpen()) { + idleChannel = null; + log.trace("Channel not connected or not opened!"); + } + } + } + return idleChannel != null ? idleChannel.channel : null; + } + + private boolean remove(IdleChannel pooledChannel) { + if (pooledChannel == null || isClosed.get()) return false; + + boolean isRemoved = false; + ConcurrentLinkedQueue pooledConnectionForHost = connectionsPool.get(pooledChannel.uri); + if (pooledConnectionForHost != null) { + isRemoved = pooledConnectionForHost.remove(pooledChannel); + } + isRemoved |= channel2IdleChannel.remove(pooledChannel.channel) != null; + return isRemoved; + } + + /** + * {@inheritDoc} + */ + public boolean removeAll(Channel channel) { + channel2CreationDate.remove(channel); + return !isClosed.get() && remove(channel2IdleChannel.get(channel)); + } + + /** + * {@inheritDoc} + */ + public boolean canCacheConnection() { + if (!isClosed.get() && maxTotalConnections != -1 && channel2IdleChannel.size() >= maxTotalConnections) { + return false; + } else { + return true; + } + } + + /** + * {@inheritDoc} + */ + public void destroy() { + if (isClosed.getAndSet(true)) return; + + // stop timer + idleConnectionDetector.cancel(); + idleConnectionDetector.purge(); + + for (Channel channel : channel2IdleChannel.keySet()) { + close(channel); + } + connectionsPool.clear(); + channel2IdleChannel.clear(); + channel2CreationDate.clear(); + } + + private void close(Channel channel) { + try { + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel2CreationDate.remove(channel); + channel.close(); + } catch (Throwable t) { + // noop + } + } + + public final String toString() { + return String.format("NettyConnectionPool: {pool-size: %d}", channel2IdleChannel.size()); + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java new file mode 100644 index 0000000000..3c3058a839 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java @@ -0,0 +1,120 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.Cookie; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.providers.ResponseBase; +import com.ning.http.util.AsyncHttpProviderUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBufferInputStream; +import org.jboss.netty.buffer.ChannelBuffers; + +/** + * Wrapper around the {@link com.ning.http.client.Response} API. + */ +public class NettyResponse extends ResponseBase { + + public NettyResponse(HttpResponseStatus status, + HttpResponseHeaders headers, + List bodyParts) { + super(status, headers, bodyParts); + } + + /* @Override */ + public String getResponseBodyExcerpt(int maxLength) throws IOException { + return getResponseBodyExcerpt(maxLength, null); + } + + public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { + // should be fine; except that it may split multi-byte chars (last char may become '?') + charset = calculateCharset(charset); + byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); + return new String(b, charset); + } + + protected List buildCookies() { + List cookies = new ArrayList(); + for (Map.Entry> header : headers.getHeaders().entrySet()) { + if (header.getKey().equalsIgnoreCase("Set-Cookie")) { + // TODO: ask for parsed header + List v = header.getValue(); + for (String value : v) { + Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); + cookies.add(cookie); + } + } + } + return Collections.unmodifiableList(cookies); + } + + /* @Override */ + public byte[] getResponseBodyAsBytes() throws IOException { + return getResponseBodyAsByteBuffer().array(); + } + + /* @Override */ + public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { + return getResponseBodyAsChannelBuffer().toByteBuffer(); + } + + /* @Override */ + public String getResponseBody() throws IOException { + return getResponseBody(null); + } + + /* @Override */ + public String getResponseBody(String charset) throws IOException { + return getResponseBodyAsChannelBuffer().toString(Charset.forName(calculateCharset(charset))); + } + + /* @Override */ + public InputStream getResponseBodyAsStream() throws IOException { + return new ChannelBufferInputStream(getResponseBodyAsChannelBuffer()); + } + + public ChannelBuffer getResponseBodyAsChannelBuffer() throws IOException { + ChannelBuffer b = null; + switch (bodyParts.size()) { + case 0: + b = ChannelBuffers.EMPTY_BUFFER; + break; + case 1: + b = ResponseBodyPart.class.cast(bodyParts.get(0)).getChannelBuffer(); + break; + default: + ChannelBuffer[] channelBuffers = new ChannelBuffer[bodyParts.size()]; + for (int i = 0; i < bodyParts.size(); i++) { + channelBuffers[i] = ResponseBodyPart.class.cast(bodyParts.get(i)).getChannelBuffer(); + } + b = ChannelBuffers.wrappedBuffer(channelBuffers); + } + + return b; + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java new file mode 100644 index 0000000000..cfebb2d766 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java @@ -0,0 +1,514 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.AsyncHandler; +import com.ning.http.client.ConnectionPoolKeyStrategy; +import com.ning.http.client.ProxyServer; +import com.ning.http.client.Request; +import com.ning.http.client.listenable.AbstractListenableFuture; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.handler.codec.http.HttpRequest; +import org.jboss.netty.handler.codec.http.HttpResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.net.MalformedURLException; +import java.net.URI; +import java.util.concurrent.Callable; +import java.util.concurrent.CancellationException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; + +/** + * A {@link Future} that can be used to track when an asynchronous HTTP request has been fully processed. + * + * @param + */ +public final class NettyResponseFuture extends AbstractListenableFuture { + + private final static Logger logger = LoggerFactory.getLogger(NettyResponseFuture.class); + public final static String MAX_RETRY = "com.ning.http.client.providers.netty.maxRetry"; + + enum STATE { + NEW, + POOLED, + RECONNECTED, + CLOSED, + } + + private final CountDownLatch latch = new CountDownLatch(1); + private final AtomicBoolean isDone = new AtomicBoolean(false); + private final AtomicBoolean isCancelled = new AtomicBoolean(false); + private AsyncHandler asyncHandler; + private final int responseTimeoutInMs; + private final int idleConnectionTimeoutInMs; + private Request request; + private HttpRequest nettyRequest; + private final AtomicReference content = new AtomicReference(); + private URI uri; + private boolean keepAlive = true; + private HttpResponse httpResponse; + private final AtomicReference exEx = new AtomicReference(); + private final AtomicInteger redirectCount = new AtomicInteger(); + private volatile Future reaperFuture; + private final AtomicBoolean inAuth = new AtomicBoolean(false); + private final AtomicBoolean statusReceived = new AtomicBoolean(false); + private final AtomicLong touch = new AtomicLong(System.currentTimeMillis()); + private final long start = System.currentTimeMillis(); + private final NettyAsyncHttpProvider asyncHttpProvider; + private final AtomicReference state = new AtomicReference(STATE.NEW); + private final AtomicBoolean contentProcessed = new AtomicBoolean(false); + private Channel channel; + private boolean reuseChannel = false; + private final AtomicInteger currentRetry = new AtomicInteger(0); + private final int maxRetry; + private boolean writeHeaders; + private boolean writeBody; + private final AtomicBoolean throwableCalled = new AtomicBoolean(false); + private boolean allowConnect = false; + private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; + private final ProxyServer proxyServer; + + public NettyResponseFuture(URI uri, + Request request, + AsyncHandler asyncHandler, + HttpRequest nettyRequest, + int responseTimeoutInMs, + int idleConnectionTimeoutInMs, + NettyAsyncHttpProvider asyncHttpProvider, + ConnectionPoolKeyStrategy connectionPoolKeyStrategy, + ProxyServer proxyServer) { + + this.asyncHandler = asyncHandler; + this.responseTimeoutInMs = responseTimeoutInMs; + this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; + this.request = request; + this.nettyRequest = nettyRequest; + this.uri = uri; + this.asyncHttpProvider = asyncHttpProvider; + this.connectionPoolKeyStrategy = connectionPoolKeyStrategy; + this.proxyServer = proxyServer; + + if (System.getProperty(MAX_RETRY) != null) { + maxRetry = Integer.valueOf(System.getProperty(MAX_RETRY)); + } else { + maxRetry = asyncHttpProvider.getConfig().getMaxRequestRetry(); + } + writeHeaders = true; + writeBody = true; + } + + protected URI getURI() throws MalformedURLException { + return uri; + } + + protected void setURI(URI uri) { + this.uri = uri; + } + + public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { + return connectionPoolKeyStrategy; + } + + public ProxyServer getProxyServer() { + return proxyServer; + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean isDone() { + return isDone.get(); + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean isCancelled() { + return isCancelled.get(); + } + + void setAsyncHandler(AsyncHandler asyncHandler) { + this.asyncHandler = asyncHandler; + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean cancel(boolean force) { + cancelReaper(); + + if (isCancelled.get()) return false; + + try { + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.close(); + } catch (Throwable t) { + // Ignore + } + if (!throwableCalled.getAndSet(true)) { + try { + asyncHandler.onThrowable(new CancellationException()); + } catch (Throwable t) { + logger.warn("cancel", t); + } + } + latch.countDown(); + isCancelled.set(true); + super.done(); + return true; + } + + /** + * Is the Future still valid + * + * @return true if response has expired and should be terminated. + */ + public boolean hasExpired() { + long now = System.currentTimeMillis(); + return idleConnectionTimeoutInMs != -1 && ((now - touch.get()) >= idleConnectionTimeoutInMs) + || responseTimeoutInMs != -1 && ((now - start) >= responseTimeoutInMs); + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public V get() throws InterruptedException, ExecutionException { + try { + return get(responseTimeoutInMs, TimeUnit.MILLISECONDS); + } catch (TimeoutException e) { + cancelReaper(); + throw new ExecutionException(e); + } + } + + void cancelReaper() { + if (reaperFuture != null) { + reaperFuture.cancel(true); + } + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, ExecutionException { + if (!isDone() && !isCancelled()) { + boolean expired = false; + if (l == -1) { + latch.await(); + } else { + expired = !latch.await(l, tu); + } + + if (expired) { + isCancelled.set(true); + try { + channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.close(); + } catch (Throwable t) { + // Ignore + } + TimeoutException te = new TimeoutException(String.format("No response received after %s %s", l, tu.name().toLowerCase())); + if (!throwableCalled.getAndSet(true)) { + try { + asyncHandler.onThrowable(te); + } catch (Throwable t) { + logger.debug("asyncHandler.onThrowable", t); + } finally { + cancelReaper(); + throw new ExecutionException(te); + } + } + } + isDone.set(true); + + ExecutionException e = exEx.getAndSet(null); + if (e != null) { + throw e; + } + } + return getContent(); + } + + V getContent() throws ExecutionException { + ExecutionException e = exEx.getAndSet(null); + if (e != null) { + throw e; + } + + V update = content.get(); + // No more retry + currentRetry.set(maxRetry); + if (exEx.get() == null && !contentProcessed.getAndSet(true)) { + try { + update = asyncHandler.onCompleted(); + } catch (Throwable ex) { + if (!throwableCalled.getAndSet(true)) { + try { + asyncHandler.onThrowable(ex); + } catch (Throwable t) { + logger.debug("asyncHandler.onThrowable", t); + } finally { + cancelReaper(); + throw new RuntimeException(ex); + } + } + } + content.compareAndSet(null, update); + } + return update; + } + + public final void done(Callable callable) { + + Throwable exception = null; + + try { + cancelReaper(); + + if (exEx.get() != null) { + return; + } + getContent(); + isDone.set(true); + if (callable != null) { + try { + callable.call(); + } catch (Exception ex) { + exception = ex; + } + } + } catch (ExecutionException t) { + return; + } catch (RuntimeException t) { + exception = t.getCause() != null ? t.getCause() : t; + + } finally { + latch.countDown(); + } + + if (exception != null) + exEx.compareAndSet(null, new ExecutionException(exception)); + + super.done(); + } + + public final void abort(final Throwable t) { + cancelReaper(); + + if (isDone.get() || isCancelled.get()) return; + + exEx.compareAndSet(null, new ExecutionException(t)); + if (!throwableCalled.getAndSet(true)) { + try { + asyncHandler.onThrowable(t); + } catch (Throwable te) { + logger.debug("asyncHandler.onThrowable", te); + } finally { + isCancelled.set(true); + } + } + latch.countDown(); + super.done(); + } + + public void content(V v) { + content.set(v); + } + + protected final Request getRequest() { + return request; + } + + public final HttpRequest getNettyRequest() { + return nettyRequest; + } + + protected final void setNettyRequest(HttpRequest nettyRequest) { + this.nettyRequest = nettyRequest; + } + + protected final AsyncHandler getAsyncHandler() { + return asyncHandler; + } + + protected final boolean isKeepAlive() { + return keepAlive; + } + + protected final void setKeepAlive(final boolean keepAlive) { + this.keepAlive = keepAlive; + } + + protected final HttpResponse getHttpResponse() { + return httpResponse; + } + + protected final void setHttpResponse(final HttpResponse httpResponse) { + this.httpResponse = httpResponse; + } + + protected int incrementAndGetCurrentRedirectCount() { + return redirectCount.incrementAndGet(); + } + + protected void setReaperFuture(Future reaperFuture) { + cancelReaper(); + this.reaperFuture = reaperFuture; + } + + protected boolean isInAuth() { + return inAuth.get(); + } + + protected boolean getAndSetAuth(boolean inDigestAuth) { + return inAuth.getAndSet(inDigestAuth); + } + + protected STATE getState() { + return state.get(); + } + + protected void setState(STATE state) { + this.state.set(state); + } + + public boolean getAndSetStatusReceived(boolean sr) { + return statusReceived.getAndSet(sr); + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public void touch() { + touch.set(System.currentTimeMillis()); + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean getAndSetWriteHeaders(boolean writeHeaders) { + boolean b = this.writeHeaders; + this.writeHeaders = writeHeaders; + return b; + } + + /** + * {@inheritDoc} + */ + /* @Override */ + public boolean getAndSetWriteBody(boolean writeBody) { + boolean b = this.writeBody; + this.writeBody = writeBody; + return b; + } + + protected NettyAsyncHttpProvider provider() { + return asyncHttpProvider; + } + + protected void attachChannel(Channel channel) { + this.channel = channel; + } + + public void setReuseChannel(boolean reuseChannel) { + this.reuseChannel = reuseChannel; + } + + public boolean isConnectAllowed() { + return allowConnect; + } + + public void setConnectAllowed(boolean allowConnect) { + this.allowConnect = allowConnect; + } + + protected void attachChannel(Channel channel, boolean reuseChannel) { + this.channel = channel; + this.reuseChannel = reuseChannel; + } + + protected Channel channel() { + return channel; + } + + protected boolean reuseChannel() { + return reuseChannel; + } + + protected boolean canRetry() { + if (currentRetry.incrementAndGet() > maxRetry) { + return false; + } + return true; + } + + public void setRequest(Request request) { + this.request = request; + } + + /** + * Return true if the {@link Future} cannot be recovered. There is some scenario where a connection can be + * closed by an unexpected IOException, and in some situation we can recover from that exception. + * + * @return true if that {@link Future} cannot be recovered. + */ + public boolean cannotBeReplay() { + return isDone() + || !canRetry() + || isCancelled() + || (channel() != null && channel().isOpen() && uri.getScheme().compareToIgnoreCase("https") != 0) + || isInAuth(); + } + + @Override + public String toString() { + return "NettyResponseFuture{" + + "currentRetry=" + currentRetry + + ",\n\tisDone=" + isDone + + ",\n\tisCancelled=" + isCancelled + + ",\n\tasyncHandler=" + asyncHandler + + ",\n\tresponseTimeoutInMs=" + responseTimeoutInMs + + ",\n\tnettyRequest=" + nettyRequest + + ",\n\tcontent=" + content + + ",\n\turi=" + uri + + ",\n\tkeepAlive=" + keepAlive + + ",\n\thttpResponse=" + httpResponse + + ",\n\texEx=" + exEx + + ",\n\tredirectCount=" + redirectCount + + ",\n\treaperFuture=" + reaperFuture + + ",\n\tinAuth=" + inAuth + + ",\n\tstatusReceived=" + statusReceived + + ",\n\ttouch=" + touch + + '}'; + } + +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java new file mode 100644 index 0000000000..b0f4b4e357 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.websocket.WebSocket; +import com.ning.http.client.websocket.WebSocketByteListener; +import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; +import com.ning.http.client.websocket.WebSocketListener; +import com.ning.http.client.websocket.WebSocketTextListener; +import org.jboss.netty.channel.Channel; +import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.PingWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.ConcurrentLinkedQueue; + +import java.io.ByteArrayOutputStream; + +import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; + +public class NettyWebSocket implements WebSocket { + private final static Logger logger = LoggerFactory.getLogger(NettyWebSocket.class); + + private final Channel channel; + private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); + + private StringBuilder textBuffer; + private ByteArrayOutputStream byteBuffer; + private int maxBufferSize = 128000000; + + public NettyWebSocket(Channel channel) { + this.channel = channel; + } + + // @Override + public WebSocket sendMessage(byte[] message) { + channel.write(new BinaryWebSocketFrame(wrappedBuffer(message))); + return this; + } + + // @Override + public WebSocket stream(byte[] fragment, boolean last) { + throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); + } + + // @Override + public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { + throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); + } + + // @Override + public WebSocket sendTextMessage(String message) { + channel.write(new TextWebSocketFrame(message)); + return this; + } + + // @Override + public WebSocket streamText(String fragment, boolean last) { + throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); + } + + // @Override + public WebSocket sendPing(byte[] payload) { + channel.write(new PingWebSocketFrame(wrappedBuffer(payload))); + return this; + } + + // @Override + public WebSocket sendPong(byte[] payload) { + channel.write(new PongWebSocketFrame(wrappedBuffer(payload))); + return this; + } + + // @Override + public WebSocket addWebSocketListener(WebSocketListener l) { + listeners.add(l); + return this; + } + + // @Override + public WebSocket removeWebSocketListener(WebSocketListener l) { + listeners.remove(l); + return this; + } + + public int getMaxBufferSize() { + return maxBufferSize; + } + + public void setMaxBufferSize(int bufferSize) { + maxBufferSize = bufferSize; + + if(maxBufferSize < 8192) + maxBufferSize = 8192; + } + + // @Override + public boolean isOpen() { + return channel.isOpen(); + } + + // @Override + public void close() { + onClose(); + listeners.clear(); + channel.close(); + } + + protected void onBinaryFragment(byte[] message, boolean last) { + for (WebSocketListener l : listeners) { + if (WebSocketByteListener.class.isAssignableFrom(l.getClass())) { + try { + WebSocketByteListener.class.cast(l).onFragment(message,last); + + if(byteBuffer == null) { + byteBuffer = new ByteArrayOutputStream(); + } + + byteBuffer.write(message); + + if(byteBuffer.size() > maxBufferSize) { + Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); + l.onError(e); + this.close(); + return; + } + + + if(last) { + WebSocketByteListener.class.cast(l).onMessage(byteBuffer.toByteArray()); + byteBuffer = null; + textBuffer = null; + } + } catch (Exception ex) { + l.onError(ex); + } + } + } + } + + protected void onTextFragment(String message, boolean last) { + for (WebSocketListener l : listeners) { + if (WebSocketTextListener.class.isAssignableFrom(l.getClass())) { + try { + WebSocketTextListener.class.cast(l).onFragment(message,last); + + if(textBuffer == null) { + textBuffer = new StringBuilder(); + } + + textBuffer.append(message); + + if(textBuffer.length() > maxBufferSize) { + Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); + l.onError(e); + this.close(); + return; + } + + if(last) { + WebSocketTextListener.class.cast(l).onMessage(textBuffer.toString()); + byteBuffer = null; + textBuffer = null; + } + } catch (Exception ex) { + l.onError(ex); + } + } + } + } + + protected void onError(Throwable t) { + for (WebSocketListener l : listeners) { + try { + l.onError(t); + } catch (Throwable t2) { + logger.error("", t2); + } + + } + } + + protected void onClose() { + onClose(1000, "Normal closure; the connection successfully completed whatever purpose for which it was created."); + } + + protected void onClose(int code, String reason) { + for (WebSocketListener l : listeners) { + try { + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(l.getClass())) { + WebSocketCloseCodeReasonListener.class.cast(l).onClose(this, code, reason); + } + l.onClose(this); + } catch (Throwable t) { + l.onError(t); + } + } + } + + @Override + public String toString() { + return "NettyWebSocket{" + + "channel=" + channel + + '}'; + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java new file mode 100644 index 0000000000..98acd04ba1 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ChannelStateEvent; +import org.jboss.netty.channel.ExceptionEvent; +import org.jboss.netty.channel.MessageEvent; + +public interface Protocol { + + void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception; + + void onError(ChannelHandlerContext ctx, ExceptionEvent e); + + void onClose(ChannelHandlerContext ctx, ChannelStateEvent e); +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java new file mode 100644 index 0000000000..f50677255c --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java @@ -0,0 +1,132 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.HttpResponseBodyPart; +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.handler.codec.http.HttpChunk; +import org.jboss.netty.handler.codec.http.HttpResponse; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.nio.ByteBuffer; +import java.util.concurrent.atomic.AtomicReference; + +/** + * A callback class used when an HTTP response body is received. + */ +public class ResponseBodyPart extends HttpResponseBodyPart { + + private final HttpChunk chunk; + private final HttpResponse response; + private final AtomicReference bytes = new AtomicReference(null); + private final boolean isLast; + private boolean closeConnection = false; + + /** + * Constructor used for non-chunked GET requests and HEAD requests. + */ + public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, boolean last) { + this(uri, response, provider, null, last); + } + + public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunk chunk, boolean last) { + super(uri, provider); + this.chunk = chunk; + this.response = response; + isLast = last; + } + + /** + * Return the response body's part bytes received. + * + * @return the response body's part bytes received. + */ + @Override + public byte[] getBodyPartBytes() { + byte[] bp = bytes.get(); + if (bp != null) { + return bp; + } + + ChannelBuffer b = getChannelBuffer(); + byte[] rb = b.toByteBuffer().array(); + bytes.set(rb); + return rb; + } + + @Override + public InputStream readBodyPartBytes() { + return new ByteArrayInputStream(getBodyPartBytes()); + } + + @Override + public int length() { + ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); + return b.readableBytes(); + } + + @Override + public int writeTo(OutputStream outputStream) throws IOException { + ChannelBuffer b = getChannelBuffer(); + int available = b.readableBytes(); + if (available > 0) { + b.getBytes(b.readerIndex(), outputStream, available); + } + return available; + } + + @Override + public ByteBuffer getBodyByteBuffer() { + return ByteBuffer.wrap(getBodyPartBytes()); + } + + public ChannelBuffer getChannelBuffer() { + return chunk != null ? chunk.getContent() : response.getContent(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isLast() { + return isLast; + } + + /** + * {@inheritDoc} + */ + @Override + public void markUnderlyingConnectionAsClosed() { + closeConnection = true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean closeUnderlyingConnection() { + return closeConnection; + } + + protected HttpChunk chunk() { + return chunk; + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java new file mode 100644 index 0000000000..497b100439 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java @@ -0,0 +1,77 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.HttpResponseHeaders; +import org.jboss.netty.handler.codec.http.HttpChunkTrailer; +import org.jboss.netty.handler.codec.http.HttpResponse; + +import java.net.URI; + +/** + * A class that represent the HTTP headers. + */ +public class ResponseHeaders extends HttpResponseHeaders { + + private final HttpChunkTrailer trailingHeaders; + private final HttpResponse response; + private final FluentCaseInsensitiveStringsMap headers; + + public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provider) { + super(uri, provider, false); + this.trailingHeaders = null; + this.response = response; + headers = computerHeaders(); + } + + public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunkTrailer traillingHeaders) { + super(uri, provider, true); + this.trailingHeaders = traillingHeaders; + this.response = response; + headers = computerHeaders(); + } + + private FluentCaseInsensitiveStringsMap computerHeaders() { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + for (String s : response.getHeaderNames()) { + for (String header : response.getHeaders(s)) { + h.add(s, header); + } + } + + if (trailingHeaders != null) { + for (final String s : trailingHeaders.getHeaderNames()) { + for (String header : response.getHeaders(s)) { + h.add(s, header); + } + } + } + + return h; + } + + /** + * Return the HTTP header + * + * @return an {@link com.ning.http.client.FluentCaseInsensitiveStringsMap} + */ + @Override + public FluentCaseInsensitiveStringsMap getHeaders() { + return headers; + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java new file mode 100644 index 0000000000..2539ee81f1 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java @@ -0,0 +1,75 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.HttpResponseStatus; +import org.jboss.netty.handler.codec.http.HttpResponse; + +import java.net.URI; + +/** + * A class that represent the HTTP response' status line (code + text) + */ +public class ResponseStatus extends HttpResponseStatus { + + private final HttpResponse response; + + public ResponseStatus(URI uri, HttpResponse response, AsyncHttpProvider provider) { + super(uri, provider); + this.response = response; + } + + /** + * Return the response status code + * + * @return the response status code + */ + public int getStatusCode() { + return response.getStatus().getCode(); + } + + /** + * Return the response status text + * + * @return the response status text + */ + public String getStatusText() { + return response.getStatus().getReasonPhrase(); + } + + @Override + public String getProtocolName() { + return response.getProtocolVersion().getProtocolName(); + } + + @Override + public int getProtocolMajorVersion() { + return response.getProtocolVersion().getMajorVersion(); + } + + @Override + public int getProtocolMinorVersion() { + return response.getProtocolVersion().getMinorVersion(); + } + + @Override + public String getProtocolText() { + return response.getProtocolVersion().getText(); + } + +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java new file mode 100644 index 0000000000..76df9de621 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty_4; + +import com.ning.http.util.Base64; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public final class WebSocketUtil { + public static final String MAGIC_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + + public static String getKey() { + byte[] nonce = createRandomBytes(16); + return base64Encode(nonce); + } + + public static String getAcceptKey(String key) throws UnsupportedEncodingException { + String acceptSeed = key + MAGIC_GUID; + byte[] sha1 = sha1(acceptSeed.getBytes("US-ASCII")); + return base64Encode(sha1); + } + + public static byte[] md5(byte[] bytes) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + return md.digest(bytes); + } catch (NoSuchAlgorithmException e) { + throw new InternalError("MD5 not supported on this platform"); + } + } + + public static byte[] sha1(byte[] bytes) { + try { + MessageDigest md = MessageDigest.getInstance("SHA1"); + return md.digest(bytes); + } catch (NoSuchAlgorithmException e) { + throw new InternalError("SHA-1 not supported on this platform"); + } + } + + public static String base64Encode(byte[] bytes) { + return Base64.encode(bytes); + } + + public static byte[] createRandomBytes(int size) { + byte[] bytes = new byte[size]; + + for (int i = 0; i < size; i++) { + bytes[i] = (byte) createRandomNumber(0, 255); + } + + return bytes; + } + + public static int createRandomNumber(int min, int max) { + return (int) (Math.random() * max + min); + } + +} + diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java new file mode 100644 index 0000000000..15a3747a14 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * ==================================================================== + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + */ + +package com.ning.http.client.providers.netty_4.spnego; + +import com.ning.http.util.Base64; +import org.ietf.jgss.GSSContext; +import org.ietf.jgss.GSSException; +import org.ietf.jgss.GSSManager; +import org.ietf.jgss.GSSName; +import org.ietf.jgss.Oid; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; + +/** + * SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) authentication + * scheme. + * + * @since 4.1 + */ +public class SpnegoEngine { + private static final String SPNEGO_OID = "1.3.6.1.5.5.2"; + private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; + + private final Logger log = LoggerFactory.getLogger(getClass()); + + private final SpnegoTokenGenerator spnegoGenerator; + + public SpnegoEngine(final SpnegoTokenGenerator spnegoGenerator) { + this.spnegoGenerator = spnegoGenerator; + } + + public SpnegoEngine() { + this(null); + } + + public String generateToken(String server) throws Throwable { + GSSContext gssContext = null; + byte[] token = null; // base64 decoded challenge + Oid negotiationOid = null; + + try { + log.debug("init {}", server); + /* Using the SPNEGO OID is the correct method. + * Kerberos v5 works for IIS but not JBoss. Unwrapping + * the initial token when using SPNEGO OID looks like what is + * described here... + * + * http://msdn.microsoft.com/en-us/library/ms995330.aspx + * + * Another helpful URL... + * + * http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tsec_SPNEGO_token.html + * + * Unfortunately SPNEGO is JRE >=1.6. + */ + + /** Try SPNEGO by default, fall back to Kerberos later if error */ + negotiationOid = new Oid(SPNEGO_OID); + + boolean tryKerberos = false; + try { + GSSManager manager = GSSManager.getInstance(); + GSSName serverName = manager.createName("HTTP@" + server, GSSName.NT_HOSTBASED_SERVICE); + gssContext = manager.createContext( + serverName.canonicalize(negotiationOid), negotiationOid, null, + GSSContext.DEFAULT_LIFETIME); + gssContext.requestMutualAuth(true); + gssContext.requestCredDeleg(true); + } catch (GSSException ex) { + log.error("generateToken", ex); + // BAD MECH means we are likely to be using 1.5, fall back to Kerberos MECH. + // Rethrow any other exception. + if (ex.getMajor() == GSSException.BAD_MECH) { + log.debug("GSSException BAD_MECH, retry with Kerberos MECH"); + tryKerberos = true; + } else { + throw ex; + } + + } + if (tryKerberos) { + /* Kerberos v5 GSS-API mechanism defined in RFC 1964.*/ + log.debug("Using Kerberos MECH {}", KERBEROS_OID); + negotiationOid = new Oid(KERBEROS_OID); + GSSManager manager = GSSManager.getInstance(); + GSSName serverName = manager.createName("HTTP@" + server, GSSName.NT_HOSTBASED_SERVICE); + gssContext = manager.createContext( + serverName.canonicalize(negotiationOid), negotiationOid, null, + GSSContext.DEFAULT_LIFETIME); + gssContext.requestMutualAuth(true); + gssContext.requestCredDeleg(true); + } + + // TODO suspicious: this will always be null because no value has been assigned before. Assign directly? + if (token == null) { + token = new byte[0]; + } + + token = gssContext.initSecContext(token, 0, token.length); + if (token == null) { + throw new Exception("GSS security context initialization failed"); + } + + /* + * IIS accepts Kerberos and SPNEGO tokens. Some other servers Jboss, Glassfish? + * seem to only accept SPNEGO. Below wraps Kerberos into SPNEGO token. + */ + if (spnegoGenerator != null && negotiationOid.toString().equals(KERBEROS_OID)) { + token = spnegoGenerator.generateSpnegoDERObject(token); + } + + gssContext.dispose(); + + String tokenstr = new String(Base64.encode(token)); + log.debug("Sending response '{}' back to the server", tokenstr); + + return tokenstr; + } catch (GSSException gsse) { + log.error("generateToken", gsse); + if (gsse.getMajor() == GSSException.DEFECTIVE_CREDENTIAL + || gsse.getMajor() == GSSException.CREDENTIALS_EXPIRED) + throw new Exception(gsse.getMessage(), gsse); + if (gsse.getMajor() == GSSException.NO_CRED) + throw new Exception(gsse.getMessage(), gsse); + if (gsse.getMajor() == GSSException.DEFECTIVE_TOKEN + || gsse.getMajor() == GSSException.DUPLICATE_TOKEN + || gsse.getMajor() == GSSException.OLD_TOKEN) + throw new Exception(gsse.getMessage(), gsse); + // other error + throw new Exception(gsse.getMessage()); + } catch (IOException ex) { + throw new Exception(ex.getMessage()); + } + } +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java new file mode 100644 index 0000000000..ff112dbdf7 --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * ==================================================================== + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package com.ning.http.client.providers.netty_4.spnego; + +import java.io.IOException; + +/** + * Abstract SPNEGO token generator. Implementations should take an Kerberos ticket and transform + * into a SPNEGO token. + *

+ * Implementations of this interface are expected to be thread-safe. + * + * @since 4.1 + */ +public interface SpnegoTokenGenerator { + + byte[] generateSpnegoDERObject(byte[] kerberosTicket) throws IOException; + +} diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java new file mode 100644 index 0000000000..686dcde44c --- /dev/null +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +/* + * Copyright 2010 Bruno de Carvalho + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.ning.http.client.providers.netty_4.util; + +import org.jboss.netty.channel.Channel; +import org.jboss.netty.channel.ChannelFuture; +import org.jboss.netty.channel.group.ChannelGroup; +import org.jboss.netty.channel.group.ChannelGroupFuture; +import org.jboss.netty.channel.group.DefaultChannelGroup; +import org.jboss.netty.channel.group.DefaultChannelGroupFuture; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +/** + * Extension of {@link DefaultChannelGroup} that's used mainly as a cleanup container, where {@link #close()} is only + * supposed to be called once. + * + * @author Bruno de Carvalho + */ +public class CleanupChannelGroup extends DefaultChannelGroup { + + private final static Logger logger = LoggerFactory.getLogger(CleanupChannelGroup.class); + + // internal vars -------------------------------------------------------------------------------------------------- + + private final AtomicBoolean closed; + private final ReentrantReadWriteLock lock; + + // constructors --------------------------------------------------------------------------------------------------- + + public CleanupChannelGroup() { + this.closed = new AtomicBoolean(false); + this.lock = new ReentrantReadWriteLock(); + } + + public CleanupChannelGroup(String name) { + super(name); + this.closed = new AtomicBoolean(false); + this.lock = new ReentrantReadWriteLock(); + } + + // DefaultChannelGroup -------------------------------------------------------------------------------------------- + + @Override + public ChannelGroupFuture close() { + this.lock.writeLock().lock(); + try { + if (!this.closed.getAndSet(true)) { + // First time close() is called. + return super.close(); + } else { + Collection futures = new ArrayList(); + logger.debug("CleanupChannelGroup Already closed"); + return new DefaultChannelGroupFuture(ChannelGroup.class.cast(this), futures); + } + } finally { + this.lock.writeLock().unlock(); + } + } + + @Override + public boolean add(Channel channel) { + // Synchronization must occur to avoid add() and close() overlap (thus potentially leaving one channel open). + // This could also be done by synchronizing the method itself but using a read lock here (rather than a + // synchronized() block) allows multiple concurrent calls to add(). + this.lock.readLock().lock(); + try { + if (this.closed.get()) { + // Immediately close channel, as close() was already called. + channel.close(); + return false; + } + + return super.add(channel); + } finally { + this.lock.readLock().unlock(); + } + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java new file mode 100644 index 0000000000..d98b1539f2 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import static org.testng.Assert.assertEquals; + +import java.util.concurrent.Executors; + +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.Response; +import com.ning.http.client.async.AbstractBasicTest; + +public class NettyAsyncHttpProviderTest extends AbstractBasicTest { + + @Test + public void bossThreadPoolExecutor() throws Throwable { + NettyAsyncHttpProviderConfig conf = new NettyAsyncHttpProviderConfig(); + conf.setBossExecutorService(Executors.newSingleThreadExecutor()); + + AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setAsyncHttpClientProviderConfig(conf).build(); + AsyncHttpClient c = getAsyncHttpClient(cf); + try { + Response r = c.prepareGet(getTargetUrl()).execute().get(); + assertEquals(r.getStatusCode(), 200); + } finally { + c.close(); + } + } + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java new file mode 100644 index 0000000000..7099604d01 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.AsyncHttpProviderConfig; +import com.ning.http.client.async.AsyncProvidersBasicTest; + +@Test +public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + + @Override + protected AsyncHttpProviderConfig getProviderConfig() { + final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); + config.addProperty("tcpNoDelay", true); + return config; + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java new file mode 100644 index 0000000000..f537cb3bb5 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.providers.netty; + +import com.ning.http.client.providers.netty_4.NettyAsyncHttpProvider; +import static org.testng.Assert.assertEquals; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ChannelPipeline; +import org.jboss.netty.channel.ChannelPipelineFactory; +import org.jboss.netty.channel.MessageEvent; +import org.jboss.netty.channel.SimpleChannelHandler; +import org.jboss.netty.handler.codec.http.HttpMessage; +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.Request; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.async.AbstractBasicTest; + +public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return new AsyncHttpClient(new CopyEncodingNettyAsyncHttpProvider(config), config); + } + + @Test(groups = { "standalone", "netty_provider" }) + public void asyncPipelineTest() throws Throwable { + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build()); + try { + final CountDownLatch l = new CountDownLatch(1); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); + p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + @Override + public Response onCompleted(Response response) throws Exception { + try { + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("X-Original-Content-Encoding"), ""); + } finally { + l.countDown(); + } + return response; + } + }).get(); + if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { + Assert.fail("Timeout out"); + } + } finally { + p.close(); + } + } + + private static class CopyEncodingNettyAsyncHttpProvider extends NettyAsyncHttpProvider { + public CopyEncodingNettyAsyncHttpProvider(AsyncHttpClientConfig config) { + super(config); + } + + protected ChannelPipelineFactory createPlainPipelineFactory() { + final ChannelPipelineFactory pipelineFactory = super.createPlainPipelineFactory(); + return new ChannelPipelineFactory() { + public ChannelPipeline getPipeline() throws Exception { + ChannelPipeline pipeline = pipelineFactory.getPipeline(); + pipeline.addBefore("inflater", "copyEncodingHeader", new CopyEncodingHandler()); + return pipeline; + } + }; + } + } + + private static class CopyEncodingHandler extends SimpleChannelHandler { + @Override + public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { + Object msg = e.getMessage(); + if (msg instanceof HttpMessage) { + HttpMessage m = (HttpMessage) msg; + // for test there is no Content-Encoding header so just hard coding value + // for verification + m.setHeader("X-Original-Content-Encoding", ""); + } + ctx.sendUpstream(e); + } + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java new file mode 100644 index 0000000000..324894c632 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.providers.netty; + +import com.ning.http.client.providers.netty_4.ResponseStatus; +import com.ning.http.client.providers.netty_4.NettyResponse; +import com.ning.http.client.Cookie; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.HttpResponseHeaders; +import org.testng.annotations.Test; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.TimeZone; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +/** + * @author Benjamin Hanzelmann + */ +public class NettyAsyncResponseTest { + + @Test(groups = "standalone") + public void testCookieParseExpires() { + // e.g. "Sun, 06-Feb-2012 03:45:24 GMT"; + SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US); + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + + Date date = new Date(System.currentTimeMillis() + 60000); // sdf.parse( dateString ); + final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); + + NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + @Override + public FluentCaseInsensitiveStringsMap getHeaders() { + return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); + } + }, null); + + List cookies = response.getCookies(); + assertEquals(cookies.size(), 1); + + Cookie cookie = cookies.get(0); + assertTrue(cookie.getMaxAge() > 55 && cookie.getMaxAge() < 61, ""); + } + + @Test(groups = "standalone") + public void testCookieParseMaxAge() { + final String cookieDef = "efmembercheck=true; max-age=60; path=/; domain=.eclipse.org"; + NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + @Override + public FluentCaseInsensitiveStringsMap getHeaders() { + return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); + } + }, null); + List cookies = response.getCookies(); + assertEquals(cookies.size(), 1); + + Cookie cookie = cookies.get(0); + assertEquals(cookie.getMaxAge(), 60); + } + + @Test(groups = "standalone") + public void testCookieParseWeirdExpiresValue() { + final String cookieDef = "efmembercheck=true; expires=60; path=/; domain=.eclipse.org"; + NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + @Override + public FluentCaseInsensitiveStringsMap getHeaders() { + return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); + } + }, null); + + List cookies = response.getCookies(); + assertEquals(cookies.size(), 1); + + Cookie cookie = cookies.get(0); + assertEquals(cookie.getMaxAge(), 60); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java new file mode 100644 index 0000000000..0b59867f6f --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.AsyncStreamHandlerTest; + +public class NettyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java new file mode 100644 index 0000000000..ab10afbcc9 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.AsyncStreamLifecycleTest; + +public class NettyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java new file mode 100644 index 0000000000..94dcab0e91 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.AuthTimeoutTest; + +public class NettyAuthTimeoutTest extends AuthTimeoutTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java new file mode 100644 index 0000000000..7cdb73dbf1 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.BasicAuthTest; + +@Test +public class NettyBasicAuthTest extends BasicAuthTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + + @Override + @Test + public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { + super.redirectAndBasicAuthTest(); // To change body of overridden methods use File | Settings | File Templates. + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java new file mode 100644 index 0000000000..45025647eb --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.BasicHttpsTest; + +public class NettyBasicHttpsTest extends BasicHttpsTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java new file mode 100644 index 0000000000..908b733ca9 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.BodyChunkTest; + +public class NettyBodyChunkTest extends BodyChunkTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java new file mode 100644 index 0000000000..54631c7586 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.BodyDeferringAsyncHandlerTest; + +public class NettyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java new file mode 100644 index 0000000000..739821b277 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ByteBufferCapacityTest; + +public class NettyByteBufferCapacityTest extends ByteBufferCapacityTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java new file mode 100644 index 0000000000..186a5184c0 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java @@ -0,0 +1,12 @@ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ChunkingTest; + +public class NettyChunkingTest extends ChunkingTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java new file mode 100644 index 0000000000..73c37ce246 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ComplexClientTest; + +public class NettyComplexClientTest extends ComplexClientTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java new file mode 100644 index 0000000000..51ede7aa77 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; + +import java.util.concurrent.TimeUnit; + +import org.jboss.netty.channel.Channel; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.ConnectionsPool; +import com.ning.http.client.async.ConnectionPoolTest; + +public class NettyConnectionPoolTest extends ConnectionPoolTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + + @Override + public void testInvalidConnectionsPool() { + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return false; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return false; + } + + public void destroy() { + + } + }; + + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); + try { + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNotNull(exception); + assertEquals(exception.getMessage(), "Too many connections -1"); + } finally { + client.close(); + } + } + + @Override + public void testValidConnectionsPool() { + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return true; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { + + } + }; + + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); + try { + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNull(exception); + } finally { + client.close(); + } + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java new file mode 100644 index 0000000000..005948931e --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.DigestAuthTest; + +public class NettyDigestAuthTest extends DigestAuthTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java new file mode 100644 index 0000000000..3c501757f3 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.EmptyBodyTest; + +public class NettyEmptyBodyTest extends EmptyBodyTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java new file mode 100644 index 0000000000..0347132555 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ErrorResponseTest; + +public class NettyErrorResponseTest extends ErrorResponseTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java new file mode 100644 index 0000000000..698ea253c1 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.Expect100ContinueTest; + +public class NettyExpect100ContinueTest extends Expect100ContinueTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java new file mode 100644 index 0000000000..459d425140 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.FilePartLargeFileTest; + +public class NettyFilePartLargeFileTest extends FilePartLargeFileTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java new file mode 100644 index 0000000000..97f0534c00 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.FilterTest; + +public class NettyFilterTest extends FilterTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java new file mode 100644 index 0000000000..a980551662 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.FollowingThreadTest; + +public class NettyFollowingThreadTest extends FollowingThreadTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java new file mode 100644 index 0000000000..d734236157 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.Head302Test; + +public class NettyHead302Test extends Head302Test { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java new file mode 100644 index 0000000000..30e7397633 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.HostnameVerifierTest; + +public class NettyHostnameVerifierTest extends HostnameVerifierTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java new file mode 100644 index 0000000000..e9afb6598b --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.HttpToHttpsRedirectTest; + +public class NettyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java new file mode 100644 index 0000000000..eb51fa21a9 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.IdleStateHandlerTest; + +public class NettyIdleStateHandlerTest extends IdleStateHandlerTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java new file mode 100644 index 0000000000..d963695dd3 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.InputStreamTest; + +public class NettyInputStreamTest extends InputStreamTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java new file mode 100644 index 0000000000..6df542b88c --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ListenableFutureTest; + +public class NettyListenableFutureTest extends ListenableFutureTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java new file mode 100644 index 0000000000..e7bd9d4b48 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2010-2012 Sonatype, Inc. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Apache License v2.0 which accompanies this distribution. + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v10.html + * The Apache License v2.0 is available at + * http://www.apache.org/licenses/LICENSE-2.0.html + * You may elect to redistribute this code under either of these licenses. + *******************************************************************************/ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.MaxConnectionsInThreads; + +public class NettyMaxConnectionsInThreads extends MaxConnectionsInThreads { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java new file mode 100644 index 0000000000..80f48e755d --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.MaxTotalConnectionTest; + +public class NettyMaxTotalConnectionTest extends MaxTotalConnectionTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java new file mode 100644 index 0000000000..b0496db3e5 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.MultipartUploadTest; + +/** + * @author dominict + */ +public class NettyMultipartUploadTest extends MultipartUploadTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java new file mode 100644 index 0000000000..602755130a --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.MultipleHeaderTest; + +public class NettyMultipleHeaderTest extends MultipleHeaderTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java new file mode 100644 index 0000000000..4d19e4b1a2 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.NoNullResponseTest; + +public class NettyNoNullResponseTest extends NoNullResponseTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java new file mode 100644 index 0000000000..c6e1aedb92 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.NonAsciiContentLengthTest; + +public class NettyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java new file mode 100644 index 0000000000..a8c2b0e3f7 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ParamEncodingTest; + +public class NettyParamEncodingTest extends ParamEncodingTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java new file mode 100644 index 0000000000..13dbd1fea2 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PerRequestRelative302Test; + +public class NettyPerRequestRelative302Test extends PerRequestRelative302Test { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java new file mode 100644 index 0000000000..9e7199ea68 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PerRequestTimeoutTest; + +public class NettyPerRequestTimeoutTest extends PerRequestTimeoutTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java new file mode 100644 index 0000000000..138bf45d03 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PostRedirectGetTest; + +public class NettyPostRedirectGetTest extends PostRedirectGetTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java new file mode 100644 index 0000000000..b1e47660ea --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PostWithQSTest; + +public class NettyPostWithQSTest extends PostWithQSTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java new file mode 100644 index 0000000000..a37b4bf5d3 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java @@ -0,0 +1,36 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; + +public class NettyProviderUtil { + + public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { + // FIXME why do tests fail with this set up? Seems like we have a race condition + // if (config == null) { + // config = new AsyncHttpClientConfig.Builder().build(); + // } + // return new AsyncHttpClient(new NettyAsyncHttpProvider(config), config); + + if (config == null) { + return new AsyncHttpClient(); + } else { + return new AsyncHttpClient(config); + } + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java new file mode 100644 index 0000000000..3f82fbea20 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProxyTest; + +public class NettyProxyTest extends ProxyTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java new file mode 100644 index 0000000000..7c24784de0 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ProxyTunnellingTest; + +public class NettyProxyTunnellingTest extends ProxyTunnellingTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java new file mode 100644 index 0000000000..e2fbc403ad --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.PutLargeFileTest; + +public class NettyPutLargeFileTest extends PutLargeFileTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java new file mode 100644 index 0000000000..659a910648 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.QueryParametersTest; + +public class NettyQueryParametersTest extends QueryParametersTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java new file mode 100644 index 0000000000..5f79e9861c --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.RC10KTest; + +public class NettyRC10KTest extends RC10KTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java new file mode 100644 index 0000000000..55337b8488 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.AsyncHttpProviderConfig; +import com.ning.http.client.async.RedirectConnectionUsageTest; + +public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + + @Override + protected AsyncHttpProviderConfig getProviderConfig() { + final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); + if (System.getProperty("blockingio") != null) { + config.setUseBlockingIO(true); + } + return config; + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java new file mode 100644 index 0000000000..89c098bbc6 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.Relative302Test; + +public class NettyRelative302Test extends Relative302Test { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java new file mode 100644 index 0000000000..438b322319 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.RemoteSiteTest; + +public class NettyRemoteSiteTest extends RemoteSiteTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java new file mode 100644 index 0000000000..991d2003d2 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Future; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.continuation.Continuation; +import org.eclipse.jetty.continuation.ContinuationSupport; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncCompletionHandler; +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.Response; +import com.ning.http.client.async.AbstractBasicTest; + +public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { + private static final String MSG = "Enough is enough."; + private static final int SLEEPTIME_MS = 1000; + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + + @Override + public AbstractHandler configureHandler() throws Exception { + return new SlowHandler(); + } + + private class SlowHandler extends AbstractHandler { + public void handle(String target, Request baseRequest, HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { + response.setStatus(HttpServletResponse.SC_OK); + final Continuation continuation = ContinuationSupport.getContinuation(request); + continuation.suspend(); + new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(SLEEPTIME_MS); + response.getOutputStream().print(MSG); + response.getOutputStream().flush(); + continuation.complete(); + } catch (InterruptedException e) { + log.error(e.getMessage(), e); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + }).start(); + baseRequest.setHandled(true); + } + } + + @Test(groups = { "standalone", "netty_provider" }) + public void testRequestTimeout() throws IOException { + final Semaphore requestThrottle = new Semaphore(1); + + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + try { + final CountDownLatch latch = new CountDownLatch(2); + + final List tooManyConnections = new ArrayList(2); + for (int i = 0; i < 2; i++) { + new Thread(new Runnable() { + + public void run() { + try { + requestThrottle.acquire(); + Future responseFuture = null; + try { + responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(SLEEPTIME_MS / 2).execute(new AsyncCompletionHandler() { + + @Override + public Response onCompleted(Response response) throws Exception { + requestThrottle.release(); + return response; + } + + @Override + public void onThrowable(Throwable t) { + requestThrottle.release(); + } + }); + } catch (Exception e) { + tooManyConnections.add(e); + } + + if (responseFuture != null) + responseFuture.get(); + } catch (Exception e) { + } finally { + latch.countDown(); + } + + } + }).start(); + + } + + try { + latch.await(30, TimeUnit.SECONDS); + } catch (Exception e) { + fail("failed to wait for requests to complete"); + } + + assertTrue(tooManyConnections.size() == 0, "Should not have any connection errors where too many connections have been attempted"); + } finally { + client.close(); + } + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java new file mode 100644 index 0000000000..0e5779b9fa --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.RetryRequestTest; + +public class NettyRetryRequestTest extends RetryRequestTest{ + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java new file mode 100644 index 0000000000..2173bc046b --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.SimpleAsyncHttpClientTest; + +public class NettySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { + + /** + * Not Used with {@link com.ning.http.client.SimpleAsyncHttpClient} + * @param config + * @return + */ + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return null; + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java new file mode 100644 index 0000000000..4508b550a1 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.TransferListenerTest; + +public class NettyTransferListenerTest extends TransferListenerTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java new file mode 100644 index 0000000000..7251633ed4 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.WebDavBasicTest; + +public class NettyWebDavBasicTest extends WebDavBasicTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java new file mode 100644 index 0000000000..a1731a5235 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.async.ZeroCopyFileTest; + +public class NettyZeroCopyFileTest extends ZeroCopyFileTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java new file mode 100644 index 0000000000..2ccc601bbd --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java @@ -0,0 +1,332 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.ListenableFuture; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.ServerSocket; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutionException; + +import static org.testng.Assert.assertTrue; + + +public class RetryNonBlockingIssue { + + private URI servletEndpointUri; + + private Server server; + + private int port1; + + public static int findFreePort() throws IOException { + ServerSocket socket = null; + + try { + // 0 is open a socket on any free port + socket = new ServerSocket(0); + return socket.getLocalPort(); + } finally { + if (socket != null) { + socket.close(); + } + } + } + + + @BeforeMethod + public void setUp() throws Exception { + server = new Server(); + + port1 = findFreePort(); + + Connector listener = new SelectChannelConnector(); + listener.setHost("127.0.0.1"); + listener.setPort(port1); + + server.addConnector(listener); + + + ServletContextHandler context = new + ServletContextHandler(ServletContextHandler.SESSIONS); + + context.setContextPath("/"); + server.setHandler(context); + context.addServlet(new ServletHolder(new + MockExceptionServlet()), "/*"); + + server.start(); + + servletEndpointUri = new URI("http://127.0.0.1:" + port1 + "/"); + } + + @AfterMethod + public void stop() { + + try { + if (server != null) server.stop(); + } catch (Exception e) { + } + + + } + + private ListenableFuture testMethodRequest(AsyncHttpClient + fetcher, int requests, String action, String id) throws IOException { + RequestBuilder builder = new RequestBuilder("GET"); + builder.addQueryParameter(action, "1"); + + builder.addQueryParameter("maxRequests", "" + requests); + builder.addQueryParameter("id", id); + builder.setUrl(servletEndpointUri.toString()); + com.ning.http.client.Request r = builder.build(); + return fetcher.executeRequest(r); + + } + + /** + * Tests that a head request can be made + * + * @throws IOException + * @throws ExecutionException + * @throws InterruptedException + */ + @Test + public void testRetryNonBlocking() throws IOException, InterruptedException, + ExecutionException { + AsyncHttpClient c = null; + List> res = new + ArrayList>(); + try { + AsyncHttpClientConfig.Builder bc = + new AsyncHttpClientConfig.Builder(); + + bc.setAllowPoolingConnection(true); + bc.setMaximumConnectionsTotal(100); + bc.setConnectionTimeoutInMs(60000); + bc.setRequestTimeoutInMs(30000); + + NettyAsyncHttpProviderConfig config = new + NettyAsyncHttpProviderConfig(); + + bc.setAsyncHttpClientProviderConfig(config); + c = new AsyncHttpClient(bc.build()); + + for (int i = 0; i < 32; i++) { + res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + } + + StringBuilder b = new StringBuilder(); + for (ListenableFuture r : res) { + Response theres = r.get(); + b.append("==============\r\n"); + b.append("Response Headers\r\n"); + Map> heads = theres.getHeaders(); + b.append(heads + "\r\n"); + b.append("==============\r\n"); + assertTrue(heads.size() > 0); + } + System.out.println(b.toString()); + System.out.flush(); + + } + finally { + if (c != null) c.close(); + } + } + + @Test + public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, + ExecutionException { + AsyncHttpClient c = null; + List> res = new + ArrayList>(); + try { + AsyncHttpClientConfig.Builder bc = + new AsyncHttpClientConfig.Builder(); + + bc.setAllowPoolingConnection(true); + bc.setMaximumConnectionsTotal(100); + bc.setConnectionTimeoutInMs(60000); + bc.setRequestTimeoutInMs(30000); + + NettyAsyncHttpProviderConfig config = new + NettyAsyncHttpProviderConfig(); + config.setAsyncConnect(true); + + bc.setAsyncHttpClientProviderConfig(config); + c = new AsyncHttpClient(bc.build()); + + for (int i = 0; i < 32; i++) { + res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + } + + StringBuilder b = new StringBuilder(); + for (ListenableFuture r : res) { + Response theres = r.get(); + b.append("==============\r\n"); + b.append("Response Headers\r\n"); + Map> heads = theres.getHeaders(); + b.append(heads + "\r\n"); + b.append("==============\r\n"); + assertTrue(heads.size() > 0); + } + System.out.println(b.toString()); + System.out.flush(); + + } + finally { + if (c != null) c.close(); + } + } + + @Test + public void testRetryBlocking() throws IOException, InterruptedException, + ExecutionException { + AsyncHttpClient c = null; + List> res = new + ArrayList>(); + try { + AsyncHttpClientConfig.Builder bc = + new AsyncHttpClientConfig.Builder(); + + bc.setAllowPoolingConnection(true); + bc.setMaximumConnectionsTotal(100); + bc.setConnectionTimeoutInMs(30000); + bc.setRequestTimeoutInMs(30000); + + NettyAsyncHttpProviderConfig config = new + NettyAsyncHttpProviderConfig(); + config.setUseBlockingIO(true); + + bc.setAsyncHttpClientProviderConfig(config); + c = new AsyncHttpClient(bc.build()); + + for (int i = 0; i < 32; i++) { + res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + } + + StringBuilder b = new StringBuilder(); + for (ListenableFuture r : res) { + Response theres = r.get(); + b.append("==============\r\n"); + b.append("Response Headers\r\n"); + Map> heads = theres.getHeaders(); + b.append(heads + "\r\n"); + b.append("==============\r\n"); + assertTrue(heads.size() > 0); + + } + System.out.println(b.toString()); + System.out.flush(); + + } + finally { + if (c != null) c.close(); + } + } + + @SuppressWarnings("serial") + public class MockExceptionServlet extends HttpServlet { + + private Map requests = new + ConcurrentHashMap(); + + private synchronized int increment(String id) { + int val = 0; + if (requests.containsKey(id)) { + Integer i = requests.get(id); + val = i + 1; + requests.put(id, val); + } else { + requests.put(id, 1); + val = 1; + } + System.out.println("REQUESTS: " + requests); + return val; + } + + public void service(HttpServletRequest req, HttpServletResponse res) + throws ServletException, IOException { + String maxRequests = req.getParameter("maxRequests"); + int max = 0; + try { + max = Integer.parseInt(maxRequests); + } + catch (NumberFormatException e) { + max = 3; + } + String id = req.getParameter("id"); + int requestNo = increment(id); + String servlet = req.getParameter("servlet"); + String io = req.getParameter("io"); + String error = req.getParameter("500"); + + + if (requestNo >= max) { + res.setHeader("Success-On-Attempt", "" + requestNo); + res.setHeader("id", id); + if (servlet != null && servlet.trim().length() > 0) + res.setHeader("type", "servlet"); + if (error != null && error.trim().length() > 0) + res.setHeader("type", "500"); + if (io != null && io.trim().length() > 0) + res.setHeader("type", "io"); + res.setStatus(200); + res.setContentLength(0); + return; + } + + + res.setStatus(200); + res.setContentLength(100); + res.setContentType("application/octet-stream"); + + res.flushBuffer(); + + if (servlet != null && servlet.trim().length() > 0) + throw new ServletException("Servlet Exception"); + + if (io != null && io.trim().length() > 0) + throw new IOException("IO Exception"); + + if (error != null && error.trim().length() > 0) + res.sendError(500, "servlet process was 500"); + } + + } +} + diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java new file mode 100644 index 0000000000..ef4d8d606f --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.netty.NettyProviderUtil; +import com.ning.http.client.websocket.ByteMessageTest; + +public class NettyByteMessageTest extends ByteMessageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java new file mode 100644 index 0000000000..3e764e3d8e --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package com.ning.http.client.providers.netty.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.netty.NettyProviderUtil; +import com.ning.http.client.websocket.CloseCodeReasonMessageTest; + +public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java new file mode 100644 index 0000000000..a30eacbc52 --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.netty.NettyProviderUtil; +import com.ning.http.client.websocket.RedirectTest; + +public class NettyRedirectTest extends RedirectTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + +} diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java new file mode 100644 index 0000000000..b62c77cd2e --- /dev/null +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty.websocket; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.providers.netty.NettyProviderUtil; +import com.ning.http.client.websocket.TextMessageTest; + +public class NettyTextMessageTest extends TextMessageTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } +} diff --git a/providers/netty-4/src/test/resources/300k.png b/providers/netty-4/src/test/resources/300k.png new file mode 100644 index 0000000000000000000000000000000000000000..bff4a8598918ed4945bc27db894230d8b5b7cc80 GIT binary patch literal 265495 zcmV)wK$O3UP)4Tx0C)k_S!Y-jOSA6TybDWOa?Uv;S#r)f3c`|eT%s5Vq5=jGkfbOeQNVzJ zh$0}MqDW9c0mXoTprU{v@eX><`M&#n_x`(oZtt@_?^ab;_fFMxSJeQ(wn&bM2tm*R z5E@2_vNh7>b#`&(#ZCYu{J{b>AWZg-j?l5THV6M}`#B1rJ?4nip058@?0;s^`}jtC z0{~gWY%iZ^?@$;w0f5l;j)^gK?Ay7^5D+m@x`oAdDyXu>T*tw1>TZV>Ifw zjJ>TM0BBYKaMWaSls^DOL72`P>+KKgA?gEwVF>dH3@SLKmISf(2yATe*JC?a8Df; zV!3AE#SN|_M0^t{EX!1t}!4OC>*_(?IwmE-rxY^zs;JFY=zzl={Ul0SL z;64mU0dt@S^#AImfFB^koLHC_4T8ZZ7>B|m!r?LDFy{SBPVYY`hQG)8!{h$DMqc0z z%f|dO=bzbl;W_`-83=q}{5PEp&#}kbTV1qAV9LMd{99sA-|yAP*2&JxZvDL`lrTyj zrHIl+X`nPws(=^8jA92;sC_6ElnzP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d7X^3!?*hHgmrJvVnCtlZj|4E5ia_&VB#^X$) z4AT<=`bCww&up5svuV-m7VZxbGG9SX`~Gl2>$Tao_fGFw9b>j5d}rm9^}Byry=wXy z?!#@%-jp5~8Q!<+N~Hg@LUw`1hAp0Ag~~5{G{l6rpXW5{IkD`ajaXH8NKLQCgT?FQ zv^Os+otU?{p8J=gY0}5vNmYz0)@PP{+_xfdLg$L+`wyd@&S#s{ofg+n9jcnb=wtow zyr&j(V+#XQV}qE#=dv>_tVS0SM zb^Yo%sXLrK}p1`GzeOd@Pw zodt4u{6e(vA2`HO+B92w!wh#|NKWxz^=|T`qCJkbBGpxg?9xA-vrW8om3MhUa?$C( Q>4ou<|EC`eTz_&S0BPL&!vFvP literal 0 HcmV?d00001 diff --git a/providers/netty-4/src/test/resources/gzip.txt.gz b/providers/netty-4/src/test/resources/gzip.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..80aeb98d2b03a00c13d7c2725d3e281f47a57d81 GIT binary patch literal 47 zcmb2|=HR#?o9WBIoL-e#pjT2+!r;CBl#a)_^V*(gwKoQx@Hl(&Bs)Xnt@zJE3=9ka Do?Q|u literal 0 HcmV?d00001 diff --git a/providers/netty-4/src/test/resources/logback-test.xml b/providers/netty-4/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..4acf278710 --- /dev/null +++ b/providers/netty-4/src/test/resources/logback-test.xml @@ -0,0 +1,13 @@ + + + + %d [%thread] %level %logger - %m%n + + + + + + + + + \ No newline at end of file diff --git a/providers/netty-4/src/test/resources/realm.properties b/providers/netty-4/src/test/resources/realm.properties new file mode 100644 index 0000000000..bc9faad66a --- /dev/null +++ b/providers/netty-4/src/test/resources/realm.properties @@ -0,0 +1 @@ +user=admin, admin \ No newline at end of file diff --git a/providers/netty-4/src/test/resources/ssltest-cacerts.jks b/providers/netty-4/src/test/resources/ssltest-cacerts.jks new file mode 100644 index 0000000000000000000000000000000000000000..9c1ffbe49a7b27a250fc7d00fedd45405744fc38 GIT binary patch literal 29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q% zsgqZxO;|@)yV;Qf{a@bi(_EC};ihIUSJTZn_Oa;jzOKEk!wH4^|gKF_(#8tA4@lW=+Zd(SpK;7LM`c(&h7%?_;A_W(D-b*&d+B392QxIJIT3K8mjl zD{82bd5MoMGV?JzzH+EdLh~lFT=|uA+s^a;bW5`p^R?;g?M?mD*u4DX)2wTJ_K$`~ z#fkJvE@N^%ad{7lPReD;f9}%Zm{iq$IVx_bD+t@EUm~~$zKvw#WsG;v> z2OhmMYxnZ|yX#+->E!eXE~-yw$zt*nR+kRnUzKmhKB-f`D8BgiSiiiy@i@=+UFyYfkd(N8_S4}x2gVV#U}iarSjKkO6^c`eDA}GZT?GhqaIO2{k-+j; z(NrA!B5fX{#$yzgxAe|(3BBY~#J{_?Q#?sKe-+Kpl%+>rqn~tL63ucc$=2VLkA%>! zEXzD54_V8;pn2gfD!D02i%j6>!J;Bs#M3)@hGls#7MTMX#cJg|cChX#T{ZLWJ=GE! zU5K~hP9gnS1$iTKXu&(?HoNMF6kM`PJ!9O|sN22V0yYKe@03qG# A2><{9 literal 0 HcmV?d00001 diff --git a/providers/netty-4/src/test/resources/ssltest-keystore.jks b/providers/netty-4/src/test/resources/ssltest-keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..a95b7c5f4fbe9f9cba881475b3854861cb182263 GIT binary patch literal 1445 zcmezO_TO6u1_mY|W&~rFV#CB@AV=73#>MqOiCqRwOxq0j*toRW7+Dy#m;@OaSs7TG zm==Ahum1KTDl}5e`kqee9lk>GwJCjfCp7D~ov*(x`E$+b6=xjpnr%q9^|4>@`!@E+ zi}uIu{+!!*!-C=Vp@lxxA&;l{Nk*7CEQ|PTX1Z`q#lHsu!v5(6#vw9KEZxO~bf#Zb zE?Il~dGkX>A=cv6>qSIP+-5VqZyGyUOVDFdgS=Z}_JfL#JMP&==)6<6Sh2b9`t5ry zzPG<5v@n$N`kc{=4oZz#{&v|`N2`6xPN7puSbB3j=P~RMOPb*@xlF*s=gqB!uVbHl z2<4ScJw8W+`&G{xr?Pq@ONfRqihy3>ye<~BGoZ+h#{_(N>D|Fs2ur2%ps7pF>I zDyq!Qu>EItI4*4OBcD3qb*tuHm9|&fwWayCaOz5XseaVX$*ge1Rv~TixJ>9JFm50^r<=XRnFV)>E5XyX* z`20}6VuG$_v3GNlivo}JLPd+C-52%4{>}87eQM$FyR%#4dd~lTX}Zdhn78D zytSvNb1s=yot+rkvqPAJ?zzMvo@KDD8@ayqLK67Bw^~d=)8$1RIHVRV%M2zL;>ym3BqC9{cp0q5C^#N!jg;Oqrb#c%Au7>88ae?(Y>*m{+_%clwSNmXJJ#2fue( zuJwJi@zm*L*}2hczl+}&I(v&Z{!e{~)NHj6dxQ**W%OyC*S>kOC&pB3PjK_JM&HO^ zRTfe!{SI<_w7t5|Kk+(W=VGl)mKCeLEB4tu{LIA6$iRr~JYXVV2D)pqdW7|<3-SD= zw~jv1mb8iy&d&Q#`!qf`dG>O9pQr~tnf__VzSRmDJ@rmb-s#wH?mS~d;Zu_jv8;Q9 z_!+M@r%rmY%EEvlj5C;{;O@<$*r}E~J@OlQHe8oaPUyCHC1O(4B!1-dme<8*cPnpb uEt|hX&w*2cNrXr4-_Nv(?*ugF{&{FJ?S$IdRLMmwGq0yv95LW9JOTidn?aWV literal 0 HcmV?d00001 diff --git a/providers/netty-4/src/test/resources/textfile.txt b/providers/netty-4/src/test/resources/textfile.txt new file mode 100644 index 0000000000..87daee60a9 --- /dev/null +++ b/providers/netty-4/src/test/resources/textfile.txt @@ -0,0 +1 @@ +filecontent: hello \ No newline at end of file diff --git a/providers/netty-4/src/test/resources/textfile2.txt b/providers/netty-4/src/test/resources/textfile2.txt new file mode 100644 index 0000000000..6a91fe609c --- /dev/null +++ b/providers/netty-4/src/test/resources/textfile2.txt @@ -0,0 +1 @@ +filecontent: hello2 \ No newline at end of file From c83340cb8eed7c8e2ceb7516079c575fcefc76d1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 21 Mar 2013 19:33:58 +1100 Subject: [PATCH 0337/2844] Work on porting to netty 4 --- providers/netty-4/pom.xml | 10 +- .../providers/netty_4/BodyChunkedInput.java | 15 +- .../providers/netty_4/BodyFileRegion.java | 12 +- .../netty_4/NettyAsyncHttpProvider.java | 473 +++++++++--------- .../netty_4/NettyAsyncHttpProviderConfig.java | 30 +- .../netty_4/NettyConnectListener.java | 40 +- .../netty_4/NettyConnectionsPool.java | 18 +- .../providers/netty_4/NettyResponse.java | 22 +- .../netty_4/NettyResponseFuture.java | 17 +- .../providers/netty_4/NettyWebSocket.java | 12 +- .../client/providers/netty_4/Protocol.java | 13 +- .../providers/netty_4/ResponseBodyPart.java | 28 +- .../providers/netty_4/ResponseHeaders.java | 16 +- .../providers/netty_4/ResponseStatus.java | 14 +- .../netty_4/util/CleanupChannelGroup.java | 11 +- providers/pom.xml | 1 + 16 files changed, 374 insertions(+), 358 deletions(-) diff --git a/providers/netty-4/pom.xml b/providers/netty-4/pom.xml index fa766d4a6d..be99ff06a7 100644 --- a/providers/netty-4/pom.xml +++ b/providers/netty-4/pom.xml @@ -7,17 +7,17 @@ 1.8.0-SNAPSHOT 4.0.0 - async-http-client-netty-provider - Asynchronous Http Client Netty Provider + async-http-client-netty-4-provider + Asynchronous Http Client Netty 4 Provider - The Async Http Client Netty Provider. + The Async Http Client Netty 4 Provider. io.netty - netty - 3.6.3.Final + netty-all + 4.0.0.Beta3 diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java index 7d2cad912a..0b7a754cbc 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java @@ -13,8 +13,9 @@ package com.ning.http.client.providers.netty_4; import com.ning.http.client.Body; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.handler.stream.ChunkedInput; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.handler.stream.ChunkedInput; import java.io.IOException; import java.nio.ByteBuffer; @@ -23,7 +24,7 @@ * Adapts a {@link Body} to Netty's {@link ChunkedInput}. */ class BodyChunkedInput - implements ChunkedInput { + implements ChunkedInput { private final Body body; @@ -72,14 +73,16 @@ public boolean hasNextChunk() throws Exception { return peekNextChunk() != null; } - public Object nextChunk() throws Exception { + @Override + public boolean readChunk(ByteBuf b) throws Exception { ByteBuffer buffer = peekNextChunk(); if (buffer == null || buffer == EOF) { - return null; + return false; } nextChunk = null; - return ChannelBuffers.wrappedBuffer(buffer); + b.writeBytes(buffer); + return true; } public boolean isEndOfInput() throws Exception { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java index 985e9a4694..d6127bdf6e 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java @@ -13,7 +13,9 @@ package com.ning.http.client.providers.netty_4; import com.ning.http.client.RandomAccessBody; -import org.jboss.netty.channel.FileRegion; +import io.netty.buffer.AbstractReferenceCounted; +import io.netty.buffer.ReferenceCounted; +import io.netty.channel.FileRegion; import java.io.IOException; import java.nio.channels.WritableByteChannel; @@ -22,6 +24,7 @@ * Adapts a {@link RandomAccessBody} to Netty's {@link FileRegion}. */ class BodyFileRegion + extends AbstractReferenceCounted implements FileRegion { private final RandomAccessBody body; @@ -33,11 +36,11 @@ public BodyFileRegion(RandomAccessBody body) { this.body = body; } - public long getPosition() { + public long position() { return 0; } - public long getCount() { + public long count() { return body.getContentLength(); } @@ -46,12 +49,11 @@ public long transferTo(WritableByteChannel target, long position) return body.transferTo(position, Long.MAX_VALUE, target); } - public void releaseExternalResources() { + public void deallocate() { try { body.close(); } catch (IOException e) { // we tried } } - } diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java index e706c51204..dac5c5bc4f 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java @@ -56,51 +56,52 @@ import com.ning.http.util.ProxyUtils; import com.ning.http.util.SslUtils; import com.ning.http.util.UTF8UrlEncoder; -import org.jboss.netty.bootstrap.ClientBootstrap; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBufferOutputStream; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFuture; -import org.jboss.netty.channel.ChannelFutureProgressListener; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.channel.ChannelPipeline; -import org.jboss.netty.channel.ChannelPipelineFactory; -import org.jboss.netty.channel.ChannelStateEvent; -import org.jboss.netty.channel.DefaultChannelFuture; -import org.jboss.netty.channel.ExceptionEvent; -import org.jboss.netty.channel.FileRegion; -import org.jboss.netty.channel.MessageEvent; -import org.jboss.netty.channel.SimpleChannelUpstreamHandler; -import org.jboss.netty.channel.group.ChannelGroup; -import org.jboss.netty.channel.socket.ClientSocketChannelFactory; -import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; -import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory; -import org.jboss.netty.handler.codec.http.CookieEncoder; -import org.jboss.netty.handler.codec.http.DefaultCookie; -import org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer; -import org.jboss.netty.handler.codec.http.DefaultHttpRequest; -import org.jboss.netty.handler.codec.http.HttpChunk; -import org.jboss.netty.handler.codec.http.HttpChunkTrailer; -import org.jboss.netty.handler.codec.http.HttpClientCodec; -import org.jboss.netty.handler.codec.http.HttpContentCompressor; -import org.jboss.netty.handler.codec.http.HttpContentDecompressor; -import org.jboss.netty.handler.codec.http.HttpHeaders; -import org.jboss.netty.handler.codec.http.HttpMethod; -import org.jboss.netty.handler.codec.http.HttpRequest; -import org.jboss.netty.handler.codec.http.HttpRequestEncoder; -import org.jboss.netty.handler.codec.http.HttpResponse; -import org.jboss.netty.handler.codec.http.HttpResponseDecoder; -import org.jboss.netty.handler.codec.http.HttpVersion; -import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; -import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; -import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame; -import org.jboss.netty.handler.ssl.SslHandler; -import org.jboss.netty.handler.stream.ChunkedFile; -import org.jboss.netty.handler.stream.ChunkedWriteHandler; +import io.netty.bootstrap.Bootstrap; +import io.netty.buffer.AbstractReferenceCounted; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufOutputStream; +import io.netty.buffer.Unpooled; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundMessageHandlerAdapter; +import io.netty.channel.ChannelPipeline; +import io.netty.channel.FileRegion; +import io.netty.channel.group.ChannelGroup; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.oio.OioEventLoopGroup; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.channel.socket.oio.OioSocketChannel; +import io.netty.handler.codec.http.DefaultFullHttpRequest; +import io.netty.handler.codec.http.FullHttpRequest; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpContent; +import io.netty.handler.codec.http.HttpObject; +import io.netty.handler.codec.http.DefaultCookie; +import io.netty.handler.codec.http.HttpClientCodec; +import io.netty.handler.codec.http.HttpContentCompressor; +import io.netty.handler.codec.http.HttpContentDecompressor; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpRequestEncoder; +import io.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.HttpResponseDecoder; +import io.netty.handler.codec.http.HttpVersion; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; +import io.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import io.netty.handler.ssl.SslHandler; +import io.netty.handler.stream.ChunkedFile; +import io.netty.handler.stream.ChunkedWriteHandler; +import io.netty.util.AttributeKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -113,6 +114,7 @@ import java.net.InetSocketAddress; import java.net.MalformedURLException; import java.net.URI; +import java.lang.reflect.Field; import java.nio.channels.ClosedChannelException; import java.nio.channels.FileChannel; import java.nio.channels.WritableByteChannel; @@ -120,13 +122,13 @@ import java.security.GeneralSecurityException; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.Semaphore; @@ -136,9 +138,9 @@ import static com.ning.http.util.MiscUtil.isNonEmpty; import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; -import static org.jboss.netty.channel.Channels.pipeline; -public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { + +public class NettyAsyncHttpProvider extends ChannelInboundMessageHandlerAdapter implements AsyncHttpProvider { private final static String WEBSOCKET_KEY = "Sec-WebSocket-Key"; private final static String HTTP_HANDLER = "httpHandler"; protected final static String SSL_HANDLER = "sslHandler"; @@ -149,15 +151,17 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); private final static Charset UTF8 = Charset.forName("UTF-8"); + public final static AttributeKey DEFAULT_ATTRIBUTE = new AttributeKey("default"); - private final ClientBootstrap plainBootstrap; - private final ClientBootstrap secureBootstrap; - private final ClientBootstrap webSocketBootstrap; - private final ClientBootstrap secureWebSocketBootstrap; + private final Bootstrap plainBootstrap; + private final Bootstrap secureBootstrap; + private final Bootstrap webSocketBootstrap; + private final Bootstrap secureWebSocketBootstrap; + private /* final */ EventLoopGroup eventLoop; private final static int MAX_BUFFERED_BYTES = 8192; private final AsyncHttpClientConfig config; private final AtomicBoolean isClose = new AtomicBoolean(false); - private final ClientSocketChannelFactory socketChannelFactory; + private final Class socketChannelFactory; private final boolean allowReleaseSocketChannelFactory; private final ChannelGroup openChannels = new @@ -193,31 +197,37 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { } if (asyncHttpProviderConfig.isUseBlockingIO()) { - socketChannelFactory = new OioClientSocketChannelFactory(config.executorService()); + socketChannelFactory = OioSocketChannel.class; this.allowReleaseSocketChannelFactory = true; } else { // check if external NioClientSocketChannelFactory is defined - NioClientSocketChannelFactory scf = asyncHttpProviderConfig.getSocketChannelFactory(); + Class scf = asyncHttpProviderConfig.getSocketChannel(); if (scf != null) { this.socketChannelFactory = scf; // cannot allow releasing shared channel factory this.allowReleaseSocketChannelFactory = false; } else { - ExecutorService e = asyncHttpProviderConfig.getBossExecutorService(); - if (e == null) { - e = Executors.newCachedThreadPool(); - } + socketChannelFactory = NioSocketChannel.class; + eventLoop = asyncHttpProviderConfig.getEventLoopGroup(); + if (eventLoop == null) { + if (socketChannelFactory == OioSocketChannel.class) { + eventLoop = new OioEventLoopGroup(); + } else if (socketChannelFactory == NioSocketChannel.class) { + eventLoop = new NioEventLoopGroup(); + } else { + throw new IllegalArgumentException("No set event loop compatbile with socket channel " + scf); + } + } int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); log.debug("Number of application's worker threads is {}", numWorkers); - socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); this.allowReleaseSocketChannelFactory = true; } } - plainBootstrap = new ClientBootstrap(socketChannelFactory); - secureBootstrap = new ClientBootstrap(socketChannelFactory); - webSocketBootstrap = new ClientBootstrap(socketChannelFactory); - secureWebSocketBootstrap = new ClientBootstrap(socketChannelFactory); + plainBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop); + secureBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop);; + webSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop);; + secureWebSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop);; configureNetty(); this.config = config; @@ -250,36 +260,46 @@ public String toString() { } void configureNetty() { + Map> optionMap = new HashMap>(); + for (Field field : ChannelOption.class.getDeclaredFields()) { + if (field.getType().isAssignableFrom(ChannelOption.class)) { + field.setAccessible(true); + try { + optionMap.put(field.getName(), (ChannelOption) field.get(null)); + } catch (IllegalAccessException ex) { + throw new Error(ex); + } + } + } + if (asyncHttpProviderConfig != null) { for (Entry entry : asyncHttpProviderConfig.propertiesSet()) { - String key = entry.getKey(); + ChannelOption key = optionMap.get(entry.getKey()); Object value = entry.getValue(); - plainBootstrap.setOption(key, value); - webSocketBootstrap.setOption(key, value); - secureBootstrap.setOption(key, value); - secureWebSocketBootstrap.setOption(key, value); + plainBootstrap.option(key, value); + webSocketBootstrap.option(key, value); + secureBootstrap.option(key, value); + secureWebSocketBootstrap.option(key, value); } } - plainBootstrap.setPipelineFactory(createPlainPipelineFactory()); - DefaultChannelFuture.setUseDeadLockChecker(false); + plainBootstrap.handler(createPlainPipelineFactory()); + // DefaultChannelFuture.setUseDeadLockChecker(false); if (asyncHttpProviderConfig != null) { executeConnectAsync = asyncHttpProviderConfig.isAsyncConnect(); if (!executeConnectAsync) { - DefaultChannelFuture.setUseDeadLockChecker(true); + // DefaultChannelFuture.setUseDeadLockChecker(true); } } - webSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { - + webSocketBootstrap.handler(new ChannelInitializer() { /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); + protected void initChannel(Channel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast("ws-decoder", new HttpResponseDecoder()); pipeline.addLast("ws-encoder", new HttpRequestEncoder()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; } }); } @@ -293,12 +313,12 @@ protected HttpClientCodec newHttpClientCodec() { } } - protected ChannelPipelineFactory createPlainPipelineFactory() { - return new ChannelPipelineFactory() { + protected ChannelInitializer createPlainPipelineFactory() { + return new ChannelInitializer() { /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); + protected void initChannel(Channel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); @@ -311,18 +331,16 @@ public ChannelPipeline getPipeline() throws Exception { } pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; } }; } void constructSSLPipeline(final NettyConnectListener cl) { - secureBootstrap.setPipelineFactory(new ChannelPipelineFactory() { - + secureBootstrap.handler(new ChannelInitializer() { /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); + protected void initChannel(Channel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); try { pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); @@ -337,15 +355,14 @@ public ChannelPipeline getPipeline() throws Exception { } pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; } }); - secureWebSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { + secureWebSocketBootstrap.handler(new ChannelInitializer() { /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); + protected void initChannel(Channel ch) throws Exception { + ChannelPipeline pipeline = ch.pipeline(); try { pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); @@ -356,8 +373,6 @@ public ChannelPipeline getPipeline() throws Exception { pipeline.addLast("ws-decoder", new HttpResponseDecoder()); pipeline.addLast("ws-encoder", new HttpRequestEncoder()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - - return pipeline; } }); } @@ -390,12 +405,12 @@ private SSLEngine createSSLEngine() throws IOException, GeneralSecurityException private Channel verifyChannelPipeline(Channel channel, String scheme) throws IOException, GeneralSecurityException { - if (channel.getPipeline().get(SSL_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { - channel.getPipeline().remove(SSL_HANDLER); - } else if (channel.getPipeline().get(HTTP_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { + if (channel.pipeline().get(SSL_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { + channel.pipeline().remove(SSL_HANDLER); + } else if (channel.pipeline().get(HTTP_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { return channel; - } else if (channel.getPipeline().get(SSL_HANDLER) == null && isSecure(scheme)) { - channel.getPipeline().addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); + } else if (channel.pipeline().get(SSL_HANDLER) == null && isSecure(scheme)) { + channel.pipeline().addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); } return channel; } @@ -409,7 +424,7 @@ protected final void writeRequest(final Channel channel, * If the channel is dead because it was pooled and the remote server decided to close it, * we just let it go and the closeChannel do it's work. */ - if (!channel.isOpen() || !channel.isConnected()) { + if (!channel.isOpen() || !channel.isActive()) { return; } @@ -429,9 +444,9 @@ protected final void writeRequest(final Channel channel, } long length = body.getContentLength(); if (length >= 0) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, length); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, length); } else { - nettyRequest.setHeader(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); + nettyRequest.headers().set(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); } } else { body = null; @@ -441,8 +456,8 @@ protected final void writeRequest(final Channel channel, if (TransferCompletionHandler.class.isAssignableFrom(future.getAsyncHandler().getClass())) { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - for (String s : future.getNettyRequest().getHeaderNames()) { - for (String header : future.getNettyRequest().getHeaders(s)) { + for (String s : future.getNettyRequest().headers().names()) { + for (String header : future.getNettyRequest().headers().getAll(s)) { h.add(s, header); } } @@ -478,7 +493,7 @@ protected final void writeRequest(final Channel channel, fileLength = raf.length(); ChannelFuture writeFuture; - if (channel.getPipeline().get(SslHandler.class) != null) { + if (channel.pipeline().get(SslHandler.class) != null) { writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, 8192)); } else { final FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); @@ -499,13 +514,13 @@ protected final void writeRequest(final Channel channel, * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. */ if (future.getRequest().getParts() != null) { - String boundary = future.getNettyRequest().getHeader("Content-Type"); - String length = future.getNettyRequest().getHeader("Content-Length"); + String boundary = future.getNettyRequest().headers().get("Content-Type"); + String length = future.getNettyRequest().headers().get("Content-Length"); body = new MultipartBody(future.getRequest().getParts(), boundary, length); } ChannelFuture writeFuture; - if (channel.getPipeline().get(SslHandler.class) == null && (body instanceof RandomAccessBody)) { + if (channel.pipeline().get(SslHandler.class) == null && (body instanceof RandomAccessBody)) { BodyFileRegion bodyFileRegion = new BodyFileRegion((RandomAccessBody) body); writeFuture = channel.write(bodyFileRegion); } else { @@ -514,7 +529,7 @@ protected final void writeRequest(final Channel channel, if (bg instanceof FeedableBodyGenerator) { ((FeedableBodyGenerator)bg).setListener(new FeedListener() { @Override public void onContentAdded() { - channel.getPipeline().get(ChunkedWriteHandler.class).resumeTransfer(); + channel.pipeline().get(ChunkedWriteHandler.class).resumeTransfer(); } }); } @@ -559,7 +574,7 @@ public void operationComplete(ChannelFuture cf) { } protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, - boolean allowConnect, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { + boolean allowConnect, ByteBuf buffer, ProxyServer proxyServer) throws IOException { String method = request.getMethod(); if (allowConnect && proxyServer != null && isSecure(uri)) { @@ -578,7 +593,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, URI uri, - ChannelBuffer buffer, + ByteBuf buffer, ProxyServer proxyServer) throws IOException { String host = AsyncHttpProviderUtils.getHost(uri); @@ -588,9 +603,9 @@ private static HttpRequest construct(AsyncHttpClientConfig config, host = request.getVirtualHost(); } - HttpRequest nettyRequest; + FullHttpRequest nettyRequest; if (m.equals(HttpMethod.CONNECT)) { - nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); + nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); } else { String path = null; if (proxyServer != null && !(isSecure(uri) && config.isUseRelativeURIsWithSSLProxies())) @@ -599,25 +614,25 @@ else if (uri.getRawQuery() != null) path = uri.getRawPath() + "?" + uri.getRawQuery(); else path = uri.getRawPath(); - nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path); + nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, m, path); } if (webSocket) { - nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); - nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); - nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" + nettyRequest.headers().add(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); + nettyRequest.headers().add(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); + nettyRequest.headers().add("Origin", "http://" + uri.getHost() + ":" + (uri.getPort() == -1 ? isSecure(uri.getScheme()) ? 443 : 80 : uri.getPort())); - nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); - nettyRequest.addHeader("Sec-WebSocket-Version", "13"); + nettyRequest.headers().add(WEBSOCKET_KEY, WebSocketUtil.getKey()); + nettyRequest.headers().add("Sec-WebSocket-Version", "13"); } if (host != null) { if (uri.getPort() == -1) { - nettyRequest.setHeader(HttpHeaders.Names.HOST, host); + nettyRequest.headers().set(HttpHeaders.Names.HOST, host); } else if (request.getVirtualHost() != null) { - nettyRequest.setHeader(HttpHeaders.Names.HOST, host); + nettyRequest.headers().set(HttpHeaders.Names.HOST, host); } else { - nettyRequest.setHeader(HttpHeaders.Names.HOST, host + ":" + uri.getPort()); + nettyRequest.headers().set(HttpHeaders.Names.HOST, host + ":" + uri.getPort()); } } else { host = "127.0.0.1"; @@ -629,19 +644,19 @@ else if (uri.getRawQuery() != null) for (String name : h.keySet()) { if (!"host".equalsIgnoreCase(name)) { for (String value : h.get(name)) { - nettyRequest.addHeader(name, value); + nettyRequest.headers().add(name, value); } } } } if (config.isCompressionEnabled()) { - nettyRequest.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP); + nettyRequest.headers().set(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP); } } else { List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); if (isNonEmpty(auth) && auth.get(0).startsWith("NTLM")) { - nettyRequest.addHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, auth.get(0)); + nettyRequest.headers().add(HttpHeaders.Names.PROXY_AUTHORIZATION, auth.get(0)); } } Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); @@ -660,13 +675,13 @@ else if (uri.getRawQuery() != null) switch (realm.getAuthScheme()) { case BASIC: - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, + nettyRequest.headers().set(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeBasicAuthentication(realm)); break; case DIGEST: if (isNonEmpty(realm.getNonce())) { try { - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, + nettyRequest.headers().set(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeDigestAuthentication(realm)); } catch (NoSuchAlgorithmException e) { throw new SecurityException(e); @@ -676,7 +691,7 @@ else if (uri.getRawQuery() != null) case NTLM: try { String msg = ntlmEngine.generateType1Msg("NTLM " + domain, authHost); - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); + nettyRequest.headers().set(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); } catch (NTLMEngineException e) { IOException ie = new IOException(); ie.initCause(e); @@ -694,7 +709,7 @@ else if (uri.getRawQuery() != null) ie.initCause(e); throw ie; } - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); + nettyRequest.headers().set(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); break; case NONE: break; @@ -704,12 +719,12 @@ else if (uri.getRawQuery() != null) } if (!webSocket && !request.getHeaders().containsKey(HttpHeaders.Names.CONNECTION)) { - nettyRequest.setHeader(HttpHeaders.Names.CONNECTION, AsyncHttpProviderUtils.keepAliveHeaderValue(config)); + nettyRequest.headers().set(HttpHeaders.Names.CONNECTION, AsyncHttpProviderUtils.keepAliveHeaderValue(config)); } if (proxyServer != null) { if (!request.getHeaders().containsKey("Proxy-Connection")) { - nettyRequest.setHeader("Proxy-Connection", AsyncHttpProviderUtils.keepAliveHeaderValue(config)); + nettyRequest.headers().set("Proxy-Connection", AsyncHttpProviderUtils.keepAliveHeaderValue(config)); } if (proxyServer.getPrincipal() != null) { @@ -720,7 +735,7 @@ else if (uri.getRawQuery() != null) try { String msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), proxyServer.getHost()); - nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + msg); + nettyRequest.headers().set(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + msg); } catch (NTLMEngineException e) { IOException ie = new IOException(); ie.initCause(e); @@ -728,7 +743,7 @@ else if (uri.getRawQuery() != null) } } } else { - nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, + nettyRequest.headers().set(HttpHeaders.Names.PROXY_AUTHORIZATION, AuthenticatorUtils.computeBasicAuthentication(proxyServer)); } } @@ -736,15 +751,15 @@ else if (uri.getRawQuery() != null) // Add default accept headers. if (request.getHeaders().getFirstValue("Accept") == null) { - nettyRequest.setHeader(HttpHeaders.Names.ACCEPT, "*/*"); + nettyRequest.headers().set(HttpHeaders.Names.ACCEPT, "*/*"); } if (request.getHeaders().getFirstValue("User-Agent") != null) { - nettyRequest.setHeader("User-Agent", request.getHeaders().getFirstValue("User-Agent")); + nettyRequest.headers().set("User-Agent", request.getHeaders().getFirstValue("User-Agent")); } else if (config.getUserAgent() != null) { - nettyRequest.setHeader("User-Agent", config.getUserAgent()); + nettyRequest.headers().set("User-Agent", config.getUserAgent()); } else { - nettyRequest.setHeader("User-Agent", + nettyRequest.headers().set("User-Agent", AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class, config)); } @@ -763,7 +778,7 @@ else if (uri.getRawQuery() != null) cookie.setDomain(c.getDomain()); httpCookieEncoder.addCookie(cookie); } - nettyRequest.setHeader(HttpHeaders.Names.COOKIE, httpCookieEncoder.encode()); + nettyRequest.headers().set(HttpHeaders.Names.COOKIE, httpCookieEncoder.encode()); } String reqType = request.getMethod(); @@ -773,20 +788,20 @@ else if (uri.getRawQuery() != null) // We already have processed the body. if (buffer != null && buffer.writerIndex() != 0) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, buffer.writerIndex()); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, buffer.writerIndex()); nettyRequest.setContent(buffer); } else if (request.getByteData() != null) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getByteData().length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getByteData())); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getByteData().length)); + nettyRequest.setContent(Unpooled.wrappedBuffer(request.getByteData())); } else if (request.getStringData() != null) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getStringData().getBytes(bodyCharset).length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getStringData().getBytes(bodyCharset))); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getStringData().getBytes(bodyCharset).length)); + nettyRequest.setContent(Unpooled.wrappedBuffer(request.getStringData().getBytes(bodyCharset))); } else if (request.getStreamData() != null) { int[] lengthWrapper = new int[1]; byte[] bytes = AsyncHttpProviderUtils.readFully(request.getStreamData(), lengthWrapper); int length = lengthWrapper[0]; - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes, 0, length)); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); + nettyRequest.setContent(Unpooled.wrappedBuffer(bytes, 0, length)); } else if (isNonEmpty(request.getParams())) { StringBuilder sb = new StringBuilder(); for (final Entry> paramEntry : request.getParams()) { @@ -800,11 +815,11 @@ else if (uri.getRawQuery() != null) UTF8UrlEncoder.appendEncoded(sb, value); } } - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(sb.length())); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(sb.toString().getBytes(bodyCharset))); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(sb.length())); + nettyRequest.setContent(Unpooled.wrappedBuffer(sb.toString().getBytes(bodyCharset))); if (!request.getHeaders().containsKey(HttpHeaders.Names.CONTENT_TYPE)) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, "application/x-www-form-urlencoded"); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_TYPE, "application/x-www-form-urlencoded"); } } else if (request.getParts() != null) { @@ -816,16 +831,16 @@ else if (uri.getRawQuery() != null) MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getParams()); - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(mre.getContentLength())); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(mre.getContentLength())); /** * TODO: AHC-78: SSL + zero copy isn't supported by the MultiPart class and pretty complex to implements. */ if (isSecure(uri)) { - ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); - mre.writeRequest(new ChannelBufferOutputStream(b)); + ByteBuf b = Unpooled.buffer(lenght); + mre.writeRequest(new ByteBufOutputStream(b)); nettyRequest.setContent(b); } } else if (request.getEntityWriter() != null) { @@ -835,16 +850,16 @@ else if (uri.getRawQuery() != null) lenght = MAX_BUFFERED_BYTES; } - ChannelBuffer b = ChannelBuffers.dynamicBuffer(lenght); - request.getEntityWriter().writeEntity(new ChannelBufferOutputStream(b)); - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, b.writerIndex()); + ByteBuf b = Unpooled.buffer(lenght); + request.getEntityWriter().writeEntity(new ByteBufOutputStream(b)); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, b.writerIndex()); nettyRequest.setContent(b); } else if (request.getFile() != null) { File file = request.getFile(); if (!file.isFile()) { throw new IOException(String.format("File %s is not a file or doesn't exist", file.getAbsolutePath())); } - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, file.length()); + nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, file.length()); } } } @@ -858,9 +873,9 @@ public void close() { openChannels.close(); for (Channel channel : openChannels) { - ChannelHandlerContext ctx = channel.getPipeline().getContext(NettyAsyncHttpProvider.class); - if (ctx.getAttachment() instanceof NettyResponseFuture) { - NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + ChannelHandlerContext ctx = channel.pipeline().context(NettyAsyncHttpProvider.class); + if (ctx.attr(DEFAULT_ATTRIBUTE).get() instanceof NettyResponseFuture) { + NettyResponseFuture future = (NettyResponseFuture) ctx.attr(DEFAULT_ATTRIBUTE).get(); future.setReaperFuture(null); } } @@ -868,11 +883,7 @@ public void close() { config.executorService().shutdown(); config.reaper().shutdown(); if (this.allowReleaseSocketChannelFactory) { - socketChannelFactory.releaseExternalResources(); - plainBootstrap.releaseExternalResources(); - secureBootstrap.releaseExternalResources(); - webSocketBootstrap.releaseExternalResources(); - secureWebSocketBootstrap.releaseExternalResources(); + eventLoop.shutdown(); } } catch (Throwable t) { log.warn("Unexpected error on close", t); @@ -927,14 +938,14 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } } - ChannelBuffer bufferedBytes = null; + ByteBuf bufferedBytes = null; if (f != null && f.getRequest().getFile() == null && - !f.getNettyRequest().getMethod().getName().equals(HttpMethod.CONNECT.getName())) { - bufferedBytes = f.getNettyRequest().getContent(); + !f.getNettyRequest().getMethod().name().equals(HttpMethod.CONNECT.name())) { + bufferedBytes = f.getNettyRequest().data(); } boolean useSSl = isSecure(uri) && !useProxy; - if (channel != null && channel.isOpen() && channel.isConnected()) { + if (channel != null && channel.isOpen() && channel.isActive()) { HttpRequest nettyRequest = buildRequest(config, request, uri, f == null ? false : f.isConnectAllowed(), bufferedBytes, proxyServer); if (f == null) { @@ -947,7 +958,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand f.attachChannel(channel, false); log.debug("\nUsing cached Channel {}\n for request \n{}\n", channel, nettyRequest); - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(f); + channel.pipeline().context(NettyAsyncHttpProvider.class).attr(DEFAULT_ATTRIBUTE).set(f); try { writeRequest(channel, config, f, nettyRequest); @@ -1007,8 +1018,8 @@ private ListenableFuture doConnect(final Request request, final AsyncHand } ChannelFuture channelFuture; - ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); - bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); + Bootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); + bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectionTimeoutInMs()); try { InetSocketAddress remoteAddress; @@ -1071,36 +1082,36 @@ private ListenableFuture doConnect(final Request request, final AsyncHand log.debug("\nNon cached request \n{}\n\nusing Channel \n{}\n", c.future().getNettyRequest(), channelFuture.getChannel()); if (!c.future().isCancelled() || !c.future().isDone()) { - openChannels.add(channelFuture.getChannel()); - c.future().attachChannel(channelFuture.getChannel(), false); + openChannels.add(channelFuture.channel()); + c.future().attachChannel(channelFuture.channel(), false); } return c.future(); } private void closeChannel(final ChannelHandlerContext ctx) { - connectionsPool.removeAll(ctx.getChannel()); + connectionsPool.removeAll(ctx.channel()); finishChannel(ctx); } private void finishChannel(final ChannelHandlerContext ctx) { - ctx.setAttachment(new DiscardEvent()); + ctx.attr(DEFAULT_ATTRIBUTE).set(new DiscardEvent()); // The channel may have already been removed if a timeout occurred, and this method may be called just after. - if (ctx.getChannel() == null) { + if (ctx.channel() == null) { return; } - log.debug("Closing Channel {} ", ctx.getChannel()); + log.debug("Closing Channel {} ", ctx.channel()); try { - ctx.getChannel().close(); + ctx.channel().close(); } catch (Throwable t) { log.debug("Error closing a connection", t); } - if (ctx.getChannel() != null) { - openChannels.remove(ctx.getChannel()); + if (ctx.channel() != null) { + openChannels.remove(ctx.channel()); } } @@ -1274,7 +1285,7 @@ private String getPoolKey(NettyResponseFuture future) throws MalformedURLExce private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future) { ctx.setAttachment(new AsyncCallable(future) { public Object call() throws Exception { - if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { + if (future.isKeepAlive() && ctx.channel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.channel())) { return null; } @@ -1284,7 +1295,7 @@ public Object call() throws Exception { @Override public String toString() { - return "Draining task for channel " + ctx.getChannel(); + return "Draining task for channel " + ctx.channel(); } }); } @@ -1336,7 +1347,7 @@ private void nextRequest(final Request request, final NettyResponseFuture fut private void abort(NettyResponseFuture future, Throwable t) { Channel channel = future.channel(); if (channel != null && openChannels.contains(channel)) { - closeChannel(channel.getPipeline().getContext(NettyAsyncHttpProvider.class)); + closeChannel(channel.pipeline().context(NettyAsyncHttpProvider.class)); openChannels.remove(channel); } @@ -1461,7 +1472,7 @@ private void markAsDone(final NettyResponseFuture future, final ChannelHandle log.debug(t.getMessage(), t); } - if (!future.isKeepAlive() || !ctx.getChannel().isReadable()) { + if (!future.isKeepAlive() || !ctx.channel().isReadable()) { closeChannel(ctx); } } @@ -1470,7 +1481,7 @@ private void finishUpdate(final NettyResponseFuture future, final ChannelHand if (lastValidChunk && future.isKeepAlive()) { drainChannel(ctx, future); } else { - if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { + if (future.isKeepAlive() && ctx.channel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.close())) { markAsDone(future, ctx); return; } @@ -1501,9 +1512,9 @@ final static class DiscardEvent { } @Override - public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) + public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Exception { - Channel channel = e.getChannel(); + Channel channel = ctx.channel(); Throwable cause = e.getCause(); NettyResponseFuture future = null; @@ -1526,8 +1537,8 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) return; } - if (ctx.getAttachment() instanceof NettyResponseFuture) { - future = (NettyResponseFuture) ctx.getAttachment(); + if (ctx.attr(DEFAULT_ATTRIBUTE).get() instanceof NettyResponseFuture) { + future = (NettyResponseFuture) ctx.attr(DEFAULT_ATTRIBUTE).get(); future.attachChannel(null, false); future.touch(); @@ -1545,7 +1556,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) } else { // Close the channel so the recovering can occurs. try { - ctx.getChannel().close(); + ctx.channel().close(); } catch (Throwable t) { ; // Swallow. } @@ -1557,8 +1568,8 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) log.debug("Trying to recover from dead Channel: {}", channel); return; } - } else if (ctx.getAttachment() instanceof AsyncCallable) { - future = ((AsyncCallable) ctx.getAttachment()).future(); + } else if (ctx.attr(DEFAULT_ATTRIBUTE).get() instanceof AsyncCallable) { + future = ((AsyncCallable) ctx.attr(DEFAULT_ATTRIBUTE).get()).future(); } } catch (Throwable t) { cause = t; @@ -1573,7 +1584,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) } } - Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); p.onError(ctx, e); closeChannel(ctx); @@ -1650,12 +1661,12 @@ protected static boolean abortOnWriteCloseException(Throwable cause) { private final static int computeAndSetContentLength(Request request, HttpRequest r) { int length = (int) request.getContentLength(); - if (length == -1 && r.getHeader(HttpHeaders.Names.CONTENT_LENGTH) != null) { - length = Integer.valueOf(r.getHeader(HttpHeaders.Names.CONTENT_LENGTH)); + if (length == -1 && r.headers().get(HttpHeaders.Names.CONTENT_LENGTH) != null) { + length = Integer.valueOf(r.headers().get(HttpHeaders.Names.CONTENT_LENGTH)); } if (length >= 0) { - r.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); + r.headers().set(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); } return length; } @@ -1663,7 +1674,7 @@ private final static int computeAndSetContentLength(Request request, HttpRequest public static NettyResponseFuture newFuture(URI uri, Request request, AsyncHandler asyncHandler, - HttpRequest nettyRequest, + FullHttpRequest nettyRequest, AsyncHttpClientConfig config, NettyAsyncHttpProvider provider, ProxyServer proxyServer) { @@ -1693,13 +1704,13 @@ public ProgressListener(boolean notifyHeaders, AsyncHandler asyncHandler, Net public void operationComplete(ChannelFuture cf) { // The write operation failed. If the channel was cached, it means it got asynchronously closed. // Let's retry a second time. - Throwable cause = cf.getCause(); + Throwable cause = cf.cause(); if (cause != null && future.getState() != NettyResponseFuture.STATE.NEW) { if (IllegalStateException.class.isAssignableFrom(cause.getClass())) { log.debug(cause.getMessage(), cause); try { - cf.getChannel().close(); + cf.channel().close(); } catch (RuntimeException ex) { log.debug(ex.getMessage(), ex); } @@ -1711,11 +1722,11 @@ public void operationComplete(ChannelFuture cf) { || abortOnWriteCloseException(cause)) { if (log.isDebugEnabled()) { - log.debug(cf.getCause() == null ? "" : cf.getCause().getMessage(), cf.getCause()); + log.debug(cf.cause() == null ? "" : cf.cause().getMessage(), cf.cause()); } try { - cf.getChannel().close(); + cf.channel().close(); } catch (RuntimeException ex) { log.debug(ex.getMessage(), ex); } @@ -1866,7 +1877,7 @@ protected Boolean initialValue() { } } - public static class OptimizedFileRegion implements FileRegion { + public static class OptimizedFileRegion extends AbstractReferenceCounted implements FileRegion { private final FileChannel file; private final RandomAccessFile raf; @@ -1881,11 +1892,11 @@ public OptimizedFileRegion(RandomAccessFile raf, long position, long count) { this.count = count; } - public long getPosition() { + public long position() { return position; } - public long getCount() { + public long count() { return count; } @@ -1903,12 +1914,12 @@ public long transferTo(WritableByteChannel target, long position) throws IOExcep long bw = file.transferTo(this.position + position, count, target); byteWritten += bw; if (byteWritten == raf.length()) { - releaseExternalResources(); + deallocate(); } return bw; } - public void releaseExternalResources() { + public void deallocate() { try { file.close(); } catch (IOException e) { @@ -1925,11 +1936,11 @@ public void releaseExternalResources() { private static class NettyTransferAdapter extends TransferCompletionHandler.TransferAdapter { - private final ChannelBuffer content; + private final ByteBuf content; private final FileInputStream file; private int byteRead = 0; - public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ChannelBuffer content, File file) throws IOException { + public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ByteBuf content, File file) throws IOException { super(headers); this.content = content; if (file != null) { @@ -1992,7 +2003,7 @@ private boolean redirect(Request request, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { - int statusCode = response.getStatus().getCode(); + int statusCode = response.getStatus().code(); boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); if (redirectEnabled && (statusCode == 302 || statusCode == 301 @@ -2003,7 +2014,7 @@ private boolean redirect(Request request, // We must allow 401 handling again. future.getAndSetAuth(false); - String location = response.getHeader(HttpHeaders.Names.LOCATION); + String location = response.headers().get(HttpHeaders.Names.LOCATION); URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); if (!uri.toString().equals(future.getURI().toString())) { @@ -2025,19 +2036,19 @@ private boolean redirect(Request request, } log.debug("Redirecting to {}", newUrl); - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { + for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE)) { Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); nBuilder.addOrReplaceCookie(c); } - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { + for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE2)) { Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); nBuilder.addOrReplaceCookie(c); } AsyncCallable ac = new AsyncCallable(future) { public Object call() throws Exception { - if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(initialPoolKey, ctx.getChannel())) { + if (initialConnectionKeepAlive && ctx.channel().isReadable() && connectionsPool.offer(initialPoolKey, ctx.channel())) { return null; } finishChannel(ctx); @@ -2047,7 +2058,7 @@ public Object call() throws Exception { if (response.isChunked()) { // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); + ctx.attr(DEFAULT_ATTRIBUTE).set(ac); } else { ac.call(); } @@ -2061,10 +2072,10 @@ public Object call() throws Exception { return false; } - private final class HttpProtocol implements Protocol { + private final class HttpProtocol implements Protocol { // @Override - public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { - final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); + public void handle(final ChannelHandlerContext ctx, final HttpObject e) throws Exception { + final NettyResponseFuture future = (NettyResponseFuture) ctx.attr(DEFAULT_ATTRIBUTE).get(); future.touch(); // The connect timeout occured. @@ -2079,20 +2090,20 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws ProxyServer proxyServer = future.getProxyServer(); HttpResponse response = null; try { - if (e.getMessage() instanceof HttpResponse) { - response = (HttpResponse) e.getMessage(); + if (e instanceof FullHttpResponse) { + response = (FullHttpResponse) e; log.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); // Required if there is some trailing headers. future.setHttpResponse(response); - int statusCode = response.getStatus().getCode(); + int statusCode = response.getStatus().code(); - String ka = response.getHeader(HttpHeaders.Names.CONNECTION); + String ka = response.headers().get(HttpHeaders.Names.CONNECTION); future.setKeepAlive(ka == null || ! ka.toLowerCase().equals("close")); - List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); + List wwwAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.WWW_AUTHENTICATE); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); @@ -2162,14 +2173,14 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws AsyncCallable ac = new AsyncCallable(future) { public Object call() throws Exception { drainChannel(ctx, future); - nextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); + nextRequest(builder.headers().sets(headers).setRealm(nr).build(), future); return null; } }; if (future.isKeepAlive() && response.isChunked()) { // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); + ctx.attr(DEFAULT_ATTRIBUTE).set(ac); } else { ac.call(); } @@ -2179,11 +2190,11 @@ public Object call() throws Exception { if (statusCode == 100) { future.getAndSetWriteHeaders(false); future.getAndSetWriteBody(true); - writeRequest(ctx.getChannel(), config, future, nettyRequest); + writeRequest(ctx.c, config, future, nettyRequest); return; } - List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); + List proxyAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.PROXY_AUTHENTICATE); if (statusCode == 407 && realm != null && proxyAuth.size() > 0 @@ -2203,7 +2214,7 @@ public Object call() throws Exception { newRealm = future.getRequest().getRealm(); } - Request req = builder.setHeaders(headers).setRealm(newRealm).build(); + Request req = builder.headers().sets(headers).setRealm(newRealm).build(); future.setReuseChannel(true); future.setConnectAllowed(true); nextRequest(req, future); @@ -2216,12 +2227,12 @@ public Object call() throws Exception { log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); if (future.isKeepAlive()) { - future.attachChannel(ctx.getChannel(), true); + future.attachChannel(ctx.channel(), true); } try { log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - upgradeProtocol(ctx.getChannel().getPipeline(), request.getURI().getScheme()); + upgradeProtocol(ctx.channel().pipeline(), request.getURI().getScheme()); } catch (Throwable ex) { abort(future, ex); } @@ -2254,8 +2265,8 @@ public Object call() throws Exception { drainChannel(ctx, future); } - } else if (e.getMessage() instanceof HttpChunk) { - HttpChunk chunk = (HttpChunk) e.getMessage(); + } else if (e.getMessage() instanceof HttpContent) { + HttpContent chunk = (HttpContent) e.getMessage(); if (handler != null) { if (chunk.isLast() || updateBodyAndInterrupt(future, handler, @@ -2413,7 +2424,7 @@ public void setContent(ChannelBuffer content) { }; if (frame.getBinaryData() != null) { - webSocketChunk.setContent(ChannelBuffers.wrappedBuffer(frame.getBinaryData())); + webSocketChunk.setContent(Unpooled.wrappedBuffer(frame.getBinaryData())); ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, webSocketChunk, true); h.onBodyPartReceived(rp); diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java index 1d064aea74..551a213619 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java @@ -21,11 +21,13 @@ import java.util.Set; import java.util.concurrent.ExecutorService; -import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ning.http.client.AsyncHttpProviderConfig; +import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.socket.SocketChannel; /** * This class can be used to pass Netty's internal configuration options. See Netty documentation for more information. @@ -40,14 +42,14 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig socketChannel; /** * Execute the connect operation asynchronously. @@ -82,7 +84,7 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig properties = new HashMap(); @@ -147,20 +149,20 @@ public void setUseBlockingIO(boolean useBlockingIO) { this.useBlockingIO = useBlockingIO; } - public NioClientSocketChannelFactory getSocketChannelFactory() { - return socketChannelFactory; + public Class getSocketChannel() { + return socketChannel; } - public void setSocketChannelFactory(NioClientSocketChannelFactory socketChannelFactory) { - this.socketChannelFactory = socketChannelFactory; + public void setSocketChannel(Class socketChannel) { + this.socketChannel = socketChannel; } - public ExecutorService getBossExecutorService() { - return bossExecutorService; + public EventLoopGroup getEventLoopGroup() { + return eventLoopGroup; } - public void setBossExecutorService(ExecutorService bossExecutorService) { - this.bossExecutorService = bossExecutorService; + public void setEventLoopGroup(EventLoopGroup eventLoopGroup) { + this.eventLoopGroup = eventLoopGroup; } public boolean isAsyncConnect() { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java index 8136a9f33d..3626a115dd 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java @@ -24,12 +24,12 @@ import javax.net.ssl.HostnameVerifier; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFuture; -import org.jboss.netty.channel.ChannelFutureListener; -import org.jboss.netty.handler.codec.http.HttpRequest; -import org.jboss.netty.handler.ssl.SslHandler; +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.ssl.SslHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,41 +64,41 @@ public NettyResponseFuture future() { public final void operationComplete(ChannelFuture f) throws Exception { if (f.isSuccess()) { - Channel channel = f.getChannel(); - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(future); - SslHandler sslHandler = (SslHandler) channel.getPipeline().get(NettyAsyncHttpProvider.SSL_HANDLER); + Channel channel = f.channel(); + channel.pipeline().context(NettyAsyncHttpProvider.class).attr(NettyAsyncHttpProvider.DEFAULT_ATTRIBUTE).set(future); + SslHandler sslHandler = (SslHandler) channel.pipeline().get(NettyAsyncHttpProvider.SSL_HANDLER); if (!handshakeDone.getAndSet(true) && (sslHandler != null)) { - ((SslHandler) channel.getPipeline().get(NettyAsyncHttpProvider.SSL_HANDLER)).handshake().addListener(this); + ((SslHandler) channel.pipeline().get(NettyAsyncHttpProvider.SSL_HANDLER)).handshake().addListener(this); return; } HostnameVerifier v = config.getHostnameVerifier(); if (sslHandler != null) { - if (!v.verify(future.getURI().getHost(), sslHandler.getEngine().getSession())) { + if (!v.verify(future.getURI().getHost(), sslHandler.engine().getSession())) { ConnectException exception = new ConnectException("HostnameVerifier exception."); future.abort(exception); throw exception; } } - future.provider().writeRequest(f.getChannel(), config, future, nettyRequest); + future.provider().writeRequest(f.channel(), config, future, nettyRequest); } else { - Throwable cause = f.getCause(); + Throwable cause = f.cause(); - logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", f.getChannel(), future.canRetry()); + logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", f.channel(), future.canRetry()); if (future.canRetry() && cause != null && (NettyAsyncHttpProvider.abortOnDisconnectException(cause) || ClosedChannelException.class.isAssignableFrom(cause.getClass()) || future.getState() != NettyResponseFuture.STATE.NEW)) { logger.debug("Retrying {} ", nettyRequest); - if (future.provider().remotelyClosed(f.getChannel(), future)) { + if (future.provider().remotelyClosed(f.channel(), future)) { return; } } - logger.debug("Failed to recover from exception: {} with channel {}", cause, f.getChannel()); + logger.debug("Failed to recover from exception: {} with channel {}", cause, f.channel()); - boolean printCause = f.getCause() != null && cause.getMessage() != null; + boolean printCause = f.cause() != null && cause.getMessage() != null; ConnectException e = new ConnectException(printCause ? cause.getMessage() + " to " + future.getURI().toString() : future.getURI().toString()); if (cause != null) { e.initCause(cause); @@ -114,10 +114,10 @@ public static class Builder { private final AsyncHandler asyncHandler; private NettyResponseFuture future; private final NettyAsyncHttpProvider provider; - private final ChannelBuffer buffer; + private final ByteBuf buffer; public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler asyncHandler, - NettyAsyncHttpProvider provider, ChannelBuffer buffer) { + NettyAsyncHttpProvider provider, ByteBuf buffer) { this.config = config; this.request = request; @@ -128,7 +128,7 @@ public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler as } public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler asyncHandler, - NettyResponseFuture future, NettyAsyncHttpProvider provider, ChannelBuffer buffer) { + NettyResponseFuture future, NettyAsyncHttpProvider provider, ByteBuf buffer) { this.config = config; this.request = request; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java index b49bd5ca31..c335848484 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java @@ -13,7 +13,7 @@ package com.ning.http.client.providers.netty_4; import com.ning.http.client.ConnectionsPool; -import org.jboss.netty.channel.Channel; +import io.netty.channel.Channel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -111,17 +111,17 @@ public void run() { long endConcurrentLoop = System.currentTimeMillis(); for (IdleChannel idleChannel : channelsInTimeout) { - Object attachment = idleChannel.channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); + Object attachment = idleChannel.channel.pipeline().context(NettyAsyncHttpProvider.class).attr(NettyAsyncHttpProvider.DEFAULT_ATTRIBUTE).get(); if (attachment != null) { if (NettyResponseFuture.class.isAssignableFrom(attachment.getClass())) { NettyResponseFuture future = (NettyResponseFuture) attachment; - if (!future.isDone() && !future.isCancelled()) { - log.debug("Future not in appropriate state %s\n", future); - continue; - } + if (!future.isDone() && !future.isCancelled()) { + log.debug("Future not in appropriate state %s\n", future); + continue; } } + } if (remove(idleChannel)) { log.debug("Closing Idle Channel {}", idleChannel.channel); @@ -163,7 +163,7 @@ else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeI } log.debug("Adding uri: {} for channel {}", uri, channel); - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.pipeline().context(NettyAsyncHttpProvider.class).attr(NettyAsyncHttpProvider.DEFAULT_ATTRIBUTE).set(new NettyAsyncHttpProvider.DiscardEvent()); ConcurrentLinkedQueue idleConnectionForHost = connectionsPool.get(uri); if (idleConnectionForHost == null) { @@ -214,7 +214,7 @@ public Channel poll(String uri) { if (idleChannel == null) { poolEmpty = true; - } else if (!idleChannel.channel.isConnected() || !idleChannel.channel.isOpen()) { + } else if (!idleChannel.channel.isActive() || !idleChannel.channel.isOpen()) { idleChannel = null; log.trace("Channel not connected or not opened!"); } @@ -274,7 +274,7 @@ public void destroy() { private void close(Channel channel) { try { - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.pipeline().context(NettyAsyncHttpProvider.class).attr(NettyAsyncHttpProvider.DEFAULT_ATTRIBUTE).set(new NettyAsyncHttpProvider.DiscardEvent()); channel2CreationDate.remove(channel); channel.close(); } catch (Throwable t) { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java index 3c3058a839..9acef964a2 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java @@ -31,9 +31,9 @@ import java.util.List; import java.util.Map; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBufferInputStream; -import org.jboss.netty.buffer.ChannelBuffers; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufInputStream; +import io.netty.buffer.Unpooled; /** * Wrapper around the {@link com.ning.http.client.Response} API. @@ -80,7 +80,7 @@ public byte[] getResponseBodyAsBytes() throws IOException { /* @Override */ public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { - return getResponseBodyAsChannelBuffer().toByteBuffer(); + return getResponseBodyAsByteBuf().nioBuffer(); } /* @Override */ @@ -90,29 +90,29 @@ public String getResponseBody() throws IOException { /* @Override */ public String getResponseBody(String charset) throws IOException { - return getResponseBodyAsChannelBuffer().toString(Charset.forName(calculateCharset(charset))); + return getResponseBodyAsByteBuf().toString(Charset.forName(calculateCharset(charset))); } /* @Override */ public InputStream getResponseBodyAsStream() throws IOException { - return new ChannelBufferInputStream(getResponseBodyAsChannelBuffer()); + return new ByteBufInputStream(getResponseBodyAsByteBuf()); } - public ChannelBuffer getResponseBodyAsChannelBuffer() throws IOException { - ChannelBuffer b = null; + public ByteBuf getResponseBodyAsByteBuf() throws IOException { + ByteBuf b = null; switch (bodyParts.size()) { case 0: - b = ChannelBuffers.EMPTY_BUFFER; + b = Unpooled.EMPTY_BUFFER; break; case 1: b = ResponseBodyPart.class.cast(bodyParts.get(0)).getChannelBuffer(); break; default: - ChannelBuffer[] channelBuffers = new ChannelBuffer[bodyParts.size()]; + ByteBuf[] channelBuffers = new ByteBuf[bodyParts.size()]; for (int i = 0; i < bodyParts.size(); i++) { channelBuffers[i] = ResponseBodyPart.class.cast(bodyParts.get(i)).getChannelBuffer(); } - b = ChannelBuffers.wrappedBuffer(channelBuffers); + b = Unpooled.wrappedBuffer(channelBuffers); } return b; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java index cfebb2d766..e467a02b0f 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java @@ -20,9 +20,10 @@ import com.ning.http.client.ProxyServer; import com.ning.http.client.Request; import com.ning.http.client.listenable.AbstractListenableFuture; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.handler.codec.http.HttpRequest; -import org.jboss.netty.handler.codec.http.HttpResponse; +import io.netty.channel.Channel; +import io.netty.handler.codec.http.FullHttpRequest; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,7 +65,7 @@ enum STATE { private final int responseTimeoutInMs; private final int idleConnectionTimeoutInMs; private Request request; - private HttpRequest nettyRequest; + private FullHttpRequest nettyRequest; private final AtomicReference content = new AtomicReference(); private URI uri; private boolean keepAlive = true; @@ -93,7 +94,7 @@ enum STATE { public NettyResponseFuture(URI uri, Request request, AsyncHandler asyncHandler, - HttpRequest nettyRequest, + FullHttpRequest nettyRequest, int responseTimeoutInMs, int idleConnectionTimeoutInMs, NettyAsyncHttpProvider asyncHttpProvider, @@ -165,7 +166,7 @@ public boolean cancel(boolean force) { if (isCancelled.get()) return false; try { - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.pipeline().context(NettyAsyncHttpProvider.class).attr(NettyAsyncHttpProvider.DEFAULT_ATTRIBUTE).set(new NettyAsyncHttpProvider.DiscardEvent()); channel.close(); } catch (Throwable t) { // Ignore @@ -229,7 +230,7 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, if (expired) { isCancelled.set(true); try { - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); + channel.pipeline().context(NettyAsyncHttpProvider.class).attr(NettyAsyncHttpProvider.DEFAULT_ATTRIBUTE).set(new NettyAsyncHttpProvider.DiscardEvent()); channel.close(); } catch (Throwable t) { // Ignore @@ -346,7 +347,7 @@ protected final Request getRequest() { return request; } - public final HttpRequest getNettyRequest() { + public final FullHttpRequest getNettyRequest() { return nettyRequest; } diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java index b0f4b4e357..caa76e1224 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java @@ -17,11 +17,11 @@ import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; import com.ning.http.client.websocket.WebSocketListener; import com.ning.http.client.websocket.WebSocketTextListener; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.PingWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.channel.Channel; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.PingWebSocketFrame; +import io.netty.handler.codec.http.websocketx.PongWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,7 +29,7 @@ import java.io.ByteArrayOutputStream; -import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; +import static io.netty.buffer.Unpooled.wrappedBuffer; public class NettyWebSocket implements WebSocket { private final static Logger logger = LoggerFactory.getLogger(NettyWebSocket.class); diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java index 98acd04ba1..3d9f93c1aa 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java @@ -12,16 +12,13 @@ */ package com.ning.http.client.providers.netty_4; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.channel.ChannelStateEvent; -import org.jboss.netty.channel.ExceptionEvent; -import org.jboss.netty.channel.MessageEvent; +import io.netty.channel.ChannelHandlerContext; -public interface Protocol { +public interface Protocol { - void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception; + void handle(ChannelHandlerContext ctx, T message) throws Exception; - void onError(ChannelHandlerContext ctx, ExceptionEvent e); + void onError(ChannelHandlerContext ctx, Throwable error); - void onClose(ChannelHandlerContext ctx, ChannelStateEvent e); + void onClose(ChannelHandlerContext ctx); } diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java index f50677255c..f48ad6de8a 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java @@ -17,9 +17,9 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.HttpResponseBodyPart; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.handler.codec.http.HttpChunk; -import org.jboss.netty.handler.codec.http.HttpResponse; +import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpContent; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -34,8 +34,8 @@ */ public class ResponseBodyPart extends HttpResponseBodyPart { - private final HttpChunk chunk; - private final HttpResponse response; + private final HttpContent chunk; + private final FullHttpResponse response; private final AtomicReference bytes = new AtomicReference(null); private final boolean isLast; private boolean closeConnection = false; @@ -43,11 +43,11 @@ public class ResponseBodyPart extends HttpResponseBodyPart { /** * Constructor used for non-chunked GET requests and HEAD requests. */ - public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, boolean last) { + public ResponseBodyPart(URI uri, FullHttpResponse response, AsyncHttpProvider provider, boolean last) { this(uri, response, provider, null, last); } - public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunk chunk, boolean last) { + public ResponseBodyPart(URI uri, FullHttpResponse response, AsyncHttpProvider provider, HttpContent chunk, boolean last) { super(uri, provider); this.chunk = chunk; this.response = response; @@ -66,8 +66,8 @@ public byte[] getBodyPartBytes() { return bp; } - ChannelBuffer b = getChannelBuffer(); - byte[] rb = b.toByteBuffer().array(); + ByteBuf b = getChannelBuffer(); + byte[] rb = b.nioBuffer().array(); bytes.set(rb); return rb; } @@ -79,13 +79,13 @@ public InputStream readBodyPartBytes() { @Override public int length() { - ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); + ByteBuf b = (chunk != null) ? chunk.data() : response.data(); return b.readableBytes(); } @Override public int writeTo(OutputStream outputStream) throws IOException { - ChannelBuffer b = getChannelBuffer(); + ByteBuf b = getChannelBuffer(); int available = b.readableBytes(); if (available > 0) { b.getBytes(b.readerIndex(), outputStream, available); @@ -98,8 +98,8 @@ public ByteBuffer getBodyByteBuffer() { return ByteBuffer.wrap(getBodyPartBytes()); } - public ChannelBuffer getChannelBuffer() { - return chunk != null ? chunk.getContent() : response.getContent(); + public ByteBuf getChannelBuffer() { + return chunk != null ? chunk.data() : response.data(); } /** @@ -126,7 +126,7 @@ public boolean closeUnderlyingConnection() { return closeConnection; } - protected HttpChunk chunk() { + protected HttpContent chunk() { return chunk; } } diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java index 497b100439..554bc2de09 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java @@ -18,8 +18,8 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseHeaders; -import org.jboss.netty.handler.codec.http.HttpChunkTrailer; -import org.jboss.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.LastHttpContent; import java.net.URI; @@ -28,7 +28,7 @@ */ public class ResponseHeaders extends HttpResponseHeaders { - private final HttpChunkTrailer trailingHeaders; + private final LastHttpContent trailingHeaders; private final HttpResponse response; private final FluentCaseInsensitiveStringsMap headers; @@ -39,7 +39,7 @@ public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provide headers = computerHeaders(); } - public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunkTrailer traillingHeaders) { + public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provider, LastHttpContent traillingHeaders) { super(uri, provider, true); this.trailingHeaders = traillingHeaders; this.response = response; @@ -48,15 +48,15 @@ public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provide private FluentCaseInsensitiveStringsMap computerHeaders() { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - for (String s : response.getHeaderNames()) { - for (String header : response.getHeaders(s)) { + for (String s : response.headers().names()) { + for (String header : response.headers().getAll(s)) { h.add(s, header); } } if (trailingHeaders != null) { - for (final String s : trailingHeaders.getHeaderNames()) { - for (String header : response.getHeaders(s)) { + for (final String s : trailingHeaders.trailingHeaders().names()) { + for (String header : response.headers().getAll(s)) { h.add(s, header); } } diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java index 2539ee81f1..1f1182c2f5 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java @@ -18,7 +18,7 @@ import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.HttpResponseStatus; -import org.jboss.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.HttpResponse; import java.net.URI; @@ -40,7 +40,7 @@ public ResponseStatus(URI uri, HttpResponse response, AsyncHttpProvider provider * @return the response status code */ public int getStatusCode() { - return response.getStatus().getCode(); + return response.getStatus().code(); } /** @@ -49,27 +49,27 @@ public int getStatusCode() { * @return the response status text */ public String getStatusText() { - return response.getStatus().getReasonPhrase(); + return response.getStatus().reasonPhrase(); } @Override public String getProtocolName() { - return response.getProtocolVersion().getProtocolName(); + return response.getProtocolVersion().protocolName(); } @Override public int getProtocolMajorVersion() { - return response.getProtocolVersion().getMajorVersion(); + return response.getProtocolVersion().majorVersion(); } @Override public int getProtocolMinorVersion() { - return response.getProtocolVersion().getMinorVersion(); + return response.getProtocolVersion().minorVersion(); } @Override public String getProtocolText() { - return response.getProtocolVersion().getText(); + return response.getProtocolVersion().text(); } } diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java index 686dcde44c..d052078c60 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java @@ -28,12 +28,11 @@ package com.ning.http.client.providers.netty_4.util; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFuture; -import org.jboss.netty.channel.group.ChannelGroup; -import org.jboss.netty.channel.group.ChannelGroupFuture; -import org.jboss.netty.channel.group.DefaultChannelGroup; -import org.jboss.netty.channel.group.DefaultChannelGroupFuture; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.group.ChannelGroup; +import io.netty.channel.group.ChannelGroupFuture; +import io.netty.channel.group.DefaultChannelGroup; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/providers/pom.xml b/providers/pom.xml index 9607ca51a4..c90b4f4f60 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -47,6 +47,7 @@ apache grizzly netty + netty-4 From 12d9d779f891f02a2c7c023696c4022114858f90 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 25 Mar 2013 04:00:14 +0100 Subject: [PATCH 0338/2844] Only compute StringData bytes once, close #263 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 4bf1076a21..2cdb075de5 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -779,8 +779,9 @@ else if (uri.getRawQuery() != null) nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getByteData().length)); nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getByteData())); } else if (request.getStringData() != null) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getStringData().getBytes(bodyCharset).length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getStringData().getBytes(bodyCharset))); + byte[] bytes = request.getStringData().getBytes(bodyCharset); + nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(bytes.length)); + nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes)); } else if (request.getStreamData() != null) { int[] lengthWrapper = new int[1]; byte[] bytes = AsyncHttpProviderUtils.readFully(request.getStreamData(), lengthWrapper); From 03a71bf0b90af7be97cb421caebed9e6b83c8a88 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Mon, 25 Mar 2013 17:04:01 -0400 Subject: [PATCH 0339/2844] Fix the build for now --- providers/pom.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/pom.xml b/providers/pom.xml index c90b4f4f60..cc7dcbcee8 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -47,7 +47,9 @@ apache grizzly netty + @@ -64,4 +66,4 @@ tests - \ No newline at end of file + From 0ac3941345ed908a0c4e78637b0fe7763728b318 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 2 Apr 2013 14:11:28 +0200 Subject: [PATCH 0340/2844] Optimize convertExpireField: don't loop on Exceptions, test RFC formt first --- .../http/util/AsyncHttpProviderUtils.java | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 86cc95b230..46ffc81ca1 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -12,20 +12,6 @@ */ package com.ning.http.util; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.ByteArrayPart; -import com.ning.http.client.Cookie; -import com.ning.http.client.FilePart; -import com.ning.http.client.FluentStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.Part; -import com.ning.http.client.Request; -import com.ning.http.client.StringPart; -import com.ning.http.multipart.ByteArrayPartSource; -import com.ning.http.multipart.MultipartRequestEntity; -import com.ning.http.multipart.PartSource; - import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -33,14 +19,29 @@ import java.io.SequenceInputStream; import java.io.UnsupportedEncodingException; import java.net.URI; -import java.text.ParseException; +import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; +import java.util.Date; import java.util.List; import java.util.Locale; import java.util.Vector; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.ByteArrayPart; +import com.ning.http.client.Cookie; +import com.ning.http.client.FilePart; +import com.ning.http.client.FluentStringsMap; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.Part; +import com.ning.http.client.Request; +import com.ning.http.client.StringPart; +import com.ning.http.multipart.ByteArrayPartSource; +import com.ning.http.multipart.MultipartRequestEntity; +import com.ning.http.multipart.PartSource; + /** * {@link com.ning.http.client.AsyncHttpProvider} common utilities. *

@@ -59,14 +60,13 @@ protected SimpleDateFormat[] initialValue() { return new SimpleDateFormat[] { - new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy", Locale.US), //ASCTIME + new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US), // RFC1123 new SimpleDateFormat("EEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US), //RFC1036 + new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy", Locale.US), //ASCTIME new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US), new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US), new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US), - new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss Z", Locale.US), - new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US) // RFC1123 - + new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss Z", Locale.US) }; } }; @@ -563,21 +563,18 @@ public static Cookie parseCookie(String value) { } public static int convertExpireField(String timestring) throws Exception { - Exception exception = null; String trimmedTimeString = removeQuote(timestring.trim()); - long now = System.currentTimeMillis(); + for (SimpleDateFormat sdf : simpleDateFormat.get()) { - try { - long expire = sdf.parse(trimmedTimeString).getTime(); + Date date = sdf.parse(trimmedTimeString, new ParsePosition(0)); + if (date != null) { + long now = System.currentTimeMillis(); + long expire = date.getTime(); return (int) ((expire - now) / 1000); - } catch (ParseException e) { - exception = e; - } catch (NumberFormatException e) { - exception = e; } } - throw exception; + throw new IllegalArgumentException("Not a valid expire field " + trimmedTimeString); } private final static String removeQuote(String s) { From c71e0529883d73094e30ce2f9e864f6abb60eb2d Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 2 Apr 2013 14:13:58 +0200 Subject: [PATCH 0341/2844] Minor removeQuote clean up --- .../com/ning/http/util/AsyncHttpProviderUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 46ffc81ca1..4adc537373 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -578,12 +578,12 @@ public static int convertExpireField(String timestring) throws Exception { } private final static String removeQuote(String s) { - if (s.startsWith("\"")) { - s = s.substring(1); - } + if (MiscUtil.isNonEmpty(s)) { + if (s.charAt(0) == '"') + s = s.substring(1); - if (s.endsWith("\"")) { - s = s.substring(0, s.length() - 1); + if (s.charAt(s.length() - 1) == '"') + s = s.substring(0, s.length() - 1); } return s; } From 4a56d5ccf4363641fbe5b6e490a1eff24aa58470 Mon Sep 17 00:00:00 2001 From: Omar Alrubaiyan Date: Tue, 2 Apr 2013 18:35:44 -0700 Subject: [PATCH 0342/2844] Fix proxy authentication in ApacheAsyncHttpProvider --- .../http/client/providers/apache/ApacheAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 1291eb086f..201a377a36 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -345,7 +345,7 @@ private HttpMethodBase createMethod(HttpClient client, Request request) throws I if (proxyServer.getPrincipal() != null) { Credentials defaultcreds = new UsernamePasswordCredentials(proxyServer.getPrincipal(), proxyServer.getPassword()); - client.getState().setCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds); + client.getState().setProxyCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds); } ProxyHost proxyHost = proxyServer == null ? null : new ProxyHost(proxyServer.getHost(), proxyServer.getPort()); From 78ae810d63f1ed719111f40cf1e078a7221be9fa Mon Sep 17 00:00:00 2001 From: saturnism Date: Sat, 6 Apr 2013 20:09:50 -0700 Subject: [PATCH 0343/2844] added adapter for JDeferred library --- extras/jdeferred/pom.xml | 17 +++ .../client/extra/AsyncHttpDeferredObject.java | 46 ++++++++ .../client/extra/ContentWriteProgress.java | 32 ++++++ .../ning/http/client/extra/HttpProgress.java | 5 + .../extra/HttpResponseBodyPartProgress.java | 20 ++++ .../ning/http/client/extra/AsyncHttpTest.java | 105 ++++++++++++++++++ extras/pom.xml | 1 + 7 files changed, 226 insertions(+) create mode 100644 extras/jdeferred/pom.xml create mode 100644 extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java create mode 100644 extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java create mode 100644 extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java create mode 100644 extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java create mode 100644 extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java diff --git a/extras/jdeferred/pom.xml b/extras/jdeferred/pom.xml new file mode 100644 index 0000000000..a794fbb3db --- /dev/null +++ b/extras/jdeferred/pom.xml @@ -0,0 +1,17 @@ + + 4.0.0 + + async-http-client-extras-parent + com.ning + 1.8.0-SNAPSHOT + .. + + async-http-client-extras-jdeferred + + + org.jdeferred + jdeferred-core + 1.0.0 + + + \ No newline at end of file diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java new file mode 100644 index 0000000000..8ecc65587b --- /dev/null +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java @@ -0,0 +1,46 @@ +package com.ning.http.client.extra; + +import java.io.IOException; + +import org.jdeferred.Promise; +import org.jdeferred.impl.DeferredObject; + +import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; +import com.ning.http.client.AsyncCompletionHandler; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.Response; + +public class AsyncHttpDeferredObject extends DeferredObject { + public AsyncHttpDeferredObject(BoundRequestBuilder builder) throws IOException { + builder.execute(new AsyncCompletionHandler() { + @Override + public Void onCompleted(Response response) throws Exception { + AsyncHttpDeferredObject.this.resolve(response); + return null; + } + + @Override + public void onThrowable(Throwable t) { + AsyncHttpDeferredObject.this.reject(t); + } + + @Override + public com.ning.http.client.AsyncHandler.STATE onContentWriteProgress( + long amount, long current, long total) { + AsyncHttpDeferredObject.this.notify(new ContentWriteProgress(amount, current, total)); + return super.onContentWriteProgress(amount, current, total); + } + + @Override + public com.ning.http.client.AsyncHandler.STATE onBodyPartReceived( + HttpResponseBodyPart content) throws Exception { + AsyncHttpDeferredObject.this.notify(new HttpResponseBodyPartProgress(content)); + return super.onBodyPartReceived(content); + } + }); + } + + public static Promise promise(final BoundRequestBuilder builder) throws IOException { + return new AsyncHttpDeferredObject(builder).promise(); + } +} diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java new file mode 100644 index 0000000000..480614d0c9 --- /dev/null +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java @@ -0,0 +1,32 @@ +package com.ning.http.client.extra; + +public class ContentWriteProgress implements HttpProgress { + private final long amount; + private final long current; + private final long total; + + public ContentWriteProgress(long amount, long current, long total) { + this.amount = amount; + this.current = current; + this.total = total; + } + + public long getAmount() { + return amount; + } + + public long getCurrent() { + return current; + } + + public long getTotal() { + return total; + } + + @Override + public String toString() { + return "ContentWriteProgress [amount=" + amount + ", current=" + + current + ", total=" + total + "]"; + } + +} diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java new file mode 100644 index 0000000000..7883af3824 --- /dev/null +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java @@ -0,0 +1,5 @@ +package com.ning.http.client.extra; + +public interface HttpProgress { + +} diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java new file mode 100644 index 0000000000..7d0a08fce9 --- /dev/null +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java @@ -0,0 +1,20 @@ +package com.ning.http.client.extra; + +import com.ning.http.client.HttpResponseBodyPart; + +public class HttpResponseBodyPartProgress implements HttpProgress { + private final HttpResponseBodyPart part; + + public HttpResponseBodyPartProgress(HttpResponseBodyPart part) { + this.part = part; + } + + public HttpResponseBodyPart getPart() { + return part; + } + + @Override + public String toString() { + return "HttpResponseBodyPartProgress [part=" + part + "]"; + } +} diff --git a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java b/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java new file mode 100644 index 0000000000..59aacd6cae --- /dev/null +++ b/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java @@ -0,0 +1,105 @@ +package com.ning.http.client.extra; + +import java.io.IOException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicInteger; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.jdeferred.DoneCallback; +import org.jdeferred.ProgressCallback; +import org.jdeferred.Promise; +import org.jdeferred.impl.DefaultDeferredManager; +import org.jdeferred.multiple.MultipleResults; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.Response; + +public class AsyncHttpTest extends TestCase { + protected DefaultDeferredManager deferredManager; + + protected void setUp() throws Exception { + super.setUp(); + deferredManager = new DefaultDeferredManager(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + public void testPromiseAdapter() throws IOException { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicInteger successCount = new AtomicInteger(); + final AtomicInteger progressCount = new AtomicInteger(); + + AsyncHttpClient client = new AsyncHttpClient(); + + Promise p1 = AsyncHttpDeferredObject + .promise(client.prepareGet("http://www.ning.com")); + p1.done(new DoneCallback() { + @Override + public void onDone(Response response) { + try { + Assert.assertEquals(200, response.getStatusCode()); + successCount.incrementAndGet(); + } finally { + latch.countDown(); + } + } + }).progress(new ProgressCallback() { + + @Override + public void onProgress(HttpProgress progress) { + progressCount.incrementAndGet(); + } + }); + + try { + latch.await(); + Assert.assertTrue(progressCount.get() > 0); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + + public void testMultiplePromiseAdapter() throws IOException { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicInteger successCount = new AtomicInteger(); + + AsyncHttpClient client = new AsyncHttpClient(); + + Promise p1 = AsyncHttpDeferredObject + .promise(client.prepareGet("http://www.ning.com")); + Promise p2 = AsyncHttpDeferredObject + .promise(client.prepareGet("http://www.google.com")); + AsyncHttpDeferredObject deferredRequest = new AsyncHttpDeferredObject( + client.prepareGet("http://jdeferred.org")); + + deferredManager.when(p1, p2, deferredRequest).then( + new DoneCallback() { + @Override + public void onDone(MultipleResults result) { + try { + Assert.assertEquals(3, result.size()); + Assert.assertEquals(200, ((Response) result.get(0) + .getResult()).getStatusCode()); + Assert.assertEquals(200, ((Response) result.get(1) + .getResult()).getStatusCode()); + Assert.assertEquals(200, ((Response) result.get(2) + .getResult()).getStatusCode()); + successCount.incrementAndGet(); + } finally { + latch.countDown(); + } + } + }); + + try { + latch.await(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + +} diff --git a/extras/pom.xml b/extras/pom.xml index fc51307e0a..561e032933 100644 --- a/extras/pom.xml +++ b/extras/pom.xml @@ -47,6 +47,7 @@ guava + jdeferred From f6b341a717bf593e06a64023aef702400c717190 Mon Sep 17 00:00:00 2001 From: saturnism Date: Sun, 7 Apr 2013 10:53:02 -0700 Subject: [PATCH 0344/2844] Added OSS headers --- extras/jdeferred/pom.xml | 17 ++++++++++++++++- .../client/extra/AsyncHttpDeferredObject.java | 15 +++++++++++++++ .../http/client/extra/ContentWriteProgress.java | 15 +++++++++++++++ .../ning/http/client/extra/HttpProgress.java | 15 +++++++++++++++ .../extra/HttpResponseBodyPartProgress.java | 15 +++++++++++++++ .../ning/http/client/extra/AsyncHttpTest.java | 15 +++++++++++++++ 6 files changed, 91 insertions(+), 1 deletion(-) diff --git a/extras/jdeferred/pom.xml b/extras/jdeferred/pom.xml index a794fbb3db..4918bb7802 100644 --- a/extras/jdeferred/pom.xml +++ b/extras/jdeferred/pom.xml @@ -1,3 +1,18 @@ + 4.0.0 @@ -14,4 +29,4 @@ 1.0.0 - \ No newline at end of file + diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java index 8ecc65587b..5e4ac2675e 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013 Ray Tsang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.ning.http.client.extra; import java.io.IOException; diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java index 480614d0c9..321025fea1 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013 Ray Tsang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.ning.http.client.extra; public class ContentWriteProgress implements HttpProgress { diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java index 7883af3824..7caa1fc232 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013 Ray Tsang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.ning.http.client.extra; public interface HttpProgress { diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java index 7d0a08fce9..79a5f7b5dc 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013 Ray Tsang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.ning.http.client.extra; import com.ning.http.client.HttpResponseBodyPart; diff --git a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java b/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java index 59aacd6cae..54bfb0e396 100644 --- a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java +++ b/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2013 Ray Tsang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.ning.http.client.extra; import java.io.IOException; From fd17c4e5c78fd64ec5ac25cff97518ba808f6a28 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 8 Apr 2013 11:45:46 -0700 Subject: [PATCH 0345/2844] Merge pull request 269. --- .../com/ning/http/client/ProxyServer.java | 4 +- .../providers/grizzly/GSSSPNEGOWrapper.java | 49 +++++ .../grizzly/GrizzlyAsyncHttpProvider.java | 186 +++++++++++++++--- 3 files changed, 207 insertions(+), 32 deletions(-) create mode 100644 providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java diff --git a/api/src/main/java/com/ning/http/client/ProxyServer.java b/api/src/main/java/com/ning/http/client/ProxyServer.java index 8f2da732d6..2bce583eba 100644 --- a/api/src/main/java/com/ning/http/client/ProxyServer.java +++ b/api/src/main/java/com/ning/http/client/ProxyServer.java @@ -58,11 +58,13 @@ public String toString() { private String ntlmDomain = System.getProperty("http.auth.ntlm.domain", ""); private boolean isBasic = true; - + + @Deprecated public boolean isBasic() { return isBasic; } + @Deprecated public void setBasic(boolean isBasic) { this.isBasic = isBasic; } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java new file mode 100644 index 0000000000..ce06498932 --- /dev/null +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java @@ -0,0 +1,49 @@ +package com.ning.http.client.providers.grizzly; + +import org.ietf.jgss.GSSContext; +import org.ietf.jgss.GSSException; +import org.ietf.jgss.GSSManager; +import org.ietf.jgss.GSSName; +import org.ietf.jgss.Oid; + +import com.ning.http.util.Base64; + +public class GSSSPNEGOWrapper { + + private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; + + static GSSManager getManager() { + return GSSManager.getInstance(); + } + + static byte[] generateGSSToken( + final byte[] input, final Oid oid, final String authServer) throws GSSException { + byte[] token = input; + if (token == null) { + token = new byte[0]; + } + GSSManager manager = getManager(); + GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE); + GSSContext gssContext = manager.createContext( + serverName.canonicalize(oid), oid, null, GSSContext.DEFAULT_LIFETIME); + gssContext.requestMutualAuth(true); + gssContext.requestCredDeleg(true); + return gssContext.initSecContext(token, 0, token.length); + } + + public static String generateToken(String authServer) + { + String returnVal = ""; + Oid oid; + try { + oid = new Oid(KERBEROS_OID); + byte[] token = GSSSPNEGOWrapper.generateGSSToken(null, oid, authServer); + returnVal = new String(Base64.encode(token)); + } catch (GSSException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return returnVal; + } +} diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index a4ad037f3d..774733095c 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 Sonatype, Inc. All rights reserved. + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. @@ -39,6 +39,7 @@ import com.ning.http.client.filter.FilterContext; import com.ning.http.client.filter.ResponseFilter; import com.ning.http.client.listener.TransferCompletionHandler; +import com.ning.http.client.ntlm.NTLMEngine; import com.ning.http.client.websocket.WebSocket; import com.ning.http.client.websocket.WebSocketByteListener; import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; @@ -172,8 +173,7 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { DelayedExecutor.Resolver resolver; private DelayedExecutor timeoutExecutor; - - + private final static NTLMEngine ntlmEngine = new NTLMEngine(); // ------------------------------------------------------------ Constructors @@ -222,7 +222,9 @@ public void completed(final Connection c) { try { execute(c, request, handler, future); } catch (Exception e) { - if (e instanceof IOException) { + if (e instanceof RuntimeException) { + failed(e); + } else if (e instanceof IOException) { failed(e); } if (LOGGER.isWarnEnabled()) { @@ -399,7 +401,7 @@ public void onTimeout(Connection connection) { } fcb.add(eventFilter); fcb.add(clientFilter); - + if (providerConfig != null) { final TransportCustomizer customizer = (TransportCustomizer) providerConfig.getProperty(TRANSPORT_CUSTOMIZER); @@ -435,6 +437,7 @@ void touchConnection(final Connection c, final Request request) { // --------------------------------------------------------- Private Methods + private static boolean configSendFileSupport() { return !((System.getProperty("os.name").equalsIgnoreCase("linux") @@ -933,6 +936,18 @@ private void convertToUpgradeRequest(final HttpTransactionContext ctx) { ctx.requestUrl = sb.toString(); } + + /* private ProxyServer getProxyServer(Request request) { + + ProxyServer proxyServer = request.getProxyServer(); + if (proxyServer == null) { + proxyServer = config.getProxyServer(); + } + return proxyServer; + + }*/ + + private void addHeaders(final Request request, final HttpRequestPacket requestPacket, final ProxyServer proxy) throws IOException { @@ -970,8 +985,9 @@ private void addHeaders(final Request request, requestPacket.setHeader(Header.ProxyConnection, "keep-alive"); } - if (proxy.getPrincipal() != null && proxy.isBasic()) { - requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); + if(null == requestPacket.getHeader(Header.ProxyAuthorization) ) + { + requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); } } @@ -1367,10 +1383,18 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { boolean result; - if (httpHeader.isSkipRemainder()) { - clearResponse(ctx.getConnection()); - cleanup(ctx, provider); - return false; + final String proxy_auth = httpHeader.getHeader(Header.ProxyAuthenticate); + + if (httpHeader.isSkipRemainder() ) { + if (!ProxyAuthorizationHandler.isNTLMSecondHandShake(proxy_auth)) { + clearResponse(ctx.getConnection()); + cleanup(ctx, provider); + return false; + } else { + super.onHttpPacketParsed(httpHeader, ctx); + httpHeader.getProcessingState().setKeepAlive(true); + return false; + } } result = super.onHttpPacketParsed(httpHeader, ctx); @@ -1453,6 +1477,14 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx, } + + private static URI getURI(String url) { + + return AsyncHttpProviderUtils.createUri(url); + + } + + private static boolean redirectCountExceeded(final HttpTransactionContext context) { return (context.redirectCount.get() > context.maxRedirectCount); @@ -1590,7 +1622,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, String principal = proxyServer.getPrincipal(); String password = proxyServer.getPassword(); Realm realm = new Realm.RealmBuilder().setPrincipal(principal) - .setPassword(password) + .setPassword(password) .setUri("/") .setMethodName("CONNECT") .setUsePreemptiveAuth(true) @@ -1615,36 +1647,123 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, } catch (UnsupportedEncodingException e) { throw new IllegalStateException("Unsupported encoding.", e); } - } else { + }else if (proxy_auth.toLowerCase().startsWith("ntlm")) { + + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + + String msg = null; + try { + + if(isNTLMFirstHandShake(proxy_auth)) + { + msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), ""); + }else { + String serverChallenge = proxy_auth.trim().substring("NTLM ".length()); + msg = ntlmEngine.generateType3Msg(principal, password, proxyServer.getNtlmDomain(), proxyServer.getHost(), serverChallenge); + } + + req.getHeaders().add(Header.ProxyAuthorization.toString(), "NTLM " + msg); + } catch (Exception e1) { + e1.printStackTrace(); + } + } else if (proxy_auth.toLowerCase().startsWith("negotiate")){ + //this is for kerberos + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + + }else { throw new IllegalStateException("Unsupported authorization method: " + proxy_auth); } final ConnectionManager m = httpTransactionContext.provider.connectionManager; + InvocationStatus tempInvocationStatus = InvocationStatus.STOP; + try { - final Connection c = m.obtainConnection(req, - httpTransactionContext.future); - final HttpTransactionContext newContext = - httpTransactionContext.copy(); - httpTransactionContext.future = null; - httpTransactionContext.provider.setHttpTransactionContext(c, newContext); - newContext.invocationStatus = InvocationStatus.STOP; - try { - httpTransactionContext.provider.execute(c, - req, - httpTransactionContext.handler, - httpTransactionContext.future); - return false; - } catch (IOException ioe) { - newContext.abort(ioe); - return false; + + if(isNTLMFirstHandShake(proxy_auth)) + { + tempInvocationStatus = InvocationStatus.CONTINUE; + + } + + if(proxy_auth.toLowerCase().startsWith("negotiate")) + { + final Connection c = m.obtainConnection(req, httpTransactionContext.future); + final HttpTransactionContext newContext = httpTransactionContext.copy(); + httpTransactionContext.future = null; + httpTransactionContext.provider.setHttpTransactionContext(c, newContext); + + newContext.invocationStatus = tempInvocationStatus; + + String challengeHeader = null; + String server = proxyServer.getHost(); + + challengeHeader = GSSSPNEGOWrapper.generateToken(server); + + req.getHeaders().add(Header.ProxyAuthorization.toString(), "Negotiate " + challengeHeader); + + + return exceuteRequest(httpTransactionContext, req, c, + newContext); + }else if(isNTLMSecondHandShake(proxy_auth)) + { + final Connection c = ctx.getConnection(); + final HttpTransactionContext newContext = httpTransactionContext.copy(); + + httpTransactionContext.future = null; + httpTransactionContext.provider.setHttpTransactionContext(c, newContext); + + newContext.invocationStatus = tempInvocationStatus; + httpTransactionContext.establishingTunnel = true; + + return exceuteRequest(httpTransactionContext, req, c, + newContext); + + } + else{ + final Connection c = m.obtainConnection(req, httpTransactionContext.future); + final HttpTransactionContext newContext = httpTransactionContext.copy(); + httpTransactionContext.future = null; + httpTransactionContext.provider.setHttpTransactionContext(c, newContext); + + newContext.invocationStatus = tempInvocationStatus; + + //NTLM needs the same connection to be used for exchange of tokens + return exceuteRequest(httpTransactionContext, req, c, + newContext); } } catch (Exception e) { httpTransactionContext.abort(e); } - httpTransactionContext.invocationStatus = InvocationStatus.STOP; + httpTransactionContext.invocationStatus = tempInvocationStatus; return false; } + private boolean exceuteRequest( + final HttpTransactionContext httpTransactionContext, + final Request req, final Connection c, + final HttpTransactionContext newContext) { + try { + httpTransactionContext.provider.execute(c, + req, + httpTransactionContext.handler, + httpTransactionContext.future); + return false; + } catch (IOException ioe) { + newContext.abort(ioe); + return false; + } + } + + public static boolean isNTLMSecondHandShake(final String proxy_auth) { + return (proxy_auth.toLowerCase().startsWith("ntlm") && !proxy_auth.equalsIgnoreCase("ntlm")); + } + public static boolean isNTLMFirstHandShake(final String proxy_auth) { + return (proxy_auth.equalsIgnoreCase("ntlm")); + } + + } // END AuthorizationHandler @@ -2418,6 +2537,7 @@ Connection obtainConnection(final Request request, final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); markConnectionAsDoNotCache(c); return c; + } void doAsyncConnect(final Request request, @@ -2472,6 +2592,7 @@ boolean returnConnection(final Request request, final Connection c) { } } return result; + } @@ -2948,4 +3069,7 @@ public int hashCode() { } } // END AHCWebSocketListenerAdapter -} \ No newline at end of file +} + + + From 1e00231166f991918685a03af14725db7a8cf011 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 9 Apr 2013 22:08:27 -0700 Subject: [PATCH 0346/2844] Add logging. --- .../providers/grizzly/GSSSPNEGOWrapper.java | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java index ce06498932..4e59ab31ea 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java @@ -7,16 +7,17 @@ import org.ietf.jgss.Oid; import com.ning.http.util.Base64; +import org.slf4j.LoggerFactory; public class GSSSPNEGOWrapper { + private final static org.slf4j.Logger LOGGER = LoggerFactory.getLogger(GSSSPNEGOWrapper.class); + private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; - private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; - - static GSSManager getManager() { + static GSSManager getManager() { return GSSManager.getInstance(); } - - static byte[] generateGSSToken( + + static byte[] generateGSSToken( final byte[] input, final Oid oid, final String authServer) throws GSSException { byte[] token = input; if (token == null) { @@ -30,20 +31,18 @@ static byte[] generateGSSToken( gssContext.requestCredDeleg(true); return gssContext.initSecContext(token, 0, token.length); } - - public static String generateToken(String authServer) - { - String returnVal = ""; - Oid oid; - try { - oid = new Oid(KERBEROS_OID); - byte[] token = GSSSPNEGOWrapper.generateGSSToken(null, oid, authServer); - returnVal = new String(Base64.encode(token)); - } catch (GSSException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - return returnVal; - } + + public static String generateToken(String authServer) { + String returnVal = ""; + Oid oid; + try { + oid = new Oid(KERBEROS_OID); + byte[] token = GSSSPNEGOWrapper.generateGSSToken(null, oid, authServer); + returnVal = Base64.encode(token); + } catch (GSSException e) { + LOGGER.warn(e.toString(), e); + } + + return returnVal; + } } From ce896c820293ac817609fff66087fed96196afe8 Mon Sep 17 00:00:00 2001 From: Ivan Porto Carrero Date: Thu, 11 Apr 2013 19:14:35 +0200 Subject: [PATCH 0347/2844] Reset cached uri vars on setUrl --- api/src/main/java/com/ning/http/client/RequestBuilderBase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java index 6aa0efeb3f..10f7d04658 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/com/ning/http/client/RequestBuilderBase.java @@ -367,6 +367,8 @@ protected RequestBuilderBase(Class derived, Request prototype) { public T setUrl(String url) { request.originalUri = buildURI(url); + request.uri = null; + request.rawUri = null; return derived.cast(this); } From 25dff7e9393e996329e1c6ff9e419c83d26dd6a7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 12 Apr 2013 10:32:17 +0200 Subject: [PATCH 0348/2844] Lower log level for markSupported not being supported, close #275 --- .../ning/http/client/generators/InputStreamBodyGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java b/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java index 12660ca438..5beba6e092 100644 --- a/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java +++ b/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java @@ -43,7 +43,7 @@ public InputStreamBodyGenerator(InputStream inputStream) { if (inputStream.markSupported()) { inputStream.mark(0); } else { - logger.warn("inputStream.markSupported() not supported. Some features will not works"); + logger.info("inputStream.markSupported() not supported. Some features will not works"); } } From 8c69cfdbbdc7f64f063553a7b14816f88717984e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 12 Apr 2013 13:12:24 -0700 Subject: [PATCH 0349/2844] Integrate Grizzly 2.3.2-SNAPSHOT in preparation for spdy support within the Grizzly provider. --- providers/grizzly/pom.xml | 14 +++++----- .../grizzly/GrizzlyAsyncHttpProvider.java | 26 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index c53b5ed6a1..f0a542777f 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -17,15 +17,15 @@ org.glassfish.grizzly grizzly-websockets - 2.3-rc6 + 2.3.2-SNAPSHOT - com.ning - async-http-client-api - ${project.version} - test - tests - + com.ning + async-http-client-api + ${project.version} + test + tests + diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 774733095c..5bde990703 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -105,13 +105,13 @@ import org.glassfish.grizzly.utils.Futures; import org.glassfish.grizzly.utils.IdleTimeoutFilter; import org.glassfish.grizzly.websockets.DataFrame; -import org.glassfish.grizzly.websockets.DefaultWebSocket; import org.glassfish.grizzly.websockets.HandShake; import org.glassfish.grizzly.websockets.HandshakeException; import org.glassfish.grizzly.websockets.ProtocolHandler; +import org.glassfish.grizzly.websockets.SimpleWebSocket; import org.glassfish.grizzly.websockets.Version; -import org.glassfish.grizzly.websockets.WebSocketEngine; -import org.glassfish.grizzly.websockets.WebSocketFilter; +import org.glassfish.grizzly.websockets.WebSocketClientFilter; +import org.glassfish.grizzly.websockets.WebSocketHolder; import org.glassfish.grizzly.websockets.draft06.ClosingFrame; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -413,7 +413,7 @@ public void onTimeout(Connection connection) { } else { doDefaultTransportConfig(); } - fcb.add(new WebSocketFilter()); + fcb.add(new WebSocketClientFilter()); clientTransport.getAsyncQueueIO().getWriter().setMaxPendingBytesPerConnection(-1); clientTransport.setProcessor(fcb.build()); @@ -1337,13 +1337,13 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context); context.webSocket = webSocketAdapter; - DefaultWebSocket ws = webSocketAdapter.gWebSocket; + SimpleWebSocket ws = webSocketAdapter.gWebSocket; if (context.currentState == AsyncHandler.STATE.UPGRADE) { httpHeader.setChunked(false); ws.onConnect(); - WebSocketEngine.getEngine().setWebSocketHolder(ctx.getConnection(), - context.protocolHandler, - ws); + WebSocketHolder.set(ctx.getConnection(), + context.protocolHandler, + ws); ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); final int wsTimeout = context.provider.clientConfig.getWebSocketIdleTimeoutInMs(); IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), @@ -1437,7 +1437,7 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c // ----------------------------------------------------- Private Methods private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) { - DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); + SimpleWebSocket ws = new SimpleWebSocket(context.protocolHandler); AsyncHttpProviderConfig config = context.provider.clientConfig.getAsyncHttpProviderConfig(); boolean bufferFragments = true; if (config instanceof GrizzlyAsyncHttpProviderConfig) { @@ -1652,7 +1652,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, req.getHeaders().remove(Header.ProxyAuthenticate.toString()); req.getHeaders().remove(Header.ProxyAuthorization.toString()); - String msg = null; + String msg; try { if(isNTLMFirstHandShake(proxy_auth)) @@ -1696,7 +1696,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, newContext.invocationStatus = tempInvocationStatus; - String challengeHeader = null; + String challengeHeader; String server = proxyServer.getHost(); challengeHeader = GSSSPNEGOWrapper.generateToken(server); @@ -2816,13 +2816,13 @@ public void getBytes(byte[] bytes) { private static final class GrizzlyWebSocketAdapter implements WebSocket { - private final DefaultWebSocket gWebSocket; + private final SimpleWebSocket gWebSocket; private final boolean bufferFragments; // -------------------------------------------------------- Constructors - GrizzlyWebSocketAdapter(final DefaultWebSocket gWebSocket, + GrizzlyWebSocketAdapter(final SimpleWebSocket gWebSocket, final boolean bufferFragements) { this.gWebSocket = gWebSocket; this.bufferFragments = bufferFragements; From 5ad184286c15466e7ded89ce3ef2030936cb6889 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 16 Apr 2013 07:51:36 +0200 Subject: [PATCH 0350/2844] Update current version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e60f566a3..1c99b4b305 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.12 + 1.7.13 ``` From ce0e2454eab55ef62b7d48503a415f56477ec6e9 Mon Sep 17 00:00:00 2001 From: Mikhail Mazursky Date: Mon, 22 Apr 2013 12:59:41 +0600 Subject: [PATCH 0351/2844] Implement Closeable where relevant This helps to advertise closeability of resource. --- api/src/main/java/com/ning/http/client/AsyncHttpProvider.java | 3 ++- api/src/main/java/com/ning/http/client/Body.java | 3 ++- api/src/main/java/com/ning/http/client/BodyConsumer.java | 3 ++- .../main/java/com/ning/http/client/SimpleAsyncHttpClient.java | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java index 49e771569b..c8015572cb 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java @@ -15,6 +15,7 @@ */ package com.ning.http.client; +import java.io.Closeable; import java.io.IOException; import java.util.List; @@ -22,7 +23,7 @@ * Interface to be used when implementing custom asynchronous I/O HTTP client. * By default, the {@link com.ning.http.client.providers.netty.NettyAsyncHttpProvider} is used. */ -public interface AsyncHttpProvider { +public interface AsyncHttpProvider extends Closeable { /** * Execute the request and invoke the {@link AsyncHandler} when the response arrive. diff --git a/api/src/main/java/com/ning/http/client/Body.java b/api/src/main/java/com/ning/http/client/Body.java index 309fbec5ae..61a2ef9e9d 100644 --- a/api/src/main/java/com/ning/http/client/Body.java +++ b/api/src/main/java/com/ning/http/client/Body.java @@ -13,13 +13,14 @@ package com.ning.http.client; +import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; /** * A request body. */ -public interface Body { +public interface Body extends Closeable { /** * Gets the length of the body. diff --git a/api/src/main/java/com/ning/http/client/BodyConsumer.java b/api/src/main/java/com/ning/http/client/BodyConsumer.java index b092ec1210..ae72ff3deb 100644 --- a/api/src/main/java/com/ning/http/client/BodyConsumer.java +++ b/api/src/main/java/com/ning/http/client/BodyConsumer.java @@ -13,13 +13,14 @@ package com.ning.http.client; +import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; /** * A simple API to be used with the {@link SimpleAsyncHttpClient} class in order to process response's bytes. */ -public interface BodyConsumer { +public interface BodyConsumer extends Closeable { /** * Consume the received bytes. diff --git a/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java b/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java index 7193753015..7df592eb51 100644 --- a/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java +++ b/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java @@ -20,6 +20,8 @@ import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; + +import java.io.Closeable; import java.io.IOException; import java.util.Collection; import java.util.Map; @@ -57,7 +59,7 @@ * Future future = client.post(new FileodyGenerator(myFile), new OutputStreamBodyConsumer(o)); * */ -public class SimpleAsyncHttpClient { +public class SimpleAsyncHttpClient implements Closeable { private final static Logger logger = LoggerFactory.getLogger(SimpleAsyncHttpClient.class); private final AsyncHttpClientConfig config; From f565b0f42c439265279cc77e4df7dc31430b7fa0 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 18 Apr 2013 14:17:37 -0400 Subject: [PATCH 0352/2844] Fixes for #278 --- .../netty/NettyAsyncHttpProvider.java | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 2cdb075de5..1f989f40a5 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2419,21 +2419,25 @@ public void setContent(ChannelBuffer content) { h.onBodyPartReceived(rp); NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - - if(pendingOpcode == OPCODE_BINARY) { - webSocket.onBinaryFragment(rp.getBodyPartBytes(),frame.isFinalFragment()); - } - else { - webSocket.onTextFragment(frame.getBinaryData().toString(UTF8),frame.isFinalFragment()); - } - if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { - try { - webSocket.onClose(CloseWebSocketFrame.class.cast(frame).getStatusCode(), CloseWebSocketFrame.class.cast(frame).getReasonText()); - } catch (Throwable t) { - // Swallow any exception that may comes from a Netty version released before 3.4.0 - log.trace("", t); + if (webSocket != null) { + if(pendingOpcode == OPCODE_BINARY) { + webSocket.onBinaryFragment(rp.getBodyPartBytes(),frame.isFinalFragment()); + } + else { + webSocket.onTextFragment(frame.getBinaryData().toString(UTF8),frame.isFinalFragment()); } + + if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { + try { + webSocket.onClose(CloseWebSocketFrame.class.cast(frame).getStatusCode(), CloseWebSocketFrame.class.cast(frame).getReasonText()); + } catch (Throwable t) { + // Swallow any exception that may comes from a Netty version released before 3.4.0 + log.trace("", t); + } + } + } else { + log.debug("UpgradeHandler returned a null NettyWebSocket "); } } } else { @@ -2453,8 +2457,10 @@ public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - webSocket.onError(e.getCause()); - webSocket.close(); + if (webSocket != null) { + webSocket.onError(e.getCause()); + webSocket.close(); + } } catch (Throwable t) { log.error("onError", t); } From 9af2694e65d3ea1808d5c7e58312426dfeab2881 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 24 Apr 2013 11:02:39 -0400 Subject: [PATCH 0353/2844] Fixes for #284 --- .../http/client/providers/netty/NettyWebSocket.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 3e0f7947e8..2197ba01f4 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -19,15 +19,15 @@ import com.ning.http.client.websocket.WebSocketTextListener; import org.jboss.netty.channel.Channel; import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.PingWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.concurrent.ConcurrentLinkedQueue; - import java.io.ByteArrayOutputStream; +import java.util.concurrent.ConcurrentLinkedQueue; import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; @@ -116,7 +116,12 @@ public boolean isOpen() { public void close() { onClose(); listeners.clear(); - channel.close(); + try { + channel.write(new CloseWebSocketFrame()); + channel.getCloseFuture().awaitUninterruptibly(); + } finally { + channel.close(); + } } protected void onBinaryFragment(byte[] message, boolean last) { From c087476fed4cdb832b4a6966ee490c6f01135c8f Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Thu, 25 Apr 2013 12:06:07 +0200 Subject: [PATCH 0354/2844] Only optimize the byte array access if possible --- .../client/providers/netty/ResponseBodyPart.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java index 1452736ee9..adc069300a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java @@ -67,9 +67,19 @@ public byte[] getBodyPartBytes() { } ChannelBuffer b = getChannelBuffer(); - byte[] rb = b.toByteBuffer().array(); - bytes.set(rb); - return rb; + int readable = b.readableBytes(); + int readerIndex = b.readerIndex(); + if (b.hasArray()) { + byte[] array = b.array(); + if (b.arrayOffset() == 0 && readerIndex == 0 && array.length == readable) { + bytes.set(array); + return array; + } + } + byte[] array = new byte[readable]; + b.getBytes(readerIndex, array); + bytes.set(array); + return array; } @Override From 679aa94e901efc7818e3cc2e5b7363fa97dcf68b Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 25 Apr 2013 18:17:44 -0400 Subject: [PATCH 0355/2844] Bump version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c99b4b305..ebf923317a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.13 + 1.7.14 ``` From 22beba2c01845a4db3f35bbbe51a0da3fbc677cf Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 14:39:18 +0200 Subject: [PATCH 0356/2844] Upgrade Grizzly 2.3.2 --- providers/grizzly/pom.xml | 2 +- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index f0a542777f..ce6b188b79 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -17,7 +17,7 @@ org.glassfish.grizzly grizzly-websockets - 2.3.2-SNAPSHOT + 2.3.2 com.ning diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 5bde990703..4f9e9966bd 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -29,7 +29,6 @@ import com.ning.http.client.HttpResponseStatus; import com.ning.http.client.ListenableFuture; import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.Part; import com.ning.http.client.ProxyServer; import com.ning.http.client.Realm; import com.ning.http.client.Request; @@ -2288,8 +2287,7 @@ private static final class PartsBodyHandler implements BodyHandler { public boolean handlesBodyType(final Request request) { - final List parts = request.getParts(); - return isNonEmpty(parts); + return isNonEmpty(request.getParts()); } @SuppressWarnings({"unchecked"}) From d4cd6f39e01113a496d2a23d8288d1bc98b3597e Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 14:41:07 +0200 Subject: [PATCH 0357/2844] Upgrade Netty 3.6.5 --- providers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index fa766d4a6d..8009c5ca94 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -17,7 +17,7 @@ io.netty netty - 3.6.3.Final + 3.6.5.Final From 330d91b3d8b6ed8e2cf70d7dd047185f2d0ec54b Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 15:03:10 +0200 Subject: [PATCH 0358/2844] Handle double quoted cookie values, master fix #283 --- .../java/com/ning/http/client/Cookie.java | 201 +++++++++--- .../client/providers/jdk/JDKResponse.java | 4 +- .../http/util/AsyncHttpProviderUtils.java | 60 +--- .../handler/codec/http/CookieDecoder.java | 304 ++++++++++++++++++ .../handler/codec/http/CookieHeaderNames.java | 56 ++++ .../jboss/netty/util/internal/StringUtil.java | 72 +++++ .../client/async/AsyncProvidersBasicTest.java | 46 +-- .../http/client/async/RemoteSiteTest.java | 26 +- .../http/util/TestAsyncHttpProviderUtils.java | 33 -- .../handler/codec/http/CookieDecoderTest.java | 52 +++ .../providers/apache/ApacheResponse.java | 4 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 6 +- .../providers/grizzly/GrizzlyResponse.java | 7 +- .../netty/NettyAsyncHttpProvider.java | 11 +- .../client/providers/netty/NettyResponse.java | 4 +- 15 files changed, 711 insertions(+), 175 deletions(-) create mode 100644 api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java create mode 100644 api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java create mode 100644 api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java delete mode 100644 api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java create mode 100644 api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java diff --git a/api/src/main/java/com/ning/http/client/Cookie.java b/api/src/main/java/com/ning/http/client/Cookie.java index 26fd46920f..5999bd19da 100644 --- a/api/src/main/java/com/ning/http/client/Cookie.java +++ b/api/src/main/java/com/ning/http/client/Cookie.java @@ -20,7 +20,7 @@ import java.util.Set; import java.util.TreeSet; -public class Cookie { +public class Cookie implements Comparable{ private final String domain; private final String name; private final String value; @@ -28,27 +28,75 @@ public class Cookie { private final int maxAge; private final boolean secure; private final int version; + private final boolean httpOnly; + private final boolean discard; + private final String comment; + private final String commentUrl; + private Set ports = Collections.emptySet(); private Set unmodifiablePorts = ports; - public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure) { - this.domain = domain; - this.name = name; - this.value = value; - this.path = path; - this.maxAge = maxAge; - this.secure = secure; - this.version = 1; - } + public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure, int version, boolean httpOnly, boolean discard, String comment, String commentUrl, Iterable ports) { + + if (name == null) { + throw new NullPointerException("name"); + } + name = name.trim(); + if (name.length() == 0) { + throw new IllegalArgumentException("empty name"); + } + + for (int i = 0; i < name.length(); i++) { + char c = name.charAt(i); + if (c > 127) { + throw new IllegalArgumentException("name contains non-ascii character: " + name); + } + + // Check prohibited characters. + switch (c) { + case '\t': + case '\n': + case 0x0b: + case '\f': + case '\r': + case ' ': + case ',': + case ';': + case '=': + throw new IllegalArgumentException("name contains one of the following prohibited characters: " + "=,; \\t\\r\\n\\v\\f: " + name); + } + } + + if (name.charAt(0) == '$') { + throw new IllegalArgumentException("name starting with '$' not allowed: " + name); + } + + if (value == null) { + throw new NullPointerException("value"); + } - public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure, int version) { - this.domain = domain; this.name = name; this.value = value; - this.path = path; + this.domain = validateValue("domain", domain); + this.path = validateValue("path", path); this.maxAge = maxAge; this.secure = secure; this.version = version; + this.httpOnly = httpOnly; + + if (version > 0) { + this.comment = validateValue("comment", comment); + } else { + this.comment = null; + } + if (version > 1) { + this.discard = discard; + this.commentUrl = validateValue("commentUrl", commentUrl); + setPorts(ports); + } else { + this.discard = false; + this.commentUrl = null; + } } public String getDomain() { @@ -79,6 +127,22 @@ public int getVersion() { return version; } + public String getComment() { + return this.comment; + } + + public String getCommentUrl() { + return this.commentUrl; + } + + public boolean isHttpOnly() { + return httpOnly; + } + + public boolean isDiscard() { + return discard; + } + public Set getPorts() { if (unmodifiablePorts == null) { unmodifiablePorts = Collections.unmodifiableSet(ports); @@ -86,28 +150,7 @@ public Set getPorts() { return unmodifiablePorts; } - public void setPorts(int... ports) { - if (ports == null) { - throw new NullPointerException("ports"); - } - - int[] portsCopy = ports.clone(); - if (portsCopy.length == 0) { - unmodifiablePorts = this.ports = Collections.emptySet(); - } else { - Set newPorts = new TreeSet(); - for (int p : portsCopy) { - if (p <= 0 || p > 65535) { - throw new IllegalArgumentException("port out of range: " + p); - } - newPorts.add(Integer.valueOf(p)); - } - this.ports = newPorts; - unmodifiablePorts = null; - } - } - - public void setPorts(Iterable ports) { + private void setPorts(Iterable ports) { Set newPorts = new TreeSet(); for (int p : ports) { if (p <= 0 || p > 65535) { @@ -125,7 +168,89 @@ public void setPorts(Iterable ports) { @Override public String toString() { - return String.format("Cookie: domain=%s, name=%s, value=%s, path=%s, maxAge=%d, secure=%s", - domain, name, value, path, maxAge, secure); + StringBuilder buf = new StringBuilder(); + buf.append(getName()); + buf.append('='); + buf.append(getValue()); + if (getDomain() != null) { + buf.append("; domain="); + buf.append(getDomain()); + } + if (getPath() != null) { + buf.append("; path="); + buf.append(getPath()); + } + if (getComment() != null) { + buf.append("; comment="); + buf.append(getComment()); + } + if (getMaxAge() >= 0) { + buf.append("; maxAge="); + buf.append(getMaxAge()); + buf.append('s'); + } + if (isSecure()) { + buf.append("; secure"); + } + if (isHttpOnly()) { + buf.append("; HTTPOnly"); + } + return buf.toString(); + } + + private String validateValue(String name, String value) { + if (value == null) { + return null; + } + value = value.trim(); + if (value.length() == 0) { + return null; + } + for (int i = 0; i < value.length(); i++) { + char c = value.charAt(i); + switch (c) { + case '\r': + case '\n': + case '\f': + case 0x0b: + case ';': + throw new IllegalArgumentException(name + " contains one of the following prohibited characters: " + ";\\r\\n\\f\\v (" + value + ')'); + } + } + return value; + } + + public int compareTo(Cookie c) { + int v; + v = getName().compareToIgnoreCase(c.getName()); + if (v != 0) { + return v; + } + + if (getPath() == null) { + if (c.getPath() != null) { + return -1; + } + } else if (c.getPath() == null) { + return 1; + } else { + v = getPath().compareTo(c.getPath()); + if (v != 0) { + return v; + } + } + + if (getDomain() == null) { + if (c.getDomain() != null) { + return -1; + } + } else if (c.getDomain() == null) { + return 1; + } else { + v = getDomain().compareToIgnoreCase(c.getDomain()); + return v; + } + + return 0; } -} +} \ No newline at end of file diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java index 56bc330e59..9eb11949b9 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java @@ -12,6 +12,7 @@ */ package com.ning.http.client.providers.jdk; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.Cookie; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; @@ -53,8 +54,7 @@ public List buildCookies() { // TODO: ask for parsed header List v = header.getValue(); for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - cookies.add(cookie); + cookies.addAll(CookieDecoder.decode(value)); } } } diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 4adc537373..3e2c8fda21 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -508,69 +508,15 @@ public static String parseCharset(String contentType) { return null; } - public static Cookie parseCookie(String value) { - String[] fields = value.split(";\\s*"); - String[] cookie = fields[0].split("=", 2); - String cookieName = cookie[0]; - String cookieValue = (cookie.length == 1) ? null : cookie[1]; - - int maxAge = -1; - String path = null; - String domain = null; - boolean secure = false; - - boolean maxAgeSet = false; - boolean expiresSet = false; - - for (int j = 1; j < fields.length; j++) { - if ("secure".equalsIgnoreCase(fields[j])) { - secure = true; - } else if (fields[j].indexOf('=') > 0) { - String[] f = fields[j].split("="); - if (f.length == 1) continue; // Add protection against null field values - - // favor 'max-age' field over 'expires' - if (!maxAgeSet && "max-age".equalsIgnoreCase(f[0])) { - try { - maxAge = Math.max(Integer.valueOf(removeQuote(f[1])), 0); - } catch (NumberFormatException e1) { - // ignore failure to parse -> treat as session cookie - // invalidate a previously parsed expires-field - maxAge = -1; - } - maxAgeSet = true; - } else if (!maxAgeSet && !expiresSet && "expires".equalsIgnoreCase(f[0])) { - try { - maxAge = Math.max(convertExpireField(f[1]), 0); - } catch (Exception e) { - // original behavior, is this correct at all (expires field with max-age semantics)? - try { - maxAge = Math.max(Integer.valueOf(f[1]), 0); - } catch (NumberFormatException e1) { - // ignore failure to parse -> treat as session cookie - } - } - expiresSet = true; - } else if ("domain".equalsIgnoreCase(f[0])) { - domain = f[1]; - } else if ("path".equalsIgnoreCase(f[0])) { - path = f[1]; - } - } - } - - return new Cookie(domain, cookieName, cookieValue, path, maxAge, secure); - } - - public static int convertExpireField(String timestring) throws Exception { + public static int convertExpireField(String timestring) { String trimmedTimeString = removeQuote(timestring.trim()); for (SimpleDateFormat sdf : simpleDateFormat.get()) { Date date = sdf.parse(trimmedTimeString, new ParsePosition(0)); if (date != null) { long now = System.currentTimeMillis(); - long expire = date.getTime(); - return (int) ((expire - now) / 1000); + long maxAgeMillis = date.getTime() - now; + return (int) (maxAgeMillis / 1000) + (maxAgeMillis % 1000 != 0 ? 1 : 0); } } diff --git a/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java b/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java new file mode 100644 index 0000000000..da8a167c10 --- /dev/null +++ b/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java @@ -0,0 +1,304 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.org.jboss.netty.handler.codec.http; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +import com.ning.org.jboss.netty.util.internal.StringUtil; +import com.ning.http.client.Cookie; +import com.ning.http.util.AsyncHttpProviderUtils; + +/** + * Decodes an HTTP header value into {@link Cookie}s. This decoder can decode the HTTP cookie version 0, 1, and 2. + * + *

+ * {@link HttpRequest} req = ...;
+ * String value = req.getHeader("Cookie");
+ * Set<{@link Cookie}> cookies = new {@link CookieDecoder}().decode(value);
+ * 
+ * + * @see CookieEncoder + * + * @apiviz.stereotype utility + * @apiviz.has org.jboss.netty.handler.codec.http.Cookie oneway - - decodes + */ +public class CookieDecoder { + + private static final char COMMA = ','; + + /** + * Creates a new decoder. + */ + private CookieDecoder() { + } + + /** + * Decodes the specified HTTP header value into {@link Cookie}s. + * + * @return the decoded {@link Cookie}s + */ + public static Set decode(String header) { + List names = new ArrayList(8); + List values = new ArrayList(8); + extractKeyValuePairs(header, names, values); + + if (names.isEmpty()) { + return Collections.emptySet(); + } + + int i; + int version = 0; + + // $Version is the only attribute that can appear before the actual + // cookie name-value pair. + if (names.get(0).equalsIgnoreCase(CookieHeaderNames.VERSION)) { + try { + version = Integer.parseInt(values.get(0)); + } catch (NumberFormatException e) { + // Ignore. + } + i = 1; + } else { + i = 0; + } + + if (names.size() <= i) { + // There's a version attribute, but nothing more. + return Collections.emptySet(); + } + + Set cookies = new TreeSet(); + for (; i < names.size(); i++) { + String name = names.get(i); + String value = values.get(i); + if (value == null) { + value = ""; + } + + String cookieName = name; + String cookieValue = value; + boolean discard = false; + boolean secure = false; + boolean httpOnly = false; + String comment = null; + String commentURL = null; + String domain = null; + String path = null; + int maxAge = -1; + List ports = Collections.emptyList(); + + for (int j = i + 1; j < names.size(); j++, i++) { + name = names.get(j); + value = values.get(j); + + if (CookieHeaderNames.DISCARD.equalsIgnoreCase(name)) { + discard = true; + } else if (CookieHeaderNames.SECURE.equalsIgnoreCase(name)) { + secure = true; + } else if (CookieHeaderNames.HTTPONLY.equalsIgnoreCase(name)) { + httpOnly = true; + } else if (CookieHeaderNames.COMMENT.equalsIgnoreCase(name)) { + comment = value; + } else if (CookieHeaderNames.COMMENTURL.equalsIgnoreCase(name)) { + commentURL = value; + } else if (CookieHeaderNames.DOMAIN.equalsIgnoreCase(name)) { + domain = value; + } else if (CookieHeaderNames.PATH.equalsIgnoreCase(name)) { + path = value; + } else if (CookieHeaderNames.EXPIRES.equalsIgnoreCase(name)) { + try { + maxAge = AsyncHttpProviderUtils.convertExpireField(value); + } catch (Exception e) { + // original behavior, is this correct at all (expires field with max-age semantics)? + try { + maxAge = Math.max(Integer.valueOf(value), 0); + } catch (NumberFormatException e1) { + // ignore failure to parse -> treat as session cookie + } + } + } else if (CookieHeaderNames.MAX_AGE.equalsIgnoreCase(name)) { + maxAge = Integer.parseInt(value); + } else if (CookieHeaderNames.VERSION.equalsIgnoreCase(name)) { + version = Integer.parseInt(value); + } else if (CookieHeaderNames.PORT.equalsIgnoreCase(name)) { + String[] portList = StringUtil.split(value, COMMA); + ports = new ArrayList(2); + for (String s1 : portList) { + try { + ports.add(Integer.valueOf(s1)); + } catch (NumberFormatException e) { + // Ignore. + } + } + } else { + break; + } + } + + Cookie c = new Cookie(domain, cookieName, cookieValue, path, maxAge, secure, version, httpOnly, discard, comment, commentURL, ports); + cookies.add(c); + } + + return cookies; + } + + private static void extractKeyValuePairs(final String header, final List names, final List values) { + + final int headerLen = header.length(); + loop: for (int i = 0;;) { + + // Skip spaces and separators. + for (;;) { + if (i == headerLen) { + break loop; + } + switch (header.charAt(i)) { + case '\t': + case '\n': + case 0x0b: + case '\f': + case '\r': + case ' ': + case ',': + case ';': + i++; + continue; + } + break; + } + + // Skip '$'. + for (;;) { + if (i == headerLen) { + break loop; + } + if (header.charAt(i) == '$') { + i++; + continue; + } + break; + } + + String name; + String value; + + if (i == headerLen) { + name = null; + value = null; + } else { + int newNameStart = i; + keyValLoop: for (;;) { + switch (header.charAt(i)) { + case ';': + // NAME; (no value till ';') + name = header.substring(newNameStart, i); + value = null; + break keyValLoop; + case '=': + // NAME=VALUE + name = header.substring(newNameStart, i); + i++; + if (i == headerLen) { + // NAME= (empty value, i.e. nothing after '=') + value = ""; + break keyValLoop; + } + + int newValueStart = i; + char c = header.charAt(i); + if (c == '"' || c == '\'') { + // NAME="VALUE" or NAME='VALUE' + StringBuilder newValueBuf = new StringBuilder(header.length() - i); + final char q = c; + boolean hadBackslash = false; + i++; + for (;;) { + if (i == headerLen) { + value = newValueBuf.toString(); + break keyValLoop; + } + if (hadBackslash) { + hadBackslash = false; + c = header.charAt(i++); + switch (c) { + case '\\': + case '"': + case '\'': + // Escape last backslash. + newValueBuf.setCharAt(newValueBuf.length() - 1, c); + break; + default: + // Do not escape last backslash. + newValueBuf.append(c); + } + } else { + c = header.charAt(i++); + if (c == q) { + value = newValueBuf.toString(); + break keyValLoop; + } + newValueBuf.append(c); + if (c == '\\') { + hadBackslash = true; + } + } + } + } else { + // NAME=VALUE; + int semiPos = header.indexOf(';', i); + if (semiPos > 0) { + value = header.substring(newValueStart, semiPos); + i = semiPos; + } else { + value = header.substring(newValueStart); + i = headerLen; + } + } + break keyValLoop; + default: + i++; + } + + if (i == headerLen) { + // NAME (no value till the end of string) + name = header.substring(newNameStart); + value = null; + break; + } + } + } + + names.add(name); + values.add(value); + } + } +} \ No newline at end of file diff --git a/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java b/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java new file mode 100644 index 0000000000..aff65a9580 --- /dev/null +++ b/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java @@ -0,0 +1,56 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.org.jboss.netty.handler.codec.http; + +final class CookieHeaderNames { + static final String PATH = "Path"; + + static final String EXPIRES = "Expires"; + + static final String MAX_AGE = "Max-Age"; + + static final String DOMAIN = "Domain"; + + static final String SECURE = "Secure"; + + static final String HTTPONLY = "HTTPOnly"; + + static final String COMMENT = "Comment"; + + static final String COMMENTURL = "CommentURL"; + + static final String DISCARD = "Discard"; + + static final String PORT = "Port"; + + static final String VERSION = "Version"; + + private CookieHeaderNames() { + // Unused. + } +} diff --git a/api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java b/api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java new file mode 100644 index 0000000000..b2378dc3e7 --- /dev/null +++ b/api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java @@ -0,0 +1,72 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.org.jboss.netty.util.internal; + +import java.util.ArrayList; +import java.util.List; + +/** + * String utility class. + */ +public final class StringUtil { + + private StringUtil() { + // Unused. + } + + private static final String EMPTY_STRING = ""; + + /** + * Splits the specified {@link String} with the specified delimiter. This operation is a simplified and optimized + * version of {@link String#split(String)}. + */ + public static String[] split(String value, char delim) { + final int end = value.length(); + final List res = new ArrayList(); + + int start = 0; + for (int i = 0; i < end; i ++) { + if (value.charAt(i) == delim) { + if (start == i) { + res.add(EMPTY_STRING); + } else { + res.add(value.substring(start, i)); + } + start = i + 1; + } + } + + if (start == 0) { // If no delimiter was found in the value + res.add(value); + } else { + if (start != end) { + // Add the last element if it's not empty. + res.add(value.substring(start, end)); + } else { + // Truncate trailing empty elements. + for (int i = res.size() - 1; i >= 0; i --) { + if (res.get(i).length() == 0) { + res.remove(i); + } else { + break; + } + } + } + } + + return res.toArray(new String[res.size()]); + } +} diff --git a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index 8d3f435cfc..a8a73b5640 100755 --- a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -15,23 +15,10 @@ */ package com.ning.http.client.async; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpClientConfig.Builder; -import com.ning.http.client.AsyncHttpClientConfigBean; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.Part; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.StringPart; -import org.testng.Assert; -import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -42,6 +29,7 @@ import java.nio.channels.UnresolvedAddressException; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -55,10 +43,24 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.ning.http.client.AsyncCompletionHandler; +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.AsyncHttpClientConfig.Builder; +import com.ning.http.client.AsyncHttpClientConfigBean; +import com.ning.http.client.AsyncHttpProviderConfig; +import com.ning.http.client.Cookie; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.MaxRedirectException; +import com.ning.http.client.Part; +import com.ning.http.client.ProxyServer; +import com.ning.http.client.Request; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.StringPart; public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { private static final String UTF_8 = "text/html;charset=UTF-8"; @@ -478,7 +480,7 @@ public void asyncDoGetCookieTest() throws Throwable { h.add("Test4", "Test4"); h.add("Test5", "Test5"); - final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false); + final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false, 1, false, false, null, null, Collections. emptySet()); c.prepareGet(getTargetUrl()).setHeaders(h).addCookie(coo).execute(new AsyncCompletionHandlerAdapter() { @Override diff --git a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java index 4134b31962..5660342076 100644 --- a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java +++ b/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java @@ -15,6 +15,19 @@ */ package com.ning.http.client.async; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.AssertJUnit.assertTrue; + +import java.io.InputStream; +import java.net.URLEncoder; +import java.util.Collections; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.testng.Assert; +import org.testng.annotations.Test; + import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; @@ -25,17 +38,6 @@ import com.ning.http.client.RequestBuilder; import com.ning.http.client.Response; import com.ning.http.util.AsyncHttpProviderUtils; -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.io.InputStream; -import java.net.URLEncoder; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.AssertJUnit.assertTrue; /** * Unit tests for remote site. @@ -245,7 +247,7 @@ public void evilCoookieTest() throws Throwable { builder2.setFollowRedirects(true); builder2.setUrl("http://www.google.com/"); builder2.addHeader("Content-Type", "text/plain"); - builder2.addCookie(new com.ning.http.client.Cookie(".google.com", "evilcookie", "test", "/", 10, false)); + builder2.addCookie(new com.ning.http.client.Cookie(".google.com", "evilcookie", "test", "/", 10, false, 1, false, false, null, null, Collections. emptySet())); com.ning.http.client.Request request2 = builder2.build(); Response response = c.executeRequest(request2).get(); diff --git a/api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java b/api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java deleted file mode 100644 index e2bab0876f..0000000000 --- a/api/src/test/java/com/ning/http/util/TestAsyncHttpProviderUtils.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package com.ning.http.util; - -import com.ning.http.client.Cookie; -import org.testng.Assert; -import org.testng.annotations.Test; - -public class TestAsyncHttpProviderUtils -{ - @Test(groups="fast") - public void testCookieParsing() - { - String cookieValue = "ID=a3be7f468f2a528c:FF=0:TM=1397369269:LM=134759269:S=XZQK3o8HJ1mytzgz"; - String testCookie = "PREF=" + cookieValue + "; expires=Thu, 11-Sep-2013 13:14:29 GMT; path=/; domain=.google.co.uk"; - Cookie cookie = AsyncHttpProviderUtils.parseCookie(testCookie); - - Assert.assertEquals(cookie.getValue(), cookieValue); - } -} diff --git a/api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java b/api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java new file mode 100644 index 0000000000..eb52cfee79 --- /dev/null +++ b/api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.org.jboss.netty.handler.codec.http; + +import java.util.Set; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.ning.http.client.Cookie; + +public class CookieDecoderTest { + + @Test(groups = "fast") + public void testDecodeUnquoted() { + Set cookies = CookieDecoder.decode("foo=value; domain=/; path=/"); + Assert.assertEquals(cookies.size(), 1); + + Cookie first = cookies.iterator().next(); + Assert.assertEquals(first.getValue(), "value"); + Assert.assertEquals(first.getDomain(), "/"); + Assert.assertEquals(first.getPath(), "/"); + } + + @Test(groups = "fast") + public void testDecodeQuoted() { + Set cookies = CookieDecoder.decode("ALPHA=\"VALUE1\"; Domain=docs.foo.com; Path=/accounts; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly"); + Assert.assertEquals(cookies.size(), 1); + + Cookie first = cookies.iterator().next(); + Assert.assertEquals(first.getValue(), "VALUE1"); + } + + @Test(groups = "fast") + public void testDecodeQuotedContainingEscapedQuote() { + Set cookies = CookieDecoder.decode("ALPHA=\"VALUE1\\\"\"; Domain=docs.foo.com; Path=/accounts; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly"); + Assert.assertEquals(cookies.size(), 1); + + Cookie first = cookies.iterator().next(); + Assert.assertEquals(first.getValue(), "VALUE1\""); + } +} \ No newline at end of file diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index 43059dee7d..4c2ee4e7c7 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -12,6 +12,7 @@ */ package com.ning.http.client.providers.apache; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.Cookie; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; @@ -55,8 +56,7 @@ public List buildCookies() { // TODO: ask for parsed header List v = header.getValue(); for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - cookies.add(cookie); + cookies.addAll(CookieDecoder.decode(value)); } } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 4f9e9966bd..b18e791a24 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -13,6 +13,7 @@ package com.ning.http.client.providers.grizzly; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; @@ -1894,8 +1895,9 @@ private static Request newRequest(final URI uri, builder.setQueryParameters(null); } for (String cookieStr : response.getHeaders().values(Header.Cookie)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - builder.addOrReplaceCookie(c); + for (Cookie c : CookieDecoder.decode(cookieStr)) { + builder.addOrReplaceCookie(c); + } } return builder.build(); diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index e7c4720f01..651676ca96 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -182,7 +182,12 @@ private List convertCookies(Cookies cookies) { gCookie.getPath(), gCookie.getMaxAge(), gCookie.isSecure(), - gCookie.getVersion())); + gCookie.getVersion(), + gCookie.isHttpOnly(), + false, + gCookie.getComment(), + null, + Collections. emptySet())); } return Collections.unmodifiableList(convertedCookies); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 1f989f40a5..a8323bccd2 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -15,6 +15,7 @@ */ package com.ning.http.client.providers.netty; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHandler.STATE; import com.ning.http.client.AsyncHttpClientConfig; @@ -2027,13 +2028,15 @@ private boolean redirect(Request request, log.debug("Redirecting to {}", newUrl); for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); + for (Cookie c : CookieDecoder.decode(cookieStr)) { + nBuilder.addOrReplaceCookie(c); + } } for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { - Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr); - nBuilder.addOrReplaceCookie(c); + for (Cookie c : CookieDecoder.decode(cookieStr)) { + nBuilder.addOrReplaceCookie(c); + } } AsyncCallable ac = new AsyncCallable(future) { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index a8b229374a..b635cd5405 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -15,6 +15,7 @@ */ package com.ning.http.client.providers.netty; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.Cookie; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.HttpResponseHeaders; @@ -65,8 +66,7 @@ protected List buildCookies() { // TODO: ask for parsed header List v = header.getValue(); for (String value : v) { - Cookie cookie = AsyncHttpProviderUtils.parseCookie(value); - cookies.add(cookie); + cookies.addAll(CookieDecoder.decode(value)); } } } From a2e7a14951476f0ddd7660869e6b9a249342e55f Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 15:06:50 +0200 Subject: [PATCH 0359/2844] Fix and optimize Netty ResponseBodyParts bytes[], master close #287 --- .../client/providers/netty/NettyResponse.java | 19 +++++----- .../providers/netty/ResponseBodyPart.java | 31 ++++++---------- .../netty/util/ChannelBufferUtil.java | 35 +++++++++++++++++++ 3 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index b635cd5405..170c12d0fe 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -15,14 +15,6 @@ */ package com.ning.http.client.providers.netty; -import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; -import com.ning.http.client.Cookie; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.providers.ResponseBase; -import com.ning.http.util.AsyncHttpProviderUtils; - import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; @@ -36,6 +28,15 @@ import org.jboss.netty.buffer.ChannelBufferInputStream; import org.jboss.netty.buffer.ChannelBuffers; +import com.ning.http.client.Cookie; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.providers.ResponseBase; +import com.ning.http.client.providers.netty.util.ChannelBufferUtil; +import com.ning.http.util.AsyncHttpProviderUtils; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; + /** * Wrapper around the {@link com.ning.http.client.Response} API. */ @@ -75,7 +76,7 @@ protected List buildCookies() { /* @Override */ public byte[] getResponseBodyAsBytes() throws IOException { - return getResponseBodyAsByteBuffer().array(); + return ChannelBufferUtil.channelBuffer2bytes(getResponseBodyAsChannelBuffer()); } /* @Override */ diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java index adc069300a..cde8459287 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java @@ -15,12 +15,6 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseBodyPart; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.handler.codec.http.HttpChunk; -import org.jboss.netty.handler.codec.http.HttpResponse; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -29,6 +23,14 @@ import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicReference; +import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.handler.codec.http.HttpChunk; +import org.jboss.netty.handler.codec.http.HttpResponse; + +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.providers.netty.util.ChannelBufferUtil; + /** * A callback class used when an HTTP response body is received. */ @@ -66,20 +68,9 @@ public byte[] getBodyPartBytes() { return bp; } - ChannelBuffer b = getChannelBuffer(); - int readable = b.readableBytes(); - int readerIndex = b.readerIndex(); - if (b.hasArray()) { - byte[] array = b.array(); - if (b.arrayOffset() == 0 && readerIndex == 0 && array.length == readable) { - bytes.set(array); - return array; - } - } - byte[] array = new byte[readable]; - b.getBytes(readerIndex, array); - bytes.set(array); - return array; + byte[] rb = ChannelBufferUtil.channelBuffer2bytes(getChannelBuffer()); + bytes.set(rb); + return rb; } @Override diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java new file mode 100644 index 0000000000..d17a3cc563 --- /dev/null +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java @@ -0,0 +1,35 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package com.ning.http.client.providers.netty.util; + +import org.jboss.netty.buffer.ChannelBuffer; + +public class ChannelBufferUtil { + + public static byte[] channelBuffer2bytes(ChannelBuffer b) { + int readable = b.readableBytes(); + int readerIndex = b.readerIndex(); + if (b.hasArray()) { + byte[] array = b.array(); + if (b.arrayOffset() == 0 && readerIndex == 0 && array.length == readable) { + return array; + } + } + byte[] array = new byte[readable]; + b.getBytes(readerIndex, array); + return array; + } +} \ No newline at end of file From ebb9c267c9f232a23ecd906fef49fe61cc2612bc Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 15:09:42 +0200 Subject: [PATCH 0360/2844] Add another public constructor to NettyConnectionsPool that doesn't depend on NettyAsyncHttpProvider, master close #289 --- .../providers/netty/NettyConnectionsPool.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index c53b086b41..bb27ee1268 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -44,11 +44,15 @@ public class NettyConnectionsPool implements ConnectionsPool { private final long maxIdleTime; public NettyConnectionsPool(NettyAsyncHttpProvider provider) { - this.maxTotalConnections = provider.getConfig().getMaxTotalConnections(); - this.maxConnectionPerHost = provider.getConfig().getMaxConnectionPerHost(); - this.sslConnectionPoolEnabled = provider.getConfig().isSslConnectionPoolEnabled(); - this.maxIdleTime = provider.getConfig().getIdleConnectionInPoolTimeoutInMs(); - this.maxConnectionLifeTimeInMs = provider.getConfig().getMaxConnectionLifeTimeInMs(); + this(provider.getConfig().getMaxTotalConnections(), provider.getConfig().getMaxConnectionPerHost(), provider.getConfig().getIdleConnectionInPoolTimeoutInMs(), provider.getConfig().isSslConnectionPoolEnabled(), provider.getConfig().getMaxConnectionLifeTimeInMs()); + } + + public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, boolean sslConnectionPoolEnabled, int maxConnectionLifeTimeInMs) { + this.maxTotalConnections = maxTotalConnections; + this.maxConnectionPerHost = maxConnectionPerHost; + this.sslConnectionPoolEnabled = sslConnectionPoolEnabled; + this.maxIdleTime = maxIdleTime; + this.maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs; this.idleConnectionDetector.schedule(new IdleChannelDetector(), maxIdleTime, maxIdleTime); } From cdbb9fa459a82c354ebe944f7b72650025123cf9 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 15:14:05 +0200 Subject: [PATCH 0361/2844] Don't use System.currentTimeMillis, master close #280 --- api/src/main/java/com/ning/http/client/Realm.java | 3 ++- .../java/com/ning/http/client/ntlm/NTLMEngine.java | 3 ++- .../http/client/oauth/OAuthSignatureCalculator.java | 6 +++--- .../client/providers/jdk/JDKDelegateFuture.java | 3 ++- .../ning/http/client/providers/jdk/JDKFuture.java | 9 +++++---- .../com/ning/http/util/AsyncHttpProviderUtils.java | 3 ++- api/src/main/java/com/ning/http/util/DateUtil.java | 4 +++- .../http/client/async/AsyncProvidersBasicTest.java | 5 +++-- .../http/client/async/PerRequestTimeoutTest.java | 5 +++-- .../providers/apache/ApacheResponseFuture.java | 9 +++++---- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 3 ++- .../providers/grizzly/GrizzlyConnectionsPool.java | 5 +++-- .../providers/netty/NettyConnectionsPool.java | 13 +++++++------ .../client/providers/netty/NettyResponseFuture.java | 9 +++++---- .../providers/netty/NettyAsyncResponseTest.java | 3 ++- 15 files changed, 49 insertions(+), 34 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/com/ning/http/client/Realm.java index af5ae68933..c8f807e9f9 100644 --- a/api/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/com/ning/http/client/Realm.java @@ -16,6 +16,7 @@ */ package com.ning.http.client; +import static com.ning.http.util.DateUtil.millisTime; import static com.ning.http.util.MiscUtil.isNonEmpty; import java.io.UnsupportedEncodingException; @@ -482,7 +483,7 @@ public RealmBuilder clone(Realm clone) { private void newCnonce() { try { MessageDigest md = MessageDigest.getInstance("MD5"); - byte[] b = md.digest(String.valueOf(System.currentTimeMillis()).getBytes("ISO-8859-1")); + byte[] b = md.digest(String.valueOf(millisTime()).getBytes("ISO-8859-1")); cnonce = toHexString(b); } catch (Exception e) { throw new SecurityException(e); diff --git a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java index b06249ca7a..60ab2c65f2 100644 --- a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java +++ b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java @@ -38,6 +38,7 @@ package com.ning.http.client.ntlm; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.util.Base64; import javax.crypto.Cipher; @@ -513,7 +514,7 @@ private static byte[] createBlob(byte[] clientChallenge, byte[] targetInformatio byte[] blobSignature = new byte[]{(byte) 0x01, (byte) 0x01, (byte) 0x00, (byte) 0x00}; byte[] reserved = new byte[]{(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00}; byte[] unknown1 = new byte[]{(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00}; - long time = System.currentTimeMillis(); + long time = millisTime(); time += 11644473600000l; // milliseconds from January 1, 1601 -> epoch. time *= 10000; // tenths of a microsecond. // convert to little-endian byte array. diff --git a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java index e33ad87c73..caf8215359 100644 --- a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java +++ b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java @@ -16,7 +16,7 @@ */ package com.ning.http.client.oauth; - +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.FluentStringsMap; import com.ning.http.client.Request; import com.ning.http.client.RequestBuilderBase; @@ -78,7 +78,7 @@ public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) mac = new ThreadSafeHMAC(consumerAuth, userAuth); this.consumerAuth = consumerAuth; this.userAuth = userAuth; - random = new Random(System.identityHashCode(this) + System.currentTimeMillis()); + random = new Random(System.identityHashCode(this) + millisTime()); } //@Override // silly 1.5; doesn't allow this for interfaces @@ -86,7 +86,7 @@ public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) public void calculateAndAddSignature(String baseURL, Request request, RequestBuilderBase requestBuilder) { String method = request.getMethod(); // POST etc String nonce = generateNonce(); - long timestamp = System.currentTimeMillis() / 1000L; + long timestamp = millisTime() / 1000L; String signature = calculateSignature(method, baseURL, timestamp, nonce, request.getParams(), request.getQueryParams()); String headerValue = constructAuthHeader(signature, nonce, timestamp); requestBuilder.setHeader(HEADER_AUTHORIZATION, headerValue); diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java index b3da007d1a..6675477368 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java @@ -12,6 +12,7 @@ */ package com.ning.http.client.providers.jdk; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncHandler; import com.ning.http.client.ListenableFuture; @@ -67,7 +68,7 @@ public V get(long timeout, TimeUnit unit) throws InterruptedException, Execution content = innerFuture.get(timeout, unit); } } catch (Throwable t) { - if (!contentProcessed.get() && timeout != -1 && ((System.currentTimeMillis() - touch.get()) <= responseTimeoutInMs)) { + if (!contentProcessed.get() && timeout != -1 && ((millisTime() - touch.get()) <= responseTimeoutInMs)) { return get(timeout, unit); } timedOut.set(true); diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java index 023abf30c5..ac7799fb7e 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java @@ -12,6 +12,7 @@ */ package com.ning.http.client.providers.jdk; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncHandler; import com.ning.http.client.listenable.AbstractListenableFuture; import org.slf4j.Logger; @@ -40,7 +41,7 @@ public class JDKFuture extends AbstractListenableFuture { protected final AtomicBoolean timedOut = new AtomicBoolean(false); protected final AtomicBoolean isDone = new AtomicBoolean(false); protected final AtomicReference exception = new AtomicReference(); - protected final AtomicLong touch = new AtomicLong(System.currentTimeMillis()); + protected final AtomicLong touch = new AtomicLong(millisTime()); protected final AtomicBoolean contentProcessed = new AtomicBoolean(false); protected final HttpURLConnection urlConnection; private boolean writeHeaders; @@ -126,7 +127,7 @@ public V get(long timeout, TimeUnit unit) throws InterruptedException, Execution content = innerFuture.get(timeout, unit); } } catch (TimeoutException t) { - if (!contentProcessed.get() && timeout != -1 && ((System.currentTimeMillis() - touch.get()) <= responseTimeoutInMs)) { + if (!contentProcessed.get() && timeout != -1 && ((millisTime() - touch.get()) <= responseTimeoutInMs)) { return get(timeout, unit); } @@ -149,7 +150,7 @@ public V get(long timeout, TimeUnit unit) throws InterruptedException, Execution * @return true if response has expired and should be terminated. */ public boolean hasExpired() { - return responseTimeoutInMs != -1 && ((System.currentTimeMillis() - touch.get()) > responseTimeoutInMs); + return responseTimeoutInMs != -1 && ((millisTime() - touch.get()) > responseTimeoutInMs); } /** @@ -157,7 +158,7 @@ public boolean hasExpired() { */ /* @Override */ public void touch() { - touch.set(System.currentTimeMillis()); + touch.set(millisTime()); } /** diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 3e2c8fda21..c15e9b4e32 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -12,6 +12,7 @@ */ package com.ning.http.util; +import static com.ning.http.util.DateUtil.millisTime; import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -514,7 +515,7 @@ public static int convertExpireField(String timestring) { for (SimpleDateFormat sdf : simpleDateFormat.get()) { Date date = sdf.parse(trimmedTimeString, new ParsePosition(0)); if (date != null) { - long now = System.currentTimeMillis(); + long now = millisTime(); long maxAgeMillis = date.getTime() - now; return (int) (maxAgeMillis / 1000) + (maxAgeMillis % 1000 != 0 ? 1 : 0); } diff --git a/api/src/main/java/com/ning/http/util/DateUtil.java b/api/src/main/java/com/ning/http/util/DateUtil.java index dc1f120425..b845b66f0a 100644 --- a/api/src/main/java/com/ning/http/util/DateUtil.java +++ b/api/src/main/java/com/ning/http/util/DateUtil.java @@ -226,7 +226,9 @@ public DateParseException() { public DateParseException(String message) { super(message); } - } + public static long millisTime() { + return System.nanoTime() / 1000000; + } } diff --git a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index a8a73b5640..d9bee375dd 100755 --- a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -15,6 +15,7 @@ */ package com.ning.http.client.async; +import static com.ning.http.util.DateUtil.millisTime; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; @@ -1591,7 +1592,7 @@ public void idleRequestTimeoutTest() throws Exception { h.add("Content-Type", "application/x-www-form-urlencoded"); h.add("LockThread", "true"); - long t1 = System.currentTimeMillis(); + long t1 = millisTime(); try { c.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute(new AsyncHandlerAdapter() { @@ -1603,7 +1604,7 @@ public void onThrowable(Throwable t) { }).get(); Assert.fail(); } catch (Throwable ex) { - final long elapsedTime = System.currentTimeMillis() - t1; + final long elapsedTime = millisTime() - t1; System.out.println("EXPIRED: " + (elapsedTime)); Assert.assertNotNull(ex.getCause()); Assert.assertTrue(elapsedTime >= 10000 && elapsedTime <= 25000); diff --git a/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java b/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java index fb32b64ab0..3c4f451b8d 100644 --- a/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java @@ -15,6 +15,7 @@ */ package com.ning.http.client.async; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; @@ -163,13 +164,13 @@ public Response onCompleted(Response response) throws Exception { @Override public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - times[0] = System.currentTimeMillis(); + times[0] = millisTime(); return super.onBodyPartReceived(content); } @Override public void onThrowable(Throwable t) { - times[1] = System.currentTimeMillis(); + times[1] = millisTime(); super.onThrowable(t); } }); diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java index 0b8abff3e9..48033c7122 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java @@ -12,6 +12,7 @@ */ package com.ning.http.client.providers.apache; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncHandler; import com.ning.http.client.Request; import com.ning.http.client.listenable.AbstractListenableFuture; @@ -41,7 +42,7 @@ public class ApacheResponseFuture extends AbstractListenableFuture { private final AtomicBoolean timedOut = new AtomicBoolean(false); private final AtomicBoolean isDone = new AtomicBoolean(false); private final AtomicReference exception = new AtomicReference(); - private final AtomicLong touch = new AtomicLong(System.currentTimeMillis()); + private final AtomicLong touch = new AtomicLong(millisTime()); private final AtomicBoolean contentProcessed = new AtomicBoolean(false); private final Request request; private final HttpMethodBase method; @@ -174,7 +175,7 @@ public V get(long timeout, TimeUnit unit) throws InterruptedException, Execution content = innerFuture.get(timeout, unit); } } catch (TimeoutException t) { - if (!contentProcessed.get() && timeout != -1 && ((System.currentTimeMillis() - touch.get()) <= responseTimeoutInMs)) { + if (!contentProcessed.get() && timeout != -1 && ((millisTime() - touch.get()) <= responseTimeoutInMs)) { return get(timeout, unit); } @@ -197,11 +198,11 @@ public V get(long timeout, TimeUnit unit) throws InterruptedException, Execution * @return true if response has expired and should be terminated. */ public boolean hasExpired() { - return responseTimeoutInMs != -1 && ((System.currentTimeMillis() - touch.get()) >= responseTimeoutInMs); + return responseTimeoutInMs != -1 && ((millisTime() - touch.get()) >= responseTimeoutInMs); } public void touch() { - touch.set(System.currentTimeMillis()); + touch.set(millisTime()); } public Request getRequest() { diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index b18e791a24..23cdd72acb 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -13,6 +13,7 @@ package com.ning.http.client.providers.grizzly; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; @@ -428,7 +429,7 @@ void touchConnection(final Connection c, final Request request) { int requestTimeout = AsyncHttpProviderUtils.requestTimeout(clientConfig, request); if (requestTimeout > 0) { if (resolver != null) { - resolver.setTimeoutMillis(c, System.currentTimeMillis() + requestTimeout); + resolver.setTimeoutMillis(c, millisTime() + requestTimeout); } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index 3156ca0cf4..89ec7a1525 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -13,6 +13,7 @@ package com.ning.http.client.providers.grizzly; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; @@ -309,7 +310,7 @@ private class DelayedRunnable implements Runnable { @Override public void run() { while (isStarted) { - final long currentTimeMs = System.currentTimeMillis(); + final long currentTimeMs = millisTime(); for (final IdleConnectionQueue delayQueue : queues) { if (delayQueue.queue.isEmpty()) continue; @@ -380,7 +381,7 @@ public IdleConnectionQueue(final long timeout) { void offer(final Connection c) { if (timeout >= 0) { - resolver.setTimeoutMs(c, System.currentTimeMillis() + timeout); + resolver.setTimeoutMs(c, millisTime() + timeout); } queue.offer(c); count.incrementAndGet(); diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java index bb27ee1268..0be5290417 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java @@ -12,6 +12,7 @@ */ package com.ning.http.client.providers.netty; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.ConnectionsPool; import org.jboss.netty.channel.Channel; import org.slf4j.Logger; @@ -64,7 +65,7 @@ private static class IdleChannel { IdleChannel(String uri, Channel channel) { this.uri = uri; this.channel = channel; - this.start = System.currentTimeMillis(); + this.start = millisTime(); } @Override @@ -100,7 +101,7 @@ public void run() { } List channelsInTimeout = new ArrayList(); - long currentTime = System.currentTimeMillis(); + long currentTime = millisTime(); for (IdleChannel idleChannel : channel2IdleChannel.values()) { long age = currentTime - idleChannel.start; @@ -112,7 +113,7 @@ public void run() { channelsInTimeout.add(idleChannel); } } - long endConcurrentLoop = System.currentTimeMillis(); + long endConcurrentLoop = millisTime(); for (IdleChannel idleChannel : channelsInTimeout) { Object attachment = idleChannel.channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); @@ -139,7 +140,7 @@ public void run() { openChannels += hostChannels.size(); } log.trace(String.format("%d channel open, %d idle channels closed (times: 1st-loop=%d, 2nd-loop=%d).\n", - openChannels, channelsInTimeout.size(), endConcurrentLoop - currentTime, System.currentTimeMillis() - endConcurrentLoop)); + openChannels, channelsInTimeout.size(), endConcurrentLoop - currentTime, millisTime() - endConcurrentLoop)); } } catch (Throwable t) { log.error("uncaught exception!", t); @@ -159,9 +160,9 @@ public boolean offer(String uri, Channel channel) { Long createTime = channel2CreationDate.get(channel); if (createTime == null){ - channel2CreationDate.putIfAbsent(channel, System.currentTimeMillis()); + channel2CreationDate.putIfAbsent(channel, millisTime()); } - else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeInMs) < System.currentTimeMillis() ) { + else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeInMs) < millisTime() ) { log.debug("Channel {} expired", channel); return false; } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index 0b26ca79a9..b3efd4680e 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -15,6 +15,7 @@ */ package com.ning.http.client.providers.netty; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncHandler; import com.ning.http.client.ConnectionPoolKeyStrategy; import com.ning.http.client.ProxyServer; @@ -74,8 +75,8 @@ enum STATE { private volatile Future reaperFuture; private final AtomicBoolean inAuth = new AtomicBoolean(false); private final AtomicBoolean statusReceived = new AtomicBoolean(false); - private final AtomicLong touch = new AtomicLong(System.currentTimeMillis()); - private final long start = System.currentTimeMillis(); + private final AtomicLong touch = new AtomicLong(millisTime()); + private final long start = millisTime(); private final NettyAsyncHttpProvider asyncHttpProvider; private final AtomicReference state = new AtomicReference(STATE.NEW); private final AtomicBoolean contentProcessed = new AtomicBoolean(false); @@ -189,7 +190,7 @@ public boolean cancel(boolean force) { * @return true if response has expired and should be terminated. */ public boolean hasExpired() { - long now = System.currentTimeMillis(); + long now = millisTime(); return idleConnectionTimeoutInMs != -1 && ((now - touch.get()) >= idleConnectionTimeoutInMs) || responseTimeoutInMs != -1 && ((now - start) >= responseTimeoutInMs); } @@ -408,7 +409,7 @@ public boolean getAndSetStatusReceived(boolean sr) { */ /* @Override */ public void touch() { - touch.set(System.currentTimeMillis()); + touch.set(millisTime()); } /** diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java index c49eee8dc2..b9087481d4 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -13,6 +13,7 @@ package com.ning.http.client.providers.netty; +import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseHeaders; @@ -38,7 +39,7 @@ public void testCookieParseExpires() { SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - Date date = new Date(System.currentTimeMillis() + 60000); // sdf.parse( dateString ); + Date date = new Date(millisTime() + 60000); // sdf.parse( dateString ); final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { From 091f4c6415417709d8a04a2a56f64f3b0f83bb46 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 15:15:21 +0200 Subject: [PATCH 0362/2844] Prevent file description leak on ClosedChannelException, master close #288 --- .../providers/netty/NettyAsyncHttpProvider.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index a8323bccd2..bdbccce215 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -485,7 +485,16 @@ protected final void writeRequest(final Channel channel, final FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); writeFuture = channel.write(region); } - writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future)); + writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future) { + public void operationComplete(ChannelFuture cf) { + try { + raf.close(); + } catch (IOException e) { + log.warn("Failed to close request body: {}", e.getMessage(), e); + } + super.operationComplete(cf); + } + }); } catch (IOException ex) { if (raf != null) { try { From e5b455f086e91cf022212625b91d6de5acd3468b Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 21:23:29 +0200 Subject: [PATCH 0363/2844] Support Location header with raw query, close #268 --- .../http/util/AsyncHttpProviderUtils.java | 40 +++++++++++++++-- .../http/util/AsyncHttpProviderUtilsTest.java | 45 +++++++++++++++++++ 2 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index c15e9b4e32..27e086324e 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -13,6 +13,7 @@ package com.ning.http.util; import static com.ning.http.util.DateUtil.millisTime; + import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -20,6 +21,7 @@ import java.io.SequenceInputStream; import java.io.UnsupportedEncodingException; import java.net.URI; +import java.net.URISyntaxException; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -49,6 +51,7 @@ * The cookies's handling code is from the Netty framework. */ public class AsyncHttpProviderUtils { + private final static byte[] NO_BYTES = new byte[0]; public final static String DEFAULT_CHARSET = "ISO-8859-1"; @@ -280,19 +283,48 @@ public final static String getHost(URI uri) { public final static URI getRedirectUri(URI uri, String location) { if(location == null) throw new IllegalArgumentException("URI " + uri + " was redirected to null location"); - URI newUri = uri.resolve(location); + + URI locationURI = null; + try { + locationURI = new URI(location); + } catch (URISyntaxException e) { + // rich, we have a badly encoded location, let's try to encode the query params + String[] parts = location.split("\\?"); + if (parts.length != 2) { + throw new IllegalArgumentException("Don't know how to turn this location into a proper URI:" + location, e); + } else { + StringBuilder properUrl = new StringBuilder(location.length()).append(parts[0]).append("?"); + + String[] queryParams = parts[1].split("&"); + for (int i = 0; i < queryParams.length; i++) { + String queryParam = queryParams[i]; + if (i != 0) + properUrl.append("&"); + String[] nameValue = queryParam.split("=", 2); + UTF8UrlEncoder.appendEncoded(properUrl, nameValue[0]); + if (nameValue.length == 2) { + properUrl.append("="); + UTF8UrlEncoder.appendEncoded(properUrl, nameValue[1]); + } + } + + locationURI = URI.create(properUrl.toString()); + } + } + + URI redirectUri = uri.resolve(locationURI); - String scheme = newUri.getScheme(); + String scheme = redirectUri.getScheme(); if (scheme == null || !scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https") && !scheme.equals("ws") && !scheme.equals("wss")) { - throw new IllegalArgumentException("The URI scheme, of the URI " + newUri + throw new IllegalArgumentException("The URI scheme, of the URI " + redirectUri + ", must be equal (ignoring case) to 'ws, 'wss', 'http', or 'https'"); } - return newUri; + return redirectUri; } public final static int getPort(URI uri) { diff --git a/api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java b/api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java new file mode 100644 index 0000000000..0b47f2e7e2 --- /dev/null +++ b/api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.util; + +import java.net.URI; + +import org.testng.Assert; +import org.testng.annotations.Test; + +public class AsyncHttpProviderUtilsTest { + + @Test(groups = "fast") + public void getRedirectUriShouldHandleProperlyEncodedLocation() { + + String url = "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505"; + URI uri = AsyncHttpProviderUtils.getRedirectUri(URI.create("http://www.ebay.de"), url); + Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); + } + + @Test(groups = "fast") + public void getRedirectUriShouldHandleRawQueryParamsLocation() { + + String url = "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC Lifebook E8310 Core2Duo T8100 2 1GHz 4GB DVD RW&_itemId=150731406505"; + URI uri = AsyncHttpProviderUtils.getRedirectUri(URI.create("http://www.ebay.de"), url); + Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); + } + + @Test(groups = "fast") + public void getRedirectUriShouldHandleRelativeLocation() { + + String url = "/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC Lifebook E8310 Core2Duo T8100 2 1GHz 4GB DVD RW&_itemId=150731406505"; + URI uri = AsyncHttpProviderUtils.getRedirectUri(URI.create("http://www.ebay.de"), url); + Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); + } +} From 736b0ccd04cbdd4bbc7a5f6bfaf66e979511e026 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 1 May 2013 22:59:41 +0200 Subject: [PATCH 0364/2844] Revive Cookie extra constructors --- api/src/main/java/com/ning/http/client/Cookie.java | 8 ++++++++ .../ning/http/client/async/AsyncProvidersBasicTest.java | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/Cookie.java b/api/src/main/java/com/ning/http/client/Cookie.java index 5999bd19da..c1ed9b1df0 100644 --- a/api/src/main/java/com/ning/http/client/Cookie.java +++ b/api/src/main/java/com/ning/http/client/Cookie.java @@ -36,6 +36,14 @@ public class Cookie implements Comparable{ private Set ports = Collections.emptySet(); private Set unmodifiablePorts = ports; + public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure) { + this(domain, name, value, path, maxAge, secure, 1); + } + + public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure, int version) { + this(domain, name, value, path, maxAge, secure, version, false, false, null, null, Collections. emptySet()); + } + public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure, int version, boolean httpOnly, boolean discard, String comment, String commentUrl, Iterable ports) { if (name == null) { diff --git a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java index d9bee375dd..ba7e1207e3 100755 --- a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java @@ -30,7 +30,6 @@ import java.nio.channels.UnresolvedAddressException; import java.util.Arrays; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -481,7 +480,7 @@ public void asyncDoGetCookieTest() throws Throwable { h.add("Test4", "Test4"); h.add("Test5", "Test5"); - final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false, 1, false, false, null, null, Collections. emptySet()); + final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false); c.prepareGet(getTargetUrl()).setHeaders(h).addCookie(coo).execute(new AsyncCompletionHandlerAdapter() { @Override From 14046724b61b8379af30489004fb33ed257adc85 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 2 May 2013 00:44:37 +0200 Subject: [PATCH 0365/2844] Revert back some invalid nanoTime usage, close #280 --- api/src/main/java/com/ning/http/client/Realm.java | 3 +-- api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java | 3 +-- .../com/ning/http/client/oauth/OAuthSignatureCalculator.java | 5 ++--- .../main/java/com/ning/http/util/AsyncHttpProviderUtils.java | 4 +--- .../client/providers/grizzly/GrizzlyAsyncHttpProvider.java | 3 +-- .../client/providers/grizzly/GrizzlyConnectionsPool.java | 5 ++--- .../http/client/providers/netty/NettyAsyncResponseTest.java | 3 +-- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/com/ning/http/client/Realm.java index c8f807e9f9..af5ae68933 100644 --- a/api/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/com/ning/http/client/Realm.java @@ -16,7 +16,6 @@ */ package com.ning.http.client; -import static com.ning.http.util.DateUtil.millisTime; import static com.ning.http.util.MiscUtil.isNonEmpty; import java.io.UnsupportedEncodingException; @@ -483,7 +482,7 @@ public RealmBuilder clone(Realm clone) { private void newCnonce() { try { MessageDigest md = MessageDigest.getInstance("MD5"); - byte[] b = md.digest(String.valueOf(millisTime()).getBytes("ISO-8859-1")); + byte[] b = md.digest(String.valueOf(System.currentTimeMillis()).getBytes("ISO-8859-1")); cnonce = toHexString(b); } catch (Exception e) { throw new SecurityException(e); diff --git a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java index 60ab2c65f2..b06249ca7a 100644 --- a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java +++ b/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java @@ -38,7 +38,6 @@ package com.ning.http.client.ntlm; -import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.util.Base64; import javax.crypto.Cipher; @@ -514,7 +513,7 @@ private static byte[] createBlob(byte[] clientChallenge, byte[] targetInformatio byte[] blobSignature = new byte[]{(byte) 0x01, (byte) 0x01, (byte) 0x00, (byte) 0x00}; byte[] reserved = new byte[]{(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00}; byte[] unknown1 = new byte[]{(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00}; - long time = millisTime(); + long time = System.currentTimeMillis(); time += 11644473600000l; // milliseconds from January 1, 1601 -> epoch. time *= 10000; // tenths of a microsecond. // convert to little-endian byte array. diff --git a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java index caf8215359..4e363745e0 100644 --- a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java +++ b/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java @@ -16,7 +16,6 @@ */ package com.ning.http.client.oauth; -import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.FluentStringsMap; import com.ning.http.client.Request; import com.ning.http.client.RequestBuilderBase; @@ -78,7 +77,7 @@ public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) mac = new ThreadSafeHMAC(consumerAuth, userAuth); this.consumerAuth = consumerAuth; this.userAuth = userAuth; - random = new Random(System.identityHashCode(this) + millisTime()); + random = new Random(System.identityHashCode(this) + System.currentTimeMillis()); } //@Override // silly 1.5; doesn't allow this for interfaces @@ -86,7 +85,7 @@ public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) public void calculateAndAddSignature(String baseURL, Request request, RequestBuilderBase requestBuilder) { String method = request.getMethod(); // POST etc String nonce = generateNonce(); - long timestamp = millisTime() / 1000L; + long timestamp = System.currentTimeMillis() / 1000L; String signature = calculateSignature(method, baseURL, timestamp, nonce, request.getParams(), request.getQueryParams()); String headerValue = constructAuthHeader(signature, nonce, timestamp); requestBuilder.setHeader(HEADER_AUTHORIZATION, headerValue); diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 27e086324e..755ae03761 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -12,8 +12,6 @@ */ package com.ning.http.util; -import static com.ning.http.util.DateUtil.millisTime; - import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -547,7 +545,7 @@ public static int convertExpireField(String timestring) { for (SimpleDateFormat sdf : simpleDateFormat.get()) { Date date = sdf.parse(trimmedTimeString, new ParsePosition(0)); if (date != null) { - long now = millisTime(); + long now = System.currentTimeMillis(); long maxAgeMillis = date.getTime() - now; return (int) (maxAgeMillis / 1000) + (maxAgeMillis % 1000 != 0 ? 1 : 0); } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 23cdd72acb..b18e791a24 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -13,7 +13,6 @@ package com.ning.http.client.providers.grizzly; -import static com.ning.http.util.DateUtil.millisTime; import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; @@ -429,7 +428,7 @@ void touchConnection(final Connection c, final Request request) { int requestTimeout = AsyncHttpProviderUtils.requestTimeout(clientConfig, request); if (requestTimeout > 0) { if (resolver != null) { - resolver.setTimeoutMillis(c, millisTime() + requestTimeout); + resolver.setTimeoutMillis(c, System.currentTimeMillis() + requestTimeout); } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index 89ec7a1525..3156ca0cf4 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -13,7 +13,6 @@ package com.ning.http.client.providers.grizzly; -import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.ConnectionsPool; @@ -310,7 +309,7 @@ private class DelayedRunnable implements Runnable { @Override public void run() { while (isStarted) { - final long currentTimeMs = millisTime(); + final long currentTimeMs = System.currentTimeMillis(); for (final IdleConnectionQueue delayQueue : queues) { if (delayQueue.queue.isEmpty()) continue; @@ -381,7 +380,7 @@ public IdleConnectionQueue(final long timeout) { void offer(final Connection c) { if (timeout >= 0) { - resolver.setTimeoutMs(c, millisTime() + timeout); + resolver.setTimeoutMs(c, System.currentTimeMillis() + timeout); } queue.offer(c); count.incrementAndGet(); diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java index b9087481d4..c49eee8dc2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -13,7 +13,6 @@ package com.ning.http.client.providers.netty; -import static com.ning.http.util.DateUtil.millisTime; import com.ning.http.client.Cookie; import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseHeaders; @@ -39,7 +38,7 @@ public void testCookieParseExpires() { SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - Date date = new Date(millisTime() + 60000); // sdf.parse( dateString ); + Date date = new Date(System.currentTimeMillis() + 60000); // sdf.parse( dateString ); final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { From fd2ecfd379c31d8a8a9136cfc7fe2648944c8673 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 7 May 2013 06:29:16 +0200 Subject: [PATCH 0366/2844] Make sure no bytes are lost when replace the HttpDecoder with the WebSocket08FrameDecoder --- .../providers/netty/NettyAsyncHttpProvider.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index bdbccce215..1529af11ce 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -277,8 +277,8 @@ void configureNetty() { /* @Override */ public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = pipeline(); - pipeline.addLast("ws-decoder", new HttpResponseDecoder()); - pipeline.addLast("ws-encoder", new HttpRequestEncoder()); + pipeline.addLast("http-decoder", new HttpResponseDecoder()); + pipeline.addLast("http-encoder", new HttpRequestEncoder()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); return pipeline; } @@ -354,8 +354,8 @@ public ChannelPipeline getPipeline() throws Exception { abort(cl.future(), ex); } - pipeline.addLast("ws-decoder", new HttpResponseDecoder()); - pipeline.addLast("ws-encoder", new HttpRequestEncoder()); + pipeline.addLast("http-decoder", new HttpResponseDecoder()); + pipeline.addLast("http-encoder", new HttpRequestEncoder()); pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); return pipeline; @@ -2390,8 +2390,8 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); } - ctx.getPipeline().replace("ws-decoder", "ws-decoder", new WebSocket08FrameDecoder(false, false)); - ctx.getPipeline().replace("ws-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); + ctx.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder", new WebSocket08FrameDecoder(false, false)); + ctx.getPipeline().replace("http-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); if (h.onHeadersReceived(responseHeaders) == STATE.CONTINUE) { h.onSuccess(new NettyWebSocket(ctx.getChannel())); } From 1379ba5bdec90ed3d71f3f7233325418d5943246 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 8 May 2013 16:11:14 -0700 Subject: [PATCH 0367/2844] Very early changes for SPDY/3 support with the Grizzly provider. More changes pending. --- .../http/client/AsyncHttpClientConfig.java | 31 +- providers/grizzly/pom.xml | 20 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 372 ++++++++++++++---- .../GrizzlyAsyncHttpProviderConfig.java | 9 +- 4 files changed, 352 insertions(+), 80 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 2ebdc29f42..52845b35e9 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -110,6 +110,7 @@ public class AsyncHttpClientConfig { protected boolean strict302Handling; protected int maxConnectionLifeTimeInMs; protected boolean useRelativeURIsWithSSLProxies; + protected boolean spdyEnabled; protected AsyncHttpClientConfig() { } @@ -145,7 +146,8 @@ private AsyncHttpClientConfig(int maxTotalConnections, HostnameVerifier hostnameVerifier, int ioThreadMultiplier, boolean strict302Handling, - boolean useRelativeURIsWithSSLProxies) { + boolean useRelativeURIsWithSSLProxies, + boolean spdyEnabled) { this.maxTotalConnections = maxTotalConnections; this.maxConnectionPerHost = maxConnectionPerHost; @@ -185,6 +187,7 @@ private AsyncHttpClientConfig(int maxTotalConnections, } this.proxyServer = proxyServer; this.useRawUrl = useRawUrl; + this.spdyEnabled = spdyEnabled; } /** @@ -455,6 +458,13 @@ public boolean isUseRawUrl() { return useRawUrl; } + /** + * @return whether or not SPDY is enabled. + */ + public boolean isSpdyEnabled() { + return spdyEnabled; + } + /** * Return true if the query parameters will be stripped from the request when a redirect is requested. * @@ -575,6 +585,7 @@ public Thread newThread(Runnable r) { private HostnameVerifier hostnameVerifier = new AllowAllHostnameVerifier(); private int ioThreadMultiplier = 2; private boolean strict302Handling; + private boolean spdyEnabled; public Builder() { } @@ -1031,6 +1042,21 @@ public Builder setUseRelativeURIsWithSSLProxies(boolean useRelativeURIsWithSSLPr return this; } + /** + * Enables SPDY support. Note that doing so, will currently disable WebSocket support + * for this client instance. If not explicitly enabled, spdy will not be used. + * + * @param spdyEnabled configures spdy support. + * + * @return this + * + * @since 2.0 + */ + public Builder setSpdyEnabled(boolean spdyEnabled) { + this.spdyEnabled = spdyEnabled; + return this; + } + /** * Create a config builder with values taken from the given prototype configuration. * @@ -1124,7 +1150,8 @@ public AsyncHttpClientConfig build() { hostnameVerifier, ioThreadMultiplier, strict302Handling, - useRelativeURIsWithSSLProxies); + useRelativeURIsWithSSLProxies, + spdyEnabled); } } } diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index ce6b188b79..d915864508 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -13,18 +13,26 @@ The Async Http Client Grizzly Provider. + + 2.3.3-SNAPSHOT + 1.0 + + org.glassfish.grizzly grizzly-websockets - 2.3.2 + ${grizzly.version} - com.ning - async-http-client-api - ${project.version} - test - tests + org.glassfish.grizzly + grizzly-spdy + ${grizzly.version} + + + org.glassfish.grizzly + grizzly-npn-api + ${grizzly.npn.version} diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index b18e791a24..318b1fb8de 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -15,6 +15,7 @@ import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; +import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.AsyncHttpProviderConfig; @@ -84,6 +85,10 @@ import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.Protocol; import org.glassfish.grizzly.impl.FutureImpl; +import org.glassfish.grizzly.spdy.NextProtoNegSupport; +import org.glassfish.grizzly.spdy.SpdyFramingFilter; +import org.glassfish.grizzly.spdy.SpdyHandlerFilter; +import org.glassfish.grizzly.spdy.SpdyMode; import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.http.util.CookieSerializerUtils; import org.glassfish.grizzly.http.util.DataChunk; @@ -142,10 +147,9 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import static com.ning.http.util.MiscUtil.isNonEmpty; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.BUFFER_WEBSOCKET_FRAGMENTS; +import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; +import static com.ning.http.util.MiscUtil.isNonEmpty; /** * A Grizzly 2.0-based implementation of {@link AsyncHttpProvider}. @@ -379,32 +383,73 @@ public void onTimeout(Connection connection) { fcb.add(filter); GrizzlyAsyncHttpProviderConfig providerConfig = (GrizzlyAsyncHttpProviderConfig) clientConfig.getAsyncHttpProviderConfig(); - final AsyncHttpClientEventFilter eventFilter; - if (providerConfig != null) { - eventFilter = new AsyncHttpClientEventFilter(this, (Integer) providerConfig.getProperty(MAX_HTTP_PACKET_HEADER_SIZE)); + + boolean npnEnabled = NextProtoNegSupport.isEnabled(); + boolean spdyEnabled = clientConfig.isSpdyEnabled(); + + if (spdyEnabled) { + // if NPN isn't available, check to see if it has been explicitly + // disabled. If it has, we assume the user knows what they are doing + // and we enable SPDY without NPN - this effectively disables standard + // HTTP/1.1 support. + if (!npnEnabled && providerConfig != null) { + if ((Boolean) providerConfig.getProperty(Property.NPN_ENABLED)) { + // NPN hasn't been disabled, so it's most likely a configuration proble. + // Log a warning and disable spdy support. + LOGGER.warn("Next Protocol Negotiation support is not available. SPDY support has been disabled."); + spdyEnabled = false; + } + } + } + + if (!spdyEnabled) { + final AsyncHttpClientEventFilter eventFilter; + final EventHandler handler = new EventHandler(this); + if (providerConfig != null) { + eventFilter = + new AsyncHttpClientEventFilter(handler, + (Integer) providerConfig + .getProperty( + MAX_HTTP_PACKET_HEADER_SIZE)); + } else { + eventFilter = new AsyncHttpClientEventFilter(handler); + } + handler.cleanup = eventFilter; + ContentEncoding[] encodings = eventFilter.getContentEncodings(); + if (encodings.length > 0) { + for (ContentEncoding encoding : encodings) { + eventFilter.removeContentEncoding(encoding); + } + } + if (clientConfig.isCompressionEnabled()) { + eventFilter.addContentEncoding( + new GZipContentEncoding(512, + 512, + new ClientEncodingFilter())); + } + fcb.add(eventFilter); + final AsyncHttpClientFilter clientFilter = + new AsyncHttpClientFilter(clientConfig); + fcb.add(clientFilter); + fcb.add(new WebSocketClientFilter()); } else { - eventFilter = new AsyncHttpClientEventFilter(this); - } - final AsyncHttpClientFilter clientFilter = - new AsyncHttpClientFilter(clientConfig); - ContentEncoding[] encodings = eventFilter.getContentEncodings(); - if (encodings.length > 0) { - for (ContentEncoding encoding : encodings) { - eventFilter.removeContentEncoding(encoding); + fcb.add(new SpdyFramingFilter()); + fcb.add(new AsyncSpdyClientEventFilter(new EventHandler(this), + ((npnEnabled) ? SpdyMode.NPN : SpdyMode.PLAIN), + clientConfig.executorService())); + final AsyncHttpClientFilter clientFilter = + new AsyncHttpClientFilter(clientConfig); + fcb.add(clientFilter); + if (npnEnabled) { + int idx = fcb.indexOfType(SSLFilter.class); + SSLFilter f = (SSLFilter) fcb.get(idx); + NextProtoNegSupport.getInstance().configure(f); } } - if (clientConfig.isCompressionEnabled()) { - eventFilter.addContentEncoding( - new GZipContentEncoding(512, - 512, - new ClientEncodingFilter())); - } - fcb.add(eventFilter); - fcb.add(clientFilter); - + if (providerConfig != null) { final TransportCustomizer customizer = (TransportCustomizer) - providerConfig.getProperty(TRANSPORT_CUSTOMIZER); + providerConfig.getProperty(Property.TRANSPORT_CUSTOMIZER); if (customizer != null) { customizer.customize(clientTransport, fcb); } else { @@ -413,7 +458,7 @@ public void onTimeout(Connection connection) { } else { doDefaultTransportConfig(); } - fcb.add(new WebSocketClientFilter()); + clientTransport.getAsyncQueueIO().getWriter().setMaxPendingBytesPerConnection(-1); clientTransport.setProcessor(fcb.build()); @@ -560,7 +605,8 @@ boolean sendRequest(final FilterChainContext ctx, context.bodyHandler = handler; isWriteComplete = handler.doHandle(ctx, request, requestPacket); } else { - ctx.write(requestPacket, ctx.getTransportContext().getCompletionHandler()); + HttpContent content = HttpContent.builder(requestPacket).last(true).build(); + ctx.write(content, ctx.getTransportContext().getCompletionHandler()); } LOGGER.debug("REQUEST: {}", requestPacket); @@ -699,6 +745,7 @@ void tunnelEstablished(final Connection c) { // ---------------------------------------------------------- Nested Classes + private static final class ContinueEvent implements FilterChainEvent { private final HttpTransactionContext context; @@ -1064,29 +1111,152 @@ private void addQueryString(final Request request, } // END AsyncHttpClientFiler - private static final class AsyncHttpClientEventFilter extends HttpClientFilter { + private interface Cleanup { - private final Map HANDLER_MAP = new HashMap(); + void cleanup(final FilterChainContext ctx); + } - private final GrizzlyAsyncHttpProvider provider; + + private static final class AsyncHttpClientEventFilter extends HttpClientFilter implements Cleanup { + private final EventHandler eventHandler; + // -------------------------------------------------------- Constructors - AsyncHttpClientEventFilter(final GrizzlyAsyncHttpProvider provider) { - this(provider, DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); + AsyncHttpClientEventFilter(final EventHandler eventHandler) { + this(eventHandler, DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); } - AsyncHttpClientEventFilter(final GrizzlyAsyncHttpProvider provider, + AsyncHttpClientEventFilter(final EventHandler eventHandler, final int maxHeaderSize) { super(maxHeaderSize); - this.provider = provider; + this.eventHandler = eventHandler; + } + + + @Override + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + eventHandler.exceptionOccurred(ctx, error); + } + + @Override + protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentParsed(content, ctx); + } + + @Override + protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersEncoded(httpHeader, ctx); + } + + @Override + protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentEncoded(content, ctx); + } + + @Override + protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onInitialLineParsed(httpHeader, ctx); + } + + @Override + protected void onHttpHeaderError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException { + eventHandler.onHttpHeaderError(httpHeader, ctx, t); + } + + @Override + protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersParsed(httpHeader, ctx); + } + + @Override + protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { + return eventHandler.onHttpPacketParsed(httpHeader, ctx); + } + + @Override + public void cleanup(final FilterChainContext ctx) { + clearResponse(ctx.getConnection()); + } + } // END AsyncHttpClientEventFilter + + + private static final class AsyncSpdyClientEventFilter extends SpdyHandlerFilter implements Cleanup { + + + private final EventHandler eventHandler; + + // -------------------------------------------------------- Constructors + + + AsyncSpdyClientEventFilter(final EventHandler eventHandler, + SpdyMode mode, + ExecutorService threadPool) { + super(mode, threadPool); + this.eventHandler = eventHandler; + } + + @Override + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + eventHandler.exceptionOccurred(ctx, error); + } + + @Override + protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentParsed(content, ctx); + } + + @Override + protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersEncoded(httpHeader, ctx); + } + + @Override + protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentEncoded(content, ctx); + } + + @Override + protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onInitialLineParsed(httpHeader, ctx); + } + + @Override + protected void onHttpHeaderError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException { + eventHandler.onHttpHeaderError(httpHeader, ctx, t); + } + + @Override + protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersParsed(httpHeader, ctx); + } + + @Override + protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { + return eventHandler.onHttpPacketParsed(httpHeader, ctx); + } + + @Override + public void cleanup(FilterChainContext ctx) { + + } + + } // END AsyncSpdyClientEventFilter + + + private static final class EventHandler { + + private static final Map HANDLER_MAP = + new HashMap(); + + static { HANDLER_MAP.put(HttpStatus.UNAUTHORIZED_401.getStatusCode(), - AuthorizationHandler.INSTANCE); + AuthorizationHandler.INSTANCE); HANDLER_MAP.put(HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.getStatusCode(), ProxyAuthorizationHandler.INSTANCE); HANDLER_MAP.put(HttpStatus.MOVED_PERMANENTLY_301.getStatusCode(), @@ -1095,14 +1265,24 @@ private static final class AsyncHttpClientEventFilter extends HttpClientFilter { RedirectHandler.INSTANCE); HANDLER_MAP.put(HttpStatus.TEMPORARY_REDIRECT_307.getStatusCode(), RedirectHandler.INSTANCE); + } + + private final GrizzlyAsyncHttpProvider provider; + Cleanup cleanup; + + + // -------------------------------------------------------- Constructors + + + EventHandler(final GrizzlyAsyncHttpProvider provider) { + this.provider = provider; } - // --------------------------------------- Methods from HttpClientFilter + // ----------------------------------------------------- Event Callbacks - @Override public void exceptionOccurred(FilterChainContext ctx, Throwable error) { provider.getHttpTransactionContext(ctx.getConnection()).abort(error); @@ -1110,7 +1290,6 @@ public void exceptionOccurred(FilterChainContext ctx, Throwable error) { } - @Override protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { @@ -1131,7 +1310,7 @@ protected void onHttpContentParsed(HttpContent content, } - @Override + @SuppressWarnings("UnusedParameters") protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); final AsyncHandler handler = context.handler; @@ -1142,7 +1321,6 @@ protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ct } } - @Override protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); final AsyncHandler handler = context.handler; @@ -1158,11 +1336,10 @@ protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) } } - @Override protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { - super.onInitialLineParsed(httpHeader, ctx); + //super.onInitialLineParsed(httpHeader, ctx); if (httpHeader.isSkipRemainder()) { return; } @@ -1239,7 +1416,6 @@ protected void onInitialLineParsed(HttpHeader httpHeader, } - @Override protected void onHttpHeaderError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t) throws IOException { @@ -1252,11 +1428,10 @@ protected void onHttpHeaderError(final HttpHeader httpHeader, } @SuppressWarnings({"unchecked"}) - @Override protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { - super.onHttpHeadersParsed(httpHeader, ctx); + //super.onHttpHeadersParsed(httpHeader, ctx); LOGGER.debug("RESPONSE: {}", httpHeader); if (httpHeader.containsHeader(Header.Connection)) { if ("close".equals(httpHeader.getHeader(Header.Connection))) { @@ -1379,25 +1554,29 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader, } @SuppressWarnings("unchecked") - @Override protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { boolean result; final String proxy_auth = httpHeader.getHeader(Header.ProxyAuthenticate); - + if (httpHeader.isSkipRemainder() ) { if (!ProxyAuthorizationHandler.isNTLMSecondHandShake(proxy_auth)) { - clearResponse(ctx.getConnection()); + cleanup.cleanup(ctx); cleanup(ctx, provider); return false; } else { - super.onHttpPacketParsed(httpHeader, ctx); + //super.onHttpPacketParsed(httpHeader, ctx); + cleanup.cleanup(ctx); httpHeader.getProcessingState().setKeepAlive(true); return false; } } - result = super.onHttpPacketParsed(httpHeader, ctx); + //result = super.onHttpPacketParsed(httpHeader, ctx); + if (cleanup != null) { + cleanup.cleanup(ctx); + } + result = false; final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); if (context.establishingTunnel @@ -1441,7 +1620,7 @@ private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransact AsyncHttpProviderConfig config = context.provider.clientConfig.getAsyncHttpProviderConfig(); boolean bufferFragments = true; if (config instanceof GrizzlyAsyncHttpProviderConfig) { - bufferFragments = (Boolean) ((GrizzlyAsyncHttpProviderConfig) config).getProperty(BUFFER_WEBSOCKET_FRAGMENTS); + bufferFragments = (Boolean) ((GrizzlyAsyncHttpProviderConfig) config).getProperty(Property.BUFFER_WEBSOCKET_FRAGMENTS); } return new GrizzlyWebSocketAdapter(ws, bufferFragments); @@ -1478,13 +1657,6 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx, } - private static URI getURI(String url) { - - return AsyncHttpProviderUtils.createUri(url); - - } - - private static boolean redirectCountExceeded(final HttpTransactionContext context) { return (context.redirectCount.get() > context.maxRedirectCount); @@ -2430,14 +2602,14 @@ public boolean doHandle(final FilterChainContext ctx, while (!last) { Buffer buffer = mm.allocate(MAX_CHUNK_SIZE); buffer.allowBufferDispose(true); - + final long readBytes = bodyLocal.read(buffer.toByteBuffer()); if (readBytes > 0) { buffer.position((int) readBytes); buffer.trim(); } else { buffer.dispose(); - + if (readBytes < 0) { last = true; buffer = Buffers.EMPTY_BUFFER; @@ -2458,7 +2630,7 @@ public boolean doHandle(final FilterChainContext ctx, last(last).build(); ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); } - + return true; } @@ -2812,26 +2984,26 @@ public void getBytes(byte[] bytes) { } } // END GrizzlyTransferAdapter - - + + private static final class GrizzlyWebSocketAdapter implements WebSocket { - + private final SimpleWebSocket gWebSocket; private final boolean bufferFragments; // -------------------------------------------------------- Constructors - - + + GrizzlyWebSocketAdapter(final SimpleWebSocket gWebSocket, final boolean bufferFragements) { this.gWebSocket = gWebSocket; this.bufferFragments = bufferFragements; } - - + + // ------------------------------------------ Methods from AHC WebSocket - - + + @Override public WebSocket sendMessage(byte[] message) { gWebSocket.send(message); @@ -2899,7 +3071,7 @@ public boolean isOpen() { public void close() { gWebSocket.close(); } - + } // END GrizzlyWebSocketAdapter @@ -3068,7 +3240,65 @@ public int hashCode() { return result; } } // END AHCWebSocketListenerAdapter - + + /* + + public static void main(String[] args) { + AsyncHttpClientConfig config = + new AsyncHttpClientConfig.Builder().setSpdyEnabled( + true).build(); + AsyncHttpClient client = + new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), + config); + try { + client.prepareGet("https://www.google.com") + .execute(new AsyncHandler() { + @Override + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) + throws Exception { + System.out.println( + new String(bodyPart.getBodyPartBytes(), + "UTF-8")); + return STATE.CONTINUE; + } + + @Override + public STATE onStatusReceived(HttpResponseStatus responseStatus) + throws Exception { + System.out + .println( + responseStatus.getStatusCode()); + return STATE.CONTINUE; + } + + @Override + public STATE onHeadersReceived(HttpResponseHeaders headers) + throws Exception { + System.out.println(headers.toString()); + return STATE.CONTINUE; + } + + @Override + public Object onCompleted() throws Exception { + System.out.println("REQUEST COMPLETE"); + return null; + } + }).get(); + } catch (IOException ioe) { + ioe.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } + } + + */ } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java index d0b61e8958..cd98e82267 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java @@ -65,7 +65,14 @@ public static enum Property { * invoked with the complete message. If this functionality is not desired, set * this property to false. */ - BUFFER_WEBSOCKET_FRAGMENTS(Boolean.class, true); + BUFFER_WEBSOCKET_FRAGMENTS(Boolean.class, true), + + /** + * By disabling NPN support, SPDY will be used over secure or non-secure channels, + * but no negotiation of the protocol via NPN will occur. In short, this means + * that this instance of AHC will only 'speak' SPDY - HTTP is effectively disabled. + */ + NPN_ENABLED(Boolean.class, true); final Object defaultValue; From 97fd126e6a0dc6129549b649c479c25ea812cdaa Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 9 May 2013 10:31:48 -0700 Subject: [PATCH 0368/2844] Add toString(). --- .../client/providers/grizzly/GrizzlyResponseHeaders.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java index 03e175f1ab..1b18601c7d 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java @@ -75,5 +75,8 @@ public FluentCaseInsensitiveStringsMap getHeaders() { } - + @Override + public String toString() { + return getHeaders().toString(); + } } From b8946eb46b147e5047c5acbbd953011e97ca9524 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 9 May 2013 13:43:12 -0400 Subject: [PATCH 0369/2844] Add anaytics --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ebf923317a..68c6ed4d29 100644 --- a/README.md +++ b/README.md @@ -180,3 +180,5 @@ Keep up to date on the library development by joining the Asynchronous HTTP Clie [Google Group](http://groups.google.com/group/asynchttpclient) or follow us on [Twitter](http://twitter.com/jfarcand) + +[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/6433679063b2351599c6ca44a08246a2 "githalytics.com")](http://githalytics.com/AsyncHttpClient/async-http-client) From fbcc2206764f44dedd31d2558071c0dc55c8de62 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 10 May 2013 16:19:08 -0700 Subject: [PATCH 0370/2844] Remove deprecated api usage. --- .../client/providers/grizzly/GrizzlyConnectionsPool.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index 3156ca0cf4..6cde1a5e8d 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -17,6 +17,7 @@ import com.ning.http.client.ConnectionsPool; import org.glassfish.grizzly.CloseListener; +import org.glassfish.grizzly.CloseType; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.attributes.Attribute; @@ -73,10 +74,10 @@ public GrizzlyConnectionsPool(final AsyncHttpClientConfig config) { unlimitedConnections = (maxConnections == -1); delayedExecutor = new DelayedExecutor(Executors.newSingleThreadExecutor()); delayedExecutor.start(); - listener = new Connection.CloseListener() { + listener = new CloseListener() { @Override - public void onClosed(Connection connection, Connection.CloseType closeType) throws IOException { - if (closeType == Connection.CloseType.REMOTELY) { + public void onClosed(Connection connection, CloseType closeType) throws IOException { + if (closeType == CloseType.REMOTELY) { if (LOG.isInfoEnabled()) { LOG.info("Remote closed connection ({}). Removing from cache", connection.toString()); } From 760a911fc1b20c918afc4648cf9ab6f637f40d8e Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 17 May 2013 18:45:07 +0200 Subject: [PATCH 0371/2844] Various multipart fixes, close #296, #297, #298 --- .../providers/jdk/JDKAsyncHttpProvider.java | 2 +- .../com/ning/http/multipart/FilePart.java | 126 ++++++++--------- .../ning/http/multipart/FilePartSource.java | 38 ++--- .../ning/http/multipart/MultipartBody.java | 5 +- .../multipart/MultipartRequestEntity.java | 71 +++++----- .../java/com/ning/http/multipart/Part.java | 131 ++++++++++-------- .../com/ning/http/multipart/PartBase.java | 45 +++--- .../com/ning/http/multipart/StringPart.java | 46 +++--- .../http/util/AsyncHttpProviderUtils.java | 8 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 2 +- .../netty/NettyAsyncHttpProvider.java | 6 +- 11 files changed, 242 insertions(+), 238 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java index 0acf1861ed..8970de8fdb 100644 --- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java @@ -608,7 +608,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request lenght = MAX_BUFFERED_BYTES; } - MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getParams()); + MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getHeaders()); urlConnection.setRequestProperty("Content-Type", mre.getContentType()); urlConnection.setRequestProperty("Content-Length", String.valueOf(mre.getContentLength())); diff --git a/api/src/main/java/com/ning/http/multipart/FilePart.java b/api/src/main/java/com/ning/http/multipart/FilePart.java index 5548085f08..66e9c8f3bf 100644 --- a/api/src/main/java/com/ning/http/multipart/FilePart.java +++ b/api/src/main/java/com/ning/http/multipart/FilePart.java @@ -23,7 +23,7 @@ /** * This class is an adaptation of the Apache HttpClient implementation - * + * * @link http://hc.apache.org/httpclient-3.x/ */ public class FilePart extends PartBase { @@ -51,43 +51,40 @@ public class FilePart extends PartBase { /** * Attachment's file name as a byte array */ - private static final byte[] FILE_NAME_BYTES = - MultipartEncodingUtil.getAsciiBytes(FILE_NAME); + private static final byte[] FILE_NAME_BYTES = MultipartEncodingUtil.getAsciiBytes(FILE_NAME); /** * Source of the file part. */ - private PartSource source; + private final PartSource source; /** * FilePart Constructor. - * - * @param name the name for this part - * @param partSource the source for this part - * @param contentType the content type for this part, if null the - * {@link #DEFAULT_CONTENT_TYPE default} is used - * @param charset the charset encoding for this part, if null the - * {@link #DEFAULT_CHARSET default} is used + * + * @param name the name for this part + * @param partSource the source for this part + * @param contentType the content type for this part, if null the {@link #DEFAULT_CONTENT_TYPE default} is used + * @param charset the charset encoding for this part, if null the {@link #DEFAULT_CHARSET default} is used + * @param contentId */ - public FilePart(String name, PartSource partSource, String contentType, String charset) { + public FilePart(String name, PartSource partSource, String contentType, String charset, String contentId) { - super( - name, - contentType == null ? DEFAULT_CONTENT_TYPE : contentType, - charset == null ? "ISO-8859-1" : charset, - DEFAULT_TRANSFER_ENCODING - ); + super(name, contentType == null ? DEFAULT_CONTENT_TYPE : contentType, charset == null ? "ISO-8859-1" : charset, DEFAULT_TRANSFER_ENCODING, contentId); if (partSource == null) { throw new IllegalArgumentException("Source may not be null"); } this.source = partSource; } + + public FilePart(String name, PartSource partSource, String contentType, String charset) { + this(name, partSource, contentType, charset, null); + } /** * FilePart Constructor. - * - * @param name the name for this part + * + * @param name the name for this part * @param partSource the source for this part */ public FilePart(String name, PartSource partSource) { @@ -96,77 +93,64 @@ public FilePart(String name, PartSource partSource) { /** * FilePart Constructor. - * + * * @param name the name of the file part * @param file the file to post - * @throws java.io.FileNotFoundException if the file is not a normal - * file or if it is not readable. + * @throws java.io.FileNotFoundException if the file is not a normal file or if it is not readable. */ - public FilePart(String name, File file) - throws FileNotFoundException { + public FilePart(String name, File file) throws FileNotFoundException { this(name, new FilePartSource(file), null, null); } /** * FilePart Constructor. - * - * @param name the name of the file part - * @param file the file to post - * @param contentType the content type for this part, if null the - * {@link #DEFAULT_CONTENT_TYPE default} is used - * @param charset the charset encoding for this part, if null the - * {@link #DEFAULT_CHARSET default} is used - * @throws FileNotFoundException if the file is not a normal - * file or if it is not readable. - */ - public FilePart(String name, File file, String contentType, String charset) - throws FileNotFoundException { + * + * @param name the name of the file part + * @param file the file to post + * @param contentType the content type for this part, if null the {@link #DEFAULT_CONTENT_TYPE default} is used + * @param charset the charset encoding for this part, if null the {@link #DEFAULT_CHARSET default} is used + * @throws FileNotFoundException if the file is not a normal file or if it is not readable. + */ + public FilePart(String name, File file, String contentType, String charset) throws FileNotFoundException { this(name, new FilePartSource(file), contentType, charset); } /** * FilePart Constructor. - * - * @param name the name of the file part + * + * @param name the name of the file part * @param fileName the file name - * @param file the file to post - * @throws FileNotFoundException if the file is not a normal - * file or if it is not readable. + * @param file the file to post + * @throws FileNotFoundException if the file is not a normal file or if it is not readable. */ - public FilePart(String name, String fileName, File file) - throws FileNotFoundException { + public FilePart(String name, String fileName, File file) throws FileNotFoundException { this(name, new FilePartSource(fileName, file), null, null); } /** * FilePart Constructor. - * - * @param name the name of the file part - * @param fileName the file name - * @param file the file to post - * @param contentType the content type for this part, if null the - * {@link #DEFAULT_CONTENT_TYPE default} is used - * @param charset the charset encoding for this part, if null the - * {@link #DEFAULT_CHARSET default} is used - * @throws FileNotFoundException if the file is not a normal - * file or if it is not readable. - */ - public FilePart(String name, String fileName, File file, String contentType, String charset) - throws FileNotFoundException { + * + * @param name the name of the file part + * @param fileName the file name + * @param file the file to post + * @param contentType the content type for this part, if null the {@link #DEFAULT_CONTENT_TYPE default} is used + * @param charset the charset encoding for this part, if null the {@link #DEFAULT_CHARSET default} is used + * @throws FileNotFoundException if the file is not a normal file or if it is not readable. + */ + public FilePart(String name, String fileName, File file, String contentType, String charset) throws FileNotFoundException { this(name, new FilePartSource(fileName, file), contentType, charset); } /** * Write the disposition header to the output stream - * + * * @param out The output stream * @throws java.io.IOException If an IO problem occurs */ - protected void sendDispositionHeader(OutputStream out) - throws IOException { - super.sendDispositionHeader(out); + protected void sendDispositionHeader(OutputStream out) throws IOException { String filename = this.source.getFileName(); if (filename != null) { + super.sendDispositionHeader(out); out.write(FILE_NAME_BYTES); out.write(QUOTE_BYTES); out.write(MultipartEncodingUtil.getAsciiBytes(filename)); @@ -176,7 +160,7 @@ protected void sendDispositionHeader(OutputStream out) /** * Write the data in "source" to the specified stream. - * + * * @param out The output stream. * @throws IOException if an IO problem occurs. */ @@ -202,17 +186,17 @@ protected void sendData(OutputStream out) throws IOException { } } - public void setStalledTime(long ms) { - _stalledTime = ms; - } + public void setStalledTime(long ms) { + _stalledTime = ms; + } - public long getStalledTime() { - return _stalledTime; - } + public long getStalledTime() { + return _stalledTime; + } /** * Returns the source of the file part. - * + * * @return The source. */ protected PartSource getSource() { @@ -221,7 +205,7 @@ protected PartSource getSource() { /** * Return the length of the data. - * + * * @return The length. * @throws IOException if an IO problem occurs */ @@ -229,6 +213,6 @@ protected long lengthOfData() throws IOException { return source.getLength(); } - private long _stalledTime = -1; + private long _stalledTime = -1; } diff --git a/api/src/main/java/com/ning/http/multipart/FilePartSource.java b/api/src/main/java/com/ning/http/multipart/FilePartSource.java index f3b28add14..6d6880c044 100644 --- a/api/src/main/java/com/ning/http/multipart/FilePartSource.java +++ b/api/src/main/java/com/ning/http/multipart/FilePartSource.java @@ -24,7 +24,7 @@ /** * This class is an adaptation of the Apache HttpClient implementation - * + * * @link http://hc.apache.org/httpclient-3.x/ */ public class FilePartSource implements PartSource { @@ -41,22 +41,19 @@ public class FilePartSource implements PartSource { /** * Constructor for FilePartSource. - * + * * @param file the FilePart source File. - * @throws java.io.FileNotFoundException if the file does not exist or - * cannot be read + * @throws java.io.FileNotFoundException if the file does not exist or cannot be read */ public FilePartSource(File file) throws FileNotFoundException { this.file = file; if (file != null) { if (!file.isFile()) { - final String errorMessage = - String.format("File is not a normal file (%s).", file.getAbsolutePath()); + final String errorMessage = String.format("File is not a normal file (%s).", file.getAbsolutePath()); throw new FileNotFoundException(errorMessage); } if (!file.canRead()) { - final String errorMessage = - String.format("File is not readable (%s).", file.getAbsolutePath()); + final String errorMessage = String.format("File is not readable (%s).", file.getAbsolutePath()); throw new FileNotFoundException(errorMessage); } this.fileName = file.getName(); @@ -65,23 +62,19 @@ public FilePartSource(File file) throws FileNotFoundException { /** * Constructor for FilePartSource. - * + * * @param fileName the file name of the FilePart - * @param file the source File for the FilePart - * @throws FileNotFoundException if the file does not exist or - * cannot be read + * @param file the source File for the FilePart + * @throws FileNotFoundException if the file does not exist or cannot be read */ - public FilePartSource(String fileName, File file) - throws FileNotFoundException { + public FilePartSource(String fileName, File file) throws FileNotFoundException { this(file); - if (fileName != null) { - this.fileName = fileName; - } + this.fileName = fileName; } /** * Return the length of the file - * + * * @return the length of the file. * @see PartSource#getLength() */ @@ -95,17 +88,17 @@ public long getLength() { /** * Return the current filename - * + * * @return the filename. * @see PartSource#getFileName() */ public String getFileName() { - return (fileName == null) ? "noname" : fileName; + return fileName; } /** * Return a new {@link java.io.FileInputStream} for the current filename. - * + * * @return the new input stream. * @throws java.io.IOException If an IO problem occurs. * @see PartSource#createInputStream() @@ -114,7 +107,7 @@ public InputStream createInputStream() throws IOException { if (this.file != null) { return new FileInputStream(this.file); } else { - return new ByteArrayInputStream(new byte[]{}); + return new ByteArrayInputStream(new byte[] {}); } } @@ -122,5 +115,4 @@ public File getFile() { return file; } - } diff --git a/api/src/main/java/com/ning/http/multipart/MultipartBody.java b/api/src/main/java/com/ning/http/multipart/MultipartBody.java index fe97ed8c19..dd751a8f31 100644 --- a/api/src/main/java/com/ning/http/multipart/MultipartBody.java +++ b/api/src/main/java/com/ning/http/multipart/MultipartBody.java @@ -48,8 +48,8 @@ public class MultipartBody implements RandomAccessBody { enum FileLocation {NONE, START, MIDDLE, END} - public MultipartBody(List parts, String boundary, String contentLength) { - this.boundary = MultipartEncodingUtil.getAsciiBytes(boundary.substring("multipart/form-data; boundary=".length())); + public MultipartBody(List parts, String contentType, String contentLength) { + this.boundary = MultipartEncodingUtil.getAsciiBytes(contentType.substring(contentType.indexOf("boundary=") + "boundary=".length())); this.contentLength = Long.parseLong(contentLength); this.parts = parts; @@ -430,6 +430,7 @@ private ByteArrayOutputStream generateFileStart(FilePart filePart) filePart.sendDispositionHeader(overhead); filePart.sendContentTypeHeader(overhead); filePart.sendTransferEncodingHeader(overhead); + filePart.sendContentIdHeader(overhead); filePart.sendEndOfHeader(overhead); return overhead; } diff --git a/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java b/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java index 0d93447a22..74dc593583 100644 --- a/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java +++ b/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java @@ -15,6 +15,9 @@ */ package com.ning.http.multipart; +import static com.ning.http.util.MiscUtil.isNonEmpty; + +import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.FluentStringsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -25,7 +28,7 @@ /** * This class is an adaptation of the Apache HttpClient implementation - * + * * @link http://hc.apache.org/httpclient-3.x/ */ public class MultipartRequestEntity implements RequestEntity { @@ -38,12 +41,11 @@ public class MultipartRequestEntity implements RequestEntity { /** * The pool of ASCII chars to be used for generating a multipart boundary. */ - private static byte[] MULTIPART_CHARS = MultipartEncodingUtil.getAsciiBytes( - "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); + private static byte[] MULTIPART_CHARS = MultipartEncodingUtil.getAsciiBytes("-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); /** * Generates a random multipart boundary string. - * + * * @return */ private static byte[] generateMultipartBoundary() { @@ -64,42 +66,35 @@ private static byte[] generateMultipartBoundary() { private byte[] multipartBoundary; - private FluentStringsMap methodParams; + private final String contentType; /** * Creates a new multipart entity containing the given parts. - * - * @param parts The parts to include. - * @param methodParams The params of the HttpMethod using this entity. + * + * @param parts The parts to include. + * @param requestHeader */ - public MultipartRequestEntity(Part[] parts, FluentStringsMap methodParams) { + public MultipartRequestEntity(Part[] parts, FluentCaseInsensitiveStringsMap requestHeaders) { if (parts == null) { throw new IllegalArgumentException("parts cannot be null"); } - if (methodParams == null) { - methodParams = new FluentStringsMap(); - } + String contentTypeHeader = requestHeaders.getFirstValue("Content-Type"); + if (isNonEmpty(contentTypeHeader)) + this.contentType = contentTypeHeader; + else + this.contentType = MULTIPART_FORM_CONTENT_TYPE; this.parts = parts; - this.methodParams = methodParams; } /** - * Returns the MIME boundary string that is used to demarcate boundaries of - * this part. The first call to this method will implicitly create a new - * boundary string. To create a boundary string first the - * HttpMethodParams.MULTIPART_BOUNDARY parameter is considered. Otherwise - * a random one is generated. - * + * Returns the MIME boundary string that is used to demarcate boundaries of this part. The first call to this method will implicitly create a new boundary string. To create a boundary string first the HttpMethodParams.MULTIPART_BOUNDARY parameter is considered. Otherwise a + * random one is generated. + * * @return The boundary string of this entity in ASCII encoding. */ protected byte[] getMultipartBoundary() { if (multipartBoundary == null) { - String temp = methodParams.get("") == null ? null : methodParams.get("").iterator().next(); - if (temp != null) { - multipartBoundary = MultipartEncodingUtil.getAsciiBytes(temp); - } else { - multipartBoundary = generateMultipartBoundary(); - } + multipartBoundary = generateMultipartBoundary(); } return multipartBoundary; } @@ -116,14 +111,18 @@ public boolean isRepeatable() { return true; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.apache.commons.httpclient.methods.RequestEntity#writeRequest(java.io.OutputStream) */ public void writeRequest(OutputStream out) throws IOException { Part.sendParts(out, parts, getMultipartBoundary()); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.apache.commons.httpclient.methods.RequestEntity#getContentLength() */ public long getContentLength() { @@ -135,14 +134,22 @@ public long getContentLength() { } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.apache.commons.httpclient.methods.RequestEntity#getContentType() */ public String getContentType() { - StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE); - buffer.append("; boundary="); - buffer.append(MultipartEncodingUtil.getAsciiString(getMultipartBoundary())); - return buffer.toString(); + if (contentType.contains("boundary=")) + return contentType; + else { + StringBuffer buffer = new StringBuffer(contentType); + if (!contentType.endsWith(";")) + buffer.append(";"); + buffer.append(" boundary="); + buffer.append(MultipartEncodingUtil.getAsciiString(getMultipartBoundary())); + return buffer.toString(); + } } } diff --git a/api/src/main/java/com/ning/http/multipart/Part.java b/api/src/main/java/com/ning/http/multipart/Part.java index f1d5d30807..82be0dc446 100644 --- a/api/src/main/java/com/ning/http/multipart/Part.java +++ b/api/src/main/java/com/ning/http/multipart/Part.java @@ -21,7 +21,7 @@ /** * This class is an adaptation of the Apache HttpClient implementation - * + * * @link http://hc.apache.org/httpclient-3.x/ */ public abstract class Part implements com.ning.http.client.Part { @@ -32,8 +32,7 @@ public abstract class Part implements com.ning.http.client.Part { protected static final String BOUNDARY = "----------------314159265358979323846"; /** - * The default boundary to be used if etBoundaryBytes(byte[]) has not - * been called. + * The default boundary to be used if etBoundaryBytes(byte[]) has not been called. */ private static final byte[] DEFAULT_BOUNDARY_BYTES = MultipartEncodingUtil.getAsciiBytes(BOUNDARY); @@ -105,12 +104,21 @@ public abstract class Part implements com.ning.http.client.Part { /** * Content type header as a byte array */ - static final byte[] CONTENT_TRANSFER_ENCODING_BYTES = - MultipartEncodingUtil.getAsciiBytes(CONTENT_TRANSFER_ENCODING); + static final byte[] CONTENT_TRANSFER_ENCODING_BYTES = MultipartEncodingUtil.getAsciiBytes(CONTENT_TRANSFER_ENCODING); + + /** + * Content type header + */ + protected static final String CONTENT_ID = "Content-ID: "; + + /** + * Content type header as a byte array + */ + static final byte[] CONTENT_ID_BYTES = MultipartEncodingUtil.getAsciiBytes(CONTENT_ID); /** * Return the boundary string. - * + * * @return the boundary string * @deprecated uses a constant string. Rather use {@link #getPartBoundary} */ @@ -125,36 +133,37 @@ public static String getBoundary() { /** * Return the name of this part. - * + * * @return The name. */ public abstract String getName(); /** * Returns the content type of this part. - * + * * @return the content type, or null to exclude the content type header */ public abstract String getContentType(); /** * Return the character encoding of this part. - * - * @return the character encoding, or null to exclude the character - * encoding header + * + * @return the character encoding, or null to exclude the character encoding header */ public abstract String getCharSet(); /** * Return the transfer encoding of this part. - * + * * @return the transfer encoding, or null to exclude the transfer encoding header */ public abstract String getTransferEncoding(); + public abstract String getContentId(); + /** * Gets the part boundary to be used. - * + * * @return the part boundary as an array of bytes. * @since 3.0 */ @@ -168,10 +177,8 @@ protected byte[] getPartBoundary() { } /** - * Sets the part boundary. Only meant to be used by - * {@link Part#sendParts(java.io.OutputStream, Part[], byte[])} - * and {@link Part#getLengthOfParts(Part[], byte[])} - * + * Sets the part boundary. Only meant to be used by {@link Part#sendParts(java.io.OutputStream, Part[], byte[])} and {@link Part#getLengthOfParts(Part[], byte[])} + * * @param boundaryBytes An array of ASCII bytes. * @since 3.0 */ @@ -181,9 +188,8 @@ void setPartBoundary(byte[] boundaryBytes) { /** * Tests if this part can be sent more than once. - * - * @return true if {@link #sendData(java.io.OutputStream)} can be successfully called - * more than once. + * + * @return true if {@link #sendData(java.io.OutputStream)} can be successfully called more than once. * @since 3.0 */ public boolean isRepeatable() { @@ -192,7 +198,7 @@ public boolean isRepeatable() { /** * Write the start to the specified output stream - * + * * @param out The output stream * @throws java.io.IOException If an IO problem occurs. */ @@ -204,7 +210,7 @@ protected void sendStart(OutputStream out) throws IOException { /** * Write the content disposition header to the specified output stream - * + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -217,7 +223,7 @@ protected void sendDispositionHeader(OutputStream out) throws IOException { /** * Write the content type header to the specified output stream - * + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -236,9 +242,8 @@ protected void sendContentTypeHeader(OutputStream out) throws IOException { } /** - * Write the content transfer encoding header to the specified - * output stream - * + * Write the content transfer encoding header to the specified output stream + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -251,9 +256,24 @@ protected void sendTransferEncodingHeader(OutputStream out) throws IOException { } } + /** + * Write the content ID header to the specified output stream + * + * @param out The output stream + * @throws IOException If an IO problem occurs. + */ + protected void sendContentIdHeader(OutputStream out) throws IOException { + String contentId = getContentId(); + if (contentId != null) { + out.write(CRLF_BYTES); + out.write(CONTENT_ID_BYTES); + out.write(MultipartEncodingUtil.getAsciiBytes(contentId)); + } + } + /** * Write the end of the header to the output stream - * + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -264,7 +284,7 @@ protected void sendEndOfHeader(OutputStream out) throws IOException { /** * Write the data to the specified output stream - * + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -272,7 +292,7 @@ protected void sendEndOfHeader(OutputStream out) throws IOException { /** * Return the length of the main content - * + * * @return long The length. * @throws IOException If an IO problem occurs */ @@ -280,7 +300,7 @@ protected void sendEndOfHeader(OutputStream out) throws IOException { /** * Write the end data to the output stream. - * + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -289,10 +309,8 @@ protected void sendEnd(OutputStream out) throws IOException { } /** - * Write all the data to the output stream. - * If you override this method make sure to override - * #length() as well - * + * Write all the data to the output stream. If you override this method make sure to override #length() as well + * * @param out The output stream * @throws IOException If an IO problem occurs. */ @@ -306,12 +324,9 @@ public void send(OutputStream out) throws IOException { sendEnd(out); } - /** - * Return the full length of all the data. - * If you override this method make sure to override - * #send(OutputStream) as well - * + * Return the full length of all the data. If you override this method make sure to override #send(OutputStream) as well + * * @return long The length. * @throws IOException If an IO problem occurs */ @@ -324,6 +339,7 @@ public long length() throws IOException { sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); + sendContentIdHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); @@ -331,7 +347,7 @@ public long length() throws IOException { /** * Return a string representation of this object. - * + * * @return A string representation of this object. * @see java.lang.Object#toString() */ @@ -341,27 +357,25 @@ public String toString() { /** * Write all parts and the last boundary to the specified output stream. - * - * @param out The stream to write to. + * + * @param out The stream to write to. * @param parts The parts to write. * @throws IOException If an I/O error occurs while writing the parts. */ - public static void sendParts(OutputStream out, final Part[] parts) - throws IOException { + public static void sendParts(OutputStream out, final Part[] parts) throws IOException { sendParts(out, parts, DEFAULT_BOUNDARY_BYTES); } /** * Write all parts and the last boundary to the specified output stream. - * - * @param out The stream to write to. - * @param parts The parts to write. + * + * @param out The stream to write to. + * @param parts The parts to write. * @param partBoundary The ASCII bytes to use as the part boundary. * @throws IOException If an I/O error occurs while writing the parts. * @since 3.0 */ - public static void sendParts(OutputStream out, Part[] parts, byte[] partBoundary) - throws IOException { + public static void sendParts(OutputStream out, Part[] parts, byte[] partBoundary) throws IOException { if (parts == null) { throw new IllegalArgumentException("Parts may not be null"); @@ -380,8 +394,7 @@ public static void sendParts(OutputStream out, Part[] parts, byte[] partBoundary out.write(CRLF_BYTES); } - public static void sendMessageEnd(OutputStream out, byte[] partBoundary) - throws IOException { + public static void sendMessageEnd(OutputStream out, byte[] partBoundary) throws IOException { if (partBoundary == null || partBoundary.length == 0) { throw new IllegalArgumentException("partBoundary may not be empty"); @@ -395,14 +408,13 @@ public static void sendMessageEnd(OutputStream out, byte[] partBoundary) /** * Write all parts and the last boundary to the specified output stream. - * - * @param out The stream to write to. + * + * @param out The stream to write to. * @param part The part to write. * @throws IOException If an I/O error occurs while writing the parts. * @since N/A */ - public static void sendPart(OutputStream out, Part part, byte[] partBoundary) - throws IOException { + public static void sendPart(OutputStream out, Part part, byte[] partBoundary) throws IOException { if (part == null) { throw new IllegalArgumentException("Parts may not be null"); @@ -414,20 +426,19 @@ public static void sendPart(OutputStream out, Part part, byte[] partBoundary) /** * Return the total sum of all parts and that of the last boundary - * + * * @param parts The parts. * @return The total length * @throws IOException If an I/O error occurs while writing the parts. */ - public static long getLengthOfParts(Part[] parts) - throws IOException { + public static long getLengthOfParts(Part[] parts) throws IOException { return getLengthOfParts(parts, DEFAULT_BOUNDARY_BYTES); } /** * Gets the length of the multipart message including the given parts. - * - * @param parts The parts. + * + * @param parts The parts. * @param partBoundary The ASCII bytes to use as the part boundary. * @return The total length * @throws IOException If an I/O error occurs while writing the parts. diff --git a/api/src/main/java/com/ning/http/multipart/PartBase.java b/api/src/main/java/com/ning/http/multipart/PartBase.java index 415bb49186..d2207d7237 100644 --- a/api/src/main/java/com/ning/http/multipart/PartBase.java +++ b/api/src/main/java/com/ning/http/multipart/PartBase.java @@ -17,7 +17,7 @@ /** * This class is an adaptation of the Apache HttpClient implementation - * + * * @link http://hc.apache.org/httpclient-3.x/ */ public abstract class PartBase extends Part { @@ -42,15 +42,18 @@ public abstract class PartBase extends Part { */ private String transferEncoding; + private String contentId; + /** * Constructor. - * - * @param name The name of the part - * @param contentType The content type, or null - * @param charSet The character encoding, or null + * + * @param name The name of the part + * @param contentType The content type, or null + * @param charSet The character encoding, or null * @param transferEncoding The transfer encoding, or null + * @param contentId The content id, or null */ - public PartBase(String name, String contentType, String charSet, String transferEncoding) { + public PartBase(String name, String contentType, String charSet, String transferEncoding, String contentId) { if (name == null) { throw new IllegalArgumentException("Name must not be null"); @@ -59,11 +62,12 @@ public PartBase(String name, String contentType, String charSet, String transfer this.contentType = contentType; this.charSet = charSet; this.transferEncoding = transferEncoding; + this.contentId = contentId; } /** * Returns the name. - * + * * @return The name. */ public String getName() { @@ -72,7 +76,7 @@ public String getName() { /** * Returns the content type of this part. - * + * * @return String The name. */ public String getContentType() { @@ -81,7 +85,7 @@ public String getContentType() { /** * Return the character encoding of this part. - * + * * @return String The name. */ public String getCharSet() { @@ -90,7 +94,7 @@ public String getCharSet() { /** * Returns the transfer encoding of this part. - * + * * @return String The name. */ public String getTransferEncoding() { @@ -99,9 +103,8 @@ public String getTransferEncoding() { /** * Sets the character encoding. - * - * @param charSet the character encoding, or null to exclude the character - * encoding header + * + * @param charSet the character encoding, or null to exclude the character encoding header */ public void setCharSet(String charSet) { this.charSet = charSet; @@ -109,7 +112,7 @@ public void setCharSet(String charSet) { /** * Sets the content type. - * + * * @param contentType the content type, or null to exclude the content type header */ public void setContentType(String contentType) { @@ -118,7 +121,7 @@ public void setContentType(String contentType) { /** * Sets the part name. - * + * * @param name */ public void setName(String name) { @@ -130,12 +133,18 @@ public void setName(String name) { /** * Sets the transfer encoding. - * - * @param transferEncoding the transfer encoding, or null to exclude the - * transfer encoding header + * + * @param transferEncoding the transfer encoding, or null to exclude the transfer encoding header */ public void setTransferEncoding(String transferEncoding) { this.transferEncoding = transferEncoding; } + public String getContentId() { + return contentId; + } + + public void setContentId(String contentId) { + this.contentId = contentId; + } } diff --git a/api/src/main/java/com/ning/http/multipart/StringPart.java b/api/src/main/java/com/ning/http/multipart/StringPart.java index 431362c8bb..1ca71f86a6 100644 --- a/api/src/main/java/com/ning/http/multipart/StringPart.java +++ b/api/src/main/java/com/ning/http/multipart/StringPart.java @@ -20,7 +20,7 @@ /** * This class is an adaptation of the Apache HttpClient implementation - * + * * @link http://hc.apache.org/httpclient-3.x/ */ public class StringPart extends PartBase { @@ -48,24 +48,19 @@ public class StringPart extends PartBase { /** * The String value of this part. */ - private String value; + private final String value; /** * Constructor. - * - * @param name The name of the part - * @param value the string to post - * @param charset the charset to be used to encode the string, if null - * the {@link #DEFAULT_CHARSET default} is used + * + * @param name The name of the part + * @param value the string to post + * @param charset the charset to be used to encode the string, if null the {@link #DEFAULT_CHARSET default} is used + * @param contentId the content id */ - public StringPart(String name, String value, String charset) { + public StringPart(String name, String value, String charset, String contentId) { - super( - name, - DEFAULT_CONTENT_TYPE, - charset == null ? DEFAULT_CHARSET : charset, - DEFAULT_TRANSFER_ENCODING - ); + super(name, DEFAULT_CONTENT_TYPE, charset == null ? DEFAULT_CHARSET : charset, DEFAULT_TRANSFER_ENCODING, contentId); if (value == null) { throw new IllegalArgumentException("Value may not be null"); } @@ -76,20 +71,23 @@ public StringPart(String name, String value, String charset) { this.value = value; } + public StringPart(String name, String value, String charset) { + this(name, value, charset, null); + } + /** * Constructor. - * - * @param name The name of the part + * + * @param name The name of the part * @param value the string to post */ public StringPart(String name, String value) { - this(name, value, null); + this(name, value, null, null); } /** - * Gets the content in bytes. Bytes are lazily created to allow the charset to be changed - * after the part is created. - * + * Gets the content in bytes. Bytes are lazily created to allow the charset to be changed after the part is created. + * * @return the content in bytes */ private byte[] getContent() { @@ -101,7 +99,7 @@ private byte[] getContent() { /** * Writes the data to the given OutputStream. - * + * * @param out the OutputStream to write to * @throws java.io.IOException if there is a write error */ @@ -111,7 +109,7 @@ protected void sendData(OutputStream out) throws IOException { /** * Return the length of the data. - * + * * @return The length of the data. * @throws IOException If an IO problem occurs */ @@ -119,7 +117,9 @@ protected long lengthOfData() throws IOException { return getContent().length; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.apache.commons.httpclient.methods.multipart.BasePart#setCharSet(java.lang.String) */ public void setCharSet(String charSet) { diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java index 755ae03761..c2519dd337 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java @@ -34,7 +34,7 @@ import com.ning.http.client.ByteArrayPart; import com.ning.http.client.Cookie; import com.ning.http.client.FilePart; -import com.ning.http.client.FluentStringsMap; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; import com.ning.http.client.HttpResponseBodyPart; import com.ning.http.client.Part; import com.ning.http.client.Request; @@ -336,11 +336,11 @@ public final static int getPort(URI uri) { * This is quite ugly as our internal names are duplicated, but we build on top of HTTP Client implementation. * * @param params - * @param methodParams + * @param requestHeaders * @return a MultipartRequestEntity. * @throws java.io.FileNotFoundException */ - public final static MultipartRequestEntity createMultipartRequestEntity(List params, FluentStringsMap methodParams) throws FileNotFoundException { + public final static MultipartRequestEntity createMultipartRequestEntity(List params, FluentCaseInsensitiveStringsMap requestHeaders) throws FileNotFoundException { com.ning.http.multipart.Part[] parts = new com.ning.http.multipart.Part[params.size()]; int i = 0; @@ -372,7 +372,7 @@ public final static MultipartRequestEntity createMultipartRequestEntity(List Date: Mon, 20 May 2013 10:21:05 -0700 Subject: [PATCH 0372/2844] - Minor cleanup to Grizzly provider. - Change version from 1.8.0-SNAPSHOT to 2.0.0-SNAPSHOT. --- api/pom.xml | 2 +- extras/guava/pom.xml | 2 +- extras/jdeferred/pom.xml | 2 +- extras/pom.xml | 2 +- pom.xml | 2 +- providers/apache/pom.xml | 2 +- providers/grizzly/pom.xml | 2 +- .../providers/grizzly/FeedableBodyGenerator.java | 2 ++ .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 10 +--------- providers/netty-4/pom.xml | 2 +- providers/netty/pom.xml | 2 +- providers/pom.xml | 2 +- site/pom.xml | 4 ++-- 13 files changed, 15 insertions(+), 21 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 05c0ddf70a..4dc580e702 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-project - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-api diff --git a/extras/guava/pom.xml b/extras/guava/pom.xml index 595d212d0d..db33ac3a22 100644 --- a/extras/guava/pom.xml +++ b/extras/guava/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-extras-parent - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-extras-guava diff --git a/extras/jdeferred/pom.xml b/extras/jdeferred/pom.xml index 4918bb7802..bc49aa1619 100644 --- a/extras/jdeferred/pom.xml +++ b/extras/jdeferred/pom.xml @@ -18,7 +18,7 @@ async-http-client-extras-parent com.ning - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT .. async-http-client-extras-jdeferred diff --git a/extras/pom.xml b/extras/pom.xml index 62d98d2eae..58ac30f3eb 100644 --- a/extras/pom.xml +++ b/extras/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-project - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-extras-parent diff --git a/pom.xml b/pom.xml index 61b928e52b..5aade5ff2e 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.ning async-http-client-project Asynchronous Http Client Project - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT pom The Async Http Client (AHC) library's purpose is to allow Java diff --git a/providers/apache/pom.xml b/providers/apache/pom.xml index 7f9e0725e2..26fcfef288 100644 --- a/providers/apache/pom.xml +++ b/providers/apache/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-providers-parent - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-apache-provider diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index d915864508..5bd599333c 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-providers-parent - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-grizzly-provider diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java index 4e509964db..c31c40c937 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java @@ -44,6 +44,7 @@ public Body createBody() throws IOException { return new EmptyBody(); } + @SuppressWarnings("UnusedDeclaration") public void feed(final Buffer buffer, final boolean isLast) throws IOException { queue.offer(new BodyPart(buffer, isLast)); @@ -61,6 +62,7 @@ void initializeAsynchronousTransfer(final FilterChainContext context, flushQueue(); } + @SuppressWarnings("unchecked") private void flushQueue() throws IOException { if (queueSize.get() > 0) { synchronized(this) { diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 1696292436..0cb9fe5eff 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -15,7 +15,6 @@ import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProvider; import com.ning.http.client.AsyncHttpProviderConfig; @@ -226,14 +225,7 @@ public void completed(final Connection c) { try { execute(c, request, handler, future); } catch (Exception e) { - if (e instanceof RuntimeException) { - failed(e); - } else if (e instanceof IOException) { - failed(e); - } - if (LOGGER.isWarnEnabled()) { - LOGGER.warn(e.toString(), e); - } + failed(e); } } diff --git a/providers/netty-4/pom.xml b/providers/netty-4/pom.xml index be99ff06a7..4104650bf6 100644 --- a/providers/netty-4/pom.xml +++ b/providers/netty-4/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-providers-parent - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-netty-4-provider diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 8009c5ca94..c374d0e80c 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-providers-parent - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-netty-provider diff --git a/providers/pom.xml b/providers/pom.xml index cc7dcbcee8..12f0423a40 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -4,7 +4,7 @@ com.ning async-http-client-project - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 async-http-client-providers-parent diff --git a/site/pom.xml b/site/pom.xml index 49f9d7dbba..f422483fd0 100644 --- a/site/pom.xml +++ b/site/pom.xml @@ -2,13 +2,13 @@ com.ning async-http-client-project - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT 4.0.0 com.ning async-http-client-site Asynchronous Http Client Project Site - 1.8.0-SNAPSHOT + 2.0.0-SNAPSHOT pom The Async Http Client site. From 8020d5a8931bc0ff64eb04375146e92c70f8946b Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Mon, 20 May 2013 14:40:00 -0400 Subject: [PATCH 0373/2844] Gump version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68c6ed4d29..94ee3268d8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.14 + 1.7.16 ``` From 92ea551a024bf8aa60a6b34576140154a6d66d0e Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 21 May 2013 18:44:57 +0200 Subject: [PATCH 0374/2844] Fix Netty privider's ReaperFuture messages, close #281 --- .../netty/NettyAsyncHttpProvider.java | 621 +++++++----------- .../providers/netty/NettyResponseFuture.java | 117 ++-- 2 files changed, 320 insertions(+), 418 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index 3b2890ceed..d6d297dc5e 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -15,48 +15,42 @@ */ package com.ning.http.client.providers.netty; -import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHandler.STATE; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; -import com.ning.http.client.ConnectionPoolKeyStrategy; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.ProgressAsyncHandler; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.RandomAccessBody; -import com.ning.http.client.Realm; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.IOExceptionFilter; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.client.generators.InputStreamBodyGenerator; -import com.ning.http.client.listener.TransferCompletionHandler; -import com.ning.http.client.ntlm.NTLMEngine; -import com.ning.http.client.ntlm.NTLMEngineException; -import com.ning.http.client.providers.netty.FeedableBodyGenerator.FeedListener; -import com.ning.http.client.providers.netty.spnego.SpnegoEngine; -import com.ning.http.client.websocket.WebSocketUpgradeHandler; -import com.ning.http.multipart.MultipartBody; -import com.ning.http.multipart.MultipartRequestEntity; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.http.util.AuthenticatorUtils; -import com.ning.http.client.providers.netty.util.CleanupChannelGroup; -import com.ning.http.util.ProxyUtils; -import com.ning.http.util.SslUtils; -import com.ning.http.util.UTF8UrlEncoder; +import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; +import static com.ning.http.util.DateUtil.millisTime; +import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.jboss.netty.channel.Channels.pipeline; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.net.ConnectException; +import java.net.InetSocketAddress; +import java.net.MalformedURLException; +import java.net.URI; +import java.nio.channels.ClosedChannelException; +import java.nio.channels.FileChannel; +import java.nio.channels.WritableByteChannel; +import java.nio.charset.Charset; +import java.security.GeneralSecurityException; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map.Entry; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.net.ssl.SSLEngine; + import org.jboss.netty.bootstrap.ClientBootstrap; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBufferOutputStream; @@ -105,39 +99,48 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.net.ssl.SSLEngine; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.net.ConnectException; -import java.net.InetSocketAddress; -import java.net.MalformedURLException; -import java.net.URI; -import java.nio.channels.ClosedChannelException; -import java.nio.channels.FileChannel; -import java.nio.channels.WritableByteChannel; -import java.nio.charset.Charset; -import java.security.GeneralSecurityException; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map.Entry; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.RejectedExecutionException; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; - -import static com.ning.http.util.MiscUtil.isNonEmpty; -import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; -import static org.jboss.netty.channel.Channels.pipeline; +import com.ning.http.client.AsyncHandler; +import com.ning.http.client.AsyncHandler.STATE; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.AsyncHttpProvider; +import com.ning.http.client.Body; +import com.ning.http.client.BodyGenerator; +import com.ning.http.client.ConnectionPoolKeyStrategy; +import com.ning.http.client.ConnectionsPool; +import com.ning.http.client.Cookie; +import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import com.ning.http.client.HttpResponseBodyPart; +import com.ning.http.client.HttpResponseHeaders; +import com.ning.http.client.HttpResponseStatus; +import com.ning.http.client.ListenableFuture; +import com.ning.http.client.MaxRedirectException; +import com.ning.http.client.ProgressAsyncHandler; +import com.ning.http.client.ProxyServer; +import com.ning.http.client.RandomAccessBody; +import com.ning.http.client.Realm; +import com.ning.http.client.Request; +import com.ning.http.client.RequestBuilder; +import com.ning.http.client.Response; +import com.ning.http.client.filter.FilterContext; +import com.ning.http.client.filter.FilterException; +import com.ning.http.client.filter.IOExceptionFilter; +import com.ning.http.client.filter.ResponseFilter; +import com.ning.http.client.generators.InputStreamBodyGenerator; +import com.ning.http.client.listener.TransferCompletionHandler; +import com.ning.http.client.ntlm.NTLMEngine; +import com.ning.http.client.ntlm.NTLMEngineException; +import com.ning.http.client.providers.netty.FeedableBodyGenerator.FeedListener; +import com.ning.http.client.providers.netty.spnego.SpnegoEngine; +import com.ning.http.client.providers.netty.util.CleanupChannelGroup; +import com.ning.http.client.websocket.WebSocketUpgradeHandler; +import com.ning.http.multipart.MultipartBody; +import com.ning.http.multipart.MultipartRequestEntity; +import com.ning.http.util.AsyncHttpProviderUtils; +import com.ning.http.util.AuthenticatorUtils; +import com.ning.http.util.ProxyUtils; +import com.ning.http.util.SslUtils; +import com.ning.http.util.UTF8UrlEncoder; +import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { private final static String WEBSOCKET_KEY = "Sec-WebSocket-Key"; @@ -161,17 +164,16 @@ public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme private final ClientSocketChannelFactory socketChannelFactory; private final boolean allowReleaseSocketChannelFactory; - private final ChannelGroup openChannels = new - CleanupChannelGroup("asyncHttpClient") { - @Override - public boolean remove(Object o) { - boolean removed = super.remove(o); - if (removed && trackConnections) { - freeConnections.release(); - } - return removed; - } - }; + private final ChannelGroup openChannels = new CleanupChannelGroup("asyncHttpClient") { + @Override + public boolean remove(Object o) { + boolean removed = super.remove(o); + if (removed && trackConnections) { + freeConnections.release(); + } + return removed; + } + }; private final ConnectionsPool connectionsPool; private Semaphore freeConnections = null; private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; @@ -186,8 +188,7 @@ public boolean remove(Object o) { public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { - if (config.getAsyncHttpProviderConfig() != null - && NettyAsyncHttpProviderConfig.class.isAssignableFrom(config.getAsyncHttpProviderConfig().getClass())) { + if (config.getAsyncHttpProviderConfig() != null && NettyAsyncHttpProviderConfig.class.isAssignableFrom(config.getAsyncHttpProviderConfig().getClass())) { asyncHttpProviderConfig = NettyAsyncHttpProviderConfig.class.cast(config.getAsyncHttpProviderConfig()); } else { asyncHttpProviderConfig = new NettyAsyncHttpProviderConfig(); @@ -200,19 +201,19 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { // check if external NioClientSocketChannelFactory is defined NioClientSocketChannelFactory scf = asyncHttpProviderConfig.getSocketChannelFactory(); if (scf != null) { - this.socketChannelFactory = scf; + this.socketChannelFactory = scf; - // cannot allow releasing shared channel factory - this.allowReleaseSocketChannelFactory = false; + // cannot allow releasing shared channel factory + this.allowReleaseSocketChannelFactory = false; } else { ExecutorService e = asyncHttpProviderConfig.getBossExecutorService(); if (e == null) { - e = Executors.newCachedThreadPool(); - } - int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); - log.debug("Number of application's worker threads is {}", numWorkers); - socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); - this.allowReleaseSocketChannelFactory = true; + e = Executors.newCachedThreadPool(); + } + int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); + log.debug("Number of application's worker threads is {}", numWorkers); + socketChannelFactory = new NioClientSocketChannelFactory(e, config.executorService(), numWorkers); + this.allowReleaseSocketChannelFactory = true; } } plainBootstrap = new ClientBootstrap(socketChannelFactory); @@ -244,10 +245,7 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { @Override public String toString() { - return String.format("NettyAsyncHttpProvider:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", - config.getMaxTotalConnections() - freeConnections.availablePermits(), - openChannels.toString(), - connectionsPool.toString()); + return String.format("NettyAsyncHttpProvider:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", config.getMaxTotalConnections() - freeConnections.availablePermits(), openChannels.toString(), connectionsPool.toString()); } void configureNetty() { @@ -295,7 +293,7 @@ protected HttpClientCodec newHttpClientCodec() { } protected ChannelPipelineFactory createPlainPipelineFactory() { - return new ChannelPipelineFactory() { + return new ChannelPipelineFactory() { /* @Override */ public ChannelPipeline getPipeline() throws Exception { @@ -364,7 +362,7 @@ public ChannelPipeline getPipeline() throws Exception { } private Channel lookupInCache(URI uri, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { - final Channel channel = connectionsPool.poll(connectionPoolKeyStrategy.getKey(uri)); + final Channel channel = connectionsPool.poll(connectionPoolKeyStrategy.getKey(uri)); if (channel != null) { log.debug("Using cached Channel {}\n for uri {}\n", channel, uri); @@ -401,14 +399,10 @@ private Channel verifyChannelPipeline(Channel channel, String scheme) throws IOE return channel; } - protected final void writeRequest(final Channel channel, - final AsyncHttpClientConfig config, - final NettyResponseFuture future, - final HttpRequest nettyRequest) { + protected final void writeRequest(final Channel channel, final AsyncHttpClientConfig config, final NettyResponseFuture future, final HttpRequest nettyRequest) { try { /** - * If the channel is dead because it was pooled and the remote server decided to close it, - * we just let it go and the closeChannel do it's work. + * If the channel is dead because it was pooled and the remote server decided to close it, we just let it go and the closeChannel do it's work. */ if (!channel.isOpen() || !channel.isConnected()) { return; @@ -448,8 +442,7 @@ protected final void writeRequest(final Channel channel, } } - TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter( - new NettyTransferAdapter(h, nettyRequest.getContent(), future.getRequest().getFile())); + TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new NettyTransferAdapter(h, nettyRequest.getContent(), future.getRequest().getFile())); } // Leave it to true. @@ -521,13 +514,14 @@ public void operationComplete(ChannelFuture cf) { } else { BodyChunkedInput bodyChunkedInput = new BodyChunkedInput(body); BodyGenerator bg = future.getRequest().getBodyGenerator(); - if (bg instanceof FeedableBodyGenerator) { - ((FeedableBodyGenerator)bg).setListener(new FeedListener() { - @Override public void onContentAdded() { - channel.getPipeline().get(ChunkedWriteHandler.class).resumeTransfer(); - } - }); - } + if (bg instanceof FeedableBodyGenerator) { + ((FeedableBodyGenerator) bg).setListener(new FeedListener() { + @Override + public void onContentAdded() { + channel.getPipeline().get(ChunkedWriteHandler.class).resumeTransfer(); + } + }); + } writeFuture = channel.write(bodyChunkedInput); } @@ -568,8 +562,7 @@ public void operationComplete(ChannelFuture cf) { } - protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, - boolean allowConnect, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { + protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, boolean allowConnect, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { String method = request.getMethod(); if (allowConnect && proxyServer != null && isSecure(uri)) { @@ -579,17 +572,12 @@ protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Re } private static SpnegoEngine getSpnegoEngine() { - if(spnegoEngine == null) + if (spnegoEngine == null) spnegoEngine = new SpnegoEngine(); return spnegoEngine; } - private static HttpRequest construct(AsyncHttpClientConfig config, - Request request, - HttpMethod m, - URI uri, - ChannelBuffer buffer, - ProxyServer proxyServer) throws IOException { + private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, URI uri, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { String host = AsyncHttpProviderUtils.getHost(uri); boolean webSocket = isWebSocket(uri); @@ -615,8 +603,7 @@ else if (uri.getRawQuery() != null) if (webSocket) { nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); - nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" - + (uri.getPort() == -1 ? isSecure(uri.getScheme()) ? 443 : 80 : uri.getPort())); + nettyRequest.addHeader("Origin", "http://" + uri.getHost() + ":" + (uri.getPort() == -1 ? isSecure(uri.getScheme()) ? 443 : 80 : uri.getPort())); nettyRequest.addHeader(WEBSOCKET_KEY, WebSocketUtil.getKey()); nettyRequest.addHeader("Sec-WebSocket-Version", "13"); } @@ -669,47 +656,45 @@ else if (uri.getRawQuery() != null) } switch (realm.getAuthScheme()) { - case BASIC: - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, - AuthenticatorUtils.computeBasicAuthentication(realm)); - break; - case DIGEST: - if (isNonEmpty(realm.getNonce())) { - try { - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, - AuthenticatorUtils.computeDigestAuthentication(realm)); - } catch (NoSuchAlgorithmException e) { - throw new SecurityException(e); - } - } - break; - case NTLM: + case BASIC: + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeBasicAuthentication(realm)); + break; + case DIGEST: + if (isNonEmpty(realm.getNonce())) { try { - String msg = ntlmEngine.generateType1Msg("NTLM " + domain, authHost); - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); - } catch (NTLMEngineException e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeDigestAuthentication(realm)); + } catch (NoSuchAlgorithmException e) { + throw new SecurityException(e); } - break; - case KERBEROS: - case SPNEGO: - String challengeHeader = null; - String server = proxyServer == null ? host : proxyServer.getHost(); - try { - challengeHeader = getSpnegoEngine().generateToken(server); - } catch (Throwable e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; - } - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); - break; - case NONE: - break; - default: - throw new IllegalStateException("Invalid Authentication " + realm); + } + break; + case NTLM: + try { + String msg = ntlmEngine.generateType1Msg("NTLM " + domain, authHost); + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); + } catch (NTLMEngineException e) { + IOException ie = new IOException(); + ie.initCause(e); + throw ie; + } + break; + case KERBEROS: + case SPNEGO: + String challengeHeader = null; + String server = proxyServer == null ? host : proxyServer.getHost(); + try { + challengeHeader = getSpnegoEngine().generateToken(server); + } catch (Throwable e) { + IOException ie = new IOException(); + ie.initCause(e); + throw ie; + } + nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); + break; + case NONE: + break; + default: + throw new IllegalStateException("Invalid Authentication " + realm); } } @@ -728,8 +713,7 @@ else if (uri.getRawQuery() != null) List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); if (!(isNonEmpty(auth) && auth.get(0).startsWith("NTLM"))) { try { - String msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), - proxyServer.getHost()); + String msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), proxyServer.getHost()); nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + msg); } catch (NTLMEngineException e) { IOException ie = new IOException(); @@ -738,8 +722,7 @@ else if (uri.getRawQuery() != null) } } } else { - nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, - AuthenticatorUtils.computeBasicAuthentication(proxyServer)); + nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, AuthenticatorUtils.computeBasicAuthentication(proxyServer)); } } } @@ -754,9 +737,7 @@ else if (uri.getRawQuery() != null) } else if (config.getUserAgent() != null) { nettyRequest.setHeader("User-Agent", config.getUserAgent()); } else { - nettyRequest.setHeader("User-Agent", - AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class, - config)); + nettyRequest.setHeader("User-Agent", AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class, config)); } if (!m.equals(HttpMethod.CONNECT)) { @@ -879,7 +860,7 @@ public void close() { config.executorService().shutdown(); config.reaper().shutdown(); if (this.allowReleaseSocketChannelFactory) { - socketChannelFactory.releaseExternalResources(); + socketChannelFactory.releaseExternalResources(); plainBootstrap.releaseExternalResources(); secureBootstrap.releaseExternalResources(); webSocketBootstrap.releaseExternalResources(); @@ -892,9 +873,7 @@ public void close() { /* @Override */ - public Response prepareResponse(final HttpResponseStatus status, - final HttpResponseHeaders headers, - final List bodyParts) { + public Response prepareResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, final List bodyParts) { return new NettyResponse(status, headers, bodyParts); } @@ -908,8 +887,7 @@ private void execute(final Request request, final NettyResponseFuture f, doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, reclaimCache); } - private ListenableFuture doConnect(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture f, - boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { + private ListenableFuture doConnect(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture f, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { if (isClose.get()) { throw new IOException("Closed"); @@ -933,14 +911,13 @@ private ListenableFuture doConnect(final Request request, final AsyncHand if (f != null && f.reuseChannel() && f.channel() != null) { channel = f.channel(); } else { - URI connectionKeyUri = useProxy? proxyServer.getURI() : uri; + URI connectionKeyUri = useProxy ? proxyServer.getURI() : uri; channel = lookupInCache(connectionKeyUri, request.getConnectionPoolKeyStrategy()); } } ChannelBuffer bufferedBytes = null; - if (f != null && f.getRequest().getFile() == null && - !f.getNettyRequest().getMethod().getName().equals(HttpMethod.CONNECT.getName())) { + if (f != null && f.getRequest().getFile() == null && !f.getNettyRequest().getMethod().getName().equals(HttpMethod.CONNECT.getName())) { bufferedBytes = f.getNettyRequest().getContent(); } @@ -997,7 +974,7 @@ private ListenableFuture doConnect(final Request request, final AsyncHand if (trackConnections) { if (!reclaimCache) { if (!freeConnections.tryAcquire()) { - IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); + IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); try { asyncHandler.onThrowable(ex); } catch (Throwable t) { @@ -1031,9 +1008,9 @@ private ListenableFuture doConnect(final Request request, final AsyncHand remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); } - if(request.getLocalAddress() != null){ + if (request.getLocalAddress() != null) { channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); - }else{ + } else { channelFuture = bootstrap.connect(remoteAddress); } @@ -1103,7 +1080,6 @@ private void finishChannel(final ChannelHandlerContext ctx) { log.debug("Closing Channel {} ", ctx.getChannel()); - try { ctx.getChannel().close(); } catch (Throwable t) { @@ -1118,7 +1094,7 @@ private void finishChannel(final ChannelHandlerContext ctx) { @Override public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) throws Exception { - //call super to reset the read timeout + // call super to reset the read timeout super.messageReceived(ctx, e); IN_IO_THREAD.set(Boolean.TRUE); if (ctx.getAttachment() == null) { @@ -1155,12 +1131,7 @@ public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) thr p.handle(ctx, e); } - private Realm kerberosChallenge(List proxyAuth, - Request request, - ProxyServer proxyServer, - FluentCaseInsensitiveStringsMap headers, - Realm realm, - NettyResponseFuture future) throws NTLMEngineException { + private Realm kerberosChallenge(List proxyAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, NettyResponseFuture future) throws NTLMEngineException { URI uri = request.getURI(); String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); @@ -1176,10 +1147,7 @@ private Realm kerberosChallenge(List proxyAuth, } else { realmBuilder = new Realm.RealmBuilder(); } - return realmBuilder.setUri(uri.getRawPath()) - .setMethodName(request.getMethod()) - .setScheme(Realm.AuthScheme.KERBEROS) - .build(); + return realmBuilder.setUri(uri.getRawPath()).setMethodName(request.getMethod()).setScheme(Realm.AuthScheme.KERBEROS).build(); } catch (Throwable throwable) { if (proxyAuth.contains("NTLM")) { return ntlmChallenge(proxyAuth, request, proxyServer, headers, realm, future); @@ -1189,12 +1157,7 @@ private Realm kerberosChallenge(List proxyAuth, } } - private Realm ntlmChallenge(List wwwAuth, - Request request, - ProxyServer proxyServer, - FluentCaseInsensitiveStringsMap headers, - Realm realm, - NettyResponseFuture future) throws NTLMEngineException { + private Realm ntlmChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, NettyResponseFuture future) throws NTLMEngineException { boolean useRealm = (proxyServer == null && realm != null); @@ -1209,19 +1172,14 @@ private Realm ntlmChallenge(List wwwAuth, URI uri = request.getURI(); headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) - .setUri(uri.getRawPath()) - .setMethodName(request.getMethod()) - .setNtlmMessageType2Received(true) - .build(); + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(uri.getRawPath()).setMethodName(request.getMethod()).setNtlmMessageType2Received(true).build(); future.getAndSetAuth(false); } else { headers.remove(HttpHeaders.Names.AUTHORIZATION); if (wwwAuth.get(0).startsWith("NTLM ")) { String serverChallenge = wwwAuth.get(0).trim().substring("NTLM ".length()); - String challengeHeader = ntlmEngine.generateType3Msg(principal, password, - ntlmDomain, ntlmHost, serverChallenge); + String challengeHeader = ntlmEngine.generateType3Msg(principal, password, ntlmDomain, ntlmHost, serverChallenge); headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); } @@ -1235,31 +1193,19 @@ private Realm ntlmChallenge(List wwwAuth, realmBuilder = new Realm.RealmBuilder(); authScheme = Realm.AuthScheme.NTLM; } - newRealm = realmBuilder.setScheme(authScheme) - .setUri(request.getURI().getPath()) - .setMethodName(request.getMethod()) - .build(); + newRealm = realmBuilder.setScheme(authScheme).setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); } return newRealm; } - private Realm ntlmProxyChallenge(List wwwAuth, - Request request, - ProxyServer proxyServer, - FluentCaseInsensitiveStringsMap headers, - Realm realm, - NettyResponseFuture future) throws NTLMEngineException { + private Realm ntlmProxyChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, NettyResponseFuture future) throws NTLMEngineException { future.getAndSetAuth(false); headers.remove(HttpHeaders.Names.PROXY_AUTHORIZATION); if (wwwAuth.get(0).startsWith("NTLM ")) { String serverChallenge = wwwAuth.get(0).trim().substring("NTLM ".length()); - String challengeHeader = ntlmEngine.generateType3Msg(proxyServer.getPrincipal(), - proxyServer.getPassword(), - proxyServer.getNtlmDomain(), - proxyServer.getHost(), - serverChallenge); + String challengeHeader = ntlmEngine.generateType3Msg(proxyServer.getPrincipal(), proxyServer.getPassword(), proxyServer.getNtlmDomain(), proxyServer.getHost(), serverChallenge); headers.add(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + challengeHeader); } Realm newRealm; @@ -1269,14 +1215,12 @@ private Realm ntlmProxyChallenge(List wwwAuth, } else { realmBuilder = new Realm.RealmBuilder(); } - newRealm = realmBuilder//.setScheme(realm.getAuthScheme()) - .setUri(request.getURI().getPath()) - .setMethodName(request.getMethod()) - .build(); + newRealm = realmBuilder// .setScheme(realm.getAuthScheme()) + .setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); return newRealm; } - + private String getPoolKey(NettyResponseFuture future) throws MalformedURLException { URI uri = future.getProxyServer() != null ? future.getProxyServer().getURI() : future.getURI(); return future.getConnectionPoolKeyStrategy().getKey(uri); @@ -1404,8 +1348,7 @@ public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws future.touch(); if (config.getIOExceptionFilters().size() > 0) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) - .request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); fc = handleIoException(fc, future); if (fc.replayRequest() && !future.cannotBeReplay()) { @@ -1435,11 +1378,8 @@ protected boolean remotelyClosed(Channel channel, NettyResponseFuture future) connectionsPool.removeAll(channel); - if (future == null && channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment() != null - && NettyResponseFuture.class.isAssignableFrom( - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment().getClass())) { - future = (NettyResponseFuture) - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); + if (future == null && channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment() != null && NettyResponseFuture.class.isAssignableFrom(channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment().getClass())) { + future = (NettyResponseFuture) channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); } if (future == null || future.cannotBeReplay()) { @@ -1506,23 +1446,20 @@ private final boolean updateBodyAndInterrupt(final NettyResponseFuture future return state; } - //Simple marker for stopping publishing bytes. + // Simple marker for stopping publishing bytes. final static class DiscardEvent { } @Override - public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) - throws Exception { + public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { Channel channel = e.getChannel(); Throwable cause = e.getCause(); NettyResponseFuture future = null; - /** Issue 81 - if (e.getCause() != null && e.getCause().getClass().isAssignableFrom(PrematureChannelClosureException.class)) { - return; - } - */ + /** + * Issue 81 if (e.getCause() != null && e.getCause().getClass().isAssignableFrom(PrematureChannelClosureException.class)) { return; } + */ if (e.getCause() != null && e.getCause().getClass().getSimpleName().equals("PrematureChannelClosureException")) { return; } @@ -1545,8 +1482,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) if (IOException.class.isAssignableFrom(cause.getClass())) { if (config.getIOExceptionFilters().size() > 0) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) - .request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); fc = handleIoException(fc, future); if (fc.replayRequest()) { @@ -1594,8 +1530,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) protected static boolean abortOnConnectCloseException(Throwable cause) { try { for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("sun.nio.ch.SocketChannelImpl") - && element.getMethodName().equals("checkConnect")) { + if (element.getClassName().equals("sun.nio.ch.SocketChannelImpl") && element.getMethodName().equals("checkConnect")) { return true; } } @@ -1612,8 +1547,7 @@ protected static boolean abortOnConnectCloseException(Throwable cause) { protected static boolean abortOnDisconnectException(Throwable cause) { try { for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("org.jboss.netty.handler.ssl.SslHandler") - && element.getMethodName().equals("channelDisconnected")) { + if (element.getClassName().equals("org.jboss.netty.handler.ssl.SslHandler") && element.getMethodName().equals("channelDisconnected")) { return true; } } @@ -1630,8 +1564,7 @@ protected static boolean abortOnDisconnectException(Throwable cause) { protected static boolean abortOnReadCloseException(Throwable cause) { for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") - && element.getMethodName().equals("read")) { + if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") && element.getMethodName().equals("read")) { return true; } } @@ -1646,8 +1579,7 @@ protected static boolean abortOnReadCloseException(Throwable cause) { protected static boolean abortOnWriteCloseException(Throwable cause) { for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") - && element.getMethodName().equals("write")) { + if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") && element.getMethodName().equals("write")) { return true; } } @@ -1671,19 +1603,12 @@ private final static int computeAndSetContentLength(Request request, HttpRequest return length; } - public static NettyResponseFuture newFuture(URI uri, - Request request, - AsyncHandler asyncHandler, - HttpRequest nettyRequest, - AsyncHttpClientConfig config, - NettyAsyncHttpProvider provider, - ProxyServer proxyServer) { + public static NettyResponseFuture newFuture(URI uri, Request request, AsyncHandler asyncHandler, HttpRequest nettyRequest, AsyncHttpClientConfig config, NettyAsyncHttpProvider provider, ProxyServer proxyServer) { int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, requestTimeout, config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy(), proxyServer); - if (request.getHeaders().getFirstValue("Expect") != null - && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { + if (request.getHeaders().getFirstValue("Expect") != null && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { f.getAndSetWriteBody(false); } return f; @@ -1717,9 +1642,7 @@ public void operationComplete(ChannelFuture cf) { return; } - if (ClosedChannelException.class.isAssignableFrom(cause.getClass()) - || abortOnReadCloseException(cause) - || abortOnWriteCloseException(cause)) { + if (ClosedChannelException.class.isAssignableFrom(cause.getClass()) || abortOnReadCloseException(cause) || abortOnWriteCloseException(cause)) { if (log.isDebugEnabled()) { log.debug(cf.getCause() == null ? "" : cf.getCause().getMessage(), cf.getCause()); @@ -1739,13 +1662,10 @@ public void operationComplete(ChannelFuture cf) { future.touch(); /** - * We need to make sure we aren't in the middle of an authorization process before publishing events - * as we will re-publish again the same event after the authorization, causing unpredictable behavior. + * We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, causing unpredictable behavior. */ Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : NettyAsyncHttpProvider.this.getConfig().getRealm(); - boolean startPublishing = future.isInAuth() - || realm == null - || realm.getUsePreemptiveAuth() == true; + boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth() == true; if (startPublishing && ProgressAsyncHandler.class.isAssignableFrom(asyncHandler.getClass())) { if (notifyHeaders) { @@ -1765,10 +1685,8 @@ public void operationProgressed(ChannelFuture cf, long amount, long current, lon } /** - * Because some implementation of the ThreadSchedulingService do not clean up cancel task until they try to run - * them, we wrap the task with the future so the when the NettyResponseFuture cancel the reaper future - * this wrapper will release the references to the channel and the nettyResponseFuture immediately. Otherwise, - * the memory referenced this way will only be released after the request timeout period which can be arbitrary long. + * Because some implementation of the ThreadSchedulingService do not clean up cancel task until they try to run them, we wrap the task with the future so the when the NettyResponseFuture cancel the reaper future this wrapper will release the references to the channel and the + * nettyResponseFuture immediately. Otherwise, the memory referenced this way will only be released after the request timeout period which can be arbitrary long. */ private final class ReaperFuture implements Future, Runnable { private Future scheduledFuture; @@ -1818,6 +1736,12 @@ public boolean isDone() { return scheduledFuture.isDone(); } + private void expire(String message) { + log.debug("{} for {}", message, nettyResponseFuture); + abort(nettyResponseFuture, new TimeoutException(message)); + nettyResponseFuture = null; + } + /** * @Override */ @@ -1827,18 +1751,20 @@ public synchronized void run() { return; } - if (nettyResponseFuture != null && nettyResponseFuture.hasExpired() - && !nettyResponseFuture.isDone() && !nettyResponseFuture.isCancelled()) { - log.debug("Request Timeout expired for {}\n", nettyResponseFuture); - - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, nettyResponseFuture.getRequest()); + boolean futureDone = nettyResponseFuture.isDone(); + boolean futureCanceled = nettyResponseFuture.isCancelled(); - abort(nettyResponseFuture, new TimeoutException("No response received after " + requestTimeout)); - - nettyResponseFuture = null; - } + if (nettyResponseFuture != null && !futureDone && !futureCanceled) { + long now = millisTime(); + if (nettyResponseFuture.hasRequestTimedOut(now)) { + long age = (now - nettyResponseFuture.getStart()) / 1000000; + expire("Request reached time out of " + nettyResponseFuture.getRequestTimeoutInMs() + " ms after " + age + " ms"); + } else if (nettyResponseFuture.hasConnectionIdleTimedOut(now)) { + long age = (now - nettyResponseFuture.getStart()) / 1000000; + expire("Request reached idle time out of " + nettyResponseFuture.getIdleConnectionTimeoutInMs() + " ms after " + age + " ms"); + } - if (nettyResponseFuture == null || nettyResponseFuture.isDone() || nettyResponseFuture.isCancelled()) { + } else if (nettyResponseFuture == null || futureDone || futureCanceled) { cancel(true); } } @@ -1903,9 +1829,7 @@ public long getCount() { public long transferTo(WritableByteChannel target, long position) throws IOException { long count = this.count - position; if (count < 0 || position < 0) { - throw new IllegalArgumentException( - "position out of range: " + position + - " (expected: 0 - " + (this.count - 1) + ")"); + throw new IllegalArgumentException("position out of range: " + position + " (expected: 0 - " + (this.count - 1) + ")"); } if (count == 0) { return 0L; @@ -1998,17 +1922,11 @@ private static final boolean validateWebSocketRequest(Request request, AsyncHand return true; } - private boolean redirect(Request request, - NettyResponseFuture future, - HttpResponse response, - final ChannelHandlerContext ctx) throws Exception { + private boolean redirect(Request request, NettyResponseFuture future, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { int statusCode = response.getStatus().getCode(); boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == 302 - || statusCode == 301 - || statusCode == 303 - || statusCode == 307)) { + if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 303 || statusCode == 307)) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { // We must allow 401 handling again. @@ -2018,13 +1936,9 @@ private boolean redirect(Request request, URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); if (!uri.toString().equals(future.getURI().toString())) { - final RequestBuilder nBuilder = stripQueryString ? - new RequestBuilder(future.getRequest()).setQueryParameters(null) - : new RequestBuilder(future.getRequest()); + final RequestBuilder nBuilder = stripQueryString ? new RequestBuilder(future.getRequest()).setQueryParameters(null) : new RequestBuilder(future.getRequest()); - if (!(statusCode < 302 || statusCode > 303) - && !(statusCode == 302 - && config.isStrict302Handling())) { + if (!(statusCode < 302 || statusCode > 303) && !(statusCode == 302 && config.isStrict302Handling())) { nBuilder.setMethod("GET"); } final boolean initialConnectionKeepAlive = future.isKeepAlive(); @@ -2103,19 +2017,14 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws int statusCode = response.getStatus().getCode(); String ka = response.getHeader(HttpHeaders.Names.CONNECTION); - future.setKeepAlive(ka == null || ! ka.toLowerCase().equals("close")); + future.setKeepAlive(ka == null || !ka.toLowerCase().equals("close")); List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder() - .asyncHandler(handler) - .request(request) - .responseStatus(status) - .responseHeaders(responseHeaders) - .build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).responseHeaders(responseHeaders).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { try { @@ -2142,14 +2051,11 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); final RequestBuilder builder = new RequestBuilder(future.getRequest()); - //if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { - // builder.setUrl(future.getURI().toString()); - //} + // if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { + // builder.setUrl(future.getURI().toString()); + // } - if (statusCode == 401 - && realm != null - && wwwAuth.size() > 0 - && !future.getAndSetAuth(true)) { + if (statusCode == 401 && realm != null && wwwAuth.size() > 0 && !future.getAndSetAuth(true)) { future.setState(NettyResponseFuture.STATE.NEW); // NTLM @@ -2158,18 +2064,13 @@ public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws // SPNEGO KERBEROS } else if (wwwAuth.contains("Negotiate")) { newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) return; + if (newRealm == null) + return; } else { - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()) - .setUri(request.getURI().getPath()) - .setMethodName(request.getMethod()) - .setUsePreemptiveAuth(true) - .parseWWWAuthenticateHeader(wwwAuth.get(0)) - .build(); + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(request.getURI().getPath()).setMethodName(request.getMethod()).setUsePreemptiveAuth(true).parseWWWAuthenticateHeader(wwwAuth.get(0)).build(); } - final Realm nr = new Realm.RealmBuilder().clone(newRealm) - .setUri(URI.create(request.getUrl()).getPath()).build(); + final Realm nr = new Realm.RealmBuilder().clone(newRealm).setUri(URI.create(request.getUrl()).getPath()).build(); log.debug("Sending authentication to {}", request.getUrl()); AsyncCallable ac = new AsyncCallable(future) { @@ -2197,10 +2098,7 @@ public Object call() throws Exception { } List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); - if (statusCode == 407 - && realm != null - && proxyAuth.size() > 0 - && !future.getAndSetAuth(true)) { + if (statusCode == 407 && realm != null && proxyAuth.size() > 0 && !future.getAndSetAuth(true)) { log.debug("Sending proxy authentication to {}", request.getUrl()); @@ -2211,7 +2109,8 @@ public Object call() throws Exception { // SPNEGO KERBEROS } else if (proxyAuth.contains("Negotiate")) { newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) return; + if (newRealm == null) + return; } else { newRealm = future.getRequest().getRealm(); } @@ -2223,8 +2122,7 @@ public Object call() throws Exception { return; } - if (future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT) - && statusCode == 200) { + if (future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT) && statusCode == 200) { log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); @@ -2245,7 +2143,8 @@ public Object call() throws Exception { return; } - if (redirect(request, future, response, ctx)) return; + if (redirect(request, future, response, ctx)) + return; if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { finishUpdate(future, ctx, response.isChunked()); @@ -2271,11 +2170,9 @@ public Object call() throws Exception { HttpChunk chunk = (HttpChunk) e.getMessage(); if (handler != null) { - if (chunk.isLast() || updateBodyAndInterrupt(future, handler, - new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, chunk, chunk.isLast()))) { + if (chunk.isLast() || updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, chunk, chunk.isLast()))) { if (chunk instanceof DefaultHttpChunkTrailer) { - updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), - future.getHttpResponse(), NettyAsyncHttpProvider.this, (HttpChunkTrailer) chunk)); + updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), future.getHttpResponse(), NettyAsyncHttpProvider.this, (HttpChunkTrailer) chunk)); } finishUpdate(future, ctx, !chunk.isLast()); } @@ -2283,8 +2180,7 @@ public Object call() throws Exception { } } catch (Exception t) { if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) - .request(future.getRequest()).ioException(IOException.class.cast(t)).build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(IOException.class.cast(t)).build(); fc = handleIoException(fc, future); if (fc.replayRequest()) { @@ -2316,8 +2212,8 @@ private final class WebSocketProtocol implements Protocol { private static final byte OPCODE_BINARY = 0x2; private static final byte OPCODE_UNKNOWN = -1; - protected byte pendingOpcode = OPCODE_UNKNOWN; - + protected byte pendingOpcode = OPCODE_UNKNOWN; + // @Override public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); @@ -2329,12 +2225,7 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder() - .asyncHandler(h) - .request(request) - .responseStatus(s) - .responseHeaders(responseHeaders) - .build(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(h).request(request).responseStatus(s).responseHeaders(responseHeaders).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { try { fc = asyncFilter.filter(fc); @@ -2357,10 +2248,10 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { } future.setHttpResponse(response); - if (redirect(request, future, response, ctx)) return; + if (redirect(request, future, response, ctx)) + return; - final org.jboss.netty.handler.codec.http.HttpResponseStatus status = - new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); + final org.jboss.netty.handler.codec.http.HttpResponseStatus status = new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); final boolean validStatus = response.getStatus().equals(status); final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; @@ -2399,13 +2290,12 @@ public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { } else if (e.getMessage() instanceof WebSocketFrame) { final WebSocketFrame frame = (WebSocketFrame) e.getMessage(); - if(frame instanceof TextWebSocketFrame) { - pendingOpcode = OPCODE_TEXT; + if (frame instanceof TextWebSocketFrame) { + pendingOpcode = OPCODE_TEXT; + } else if (frame instanceof BinaryWebSocketFrame) { + pendingOpcode = OPCODE_BINARY; } - else if(frame instanceof BinaryWebSocketFrame) { - pendingOpcode = OPCODE_BINARY; - } - + HttpChunk webSocketChunk = new HttpChunk() { private ChannelBuffer content; @@ -2433,11 +2323,10 @@ public void setContent(ChannelBuffer content) { NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); if (webSocket != null) { - if(pendingOpcode == OPCODE_BINARY) { - webSocket.onBinaryFragment(rp.getBodyPartBytes(),frame.isFinalFragment()); - } - else { - webSocket.onTextFragment(frame.getBinaryData().toString(UTF8),frame.isFinalFragment()); + if (pendingOpcode == OPCODE_BINARY) { + webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); + } else { + webSocket.onTextFragment(frame.getBinaryData().toString(UTF8), frame.isFinalFragment()); } if (CloseWebSocketFrame.class.isAssignableFrom(frame.getClass())) { @@ -2457,7 +2346,7 @@ public void setContent(ChannelBuffer content) { } } - //@Override + // @Override public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { try { log.warn("onError {}", e); @@ -2478,7 +2367,7 @@ public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { } } - //@Override + // @Override public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { log.trace("onClose {}", e); if (ctx.getAttachment() == null || !NettyResponseFuture.class.isAssignableFrom(ctx.getAttachment().getClass())) { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index b3efd4680e..d56637faa6 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -43,7 +43,7 @@ /** * A {@link Future} that can be used to track when an asynchronous HTTP request has been fully processed. - * + * * @param */ public final class NettyResponseFuture extends AbstractListenableFuture { @@ -52,17 +52,14 @@ public final class NettyResponseFuture extends AbstractListenableFuture { public final static String MAX_RETRY = "com.ning.http.client.providers.netty.maxRetry"; enum STATE { - NEW, - POOLED, - RECONNECTED, - CLOSED, + NEW, POOLED, RECONNECTED, CLOSED, } private final CountDownLatch latch = new CountDownLatch(1); private final AtomicBoolean isDone = new AtomicBoolean(false); private final AtomicBoolean isCancelled = new AtomicBoolean(false); private AsyncHandler asyncHandler; - private final int responseTimeoutInMs; + private final int requestTimeoutInMs; private final int idleConnectionTimeoutInMs; private Request request; private HttpRequest nettyRequest; @@ -90,19 +87,19 @@ enum STATE { private boolean allowConnect = false; private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; private final ProxyServer proxyServer; - - public NettyResponseFuture(URI uri, - Request request, - AsyncHandler asyncHandler, - HttpRequest nettyRequest, - int responseTimeoutInMs, - int idleConnectionTimeoutInMs, - NettyAsyncHttpProvider asyncHttpProvider, - ConnectionPoolKeyStrategy connectionPoolKeyStrategy, - ProxyServer proxyServer) { + + public NettyResponseFuture(URI uri,// + Request request,// + AsyncHandler asyncHandler,// + HttpRequest nettyRequest,// + int requestTimeoutInMs,// + int idleConnectionTimeoutInMs,// + NettyAsyncHttpProvider asyncHttpProvider,// + ConnectionPoolKeyStrategy connectionPoolKeyStrategy,// + ProxyServer proxyServer) { this.asyncHandler = asyncHandler; - this.responseTimeoutInMs = responseTimeoutInMs; + this.requestTimeoutInMs = requestTimeoutInMs; this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; this.request = request; this.nettyRequest = nettyRequest; @@ -128,11 +125,11 @@ protected void setURI(URI uri) { this.uri = uri; } - public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { - return connectionPoolKeyStrategy; - } + public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { + return connectionPoolKeyStrategy; + } - public ProxyServer getProxyServer() { + public ProxyServer getProxyServer() { return proxyServer; } @@ -163,7 +160,8 @@ void setAsyncHandler(AsyncHandler asyncHandler) { public boolean cancel(boolean force) { cancelReaper(); - if (isCancelled.get()) return false; + if (isCancelled.get()) + return false; try { channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); @@ -186,13 +184,20 @@ public boolean cancel(boolean force) { /** * Is the Future still valid - * + * * @return true if response has expired and should be terminated. */ public boolean hasExpired() { long now = millisTime(); - return idleConnectionTimeoutInMs != -1 && ((now - touch.get()) >= idleConnectionTimeoutInMs) - || responseTimeoutInMs != -1 && ((now - start) >= responseTimeoutInMs); + return hasConnectionIdleTimedOut(now) || hasRequestTimedOut(now); + } + + public boolean hasConnectionIdleTimedOut(long now) { + return idleConnectionTimeoutInMs != -1 && (now - touch.get()) >= idleConnectionTimeoutInMs; + } + + public boolean hasRequestTimedOut(long now) { + return requestTimeoutInMs != -1 && (now - start) >= requestTimeoutInMs; } /** @@ -201,7 +206,7 @@ public boolean hasExpired() { /* @Override */ public V get() throws InterruptedException, ExecutionException { try { - return get(responseTimeoutInMs, TimeUnit.MILLISECONDS); + return get(requestTimeoutInMs, TimeUnit.MILLISECONDS); } catch (TimeoutException e) { cancelReaper(); throw new ExecutionException(e); @@ -323,7 +328,8 @@ public final void done(Callable callable) { public final void abort(final Throwable t) { cancelReaper(); - if (isDone.get() || isCancelled.get()) return; + if (isDone.get() || isCancelled.get()) + return; exEx.compareAndSet(null, new ExecutionException(t)); if (!throwableCalled.getAndSet(true)) { @@ -477,38 +483,45 @@ public void setRequest(Request request) { } /** - * Return true if the {@link Future} cannot be recovered. There is some scenario where a connection can be - * closed by an unexpected IOException, and in some situation we can recover from that exception. - * + * Return true if the {@link Future} cannot be recovered. There is some scenario where a connection can be closed by an unexpected IOException, and in some situation we can recover from that exception. + * * @return true if that {@link Future} cannot be recovered. */ public boolean cannotBeReplay() { - return isDone() - || !canRetry() - || isCancelled() - || (channel() != null && channel().isOpen() && uri.getScheme().compareToIgnoreCase("https") != 0) - || isInAuth(); + return isDone() || !canRetry() || isCancelled() || (channel() != null && channel().isOpen() && uri.getScheme().compareToIgnoreCase("https") != 0) || isInAuth(); + } + + public long getStart() { + return start; + } + + public long getRequestTimeoutInMs() { + return requestTimeoutInMs; + } + + public long getIdleConnectionTimeoutInMs() { + return idleConnectionTimeoutInMs; } @Override public String toString() { - return "NettyResponseFuture{" + - "currentRetry=" + currentRetry + - ",\n\tisDone=" + isDone + - ",\n\tisCancelled=" + isCancelled + - ",\n\tasyncHandler=" + asyncHandler + - ",\n\tresponseTimeoutInMs=" + responseTimeoutInMs + - ",\n\tnettyRequest=" + nettyRequest + - ",\n\tcontent=" + content + - ",\n\turi=" + uri + - ",\n\tkeepAlive=" + keepAlive + - ",\n\thttpResponse=" + httpResponse + - ",\n\texEx=" + exEx + - ",\n\tredirectCount=" + redirectCount + - ",\n\treaperFuture=" + reaperFuture + - ",\n\tinAuth=" + inAuth + - ",\n\tstatusReceived=" + statusReceived + - ",\n\ttouch=" + touch + + return "NettyResponseFuture{" + // + "currentRetry=" + currentRetry + // + ",\n\tisDone=" + isDone + // + ",\n\tisCancelled=" + isCancelled + // + ",\n\tasyncHandler=" + asyncHandler + // + ",\n\trequestTimeoutInMs=" + requestTimeoutInMs + // + ",\n\tnettyRequest=" + nettyRequest + // + ",\n\tcontent=" + content + // + ",\n\turi=" + uri + // + ",\n\tkeepAlive=" + keepAlive + // + ",\n\thttpResponse=" + httpResponse + // + ",\n\texEx=" + exEx + // + ",\n\tredirectCount=" + redirectCount + // + ",\n\treaperFuture=" + reaperFuture + // + ",\n\tinAuth=" + inAuth + // + ",\n\tstatusReceived=" + statusReceived + // + ",\n\ttouch=" + touch + // '}'; } From 0204ca3fce08c1b63d623d28ed1ce00448dc2f1a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 22 May 2013 05:12:44 +0200 Subject: [PATCH 0375/2844] Make idleConnectionTimeout effective when less than requestTimeout, close #120 --- .../providers/netty/NettyAsyncHttpProvider.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index d6d297dc5e..e5c7a3077c 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -550,9 +550,11 @@ public void operationComplete(ChannelFuture cf) { try { future.touch(); int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); - if (requestTimeout != -1 && !future.isDone() && !future.isCancelled()) { + int schedulePeriod = requestTimeout != -1 ? (config.getIdleConnectionTimeoutInMs() != -1 ? Math.min(requestTimeout, config.getIdleConnectionTimeoutInMs()) : requestTimeout) : config.getIdleConnectionTimeoutInMs(); + + if (schedulePeriod != -1 && !future.isDone() && !future.isCancelled()) { ReaperFuture reaperFuture = new ReaperFuture(future); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, requestTimeout, TimeUnit.MILLISECONDS); + Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, schedulePeriod, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); } @@ -1606,7 +1608,15 @@ private final static int computeAndSetContentLength(Request request, HttpRequest public static NettyResponseFuture newFuture(URI uri, Request request, AsyncHandler asyncHandler, HttpRequest nettyRequest, AsyncHttpClientConfig config, NettyAsyncHttpProvider provider, ProxyServer proxyServer) { int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - NettyResponseFuture f = new NettyResponseFuture(uri, request, asyncHandler, nettyRequest, requestTimeout, config.getIdleConnectionTimeoutInMs(), provider, request.getConnectionPoolKeyStrategy(), proxyServer); + NettyResponseFuture f = new NettyResponseFuture(uri,// + request,// + asyncHandler,// + nettyRequest,// + requestTimeout,// + config.getIdleConnectionTimeoutInMs(),// + provider,// + request.getConnectionPoolKeyStrategy(),// + proxyServer); if (request.getHeaders().getFirstValue("Expect") != null && request.getHeaders().getFirstValue("Expect").equalsIgnoreCase("100-Continue")) { f.getAndSetWriteBody(false); From 567eed701424a373f57772405d46f5fb859ec2f2 Mon Sep 17 00:00:00 2001 From: jfarcand Date: Fri, 24 May 2013 10:26:07 -0400 Subject: [PATCH 0376/2844] Fixes #302 --- .../http/client/providers/netty/NettyAsyncHttpProvider.java | 2 +- .../ning/http/client/providers/netty/NettyWebSocket.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index e5c7a3077c..e1898d286a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -2389,7 +2389,7 @@ public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - webSocket.close(); + webSocket.close(1006, "Connection was closed abnormally (that is, with no close frame being sent)."); } catch (Throwable t) { log.error("onError", t); } diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 2197ba01f4..2cd8bb17bd 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -124,6 +124,12 @@ public void close() { } } + // @Override + public void close(int statusCode, String reason) { + onClose(statusCode, reason); + listeners.clear(); + } + protected void onBinaryFragment(byte[] message, boolean last) { for (WebSocketListener l : listeners) { if (WebSocketByteListener.class.isAssignableFrom(l.getClass())) { From 9671af270265b8723dc71e35a526e74a5ee4ddfc Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 23 May 2013 17:48:23 -0700 Subject: [PATCH 0377/2844] - Grizzly+SPDY checkpoint. Now able to support SPDY and HTTP at the same time (no longer mutually exclusive). --- .../http/client/AsyncHttpClientConfig.java | 58 ++- .../grizzly/GrizzlyAsyncHttpProvider.java | 423 +++++++++++++++--- 2 files changed, 418 insertions(+), 63 deletions(-) diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java index 52845b35e9..abd80b8cb2 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java @@ -111,6 +111,8 @@ public class AsyncHttpClientConfig { protected int maxConnectionLifeTimeInMs; protected boolean useRelativeURIsWithSSLProxies; protected boolean spdyEnabled; + protected int spdyInitialWindowSize; + protected int spdyMaxConcurrentStreams; protected AsyncHttpClientConfig() { } @@ -147,7 +149,9 @@ private AsyncHttpClientConfig(int maxTotalConnections, int ioThreadMultiplier, boolean strict302Handling, boolean useRelativeURIsWithSSLProxies, - boolean spdyEnabled) { + boolean spdyEnabled, + int spdyInitialWindowSize, + int spdyMaxConcurrentStreams) { this.maxTotalConnections = maxTotalConnections; this.maxConnectionPerHost = maxConnectionPerHost; @@ -188,6 +192,8 @@ private AsyncHttpClientConfig(int maxTotalConnections, this.proxyServer = proxyServer; this.useRawUrl = useRawUrl; this.spdyEnabled = spdyEnabled; + this.spdyInitialWindowSize = spdyInitialWindowSize; + this.spdyMaxConcurrentStreams = spdyMaxConcurrentStreams; } /** @@ -465,6 +471,20 @@ public boolean isSpdyEnabled() { return spdyEnabled; } + /** + * @return the windows size new SPDY sessions should be initialized to. + */ + public int getSpdyInitialWindowSize() { + return spdyInitialWindowSize; + } + + /** + * @return the maximum number of concurrent streams over one SPDY session. + */ + public int getSpdyMaxConcurrentStreams() { + return spdyMaxConcurrentStreams; + } + /** * Return true if the query parameters will be stripped from the request when a redirect is requested. * @@ -586,6 +606,8 @@ public Thread newThread(Runnable r) { private int ioThreadMultiplier = 2; private boolean strict302Handling; private boolean spdyEnabled; + private int spdyInitialWindowSize = 10 * 1024 * 1024; + private int spdyMaxConcurrentStreams = 100; public Builder() { } @@ -1057,6 +1079,36 @@ public Builder setSpdyEnabled(boolean spdyEnabled) { return this; } + /** + * Configures the initial window size for the SPDY session. + * + * @param spdyInitialWindowSize the initial window size. + * + * @return this + * + * @since 2.0 + */ + public Builder setSpdyInitialWindowSize(int spdyInitialWindowSize) { + this.spdyInitialWindowSize = spdyInitialWindowSize; + return this; + } + + /** + * Configures the maximum number of concurrent streams over a single + * SPDY session. + * + * @param spdyMaxConcurrentStreams the maximum number of concurrent + * streams over a single SPDY session. + * + * @return this + * + * @since 2.0 + */ + public Builder setSpdyMaxConcurrentStreams(int spdyMaxConcurrentStreams) { + this.spdyMaxConcurrentStreams = spdyMaxConcurrentStreams; + return this; + } + /** * Create a config builder with values taken from the given prototype configuration. * @@ -1151,7 +1203,9 @@ public AsyncHttpClientConfig build() { ioThreadMultiplier, strict302Handling, useRelativeURIsWithSSLProxies, - spdyEnabled); + spdyEnabled, + spdyInitialWindowSize, + spdyMaxConcurrentStreams); } } } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 0cb9fe5eff..fdd9c8af15 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -13,6 +13,7 @@ package com.ning.http.client.providers.grizzly; +import com.ning.http.client.AsyncHttpClient; import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; @@ -67,6 +68,7 @@ import org.glassfish.grizzly.attributes.Attribute; import org.glassfish.grizzly.attributes.AttributeStorage; import org.glassfish.grizzly.filterchain.BaseFilter; +import org.glassfish.grizzly.filterchain.Filter; import org.glassfish.grizzly.filterchain.FilterChain; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.filterchain.FilterChainContext; @@ -84,10 +86,15 @@ import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.Protocol; import org.glassfish.grizzly.impl.FutureImpl; +import org.glassfish.grizzly.npn.ClientSideNegotiator; import org.glassfish.grizzly.spdy.NextProtoNegSupport; import org.glassfish.grizzly.spdy.SpdyFramingFilter; import org.glassfish.grizzly.spdy.SpdyHandlerFilter; import org.glassfish.grizzly.spdy.SpdyMode; +import org.glassfish.grizzly.spdy.SpdySession; +import org.glassfish.grizzly.ssl.SSLBaseFilter; +import org.glassfish.grizzly.ssl.SSLConnectionContext; +import org.glassfish.grizzly.ssl.SSLUtils; import org.glassfish.grizzly.utils.Charsets; import org.glassfish.grizzly.http.util.CookieSerializerUtils; import org.glassfish.grizzly.http.util.DataChunk; @@ -121,6 +128,7 @@ import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.File; @@ -135,9 +143,11 @@ import java.security.NoSuchAlgorithmException; import java.util.Collection; import java.util.HashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Semaphore; @@ -146,6 +156,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider.SwitchingSSLFilter.SSLSwitchingEvent; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; import static com.ning.http.util.MiscUtil.isNonEmpty; @@ -386,7 +397,7 @@ public void onTimeout(Connection connection) { // HTTP/1.1 support. if (!npnEnabled && providerConfig != null) { if ((Boolean) providerConfig.getProperty(Property.NPN_ENABLED)) { - // NPN hasn't been disabled, so it's most likely a configuration proble. + // NPN hasn't been disabled, so it's most likely a configuration problem. // Log a warning and disable spdy support. LOGGER.warn("Next Protocol Negotiation support is not available. SPDY support has been disabled."); spdyEnabled = false; @@ -394,50 +405,36 @@ public void onTimeout(Connection connection) { } } - if (!spdyEnabled) { - final AsyncHttpClientEventFilter eventFilter; - final EventHandler handler = new EventHandler(this); - if (providerConfig != null) { - eventFilter = - new AsyncHttpClientEventFilter(handler, - (Integer) providerConfig - .getProperty( - MAX_HTTP_PACKET_HEADER_SIZE)); - } else { - eventFilter = new AsyncHttpClientEventFilter(handler); - } - handler.cleanup = eventFilter; - ContentEncoding[] encodings = eventFilter.getContentEncodings(); - if (encodings.length > 0) { - for (ContentEncoding encoding : encodings) { - eventFilter.removeContentEncoding(encoding); - } - } - if (clientConfig.isCompressionEnabled()) { - eventFilter.addContentEncoding( - new GZipContentEncoding(512, - 512, - new ClientEncodingFilter())); - } - fcb.add(eventFilter); - final AsyncHttpClientFilter clientFilter = - new AsyncHttpClientFilter(clientConfig); - fcb.add(clientFilter); - fcb.add(new WebSocketClientFilter()); + final AsyncHttpClientEventFilter eventFilter; + final EventHandler handler = new EventHandler(this); + if (providerConfig != null) { + eventFilter = + new AsyncHttpClientEventFilter(handler, + (Integer) providerConfig + .getProperty( + MAX_HTTP_PACKET_HEADER_SIZE)); } else { - fcb.add(new SpdyFramingFilter()); - fcb.add(new AsyncSpdyClientEventFilter(new EventHandler(this), - ((npnEnabled) ? SpdyMode.NPN : SpdyMode.PLAIN), - clientConfig.executorService())); - final AsyncHttpClientFilter clientFilter = - new AsyncHttpClientFilter(clientConfig); - fcb.add(clientFilter); - if (npnEnabled) { - int idx = fcb.indexOfType(SSLFilter.class); - SSLFilter f = (SSLFilter) fcb.get(idx); - NextProtoNegSupport.getInstance().configure(f); + eventFilter = new AsyncHttpClientEventFilter(handler); + } + handler.cleanup = eventFilter; + ContentEncoding[] encodings = eventFilter.getContentEncodings(); + if (encodings.length > 0) { + for (ContentEncoding encoding : encodings) { + eventFilter.removeContentEncoding(encoding); } } + if (clientConfig.isCompressionEnabled()) { + eventFilter.addContentEncoding( + new GZipContentEncoding(512, + 512, + new ClientEncodingFilter())); + } + fcb.add(eventFilter); + final AsyncHttpClientFilter clientFilter = + new AsyncHttpClientFilter(clientConfig); + fcb.add(clientFilter); + fcb.add(new WebSocketClientFilter()); + if (providerConfig != null) { final TransportCustomizer customizer = (TransportCustomizer) @@ -451,7 +448,21 @@ public void onTimeout(Connection connection) { doDefaultTransportConfig(); } + // FilterChain for the standard HTTP case has been configured, we now + // copy it and modify for SPDY purposes. + if (spdyEnabled) { + FilterChainBuilder spdyFilterChain = + createSpdyFilterChain(fcb, npnEnabled); + ProtocolNegotiator pn = + new ProtocolNegotiator(spdyFilterChain.build()); + NextProtoNegSupport.getInstance() + .setClientSideNegotiator(clientTransport, pn); + } + + // Don't limit the number of bytes the client can have queued to write. clientTransport.getAsyncQueueIO().getWriter().setMaxPendingBytesPerConnection(-1); + + // Install the HTTP filter chain. clientTransport.setProcessor(fcb.build()); } @@ -475,6 +486,44 @@ void touchConnection(final Connection c, final Request request) { // --------------------------------------------------------- Private Methods + private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb, + final boolean npnEnabled) { + + FilterChainBuilder spdyFcb = FilterChainBuilder.stateless(); + spdyFcb.addAll(fcb); + int idx = spdyFcb.indexOfType(SSLFilter.class); + Filter f = spdyFcb.get(idx); + + // Adjust the SSLFilter to support NPN + if (npnEnabled) { + SSLBaseFilter sslBaseFilter = (SSLBaseFilter) f; + NextProtoNegSupport.getInstance().configure(sslBaseFilter); + ProtocolHandshakeListener handshakeListener = + new ProtocolHandshakeListener(); + sslBaseFilter.addHandshakeListener(handshakeListener); + } + + // Remove the HTTP Client filter - this will be replaced by the + // SPDY framing and handler filters. + idx = spdyFcb.indexOfType(HttpClientFilter.class); + spdyFcb.set(idx, new SpdyFramingFilter()); + final SpdyMode spdyMode = ((npnEnabled) ? SpdyMode.NPN : SpdyMode.PLAIN); + AsyncSpdyClientEventFilter spdyFilter = + new AsyncSpdyClientEventFilter(new EventHandler(this), + spdyMode, + clientConfig.executorService()); + spdyFilter.setInitialWindowSize(clientConfig.getSpdyInitialWindowSize()); + spdyFilter.setMaxConcurrentStreams(clientConfig.getSpdyMaxConcurrentStreams()); + spdyFcb.add(idx + 1, spdyFilter); + + // Remove the WebSocket filter - not currently supported. + idx = spdyFcb.indexOfType(WebSocketClientFilter.class); + spdyFcb.remove(idx); + + return spdyFcb; + } + + private static boolean configSendFileSupport() { return !((System.getProperty("os.name").equalsIgnoreCase("linux") @@ -530,7 +579,7 @@ public void updated(WriteResult result) { void setHttpTransactionContext(final AttributeStorage storage, - final HttpTransactionContext httpTransactionState) { + final HttpTransactionContext httpTransactionState) { if (httpTransactionState == null) { REQUEST_STATE_ATTR.remove(storage); @@ -599,6 +648,19 @@ boolean sendRequest(final FilterChainContext ctx, } else { HttpContent content = HttpContent.builder(requestPacket).last(true).build(); ctx.write(content, ctx.getTransportContext().getCompletionHandler()); +// FilterChainContext newContext = new FilterChainContext(); +// FilterChain fc = (FilterChain) ctx.getConnection().getProcessor(); +// final FilterChainContext newFilterChainContext = +// fc.obtainFilterChainContext( +// ctx.getConnection(), +// ctx.getStartIdx(), +// fc.size(), +// ctx.getFilterIdx()); +// +// newFilterChainContext.setAddressHolder(ctx.getAddressHolder()); +// newFilterChainContext.getInternalContext().setProcessor(fc); +// //newFilterChainContext.setMessage(ctx.getMessage()); +// newContext.write(content, ctx.getTransportContext().getCompletionHandler()); } LOGGER.debug("REQUEST: {}", requestPacket); @@ -738,6 +800,118 @@ void tunnelEstablished(final Connection c) { // ---------------------------------------------------------- Nested Classes + static final class ProtocolHandshakeListener implements + SSLBaseFilter.HandshakeListener { + + + static ConcurrentHashMap listeners = + new ConcurrentHashMap(); + + + // --------------------------------------- Method from HandshakeListener + + + @Override + public void onStart(Connection connection) { + // no-op + } + + @Override + public void onComplete(Connection connection) { + final HandshakeCompleteListener listener = listeners.get(connection); + if (listener != null) { + removeListener(connection); + listener.complete(); + } + } + + + // --------------------------------------------- Package Private Methods + + + public static void addListener(final Connection c, + final HandshakeCompleteListener listener) { + listeners.putIfAbsent(c, listener); + } + + static void removeListener(final Connection c) { + listeners.remove(c); + } + } + + private static interface HandshakeCompleteListener { + void complete(); + } + + + private static final class ProtocolNegotiator implements ClientSideNegotiator { + + + private static final String SPDY = "spdy/3"; + private static final String HTTP = "HTTP/1.1"; + + private final FilterChain spdyFilterChain; + private final SpdyHandlerFilter spdyHandlerFilter; + + + // -------------------------------------------------------- Constructors + + private ProtocolNegotiator(final FilterChain spdyFilterChain) { + this.spdyFilterChain = spdyFilterChain; + int idx = spdyFilterChain.indexOfType(SpdyHandlerFilter.class); + spdyHandlerFilter = (SpdyHandlerFilter) spdyFilterChain.get(idx); + } + + + // ----------------------------------- Methods from ClientSideNegotiator + + + @Override + public boolean wantNegotiate(SSLEngine engine) { + GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::wantNegotiate"); + return true; + } + + @Override + public String selectProtocol(SSLEngine engine, LinkedHashSet strings) { + GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::selectProtocol: " + strings); + final Connection connection = NextProtoNegSupport.getConnection(engine); + + // Give preference to SPDY/3. If not available, check for HTTP as a + // fallback + if (strings.contains(SPDY)) { + GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::selecting: " + SPDY); + SSLConnectionContext sslCtx = + SSLUtils.getSslConnectionContext(connection); + sslCtx.setNewConnectionFilterChain(spdyFilterChain); + final SpdySession spdySession = + new SpdySession(connection, false, spdyHandlerFilter); + spdySession.setLocalInitialWindowSize(spdyHandlerFilter.getInitialWindowSize()); + spdySession.setLocalMaxConcurrentStreams(spdyHandlerFilter.getMaxConcurrentStreams()); + + SpdySession.bind(connection, spdySession); + return SPDY; + } else if (strings.contains(HTTP)) { + GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::selecting: " + HTTP); + // Use the default HTTP FilterChain. + return HTTP; + } else { + GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::selecting NONE"); + // no protocol support. Will close the connection when + // onNoDeal is invoked + return ""; + } + } + + @Override + public void onNoDeal(SSLEngine engine) { + GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::onNoDeal"); + final Connection connection = NextProtoNegSupport.getConnection(engine); + connection.closeSilently(); + } + } + + private static final class ContinueEvent implements FilterChainEvent { private final HttpTransactionContext context; @@ -855,7 +1029,7 @@ public NextAction handleEvent(final FilterChainContext ctx, private boolean sendAsGrizzlyRequest(final Request request, - final FilterChainContext ctx) + final FilterChainContext ctx) throws IOException { final HttpTransactionContext httpCtx = getHttpTransactionContext(ctx.getConnection()); @@ -874,7 +1048,7 @@ private boolean sendAsGrizzlyRequest(final Request request, final boolean useProxy = proxy != null; if (useProxy) { if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) { - ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(false, ctx.getConnection())); + ctx.notifyDownstream(new SSLSwitchingEvent(false, ctx.getConnection(), null)); secure = false; httpCtx.establishingTunnel = true; builder.method(Method.CONNECT); @@ -912,9 +1086,6 @@ private boolean sendAsGrizzlyRequest(final Request request, requestPacket = builder.build(); } requestPacket.setSecure(secure); - if (secure) { - ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(true, ctx.getConnection())); - } if (!useProxy && !httpCtx.isWSRequest) { addQueryString(request, requestPacket); } @@ -923,14 +1094,68 @@ private boolean sendAsGrizzlyRequest(final Request request, final AsyncHandler h = httpCtx.handler; if (h != null) { - if (TransferCompletionHandler.class.isAssignableFrom(h.getClass())) { + if (TransferCompletionHandler.class.isAssignableFrom( + h.getClass())) { final FluentCaseInsensitiveStringsMap map = - new FluentCaseInsensitiveStringsMap(request.getHeaders()); - TransferCompletionHandler.class.cast(h).transferAdapter(new GrizzlyTransferAdapter(map)); + new FluentCaseInsensitiveStringsMap( + request.getHeaders()); + TransferCompletionHandler.class.cast(h) + .transferAdapter(new GrizzlyTransferAdapter(map)); } } - return sendRequest(ctx, request, requestPacket); + final HttpRequestPacket requestPacketLocal = requestPacket; + final Callable action = new Callable() { + @Override + public Boolean call() throws Exception { + FilterChainContext sendingCtx = ctx; + + // Check to see if the ProtocolNegotiator has given + // us a different FilterChain to use. + SSLConnectionContext sslCtx = + SSLUtils.getSslConnectionContext(ctx.getConnection()); + FilterChain fc = sslCtx.getNewConnectionFilterChain(); + + if (fc != null) { + // Create a new FilterChain context using the new + // FilterChain. + // TODO: We need to mark this connection somehow + // as being only suitable for this type of + // request. + sendingCtx = obtainProtocolChainContext(ctx, fc); + } + return sendRequest(sendingCtx, request, requestPacketLocal); + } + }; + if (secure) { + ctx.notifyDownstream(new SSLSwitchingEvent(true, ctx.getConnection(), action)); + return false; + } + try { + return action.call(); + } catch (Exception e) { + httpCtx.abort(e); + return true; + } + + } + + private FilterChainContext obtainProtocolChainContext( + final FilterChainContext ctx, + final FilterChain completeProtocolFilterChain) { + + final FilterChainContext newFilterChainContext = + completeProtocolFilterChain.obtainFilterChainContext( + ctx.getConnection(), + ctx.getStartIdx() + 1, + completeProtocolFilterChain.size(), + ctx.getFilterIdx() + 1); + newFilterChainContext.setAddressHolder(ctx.getAddressHolder()); + newFilterChainContext.setMessage(ctx.getMessage()); + newFilterChainContext.getInternalContext().setIoEvent( + ctx.getInternalContext().getIoEvent()); + ctx.getConnection().setProcessor(completeProtocolFilterChain); + return newFilterChainContext; } private boolean isSecure(String scheme) { @@ -2034,8 +2259,8 @@ private void notifySchemeSwitch(final FilterChainContext ctx, final Connection c, final URI uri) throws IOException { - ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent( - "https".equals(uri.getScheme()), c)); + ctx.notifyDownstream( + new SSLSwitchingEvent("https".equals(uri.getScheme()), c, null)); } } // END RedirectHandler @@ -2497,8 +2722,8 @@ public boolean handlesBodyType(final Request request) { @SuppressWarnings({"unchecked"}) public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) + final Request request, + final HttpRequestPacket requestPacket) throws IOException { final File f = request.getFile(); @@ -2877,11 +3102,38 @@ static final class SwitchingSSLFilter extends SSLFilter { @Override - public NextAction handleEvent(FilterChainContext ctx, FilterChainEvent event) throws IOException { + public NextAction handleConnect(FilterChainContext ctx) + throws IOException { + if (isSecure(ctx.getConnection())) { + // initiate the handshake during the connection event + // so that we can properly install the SPDY FilterChain + // based on NPN results. + handshake(ctx.getConnection(), null); + } + return ctx.getInvokeAction(); + } + + @Override + public NextAction handleEvent(final FilterChainContext ctx, FilterChainEvent event) throws IOException { if (event.type() == SSLSwitchingEvent.class) { final SSLSwitchingEvent se = (SSLSwitchingEvent) event; - CONNECTION_IS_SECURE.set(se.connection, se.secure); + setSecureStatus(se.connection, se.secure); + if (se.secure) { + ProtocolHandshakeListener.addListener(ctx.getConnection(), + new HandshakeCompleteListener() { + @Override + public void complete() { + try { + se.action.call(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + ); + handshake(ctx.getConnection(), null); + } return ctx.getStopAction(); } return ctx.getInvokeAction(); @@ -2926,6 +3178,10 @@ private boolean isSecure(final Connection c) { } + private void setSecureStatus(final Connection c, final boolean secure) { + CONNECTION_IS_SECURE.set(c, secure); + } + // ------------------------------------------------------ Nested Classes @@ -2933,14 +3189,18 @@ static final class SSLSwitchingEvent implements FilterChainEvent { final boolean secure; final Connection connection; + final Callable action; // ---------------------------------------------------- Constructors - SSLSwitchingEvent(final boolean secure, final Connection c) { + SSLSwitchingEvent(final boolean secure, + final Connection c, + final Callable action) { this.secure = secure; connection = c; + this.action = action; } @@ -3233,7 +3493,7 @@ public int hashCode() { } } // END AHCWebSocketListenerAdapter - /* + public static void main(String[] args) { AsyncHttpClientConfig config = @@ -3281,6 +3541,47 @@ public Object onCompleted() throws Exception { return null; } }).get(); + client.prepareGet("https://forum-en.guildwars2.com/forum") + .execute(new AsyncHandler() { + @Override + public void onThrowable(Throwable t) { + t.printStackTrace(); + } + + @Override + public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) + throws Exception { + System.out.println( + new String( + bodyPart.getBodyPartBytes(), + "UTF-8")); + return STATE.CONTINUE; + } + + @Override + public STATE onStatusReceived(HttpResponseStatus responseStatus) + throws Exception { + System.out + .println( + responseStatus.getStatusCode()); + return STATE.CONTINUE; + } + + @Override + public STATE onHeadersReceived(HttpResponseHeaders headers) + throws Exception { + System.out.println(headers.toString()); + return STATE.CONTINUE; + } + + @Override + public Object onCompleted() + throws Exception { + System.out.println("REQUEST COMPLETE"); + return null; + } + }).get(); + System.exit(0); } catch (IOException ioe) { ioe.printStackTrace(); } catch (InterruptedException e) { @@ -3290,7 +3591,7 @@ public Object onCompleted() throws Exception { } } - */ + } From 149852a9fbf646cbcc37e3ad1d1e9d5673f48f12 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 24 May 2013 14:01:19 -0700 Subject: [PATCH 0378/2844] - Get SSL related tests passing again after SPDY-related changes. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 93 ++++++++++--------- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index fdd9c8af15..7961252825 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -383,6 +383,9 @@ public void onTimeout(Connection connection) { false, false); final SwitchingSSLFilter filter = new SwitchingSSLFilter(configurator, defaultSecState); + ProtocolHandshakeListener handshakeListener = + new ProtocolHandshakeListener(); + filter.addHandshakeListener(handshakeListener); fcb.add(filter); GrizzlyAsyncHttpProviderConfig providerConfig = (GrizzlyAsyncHttpProviderConfig) clientConfig.getAsyncHttpProviderConfig(); @@ -494,13 +497,11 @@ private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb, int idx = spdyFcb.indexOfType(SSLFilter.class); Filter f = spdyFcb.get(idx); + // Adjust the SSLFilter to support NPN if (npnEnabled) { SSLBaseFilter sslBaseFilter = (SSLBaseFilter) f; NextProtoNegSupport.getInstance().configure(sslBaseFilter); - ProtocolHandshakeListener handshakeListener = - new ProtocolHandshakeListener(); - sslBaseFilter.addHandshakeListener(handshakeListener); } // Remove the HTTP Client filter - this will be replaced by the @@ -970,6 +971,13 @@ public void updated(Object result) { return super.handleRead(ctx); } + @Override + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); + if (context != null) { + context.abort(error.getCause()); + } + } } // END AsyncHttpClientTransportFilter @@ -1113,15 +1121,17 @@ public Boolean call() throws Exception { // us a different FilterChain to use. SSLConnectionContext sslCtx = SSLUtils.getSslConnectionContext(ctx.getConnection()); - FilterChain fc = sslCtx.getNewConnectionFilterChain(); - - if (fc != null) { - // Create a new FilterChain context using the new - // FilterChain. - // TODO: We need to mark this connection somehow - // as being only suitable for this type of - // request. - sendingCtx = obtainProtocolChainContext(ctx, fc); + if (sslCtx != null) { + FilterChain fc = sslCtx.getNewConnectionFilterChain(); + + if (fc != null) { + // Create a new FilterChain context using the new + // FilterChain. + // TODO: We need to mark this connection somehow + // as being only suitable for this type of + // request. + sendingCtx = obtainProtocolChainContext(ctx, fc); + } } return sendRequest(sendingCtx, request, requestPacketLocal); } @@ -1776,7 +1786,7 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c boolean result; final String proxy_auth = httpHeader.getHeader(Header.ProxyAuthenticate); - if (httpHeader.isSkipRemainder() ) { + if (httpHeader.isSkipRemainder()) { if (!ProxyAuthorizationHandler.isNTLMSecondHandShake(proxy_auth)) { cleanup.cleanup(ctx); cleanup(ctx, provider); @@ -2146,7 +2156,7 @@ private boolean exceuteRequest( } public static boolean isNTLMSecondHandShake(final String proxy_auth) { - return (proxy_auth.toLowerCase().startsWith("ntlm") && !proxy_auth.equalsIgnoreCase("ntlm")); + return (proxy_auth != null && proxy_auth.toLowerCase().startsWith("ntlm") && !proxy_auth.equalsIgnoreCase("ntlm")); } public static boolean isNTLMFirstHandShake(final String proxy_auth) { return (proxy_auth.equalsIgnoreCase("ntlm")); @@ -2208,13 +2218,13 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, try { final Connection c = m.obtainConnection(requestToSend, httpTransactionContext.future); - if (switchingSchemes(orig, uri)) { - try { - notifySchemeSwitch(ctx, c, uri); - } catch (IOException ioe) { - httpTransactionContext.abort(ioe); - } - } +// if (switchingSchemes(orig, uri)) { +// try { +// notifySchemeSwitch(ctx, c, uri); +// } catch (IOException ioe) { +// httpTransactionContext.abort(ioe); +// } +// } final HttpTransactionContext newContext = httpTransactionContext.copy(); httpTransactionContext.future = null; @@ -3102,15 +3112,8 @@ static final class SwitchingSSLFilter extends SSLFilter { @Override - public NextAction handleConnect(FilterChainContext ctx) - throws IOException { - if (isSecure(ctx.getConnection())) { - // initiate the handshake during the connection event - // so that we can properly install the SPDY FilterChain - // based on NPN results. - handshake(ctx.getConnection(), null); - } - return ctx.getInvokeAction(); + protected void notifyHandshakeFailed(Connection connection, Throwable t) { + throw new RuntimeException(t); } @Override @@ -3118,22 +3121,26 @@ public NextAction handleEvent(final FilterChainContext ctx, FilterChainEvent eve if (event.type() == SSLSwitchingEvent.class) { final SSLSwitchingEvent se = (SSLSwitchingEvent) event; - setSecureStatus(se.connection, se.secure); + if (se.secure) { - ProtocolHandshakeListener.addListener(ctx.getConnection(), - new HandshakeCompleteListener() { - @Override - public void complete() { - try { - se.action.call(); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - ); + if (se.action != null) { + ProtocolHandshakeListener.addListener( + ctx.getConnection(), + new HandshakeCompleteListener() { + @Override + public void complete() { + try { + se.action.call(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + ); + } handshake(ctx.getConnection(), null); } + setSecureStatus(se.connection, se.secure); return ctx.getStopAction(); } return ctx.getInvokeAction(); From a12093438aa28e559c30cbbf1c7162f7d468fa2b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 13:54:04 -0700 Subject: [PATCH 0379/2844] - Change group ID from com.ning to org.asynchttpclient. - Update API packages: + com.ning --> org.asynchttpclient + compress package hierarchy to remove now redundant http.client sub-packages. The package changes will occur over multiple commits to avoid a particularly annoying bug in Intellij as well as git rebase -i change renamed files to rm/add thus losing all history. --- api/pom.xml | 2 +- .../AsyncCompletionHandler.java | 10 +- .../AsyncCompletionHandlerBase.java | 2 +- .../asynchttpclient}/AsyncHandler.java | 2 +- .../asynchttpclient}/AsyncHttpClient.java | 40 +++--- .../AsyncHttpClientConfig.java | 132 +++++++++--------- .../AsyncHttpClientConfigBean.java | 10 +- .../asynchttpclient}/AsyncHttpProvider.java | 5 +- .../AsyncHttpProviderConfig.java | 6 +- .../client => org/asynchttpclient}/Body.java | 2 +- .../asynchttpclient}/BodyConsumer.java | 2 +- .../BodyDeferringAsyncHandler.java | 7 +- .../asynchttpclient}/BodyGenerator.java | 2 +- .../asynchttpclient}/ByteArrayPart.java | 2 +- .../ConnectionPoolKeyStrategy.java | 2 +- .../asynchttpclient}/ConnectionsPool.java | 2 +- .../asynchttpclient}/Cookie.java | 2 +- .../DefaultConnectionPoolStrategy.java | 4 +- .../asynchttpclient}/FilePart.java | 2 +- .../FluentCaseInsensitiveStringsMap.java | 4 +- .../asynchttpclient}/FluentStringsMap.java | 2 +- .../asynchttpclient}/HttpContent.java | 4 +- .../HttpResponseBodyPart.java | 2 +- .../asynchttpclient}/HttpResponseHeaders.java | 2 +- .../asynchttpclient}/HttpResponseStatus.java | 2 +- .../asynchttpclient}/ListenableFuture.java | 2 +- .../MaxRedirectException.java | 2 +- .../client => org/asynchttpclient}/Part.java | 2 +- .../ProgressAsyncHandler.java | 8 +- .../asynchttpclient}/ProxyServer.java | 4 +- .../asynchttpclient}/RandomAccessBody.java | 2 +- .../client => org/asynchttpclient}/Realm.java | 4 +- .../asynchttpclient}/Request.java | 2 +- .../asynchttpclient}/RequestBuilder.java | 6 +- .../asynchttpclient}/RequestBuilderBase.java | 10 +- .../asynchttpclient}/Response.java | 12 +- .../ResumableBodyConsumer.java | 2 +- .../asynchttpclient}/SSLEngineFactory.java | 2 +- .../asynchttpclient}/SignatureCalculator.java | 2 +- .../SimpleAsyncHttpClient.java | 20 +-- .../asynchttpclient}/StringPart.java | 2 +- .../asynchttpclient}/ThrowableHandler.java | 2 +- .../asynchttpclient}/UpgradeHandler.java | 4 +- .../consumers/AppendableBodyConsumer.java | 4 +- .../consumers/ByteBufferBodyConsumer.java | 4 +- .../consumers/FileBodyConsumer.java | 4 +- .../consumers/OutputStreamBodyConsumer.java | 4 +- .../ResumableRandomAccessFileListener.java | 7 +- .../extra/ThrottleRequestFilter.java | 23 +-- .../filter/FilterContext.java | 14 +- .../filter/FilterException.java | 4 +- .../filter/IOExceptionFilter.java | 6 +- .../filter/RequestFilter.java | 4 +- .../filter/ResponseFilter.java | 4 +- .../generators/ByteArrayBodyGenerator.java | 6 +- .../generators/FileBodyGenerator.java | 6 +- .../generators/InputStreamBodyGenerator.java | 6 +- .../listenable/AbstractListenableFuture.java | 4 +- .../listenable/ExecutionList.java | 2 +- .../listener/TransferCompletionHandler.java | 32 ++--- .../listener/TransferListener.java | 4 +- .../multipart/ByteArrayPartSource.java | 2 +- .../asynchttpclient}/multipart/FilePart.java | 2 +- .../multipart/FilePartSource.java | 2 +- .../multipart/FilePartStallHandler.java | 2 +- .../multipart/FileUploadStalledException.java | 2 +- .../multipart/MultipartBody.java | 45 +++--- .../multipart/MultipartEncodingUtil.java | 2 +- .../multipart/MultipartRequestEntity.java | 7 +- .../asynchttpclient}/multipart/Part.java | 4 +- .../asynchttpclient}/multipart/PartBase.java | 2 +- .../multipart/PartSource.java | 2 +- .../multipart/RequestEntity.java | 2 +- .../multipart/StringPart.java | 2 +- .../asynchttpclient}/ntlm/NTLMEngine.java | 4 +- .../ntlm/NTLMEngineException.java | 2 +- .../asynchttpclient}/oauth/ConsumerKey.java | 2 +- .../oauth/OAuthSignatureCalculator.java | 18 +-- .../asynchttpclient}/oauth/RequestToken.java | 2 +- .../oauth/ThreadSafeHMAC.java | 6 +- .../handler/codec/http/CookieDecoder.java | 8 +- .../handler/codec/http/CookieHeaderNames.java | 2 +- .../jboss/netty/util/internal/StringUtil.java | 2 +- .../providers/ResponseBase.java | 18 +-- .../providers/jdk/JDKAsyncHttpProvider.java | 69 ++++----- .../jdk/JDKAsyncHttpProviderConfig.java | 4 +- .../providers/jdk/JDKDelegateFuture.java | 8 +- .../providers/jdk/JDKFuture.java | 9 +- .../providers/jdk/JDKResponse.java | 19 +-- .../providers/jdk/ResponseBodyPart.java | 6 +- .../providers/jdk/ResponseHeaders.java | 10 +- .../providers/jdk/ResponseStatus.java | 6 +- .../PropertiesBasedResumableProcessor.java | 4 +- .../resumable/ResumableAsyncHandler.java | 24 ++-- .../resumable/ResumableIOExceptionFilter.java | 14 +- .../resumable/ResumableListener.java | 2 +- .../asynchttpclient}/simple/HeaderMap.java | 4 +- .../simple/SimpleAHCTransferListener.java | 6 +- .../util/AllowAllHostnameVerifier.java | 2 +- .../util/AsyncHttpProviderUtils.java | 42 +++--- .../util/AuthenticatorUtils.java | 8 +- .../asynchttpclient}/util/Base64.java | 2 +- .../asynchttpclient}/util/DateUtil.java | 2 +- .../asynchttpclient}/util/MiscUtil.java | 2 +- .../asynchttpclient}/util/ProxyUtils.java | 14 +- .../asynchttpclient}/util/SslUtils.java | 2 +- .../asynchttpclient}/util/UTF8Codec.java | 2 +- .../asynchttpclient}/util/UTF8UrlEncoder.java | 4 +- .../webdav/WebDavCompletionHandlerBase.java | 18 +-- .../webdav/WebDavResponse.java | 8 +- .../websocket/DefaultWebSocketListener.java | 2 +- .../asynchttpclient}/websocket/WebSocket.java | 2 +- .../websocket/WebSocketByteListener.java | 2 +- .../WebSocketCloseCodeReasonListener.java | 2 +- .../websocket/WebSocketListener.java | 2 +- .../websocket/WebSocketPingListener.java | 2 +- .../websocket/WebSocketPongListener.java | 2 +- .../websocket/WebSocketTextListener.java | 2 +- .../websocket/WebSocketUpgradeHandler.java | 12 +- .../asynchttpclient}/version.properties | 0 .../asynchttpclient}/RealmTest.java | 7 +- .../async/AbstractBasicTest.java | 20 +-- .../async/AsyncProvidersBasicTest.java | 34 ++--- .../async/AsyncStreamHandlerTest.java | 20 +-- .../async/AsyncStreamLifecycleTest.java | 12 +- .../async/AuthTimeoutTest.java | 10 +- .../asynchttpclient}/async/BasicAuthTest.java | 26 ++-- .../async/BasicHttpsTest.java | 8 +- .../asynchttpclient}/async/BodyChunkTest.java | 12 +- .../async/BodyDeferringAsyncHandlerTest.java | 12 +- .../async/ByteBufferCapacityTest.java | 8 +- .../asynchttpclient}/async/ChunkingTest.java | 19 +-- .../async/ComplexClientTest.java | 6 +- .../async/ConnectionPoolTest.java | 12 +- .../async/DigestAuthTest.java | 8 +- .../asynchttpclient}/async/EmptyBodyTest.java | 14 +- .../async/ErrorResponseTest.java | 6 +- .../async/Expect100ContinueTest.java | 6 +- .../async/FilePartLargeFileTest.java | 12 +- .../asynchttpclient}/async/FilterTest.java | 22 +-- .../FluentCaseInsensitiveStringsMapTest.java | 4 +- .../async/FluentStringsMapTest.java | 4 +- .../async/FollowingThreadTest.java | 14 +- .../asynchttpclient}/async/Head302Test.java | 12 +- .../async/HostnameVerifierTest.java | 8 +- .../async/HttpToHttpsRedirectTest.java | 8 +- .../async/IdleStateHandlerTest.java | 6 +- .../async/InputStreamTest.java | 8 +- .../async/ListenableFutureTest.java | 8 +- .../async/MaxConnectionsInThreads.java | 6 +- .../async/MaxTotalConnectionTest.java | 8 +- .../async/MultipartUploadTest.java | 23 +-- .../async/MultipleHeaderTest.java | 18 +-- .../async/NoNullResponseTest.java | 10 +- .../async/NonAsciiContentLengthTest.java | 8 +- .../async/ParamEncodingTest.java | 8 +- .../async/PerRequestRelative302Test.java | 8 +- .../async/PerRequestTimeoutTest.java | 14 +- .../async/PostRedirectGetTest.java | 22 +-- .../async/PostWithQSTest.java | 12 +- .../asynchttpclient}/async/ProxyTest.java | 12 +- .../async/ProxyTunnellingTest.java | 18 +-- .../async/PutLargeFileTest.java | 10 +- .../async/QueryParametersTest.java | 8 +- .../asynchttpclient}/async/RC10KTest.java | 16 +-- .../async/RedirectConnectionUsageTest.java | 19 +-- .../async/Relative302Test.java | 8 +- .../async/RemoteSiteTest.java | 27 ++-- .../async/RequestBuilderTest.java | 8 +- .../async/RetryRequestTest.java | 6 +- .../SimpleAsyncClientErrorBehaviourTest.java | 14 +- .../async/SimpleAsyncHttpClientTest.java | 22 +-- .../async/TransferListenerTest.java | 16 +-- .../async/WebDavBasicTest.java | 16 +-- .../async/ZeroCopyFileTest.java | 20 +-- .../ByteArrayBodyGeneratorTest.java | 5 +- .../oauth/TestSignatureCalculator.java | 7 +- .../handler/codec/http/CookieDecoderTest.java | 8 +- .../resumable/MapResumableProcessor.java | 4 +- ...PropertiesBasedResumableProcesserTest.java | 3 +- .../resumable/ResumableAsyncHandlerTest.java | 7 +- .../util/AsyncHttpProviderUtilsTest.java | 6 +- .../asynchttpclient}/util/ProxyUtilsTest.java | 9 +- .../util/TestUTF8UrlCodec.java | 3 +- .../websocket/AbstractBasicTest.java | 6 +- .../websocket/ByteMessageTest.java | 10 +- .../websocket/CloseCodeReasonMessageTest.java | 15 +- .../websocket/RedirectTest.java | 13 +- .../websocket/TextMessageTest.java | 40 +++--- extras/guava/pom.xml | 2 +- .../client/extra/ListenableFutureAdapter.java | 2 +- extras/jdeferred/pom.xml | 2 +- .../client/extra/AsyncHttpDeferredObject.java | 13 +- .../extra/HttpResponseBodyPartProgress.java | 2 +- .../ning/http/client/extra/AsyncHttpTest.java | 4 +- extras/pom.xml | 4 +- pom.xml | 2 +- providers/apache/pom.xml | 2 +- .../apache/ApacheAsyncHttpProvider.java | 68 ++++----- .../apache/ApacheAsyncHttpProviderConfig.java | 2 +- .../providers/apache/ApacheResponse.java | 14 +- .../apache/ApacheResponseBodyPart.java | 4 +- .../apache/ApacheResponseFuture.java | 8 +- .../apache/ApacheResponseHeaders.java | 8 +- .../apache/ApacheResponseStatus.java | 4 +- providers/grizzly/pom.xml | 2 +- .../grizzly/FeedableBodyGenerator.java | 4 +- .../providers/grizzly/GSSSPNEGOWrapper.java | 2 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 84 +++++------ .../GrizzlyAsyncHttpProviderConfig.java | 4 +- .../grizzly/GrizzlyConnectionsPool.java | 4 +- .../providers/grizzly/GrizzlyResponse.java | 16 +-- .../grizzly/GrizzlyResponseBodyPart.java | 4 +- .../grizzly/GrizzlyResponseFuture.java | 8 +- .../grizzly/GrizzlyResponseHeaders.java | 6 +- .../grizzly/GrizzlyResponseStatus.java | 4 +- .../GrizzlyAsyncProviderBasicTest.java | 8 +- .../GrizzlyAsyncStreamHandlerTest.java | 6 +- .../GrizzlyAsyncStreamLifecycleTest.java | 6 +- .../grizzly/GrizzlyAuthTimeoutTest.java | 6 +- .../grizzly/GrizzlyBasicAuthTest.java | 6 +- .../grizzly/GrizzlyBasicHttpsTest.java | 6 +- .../grizzly/GrizzlyBodyChunkTest.java | 6 +- .../GrizzlyBodyDeferringAsyncHandlerTest.java | 6 +- .../GrizzlyByteBufferCapacityTest.java | 6 +- .../grizzly/GrizzlyChunkingTest.java | 6 +- .../grizzly/GrizzlyComplexClientTest.java | 6 +- .../grizzly/GrizzlyConnectionPoolTest.java | 10 +- .../grizzly/GrizzlyDigestAuthTest.java | 6 +- .../grizzly/GrizzlyEmptyBodyTest.java | 6 +- .../grizzly/GrizzlyErrorResponseTest.java | 6 +- .../grizzly/GrizzlyExpectContinue100Test.java | 6 +- .../providers/grizzly/GrizzlyFilterTest.java | 6 +- .../grizzly/GrizzlyFollowingThreadTest.java | 6 +- .../providers/grizzly/GrizzlyHead302Test.java | 6 +- .../GrizzlyHttpToHttpsRedirectTest.java | 6 +- .../grizzly/GrizzlyIdleStateHandlerTest.java | 6 +- .../grizzly/GrizzlyInputStreamTest.java | 6 +- .../grizzly/GrizzlyListenableFutureTest.java | 6 +- .../GrizzlyMaxConnectionsInThreadsTest.java | 6 +- .../GrizzlyMaxTotalConnectionTest.java | 6 +- .../grizzly/GrizzlyMultipleHeaderTest.java | 6 +- .../grizzly/GrizzlyNoNullResponseTest.java | 6 +- .../GrizzlyNonAsciiContentLengthTest.java | 6 +- .../grizzly/GrizzlyParamEncodingTest.java | 6 +- .../GrizzlyPerRequestRelative302Test.java | 6 +- .../grizzly/GrizzlyPerRequestTimeoutTest.java | 6 +- .../grizzly/GrizzlyPostRedirectGetTest.java | 6 +- .../grizzly/GrizzlyPostWithQSTest.java | 6 +- .../grizzly/GrizzlyProviderUtil.java | 4 +- .../providers/grizzly/GrizzlyProxyTest.java | 6 +- .../grizzly/GrizzlyProxyTunnelingTest.java | 6 +- .../grizzly/GrizzlyPutLargeFileTest.java | 6 +- .../grizzly/GrizzlyQueryParametersTest.java | 6 +- .../providers/grizzly/GrizzlyRC10KTest.java | 6 +- .../GrizzlyRedirectConnectionUsageTest.java | 8 +- .../grizzly/GrizzlyRelative302Test.java | 6 +- .../grizzly/GrizzlyRemoteSiteTest.java | 6 +- .../grizzly/GrizzlyRetryRequestTest.java | 6 +- .../GrizzlySimpleAsyncHttpClientTest.java | 6 +- .../grizzly/GrizzlyTransferListenerTest.java | 6 +- .../GrizzlyUnexpectingTimeoutTest.java | 10 +- .../websocket/GrizzlyByteMessageTest.java | 6 +- .../GrizzlyCloseCodeReasonMsgTest.java | 6 +- .../websocket/GrizzlyRedirectTest.java | 6 +- .../websocket/GrizzlyTextMessageTest.java | 6 +- providers/netty-4/pom.xml | 2 +- .../providers/netty_4/BodyChunkedInput.java | 2 +- .../providers/netty_4/BodyFileRegion.java | 2 +- .../netty_4/FeedableBodyGenerator.java | 4 +- .../netty_4/NettyAsyncHttpProvider.java | 80 +++++------ .../netty_4/NettyAsyncHttpProviderConfig.java | 6 +- .../netty_4/NettyConnectListener.java | 10 +- .../netty_4/NettyConnectionsPool.java | 4 +- .../providers/netty_4/NettyResponse.java | 14 +- .../netty_4/NettyResponseFuture.java | 10 +- .../providers/netty_4/NettyWebSocket.java | 10 +- .../providers/netty_4/ResponseBodyPart.java | 4 +- .../providers/netty_4/ResponseHeaders.java | 8 +- .../providers/netty_4/ResponseStatus.java | 4 +- .../providers/netty_4/WebSocketUtil.java | 2 +- .../netty_4/spnego/SpnegoEngine.java | 2 +- .../netty/NettyAsyncHttpProviderTest.java | 8 +- .../netty/NettyAsyncProviderBasicTest.java | 8 +- .../netty/NettyAsyncProviderPipelineTest.java | 12 +- .../netty/NettyAsyncResponseTest.java | 6 +- .../netty/NettyAsyncStreamHandlerTest.java | 6 +- .../netty/NettyAsyncStreamLifecycleTest.java | 6 +- .../providers/netty/NettyAuthTimeoutTest.java | 6 +- .../providers/netty/NettyBasicAuthTest.java | 6 +- .../providers/netty/NettyBasicHttpsTest.java | 6 +- .../providers/netty/NettyBodyChunkTest.java | 6 +- .../NettyBodyDeferringAsyncHandlerTest.java | 6 +- .../netty/NettyByteBufferCapacityTest.java | 6 +- .../providers/netty/NettyChunkingTest.java | 6 +- .../netty/NettyComplexClientTest.java | 6 +- .../netty/NettyConnectionPoolTest.java | 8 +- .../providers/netty/NettyDigestAuthTest.java | 6 +- .../providers/netty/NettyEmptyBodyTest.java | 6 +- .../netty/NettyErrorResponseTest.java | 6 +- .../netty/NettyExpect100ContinueTest.java | 6 +- .../netty/NettyFilePartLargeFileTest.java | 6 +- .../providers/netty/NettyFilterTest.java | 6 +- .../netty/NettyFollowingThreadTest.java | 6 +- .../providers/netty/NettyHead302Test.java | 6 +- .../netty/NettyHostnameVerifierTest.java | 6 +- .../netty/NettyHttpToHttpsRedirectTest.java | 6 +- .../netty/NettyIdleStateHandlerTest.java | 6 +- .../providers/netty/NettyInputStreamTest.java | 6 +- .../netty/NettyListenableFutureTest.java | 6 +- .../netty/NettyMaxConnectionsInThreads.java | 6 +- .../netty/NettyMaxTotalConnectionTest.java | 6 +- .../netty/NettyMultipartUploadTest.java | 6 +- .../netty/NettyMultipleHeaderTest.java | 6 +- .../netty/NettyNoNullResponseTest.java | 6 +- .../netty/NettyNonAsciiContentLengthTest.java | 6 +- .../netty/NettyParamEncodingTest.java | 6 +- .../netty/NettyPerRequestRelative302Test.java | 6 +- .../netty/NettyPerRequestTimeoutTest.java | 6 +- .../netty/NettyPostRedirectGetTest.java | 6 +- .../providers/netty/NettyPostWithQSTest.java | 6 +- .../providers/netty/NettyProviderUtil.java | 4 +- .../providers/netty/NettyProxyTest.java | 6 +- .../netty/NettyProxyTunnellingTest.java | 6 +- .../netty/NettyPutLargeFileTest.java | 6 +- .../netty/NettyQueryParametersTest.java | 6 +- .../providers/netty/NettyRC10KTest.java | 6 +- .../NettyRedirectConnectionUsageTest.java | 8 +- .../providers/netty/NettyRelative302Test.java | 6 +- .../providers/netty/NettyRemoteSiteTest.java | 6 +- .../NettyRequestThrottleTimeoutTest.java | 10 +- .../netty/NettyRetryRequestTest.java | 6 +- .../netty/NettySimpleAsyncHttpClientTest.java | 8 +- .../netty/NettyTransferListenerTest.java | 6 +- .../providers/netty/NettyWebDavBasicTest.java | 6 +- .../netty/NettyZeroCopyFileTest.java | 6 +- .../netty/RetryNonBlockingIssue.java | 13 +- .../netty/websocket/NettyByteMessageTest.java | 6 +- .../NettyCloseCodeReasonMsgTest.java | 6 +- .../netty/websocket/NettyRedirectTest.java | 6 +- .../netty/websocket/NettyTextMessageTest.java | 6 +- providers/netty/pom.xml | 2 +- .../providers/netty/BodyChunkedInput.java | 2 +- .../providers/netty/BodyFileRegion.java | 2 +- .../netty/FeedableBodyGenerator.java | 4 +- .../netty/NettyAsyncHttpProvider.java | 84 +++++------ .../netty/NettyAsyncHttpProviderConfig.java | 6 +- .../providers/netty/NettyConnectListener.java | 10 +- .../providers/netty/NettyConnectionsPool.java | 6 +- .../client/providers/netty/NettyResponse.java | 16 +-- .../providers/netty/NettyResponseFuture.java | 12 +- .../providers/netty/NettyWebSocket.java | 10 +- .../providers/netty/ResponseBodyPart.java | 4 +- .../providers/netty/ResponseHeaders.java | 8 +- .../providers/netty/ResponseStatus.java | 4 +- .../client/providers/netty/WebSocketUtil.java | 2 +- .../providers/netty/spnego/SpnegoEngine.java | 2 +- .../netty/NettyAsyncHttpProviderTest.java | 8 +- .../netty/NettyAsyncProviderBasicTest.java | 8 +- .../netty/NettyAsyncProviderPipelineTest.java | 12 +- .../netty/NettyAsyncResponseTest.java | 6 +- .../netty/NettyAsyncStreamHandlerTest.java | 6 +- .../netty/NettyAsyncStreamLifecycleTest.java | 6 +- .../providers/netty/NettyAuthTimeoutTest.java | 6 +- .../providers/netty/NettyBasicAuthTest.java | 6 +- .../providers/netty/NettyBasicHttpsTest.java | 6 +- .../providers/netty/NettyBodyChunkTest.java | 6 +- .../NettyBodyDeferringAsyncHandlerTest.java | 6 +- .../netty/NettyByteBufferCapacityTest.java | 6 +- .../providers/netty/NettyChunkingTest.java | 6 +- .../netty/NettyComplexClientTest.java | 6 +- .../netty/NettyConnectionPoolTest.java | 8 +- .../providers/netty/NettyDigestAuthTest.java | 6 +- .../providers/netty/NettyEmptyBodyTest.java | 6 +- .../netty/NettyErrorResponseTest.java | 6 +- .../netty/NettyExpect100ContinueTest.java | 6 +- .../netty/NettyFilePartLargeFileTest.java | 6 +- .../providers/netty/NettyFilterTest.java | 6 +- .../netty/NettyFollowingThreadTest.java | 6 +- .../providers/netty/NettyHead302Test.java | 6 +- .../netty/NettyHostnameVerifierTest.java | 6 +- .../netty/NettyHttpToHttpsRedirectTest.java | 6 +- .../netty/NettyIdleStateHandlerTest.java | 6 +- .../providers/netty/NettyInputStreamTest.java | 6 +- .../netty/NettyListenableFutureTest.java | 6 +- .../netty/NettyMaxConnectionsInThreads.java | 6 +- .../netty/NettyMaxTotalConnectionTest.java | 6 +- .../netty/NettyMultipartUploadTest.java | 6 +- .../netty/NettyMultipleHeaderTest.java | 6 +- .../netty/NettyNoNullResponseTest.java | 6 +- .../netty/NettyNonAsciiContentLengthTest.java | 6 +- .../netty/NettyParamEncodingTest.java | 6 +- .../netty/NettyPerRequestRelative302Test.java | 6 +- .../netty/NettyPerRequestTimeoutTest.java | 6 +- .../netty/NettyPostRedirectGetTest.java | 6 +- .../providers/netty/NettyPostWithQSTest.java | 6 +- .../providers/netty/NettyProviderUtil.java | 4 +- .../providers/netty/NettyProxyTest.java | 6 +- .../netty/NettyProxyTunnellingTest.java | 6 +- .../netty/NettyPutLargeFileTest.java | 6 +- .../netty/NettyQueryParametersTest.java | 6 +- .../providers/netty/NettyRC10KTest.java | 6 +- .../NettyRedirectConnectionUsageTest.java | 8 +- .../providers/netty/NettyRelative302Test.java | 6 +- .../providers/netty/NettyRemoteSiteTest.java | 6 +- .../NettyRequestThrottleTimeoutTest.java | 10 +- .../netty/NettyRetryRequestTest.java | 6 +- .../netty/NettySimpleAsyncHttpClientTest.java | 8 +- .../netty/NettyTransferListenerTest.java | 6 +- .../providers/netty/NettyWebDavBasicTest.java | 6 +- .../netty/NettyZeroCopyFileTest.java | 6 +- .../netty/RetryNonBlockingIssue.java | 13 +- .../netty/websocket/NettyByteMessageTest.java | 6 +- .../NettyCloseCodeReasonMsgTest.java | 6 +- .../netty/websocket/NettyRedirectTest.java | 6 +- .../netty/websocket/NettyTextMessageTest.java | 6 +- providers/pom.xml | 6 +- site/pom.xml | 4 +- 418 files changed, 1761 insertions(+), 1710 deletions(-) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncCompletionHandler.java (88%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncCompletionHandlerBase.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncHandler.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncHttpClient.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncHttpClientConfig.java (86%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncHttpClientConfigBean.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncHttpProvider.java (90%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/AsyncHttpProviderConfig.java (89%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/Body.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/BodyConsumer.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/BodyDeferringAsyncHandler.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/BodyGenerator.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ByteArrayPart.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ConnectionPoolKeyStrategy.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ConnectionsPool.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/Cookie.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/DefaultConnectionPoolStrategy.java (90%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/FilePart.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/FluentCaseInsensitiveStringsMap.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/FluentStringsMap.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/HttpContent.java (91%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/HttpResponseBodyPart.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/HttpResponseHeaders.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/HttpResponseStatus.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ListenableFuture.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/MaxRedirectException.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/Part.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ProgressAsyncHandler.java (83%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ProxyServer.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/RandomAccessBody.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/Realm.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/Request.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/RequestBuilder.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/RequestBuilderBase.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/Response.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ResumableBodyConsumer.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/SSLEngineFactory.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/SignatureCalculator.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/SimpleAsyncHttpClient.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/StringPart.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ThrowableHandler.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/UpgradeHandler.java (90%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/consumers/AppendableBodyConsumer.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/consumers/ByteBufferBodyConsumer.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/consumers/FileBodyConsumer.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/consumers/OutputStreamBodyConsumer.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/ResumableRandomAccessFileListener.java (88%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/ThrottleRequestFilter.java (87%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/filter/FilterContext.java (92%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/filter/FilterException.java (88%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/filter/IOExceptionFilter.java (85%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/filter/RequestFilter.java (89%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/filter/ResponseFilter.java (91%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/generators/ByteArrayBodyGenerator.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/generators/FileBodyGenerator.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/generators/InputStreamBodyGenerator.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/listenable/AbstractListenableFuture.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/listenable/ExecutionList.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/listener/TransferCompletionHandler.java (87%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/listener/TransferListener.java (94%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/ByteArrayPartSource.java (97%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/FilePart.java (99%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/FilePartSource.java (98%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/FilePartStallHandler.java (97%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/FileUploadStalledException.java (95%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/MultipartBody.java (92%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/MultipartEncodingUtil.java (98%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/MultipartRequestEntity.java (96%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/Part.java (99%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/PartBase.java (98%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/PartSource.java (97%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/RequestEntity.java (98%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/multipart/StringPart.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ntlm/NTLMEngine.java (99%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/ntlm/NTLMEngineException.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/oauth/ConsumerKey.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/oauth/OAuthSignatureCalculator.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/oauth/RequestToken.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/oauth/ThreadSafeHMAC.java (93%) rename api/src/main/java/{com/ning => org/asynchttpclient}/org/jboss/netty/handler/codec/http/CookieDecoder.java (98%) rename api/src/main/java/{com/ning => org/asynchttpclient}/org/jboss/netty/handler/codec/http/CookieHeaderNames.java (96%) rename api/src/main/java/{com/ning => org/asynchttpclient}/org/jboss/netty/util/internal/StringUtil.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/ResponseBase.java (89%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/JDKAsyncHttpProvider.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/JDKAsyncHttpProviderConfig.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/JDKDelegateFuture.java (93%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/JDKFuture.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/JDKResponse.java (82%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/ResponseBodyPart.java (94%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/ResponseHeaders.java (86%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/jdk/ResponseStatus.java (93%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/resumable/PropertiesBasedResumableProcessor.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/resumable/ResumableAsyncHandler.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/resumable/ResumableIOExceptionFilter.java (73%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/resumable/ResumableListener.java (97%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/simple/HeaderMap.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/simple/SimpleAHCTransferListener.java (93%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/AllowAllHostnameVerifier.java (96%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/AsyncHttpProviderUtils.java (94%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/AuthenticatorUtils.java (94%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/Base64.java (99%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/DateUtil.java (99%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/MiscUtil.java (97%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/ProxyUtils.java (94%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/SslUtils.java (99%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/UTF8Codec.java (98%) rename api/src/main/java/{com/ning/http => org/asynchttpclient}/util/UTF8UrlEncoder.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/webdav/WebDavCompletionHandlerBase.java (93%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/webdav/WebDavResponse.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/DefaultWebSocketListener.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocket.java (98%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketByteListener.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketCloseCodeReasonListener.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketListener.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketPingListener.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketPongListener.java (95%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketTextListener.java (96%) rename api/src/main/java/{com/ning/http/client => org/asynchttpclient}/websocket/WebSocketUpgradeHandler.java (95%) rename api/src/main/resources/{com/ning/http/client => org/asynchttpclient}/version.properties (100%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/RealmTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/AbstractBasicTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/AsyncProvidersBasicTest.java (98%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/AsyncStreamHandlerTest.java (98%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/AsyncStreamLifecycleTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/AuthTimeoutTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/BasicAuthTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/BasicHttpsTest.java (98%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/BodyChunkTest.java (88%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/BodyDeferringAsyncHandlerTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ByteBufferCapacityTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ChunkingTest.java (93%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ComplexClientTest.java (94%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ConnectionPoolTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/DigestAuthTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/EmptyBodyTest.java (94%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ErrorResponseTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/Expect100ContinueTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/FilePartLargeFileTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/FilterTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/FluentCaseInsensitiveStringsMapTest.java (99%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/FluentStringsMapTest.java (99%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/FollowingThreadTest.java (92%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/Head302Test.java (92%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/HostnameVerifierTest.java (98%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/HttpToHttpsRedirectTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/IdleStateHandlerTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/InputStreamTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ListenableFutureTest.java (92%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/MaxConnectionsInThreads.java (98%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/MaxTotalConnectionTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/MultipartUploadTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/MultipleHeaderTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/NoNullResponseTest.java (93%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/NonAsciiContentLengthTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ParamEncodingTest.java (94%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/PerRequestRelative302Test.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/PerRequestTimeoutTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/PostRedirectGetTest.java (94%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/PostWithQSTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ProxyTest.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ProxyTunnellingTest.java (94%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/PutLargeFileTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/QueryParametersTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/RC10KTest.java (94%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/RedirectConnectionUsageTest.java (93%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/Relative302Test.java (97%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/RemoteSiteTest.java (93%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/RequestBuilderTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/RetryRequestTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/SimpleAsyncClientErrorBehaviourTest.java (90%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/SimpleAsyncHttpClientTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/TransferListenerTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/WebDavBasicTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/async/ZeroCopyFileTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/generators/ByteArrayBodyGeneratorTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/oauth/TestSignatureCalculator.java (88%) rename api/src/test/java/{com/ning => org/asynchttpclient}/org/jboss/netty/handler/codec/http/CookieDecoderTest.java (87%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/resumable/MapResumableProcessor.java (82%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/resumable/PropertiesBasedResumableProcesserTest.java (92%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/resumable/ResumableAsyncHandlerTest.java (90%) rename api/src/test/java/{com/ning/http => org/asynchttpclient}/util/AsyncHttpProviderUtilsTest.java (92%) rename api/src/test/java/{com/ning/http => org/asynchttpclient}/util/ProxyUtilsTest.java (91%) rename api/src/test/java/{com/ning/http => org/asynchttpclient}/util/TestUTF8UrlCodec.java (92%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/websocket/AbstractBasicTest.java (96%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/websocket/ByteMessageTest.java (95%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/websocket/CloseCodeReasonMessageTest.java (87%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/websocket/RedirectTest.java (91%) rename api/src/test/java/{com/ning/http/client => org/asynchttpclient}/websocket/TextMessageTest.java (88%) diff --git a/api/pom.xml b/api/pom.xml index 4dc580e702..baa90e8234 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-project 2.0.0-SNAPSHOT diff --git a/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java similarity index 88% rename from api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java rename to api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java index ebc171d07c..b8e8d70889 100644 --- a/api/src/main/java/com/ning/http/client/AsyncCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -22,7 +22,7 @@ /** * An {@link AsyncHandler} augmented with an {@link #onCompleted(Response)} convenience method which gets called * when the {@link Response} processing is finished. This class also implement the {@link ProgressAsyncHandler} callback, - * all doing nothing except returning {@link com.ning.http.client.AsyncHandler.STATE#CONTINUE} + * all doing nothing except returning {@link org.asynchttpclient.AsyncHandler.STATE#CONTINUE} * * @param Type of the value that will be returned by the associated {@link java.util.concurrent.Future} */ @@ -86,7 +86,7 @@ public void onThrowable(Throwable t) { * Invoked when the content (a {@link java.io.File}, {@link String} or {@link java.io.FileInputStream} has been fully * written on the I/O socket. * - * @return a {@link com.ning.http.client.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. + * @return a {@link org.asynchttpclient.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. */ public STATE onHeaderWriteCompleted() { return STATE.CONTINUE; @@ -96,7 +96,7 @@ public STATE onHeaderWriteCompleted() { * Invoked when the content (a {@link java.io.File}, {@link String} or {@link java.io.FileInputStream} has been fully * written on the I/O socket. * - * @return a {@link com.ning.http.client.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. + * @return a {@link org.asynchttpclient.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. */ public STATE onContentWriteCompleted() { return STATE.CONTINUE; @@ -108,7 +108,7 @@ public STATE onContentWriteCompleted() { * @param amount The amount of bytes to transfer. * @param current The amount of bytes transferred * @param total The total number of bytes transferred - * @return a {@link com.ning.http.client.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. + * @return a {@link org.asynchttpclient.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. */ public STATE onContentWriteProgress(long amount, long current, long total) { return STATE.CONTINUE; diff --git a/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java similarity index 97% rename from api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java rename to api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java index 434d086e70..c98ee94507 100644 --- a/api/src/main/java/com/ning/http/client/AsyncCompletionHandlerBase.java +++ b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/api/src/main/java/com/ning/http/client/AsyncHandler.java b/api/src/main/java/org/asynchttpclient/AsyncHandler.java similarity index 99% rename from api/src/main/java/com/ning/http/client/AsyncHandler.java rename to api/src/main/java/org/asynchttpclient/AsyncHandler.java index 02b62e1707..3e6631a7ae 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHandler.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; /** * An asynchronous handler or callback which gets invoked as soon as some data is available when diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java similarity index 94% rename from api/src/main/java/com/ning/http/client/AsyncHttpClient.java rename to api/src/main/java/org/asynchttpclient/AsyncHttpClient.java index d4d4e3157a..73f51bd402 100755 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -14,13 +14,13 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.Request.EntityWriter; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.RequestFilter; -import com.ning.http.client.resumable.ResumableAsyncHandler; +import org.asynchttpclient.Request.EntityWriter; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.RequestFilter; +import org.asynchttpclient.resumable.ResumableAsyncHandler; import java.io.Closeable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,7 +42,7 @@ * * The code above will block until the response is fully received. To execute asynchronous HTTP request, you - * create an {@link AsyncHandler} or its abstract implementation, {@link com.ning.http.client.AsyncCompletionHandler} + * create an {@link AsyncHandler} or its abstract implementation, {@link AsyncCompletionHandler} *

*

  *       AsyncHttpClient c = new AsyncHttpClient();
@@ -75,7 +75,7 @@
  *      });
  *      Integer statusCode = f.get();
  * 
* You can also have more control about the how the response is asynchronously processed by using a {@link AsyncHandler} @@ -145,10 +145,10 @@ public class AsyncHttpClient implements Closeable { * provider is explicitly specified by the developer. */ private static final String[] DEFAULT_PROVIDERS = { - "com.ning.http.client.providers.netty.NettyAsyncHttpProvider", - "com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider", - "com.ning.http.client.providers.apache.ApacheAsyncHttpProvider", - "com.ning.http.client.providers.jdk.JDKAsyncHttpProvider" + "org.asynchttpclient.providers.netty.NettyAsyncHttpProvider", + "org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider", + "org.asynchttpclient.providers.apache.ApacheAsyncHttpProvider", + "org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider" }; private final AsyncHttpProvider httpProvider; @@ -175,7 +175,7 @@ public class AsyncHttpClient implements Closeable { * * * If none of those providers are found, then the runtime will default to - * the {@link com.ning.http.client.providers.jdk.JDKAsyncHttpProvider}. + * the {@link org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider}. */ public AsyncHttpClient() { this(new AsyncHttpClientConfig.Builder().build()); @@ -204,7 +204,7 @@ public AsyncHttpClient(AsyncHttpProvider provider) { * * * If none of those providers are found, then the runtime will default to - * the {@link com.ning.http.client.providers.jdk.JDKAsyncHttpProvider}. + * the {@link org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider}. * * @param config a {@link AsyncHttpClientConfig} */ @@ -317,12 +317,12 @@ public BoundRequestBuilder setBody(byte[] data) throws IllegalArgumentException } @Override - public BoundRequestBuilder setBody(EntityWriter dataWriter, long length) throws IllegalArgumentException { + public BoundRequestBuilder setBody(Request.EntityWriter dataWriter, long length) throws IllegalArgumentException { return super.setBody(dataWriter, length); } @Override - public BoundRequestBuilder setBody(EntityWriter dataWriter) { + public BoundRequestBuilder setBody(Request.EntityWriter dataWriter) { return super.setBody(dataWriter); } @@ -380,9 +380,9 @@ public BoundRequestBuilder setSignatureCalculator(SignatureCalculator signatureC /** - * Return the asynchronous {@link com.ning.http.client.AsyncHttpProvider} + * Return the asynchronous {@link AsyncHttpProvider} * - * @return an {@link com.ning.http.client.AsyncHttpProvider} + * @return an {@link AsyncHttpProvider} */ @SuppressWarnings("UnusedDeclaration") public AsyncHttpProvider getProvider() { @@ -433,9 +433,9 @@ public boolean isClosed() { } /** - * Return the {@link com.ning.http.client.AsyncHttpClientConfig} + * Return the {@link AsyncHttpClientConfig} * - * @return {@link com.ning.http.client.AsyncHttpClientConfig} + * @return {@link AsyncHttpClientConfig} */ @SuppressWarnings("UnusedDeclaration") public AsyncHttpClientConfig getConfig() { diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java similarity index 86% rename from api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java rename to api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index abd80b8cb2..59f4eb8ecd 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.filter.IOExceptionFilter; -import com.ning.http.client.filter.RequestFilter; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.util.AllowAllHostnameVerifier; -import com.ning.http.util.ProxyUtils; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.RequestFilter; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.util.AllowAllHostnameVerifier; +import org.asynchttpclient.util.ProxyUtils; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; @@ -40,17 +40,17 @@ * Configuration class to use with a {@link AsyncHttpClient}. System property can be also used to configure this * object default behavior by doing: *

- * -Dcom.ning.http.client.AsyncHttpClientConfig.nameOfTheProperty + * -Dorg.asynchttpclient.AsyncHttpClientConfig.nameOfTheProperty * ex: *

- * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultMaxTotalConnections - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultMaxTotalConnections - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultMaxConnectionsPerHost - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultConnectionTimeoutInMS - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultIdleConnectionInPoolTimeoutInMS - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultRequestTimeoutInMS - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultRedirectsEnabled - * -Dcom.ning.http.client.AsyncHttpClientConfig.defaultMaxRedirects + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultMaxTotalConnections + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultMaxTotalConnections + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultMaxConnectionsPerHost + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultConnectionTimeoutInMS + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultIdleConnectionInPoolTimeoutInMS + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultRequestTimeoutInMS + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultRedirectsEnabled + * -Dorg.asynchttpclient.AsyncHttpClientConfig.defaultMaxRedirects */ public class AsyncHttpClientConfig { @@ -206,54 +206,54 @@ public ScheduledExecutorService reaper() { } /** - * Return the maximum number of connections an {@link com.ning.http.client.AsyncHttpClient} can handle. + * Return the maximum number of connections an {@link AsyncHttpClient} can handle. * - * @return the maximum number of connections an {@link com.ning.http.client.AsyncHttpClient} can handle. + * @return the maximum number of connections an {@link AsyncHttpClient} can handle. */ public int getMaxTotalConnections() { return maxTotalConnections; } /** - * Return the maximum number of connections per hosts an {@link com.ning.http.client.AsyncHttpClient} can handle. + * Return the maximum number of connections per hosts an {@link AsyncHttpClient} can handle. * - * @return the maximum number of connections per host an {@link com.ning.http.client.AsyncHttpClient} can handle. + * @return the maximum number of connections per host an {@link AsyncHttpClient} can handle. */ public int getMaxConnectionPerHost() { return maxConnectionPerHost; } /** - * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can wait when connecting to a remote host + * Return the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host * - * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can wait when connecting to a remote host + * @return the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host */ public int getConnectionTimeoutInMs() { return connectionTimeOutInMs; } /** - * Return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} may be idle before being timed out. - * @return the maximum time, in milliseconds, a {@link com.ning.http.client.websocket.WebSocket} may be idle before being timed out. + * Return the maximum time, in milliseconds, a {@link org.asynchttpclient.websocket.WebSocket} may be idle before being timed out. + * @return the maximum time, in milliseconds, a {@link org.asynchttpclient.websocket.WebSocket} may be idle before being timed out. */ public int getWebSocketIdleTimeoutInMs() { return webSocketIdleTimeoutInMs; } /** - * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. + * Return the maximum time in millisecond an {@link AsyncHttpClient} can stay idle. * - * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. + * @return the maximum time in millisecond an {@link AsyncHttpClient} can stay idle. */ public int getIdleConnectionTimeoutInMs() { return idleConnectionTimeoutInMs; } /** - * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection + * Return the maximum time in millisecond an {@link AsyncHttpClient} will keep connection * in pool. * - * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection + * @return the maximum time in millisecond an {@link AsyncHttpClient} will keep connection * in pool. */ public int getIdleConnectionInPoolTimeoutInMs() { @@ -261,9 +261,9 @@ public int getIdleConnectionInPoolTimeoutInMs() { } /** - * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} wait for a response + * Return the maximum time in millisecond an {@link AsyncHttpClient} wait for a response * - * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} wait for a response + * @return the maximum time in millisecond an {@link AsyncHttpClient} wait for a response */ public int getRequestTimeoutInMs() { return requestTimeoutInMs; @@ -336,9 +336,9 @@ public ExecutorService executorService() { } /** - * An instance of {@link com.ning.http.client.ProxyServer} used by an {@link AsyncHttpClient} + * An instance of {@link ProxyServer} used by an {@link AsyncHttpClient} * - * @return instance of {@link com.ning.http.client.ProxyServer} + * @return instance of {@link ProxyServer} */ public ProxyServer getProxyServer() { return proxyServer; @@ -385,9 +385,9 @@ public SSLEngine newSSLEngine() { } /** - * Return the {@link com.ning.http.client.AsyncHttpProviderConfig} + * Return the {@link AsyncHttpProviderConfig} * - * @return the {@link com.ning.http.client.AsyncHttpProviderConfig} + * @return the {@link AsyncHttpProviderConfig} */ public AsyncHttpProviderConfig getAsyncHttpProviderConfig() { return providerConfig; @@ -547,9 +547,9 @@ public boolean isUseRelativeURIsWithSSLProxies() { } /** - * Return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. + * Return the maximum time in millisecond an {@link AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. * - * @return the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. + * @return the maximum time in millisecond an {@link AsyncHttpClient} will keep connection in the pool, or -1 to keep connection while possible. */ public int getMaxConnectionLifeTimeInMs() { return maxConnectionLifeTimeInMs; @@ -613,9 +613,9 @@ public Builder() { } /** - * Set the maximum number of connections an {@link com.ning.http.client.AsyncHttpClient} can handle. + * Set the maximum number of connections an {@link AsyncHttpClient} can handle. * - * @param defaultMaxTotalConnections the maximum number of connections an {@link com.ning.http.client.AsyncHttpClient} can handle. + * @param defaultMaxTotalConnections the maximum number of connections an {@link AsyncHttpClient} can handle. * @return a {@link Builder} */ public Builder setMaximumConnectionsTotal(int defaultMaxTotalConnections) { @@ -624,9 +624,9 @@ public Builder setMaximumConnectionsTotal(int defaultMaxTotalConnections) { } /** - * Set the maximum number of connections per hosts an {@link com.ning.http.client.AsyncHttpClient} can handle. + * Set the maximum number of connections per hosts an {@link AsyncHttpClient} can handle. * - * @param defaultMaxConnectionPerHost the maximum number of connections per host an {@link com.ning.http.client.AsyncHttpClient} can handle. + * @param defaultMaxConnectionPerHost the maximum number of connections per host an {@link AsyncHttpClient} can handle. * @return a {@link Builder} */ public Builder setMaximumConnectionsPerHost(int defaultMaxConnectionPerHost) { @@ -635,9 +635,9 @@ public Builder setMaximumConnectionsPerHost(int defaultMaxConnectionPerHost) { } /** - * Set the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can wait when connecting to a remote host + * Set the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host * - * @param defaultConnectionTimeOutInMs the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can wait when connecting to a remote host + * @param defaultConnectionTimeOutInMs the maximum time in millisecond an {@link AsyncHttpClient} can wait when connecting to a remote host * @return a {@link Builder} */ public Builder setConnectionTimeoutInMs(int defaultConnectionTimeOutInMs) { @@ -646,10 +646,10 @@ public Builder setConnectionTimeoutInMs(int defaultConnectionTimeOutInMs) { } /** - * Set the maximum time in millisecond an {@link com.ning.http.client.websocket.WebSocket} can stay idle. + * Set the maximum time in millisecond an {@link org.asynchttpclient.websocket.WebSocket} can stay idle. * * @param defaultWebSocketIdleTimeoutInMs - * the maximum time in millisecond an {@link com.ning.http.client.websocket.WebSocket} can stay idle. + * the maximum time in millisecond an {@link org.asynchttpclient.websocket.WebSocket} can stay idle. * @return a {@link Builder} */ public Builder setWebSocketIdleTimeoutInMs(int defaultWebSocketIdleTimeoutInMs) { @@ -658,10 +658,10 @@ public Builder setWebSocketIdleTimeoutInMs(int defaultWebSocketIdleTimeoutInMs) } /** - * Set the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. + * Set the maximum time in millisecond an {@link AsyncHttpClient} can stay idle. * * @param defaultIdleConnectionTimeoutInMs - * the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} can stay idle. + * the maximum time in millisecond an {@link AsyncHttpClient} can stay idle. * @return a {@link Builder} */ public Builder setIdleConnectionTimeoutInMs(int defaultIdleConnectionTimeoutInMs) { @@ -670,11 +670,11 @@ public Builder setIdleConnectionTimeoutInMs(int defaultIdleConnectionTimeoutInMs } /** - * Set the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection + * Set the maximum time in millisecond an {@link AsyncHttpClient} will keep connection * idle in pool. * * @param defaultIdleConnectionInPoolTimeoutInMs - * the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} will keep connection + * the maximum time in millisecond an {@link AsyncHttpClient} will keep connection * idle in pool. * @return a {@link Builder} */ @@ -684,9 +684,9 @@ public Builder setIdleConnectionInPoolTimeoutInMs(int defaultIdleConnectionInPoo } /** - * Set the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} wait for a response + * Set the maximum time in millisecond an {@link AsyncHttpClient} wait for a response * - * @param defaultRequestTimeoutInMs the maximum time in millisecond an {@link com.ning.http.client.AsyncHttpClient} wait for a response + * @param defaultRequestTimeoutInMs the maximum time in millisecond an {@link AsyncHttpClient} wait for a response * @return a {@link Builder} */ public Builder setRequestTimeoutInMs(int defaultRequestTimeoutInMs) { @@ -754,7 +754,7 @@ public Builder setAllowPoolingConnection(boolean allowPoolingConnection) { * * @param allowPoolingConnection true if connection can be pooled by a {@link ConnectionsPool} * @return a {@link Builder} - * @deprecated - Use {@link com.ning.http.client.AsyncHttpClientConfig.Builder#setAllowPoolingConnection(boolean)} + * @deprecated - Use {@link AsyncHttpClientConfig.Builder#setAllowPoolingConnection(boolean)} */ public Builder setKeepAlive(boolean allowPoolingConnection) { this.allowPoolingConnection = allowPoolingConnection; @@ -788,9 +788,9 @@ public Builder setExecutorService(ExecutorService applicationThreadPool) { } /** - * Set an instance of {@link com.ning.http.client.ProxyServer} used by an {@link AsyncHttpClient} + * Set an instance of {@link ProxyServer} used by an {@link AsyncHttpClient} * - * @param proxyServer instance of {@link com.ning.http.client.ProxyServer} + * @param proxyServer instance of {@link ProxyServer} * @return a {@link Builder} */ public Builder setProxyServer(ProxyServer proxyServer) { @@ -828,9 +828,9 @@ public SSLEngine newSSLEngine() throws GeneralSecurityException { } /** - * Set the {@link com.ning.http.client.AsyncHttpProviderConfig} + * Set the {@link AsyncHttpProviderConfig} * - * @param providerConfig the {@link com.ning.http.client.AsyncHttpProviderConfig} + * @param providerConfig the {@link AsyncHttpProviderConfig} * @return a {@link Builder} */ public Builder setAsyncHttpClientProviderConfig(AsyncHttpProviderConfig providerConfig) { @@ -861,9 +861,9 @@ public Builder setRealm(Realm realm) { } /** - * Add an {@link com.ning.http.client.filter.RequestFilter} that will be invoked before {@link com.ning.http.client.AsyncHttpClient#executeRequest(Request)} + * Add an {@link org.asynchttpclient.filter.RequestFilter} that will be invoked before {@link AsyncHttpClient#executeRequest(Request)} * - * @param requestFilter {@link com.ning.http.client.filter.RequestFilter} + * @param requestFilter {@link org.asynchttpclient.filter.RequestFilter} * @return this */ public Builder addRequestFilter(RequestFilter requestFilter) { @@ -872,9 +872,9 @@ public Builder addRequestFilter(RequestFilter requestFilter) { } /** - * Remove an {@link com.ning.http.client.filter.RequestFilter} that will be invoked before {@link com.ning.http.client.AsyncHttpClient#executeRequest(Request)} + * Remove an {@link org.asynchttpclient.filter.RequestFilter} that will be invoked before {@link AsyncHttpClient#executeRequest(Request)} * - * @param requestFilter {@link com.ning.http.client.filter.RequestFilter} + * @param requestFilter {@link org.asynchttpclient.filter.RequestFilter} * @return this */ public Builder removeRequestFilter(RequestFilter requestFilter) { @@ -883,10 +883,10 @@ public Builder removeRequestFilter(RequestFilter requestFilter) { } /** - * Add an {@link com.ning.http.client.filter.ResponseFilter} that will be invoked as soon as the response is + * Add an {@link org.asynchttpclient.filter.ResponseFilter} that will be invoked as soon as the response is * received, and before {@link AsyncHandler#onStatusReceived(HttpResponseStatus)}. * - * @param responseFilter an {@link com.ning.http.client.filter.ResponseFilter} + * @param responseFilter an {@link org.asynchttpclient.filter.ResponseFilter} * @return this */ public Builder addResponseFilter(ResponseFilter responseFilter) { @@ -895,10 +895,10 @@ public Builder addResponseFilter(ResponseFilter responseFilter) { } /** - * Remove an {@link com.ning.http.client.filter.ResponseFilter} that will be invoked as soon as the response is + * Remove an {@link org.asynchttpclient.filter.ResponseFilter} that will be invoked as soon as the response is * received, and before {@link AsyncHandler#onStatusReceived(HttpResponseStatus)}. * - * @param responseFilter an {@link com.ning.http.client.filter.ResponseFilter} + * @param responseFilter an {@link org.asynchttpclient.filter.ResponseFilter} * @return this */ public Builder removeResponseFilter(ResponseFilter responseFilter) { @@ -907,10 +907,10 @@ public Builder removeResponseFilter(ResponseFilter responseFilter) { } /** - * Add an {@link com.ning.http.client.filter.IOExceptionFilter} that will be invoked when an {@link java.io.IOException} + * Add an {@link org.asynchttpclient.filter.IOExceptionFilter} that will be invoked when an {@link java.io.IOException} * occurs during the download/upload operations. * - * @param ioExceptionFilter an {@link com.ning.http.client.filter.ResponseFilter} + * @param ioExceptionFilter an {@link org.asynchttpclient.filter.ResponseFilter} * @return this */ public Builder addIOExceptionFilter(IOExceptionFilter ioExceptionFilter) { @@ -919,10 +919,10 @@ public Builder addIOExceptionFilter(IOExceptionFilter ioExceptionFilter) { } /** - * Remove an {@link com.ning.http.client.filter.IOExceptionFilter} tthat will be invoked when an {@link java.io.IOException} + * Remove an {@link org.asynchttpclient.filter.IOExceptionFilter} tthat will be invoked when an {@link java.io.IOException} * occurs during the download/upload operations. * - * @param ioExceptionFilter an {@link com.ning.http.client.filter.ResponseFilter} + * @param ioExceptionFilter an {@link org.asynchttpclient.filter.ResponseFilter} * @return this */ public Builder removeIOExceptionFilter(IOExceptionFilter ioExceptionFilter) { diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java similarity index 97% rename from api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java rename to api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java index 0aaf123614..4e48491b34 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpClientConfigBean.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.filter.IOExceptionFilter; -import com.ning.http.client.filter.RequestFilter; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.util.ProxyUtils; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.RequestFilter; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.util.ProxyUtils; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java similarity index 90% rename from api/src/main/java/com/ning/http/client/AsyncHttpProvider.java rename to api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java index c8015572cb..da96a0497e 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.Closeable; import java.io.IOException; @@ -21,7 +21,8 @@ /** * Interface to be used when implementing custom asynchronous I/O HTTP client. - * By default, the {@link com.ning.http.client.providers.netty.NettyAsyncHttpProvider} is used. + * By default, the {@link org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider} is used if + * none of the other provider modules are found on the classpath. */ public interface AsyncHttpProvider extends Closeable { diff --git a/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpProviderConfig.java similarity index 89% rename from api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java rename to api/src/main/java/org/asynchttpclient/AsyncHttpProviderConfig.java index f006bc32c6..48b9cd565a 100644 --- a/api/src/main/java/com/ning/http/client/AsyncHttpProviderConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpProviderConfig.java @@ -10,20 +10,20 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; import java.util.Map; import java.util.Set; /** - * {@link com.ning.http.client.AsyncHttpProvider} proprietary configurable properties. Note that properties are + * {@link AsyncHttpProvider} proprietary configurable properties. Note that properties are * AsyncHttpProvider dependent, so make sure you consult the AsyncHttpProvider's documentation * about what is supported and what's not. */ public interface AsyncHttpProviderConfig { /** - * Add a property that will be used when the AsyncHttpClient initialize its {@link com.ning.http.client.AsyncHttpProvider} + * Add a property that will be used when the AsyncHttpClient initialize its {@link AsyncHttpProvider} * * @param name the name of the property * @param value the value of the property diff --git a/api/src/main/java/com/ning/http/client/Body.java b/api/src/main/java/org/asynchttpclient/Body.java similarity index 98% rename from api/src/main/java/com/ning/http/client/Body.java rename to api/src/main/java/org/asynchttpclient/Body.java index 61a2ef9e9d..dacf0642d4 100644 --- a/api/src/main/java/com/ning/http/client/Body.java +++ b/api/src/main/java/org/asynchttpclient/Body.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.Closeable; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/BodyConsumer.java b/api/src/main/java/org/asynchttpclient/BodyConsumer.java similarity index 97% rename from api/src/main/java/com/ning/http/client/BodyConsumer.java rename to api/src/main/java/org/asynchttpclient/BodyConsumer.java index ae72ff3deb..ccebd5e8b0 100644 --- a/api/src/main/java/com/ning/http/client/BodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/BodyConsumer.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.Closeable; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java b/api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java similarity index 98% rename from api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java rename to api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java index 3171d78aab..1bf49bbb03 100644 --- a/api/src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.Response.ResponseBuilder; +import org.asynchttpclient.Response.ResponseBuilder; import java.io.FilterInputStream; import java.io.IOException; @@ -74,7 +74,8 @@ * */ public class BodyDeferringAsyncHandler implements AsyncHandler { - private final ResponseBuilder responseBuilder = new ResponseBuilder(); + private final Response.ResponseBuilder + responseBuilder = new Response.ResponseBuilder(); private final CountDownLatch headersArrived = new CountDownLatch(1); diff --git a/api/src/main/java/com/ning/http/client/BodyGenerator.java b/api/src/main/java/org/asynchttpclient/BodyGenerator.java similarity index 97% rename from api/src/main/java/com/ning/http/client/BodyGenerator.java rename to api/src/main/java/org/asynchttpclient/BodyGenerator.java index 35fe386282..804d28f96e 100644 --- a/api/src/main/java/com/ning/http/client/BodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/BodyGenerator.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/ByteArrayPart.java b/api/src/main/java/org/asynchttpclient/ByteArrayPart.java similarity index 97% rename from api/src/main/java/com/ning/http/client/ByteArrayPart.java rename to api/src/main/java/org/asynchttpclient/ByteArrayPart.java index 3d7c73186c..87311f0f1b 100644 --- a/api/src/main/java/com/ning/http/client/ByteArrayPart.java +++ b/api/src/main/java/org/asynchttpclient/ByteArrayPart.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; public class ByteArrayPart implements Part { private String name; diff --git a/api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java b/api/src/main/java/org/asynchttpclient/ConnectionPoolKeyStrategy.java similarity index 95% rename from api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java rename to api/src/main/java/org/asynchttpclient/ConnectionPoolKeyStrategy.java index 3beb10d3ec..49603dabe4 100644 --- a/api/src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java +++ b/api/src/main/java/org/asynchttpclient/ConnectionPoolKeyStrategy.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.net.URI; diff --git a/api/src/main/java/com/ning/http/client/ConnectionsPool.java b/api/src/main/java/org/asynchttpclient/ConnectionsPool.java similarity index 98% rename from api/src/main/java/com/ning/http/client/ConnectionsPool.java rename to api/src/main/java/org/asynchttpclient/ConnectionsPool.java index 1feb843d8b..c76c855b79 100644 --- a/api/src/main/java/com/ning/http/client/ConnectionsPool.java +++ b/api/src/main/java/org/asynchttpclient/ConnectionsPool.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; /** * An interface used by an {@link AsyncHttpProvider} for caching http connections. diff --git a/api/src/main/java/com/ning/http/client/Cookie.java b/api/src/main/java/org/asynchttpclient/Cookie.java similarity index 99% rename from api/src/main/java/com/ning/http/client/Cookie.java rename to api/src/main/java/org/asynchttpclient/Cookie.java index c1ed9b1df0..a38311f9d3 100644 --- a/api/src/main/java/com/ning/http/client/Cookie.java +++ b/api/src/main/java/org/asynchttpclient/Cookie.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.util.Collections; import java.util.Set; diff --git a/api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java b/api/src/main/java/org/asynchttpclient/DefaultConnectionPoolStrategy.java similarity index 90% rename from api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java rename to api/src/main/java/org/asynchttpclient/DefaultConnectionPoolStrategy.java index c56f656123..b312155c4f 100644 --- a/api/src/main/java/com/ning/http/client/DefaultConnectionPoolStrategy.java +++ b/api/src/main/java/org/asynchttpclient/DefaultConnectionPoolStrategy.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.net.URI; -import com.ning.http.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AsyncHttpProviderUtils; public enum DefaultConnectionPoolStrategy implements ConnectionPoolKeyStrategy { diff --git a/api/src/main/java/com/ning/http/client/FilePart.java b/api/src/main/java/org/asynchttpclient/FilePart.java similarity index 97% rename from api/src/main/java/com/ning/http/client/FilePart.java rename to api/src/main/java/org/asynchttpclient/FilePart.java index 714395a745..c5cc15860e 100644 --- a/api/src/main/java/com/ning/http/client/FilePart.java +++ b/api/src/main/java/org/asynchttpclient/FilePart.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.File; diff --git a/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java b/api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java similarity index 99% rename from api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java rename to api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java index b4afd7d8f8..5f8c54232d 100644 --- a/api/src/main/java/com/ning/http/client/FluentCaseInsensitiveStringsMap.java +++ b/api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java @@ -14,9 +14,9 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import java.util.ArrayList; import java.util.Arrays; diff --git a/api/src/main/java/com/ning/http/client/FluentStringsMap.java b/api/src/main/java/org/asynchttpclient/FluentStringsMap.java similarity index 99% rename from api/src/main/java/com/ning/http/client/FluentStringsMap.java rename to api/src/main/java/org/asynchttpclient/FluentStringsMap.java index 5c71428614..b54db29717 100644 --- a/api/src/main/java/com/ning/http/client/FluentStringsMap.java +++ b/api/src/main/java/org/asynchttpclient/FluentStringsMap.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.util.ArrayList; import java.util.Arrays; diff --git a/api/src/main/java/com/ning/http/client/HttpContent.java b/api/src/main/java/org/asynchttpclient/HttpContent.java similarity index 91% rename from api/src/main/java/com/ning/http/client/HttpContent.java rename to api/src/main/java/org/asynchttpclient/HttpContent.java index 334def9239..219e2411cc 100644 --- a/api/src/main/java/com/ning/http/client/HttpContent.java +++ b/api/src/main/java/org/asynchttpclient/HttpContent.java @@ -13,12 +13,12 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.net.URI; /** - * Base class for callback class used by {@link com.ning.http.client.AsyncHandler} + * Base class for callback class used by {@link AsyncHandler} */ public class HttpContent { protected final AsyncHttpProvider provider; diff --git a/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java similarity index 98% rename from api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java rename to api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java index 63e98cc59c..2a8655e2d0 100644 --- a/api/src/main/java/com/ning/http/client/HttpResponseBodyPart.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.IOException; import java.io.InputStream; diff --git a/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java b/api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java similarity index 98% rename from api/src/main/java/com/ning/http/client/HttpResponseHeaders.java rename to api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java index c3842cf122..54c894f712 100644 --- a/api/src/main/java/com/ning/http/client/HttpResponseHeaders.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.net.URI; diff --git a/api/src/main/java/com/ning/http/client/HttpResponseStatus.java b/api/src/main/java/org/asynchttpclient/HttpResponseStatus.java similarity index 98% rename from api/src/main/java/com/ning/http/client/HttpResponseStatus.java rename to api/src/main/java/org/asynchttpclient/HttpResponseStatus.java index f90b30c5a7..3581e46582 100644 --- a/api/src/main/java/com/ning/http/client/HttpResponseStatus.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseStatus.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.net.URI; diff --git a/api/src/main/java/com/ning/http/client/ListenableFuture.java b/api/src/main/java/org/asynchttpclient/ListenableFuture.java similarity index 99% rename from api/src/main/java/com/ning/http/client/ListenableFuture.java rename to api/src/main/java/org/asynchttpclient/ListenableFuture.java index 371c5540b2..f40012e76c 100755 --- a/api/src/main/java/com/ning/http/client/ListenableFuture.java +++ b/api/src/main/java/org/asynchttpclient/ListenableFuture.java @@ -28,7 +28,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import java.util.concurrent.Callable; import java.util.concurrent.Executor; diff --git a/api/src/main/java/com/ning/http/client/MaxRedirectException.java b/api/src/main/java/org/asynchttpclient/MaxRedirectException.java similarity index 97% rename from api/src/main/java/com/ning/http/client/MaxRedirectException.java rename to api/src/main/java/org/asynchttpclient/MaxRedirectException.java index bdffe02368..f39f70d900 100644 --- a/api/src/main/java/com/ning/http/client/MaxRedirectException.java +++ b/api/src/main/java/org/asynchttpclient/MaxRedirectException.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; /** * Thrown when the {@link AsyncHttpClientConfig#getMaxRedirects()} has been reached. diff --git a/api/src/main/java/com/ning/http/client/Part.java b/api/src/main/java/org/asynchttpclient/Part.java similarity index 96% rename from api/src/main/java/com/ning/http/client/Part.java rename to api/src/main/java/org/asynchttpclient/Part.java index 95e34eeca7..521cad838e 100644 --- a/api/src/main/java/com/ning/http/client/Part.java +++ b/api/src/main/java/org/asynchttpclient/Part.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; /** * Interface for the parts in a multipart request. diff --git a/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java b/api/src/main/java/org/asynchttpclient/ProgressAsyncHandler.java similarity index 83% rename from api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java rename to api/src/main/java/org/asynchttpclient/ProgressAsyncHandler.java index 3c0363d8f0..a562addc42 100644 --- a/api/src/main/java/com/ning/http/client/ProgressAsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/ProgressAsyncHandler.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; /** * An extended {@link AsyncHandler} with two extra callback who get invoked during the content upload to a remote server. @@ -22,7 +22,7 @@ public interface ProgressAsyncHandler extends AsyncHandler { * Invoked when the content (a {@link java.io.File}, {@link String} or {@link java.io.FileInputStream} has been fully * written on the I/O socket. * - * @return a {@link com.ning.http.client.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. + * @return a {@link AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. */ STATE onHeaderWriteCompleted(); @@ -30,7 +30,7 @@ public interface ProgressAsyncHandler extends AsyncHandler { * Invoked when the content (a {@link java.io.File}, {@link String} or {@link java.io.FileInputStream} has been fully * written on the I/O socket. * - * @return a {@link com.ning.http.client.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. + * @return a {@link AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. */ STATE onContentWriteCompleted(); @@ -41,7 +41,7 @@ public interface ProgressAsyncHandler extends AsyncHandler { * @param amount The amount of bytes to transfer. * @param current The amount of bytes transferred * @param total The total number of bytes transferred - * @return a {@link com.ning.http.client.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. + * @return a {@link AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. */ STATE onContentWriteProgress(long amount, long current, long total); diff --git a/api/src/main/java/com/ning/http/client/ProxyServer.java b/api/src/main/java/org/asynchttpclient/ProxyServer.java similarity index 97% rename from api/src/main/java/com/ning/http/client/ProxyServer.java rename to api/src/main/java/org/asynchttpclient/ProxyServer.java index 2bce583eba..d7d841c3fc 100644 --- a/api/src/main/java/com/ning/http/client/ProxyServer.java +++ b/api/src/main/java/org/asynchttpclient/ProxyServer.java @@ -14,14 +14,14 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.ning.http.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AsyncHttpProviderUtils; /** * Represents a proxy server. diff --git a/api/src/main/java/com/ning/http/client/RandomAccessBody.java b/api/src/main/java/org/asynchttpclient/RandomAccessBody.java similarity index 98% rename from api/src/main/java/com/ning/http/client/RandomAccessBody.java rename to api/src/main/java/org/asynchttpclient/RandomAccessBody.java index c4ee2f2332..95aa0fb1ae 100644 --- a/api/src/main/java/com/ning/http/client/RandomAccessBody.java +++ b/api/src/main/java/org/asynchttpclient/RandomAccessBody.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.IOException; import java.nio.channels.WritableByteChannel; diff --git a/api/src/main/java/com/ning/http/client/Realm.java b/api/src/main/java/org/asynchttpclient/Realm.java similarity index 99% rename from api/src/main/java/com/ning/http/client/Realm.java rename to api/src/main/java/org/asynchttpclient/Realm.java index af5ae68933..de213f74c0 100644 --- a/api/src/main/java/com/ning/http/client/Realm.java +++ b/api/src/main/java/org/asynchttpclient/Realm.java @@ -14,9 +14,9 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; diff --git a/api/src/main/java/com/ning/http/client/Request.java b/api/src/main/java/org/asynchttpclient/Request.java similarity index 99% rename from api/src/main/java/com/ning/http/client/Request.java rename to api/src/main/java/org/asynchttpclient/Request.java index d2106a95c2..056f93ee0d 100644 --- a/api/src/main/java/com/ning/http/client/Request.java +++ b/api/src/main/java/org/asynchttpclient/Request.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.File; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/RequestBuilder.java b/api/src/main/java/org/asynchttpclient/RequestBuilder.java similarity index 97% rename from api/src/main/java/com/ning/http/client/RequestBuilder.java rename to api/src/main/java/org/asynchttpclient/RequestBuilder.java index 7bf55ee1a5..4702419ac9 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilder.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilder.java @@ -13,9 +13,9 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.Request.EntityWriter; +import org.asynchttpclient.Request.EntityWriter; import java.io.InputStream; import java.util.Collection; @@ -105,7 +105,7 @@ public RequestBuilder setBody(EntityWriter dataWriter) { * @return a {@link RequestBuilder} * @throws IllegalArgumentException * @see #setBody(BodyGenerator) InputStreamBodyGenerator(inputStream) - * @see com.ning.http.client.generators.InputStreamBodyGenerator + * @see org.asynchttpclient.generators.InputStreamBodyGenerator * @deprecated {@link #setBody(BodyGenerator)} setBody(new InputStreamBodyGenerator(inputStream)) */ @Override diff --git a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java similarity index 98% rename from api/src/main/java/com/ning/http/client/RequestBuilderBase.java rename to api/src/main/java/org/asynchttpclient/RequestBuilderBase.java index 10f7d04658..2564543753 100644 --- a/api/src/main/java/com/ning/http/client/RequestBuilderBase.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; -import com.ning.http.client.Request.EntityWriter; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.http.util.UTF8UrlEncoder; +import org.asynchttpclient.Request.EntityWriter; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.UTF8UrlEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/api/src/main/java/com/ning/http/client/Response.java b/api/src/main/java/org/asynchttpclient/Response.java similarity index 94% rename from api/src/main/java/com/ning/http/client/Response.java rename to api/src/main/java/org/asynchttpclient/Response.java index 1151706345..3db376606d 100644 --- a/api/src/main/java/com/ning/http/client/Response.java +++ b/api/src/main/java/org/asynchttpclient/Response.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.IOException; import java.io.InputStream; @@ -26,7 +26,7 @@ import java.util.List; /** - * Represents the asynchronous HTTP response callback for an {@link com.ning.http.client.AsyncCompletionHandler} + * Represents the asynchronous HTTP response callback for an {@link AsyncCompletionHandler} */ public interface Response { /** @@ -168,8 +168,8 @@ public interface Response { /** * Return true if the response's headers has been computed by an {@link AsyncHandler} It will return false if the - * either {@link com.ning.http.client.AsyncHandler#onStatusReceived(HttpResponseStatus)} - * or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link com.ning.http.client.AsyncHandler.STATE#ABORT} + * either {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} + * or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link AsyncHandler.STATE#ABORT} * * @return true if the response's headers has been computed by an {@link AsyncHandler} */ @@ -177,8 +177,8 @@ public interface Response { /** * Return true if the response's body has been computed by an {@link AsyncHandler}. It will return false if the - * either {@link com.ning.http.client.AsyncHandler#onStatusReceived(HttpResponseStatus)} - * or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link com.ning.http.client.AsyncHandler.STATE#ABORT} + * either {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} + * or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link AsyncHandler.STATE#ABORT} * * @return true if the response's body has been computed by an {@link AsyncHandler} */ diff --git a/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java b/api/src/main/java/org/asynchttpclient/ResumableBodyConsumer.java similarity index 97% rename from api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java rename to api/src/main/java/org/asynchttpclient/ResumableBodyConsumer.java index 018bd648e4..4fa0025909 100644 --- a/api/src/main/java/com/ning/http/client/ResumableBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/ResumableBodyConsumer.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/SSLEngineFactory.java b/api/src/main/java/org/asynchttpclient/SSLEngineFactory.java similarity index 97% rename from api/src/main/java/com/ning/http/client/SSLEngineFactory.java rename to api/src/main/java/org/asynchttpclient/SSLEngineFactory.java index 1e5fc5873f..394ab9bfe4 100644 --- a/api/src/main/java/com/ning/http/client/SSLEngineFactory.java +++ b/api/src/main/java/org/asynchttpclient/SSLEngineFactory.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; import javax.net.ssl.SSLEngine; import java.security.GeneralSecurityException; diff --git a/api/src/main/java/com/ning/http/client/SignatureCalculator.java b/api/src/main/java/org/asynchttpclient/SignatureCalculator.java similarity index 98% rename from api/src/main/java/com/ning/http/client/SignatureCalculator.java rename to api/src/main/java/org/asynchttpclient/SignatureCalculator.java index 8c31cc8d0d..baa96ba3c3 100644 --- a/api/src/main/java/com/ning/http/client/SignatureCalculator.java +++ b/api/src/main/java/org/asynchttpclient/SignatureCalculator.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client; +package org.asynchttpclient; /** * Interface that allows injecting signature calculator into diff --git a/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java similarity index 97% rename from api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java rename to api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java index 7df592eb51..ccbb0f2aa9 100644 --- a/api/src/main/java/com/ning/http/client/SimpleAsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.resumable.ResumableAsyncHandler; -import com.ning.http.client.resumable.ResumableIOExceptionFilter; -import com.ning.http.client.simple.HeaderMap; -import com.ning.http.client.simple.SimpleAHCTransferListener; +import org.asynchttpclient.resumable.ResumableAsyncHandler; +import org.asynchttpclient.resumable.ResumableIOExceptionFilter; +import org.asynchttpclient.simple.HeaderMap; +import org.asynchttpclient.simple.SimpleAHCTransferListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -30,8 +30,8 @@ import java.util.concurrent.ScheduledExecutorService; /** - * Simple implementation of {@link AsyncHttpClient} and it's related builders ({@link com.ning.http.client.AsyncHttpClientConfig}, - * {@link Realm}, {@link com.ning.http.client.ProxyServer} and {@link com.ning.http.client.AsyncHandler}. You can + * Simple implementation of {@link AsyncHttpClient} and it's related builders ({@link AsyncHttpClientConfig}, + * {@link Realm}, {@link ProxyServer} and {@link AsyncHandler}. You can * build powerful application by just using this class. *

* This class rely on {@link BodyGenerator} and {@link BodyConsumer} for handling the request and response body. No @@ -690,15 +690,15 @@ public ResumableBodyConsumerAsyncHandler(long byteTransferred, ProgressAsyncHand this.delegate = delegate; } - public com.ning.http.client.AsyncHandler.STATE onHeaderWriteCompleted() { + public AsyncHandler.STATE onHeaderWriteCompleted() { return delegate.onHeaderWriteCompleted(); } - public com.ning.http.client.AsyncHandler.STATE onContentWriteCompleted() { + public AsyncHandler.STATE onContentWriteCompleted() { return delegate.onContentWriteCompleted(); } - public com.ning.http.client.AsyncHandler.STATE onContentWriteProgress(long amount, long current, long total) { + public AsyncHandler.STATE onContentWriteProgress(long amount, long current, long total) { return delegate.onContentWriteProgress(amount, current, total); } } diff --git a/api/src/main/java/com/ning/http/client/StringPart.java b/api/src/main/java/org/asynchttpclient/StringPart.java similarity index 97% rename from api/src/main/java/com/ning/http/client/StringPart.java rename to api/src/main/java/org/asynchttpclient/StringPart.java index acdb49b192..cd0c617c55 100644 --- a/api/src/main/java/com/ning/http/client/StringPart.java +++ b/api/src/main/java/org/asynchttpclient/StringPart.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client; +package org.asynchttpclient; /** * A string multipart part. diff --git a/api/src/main/java/com/ning/http/client/ThrowableHandler.java b/api/src/main/java/org/asynchttpclient/ThrowableHandler.java similarity index 96% rename from api/src/main/java/com/ning/http/client/ThrowableHandler.java rename to api/src/main/java/org/asynchttpclient/ThrowableHandler.java index 5f017fd4b7..cbafe59011 100644 --- a/api/src/main/java/com/ning/http/client/ThrowableHandler.java +++ b/api/src/main/java/org/asynchttpclient/ThrowableHandler.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; /** * Simple {@link Throwable} handler to be used with {@link SimpleAsyncHttpClient} diff --git a/api/src/main/java/com/ning/http/client/UpgradeHandler.java b/api/src/main/java/org/asynchttpclient/UpgradeHandler.java similarity index 90% rename from api/src/main/java/com/ning/http/client/UpgradeHandler.java rename to api/src/main/java/org/asynchttpclient/UpgradeHandler.java index 861e3abe0a..9ed5e4a7b0 100644 --- a/api/src/main/java/com/ning/http/client/UpgradeHandler.java +++ b/api/src/main/java/org/asynchttpclient/UpgradeHandler.java @@ -10,10 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; /** - * Invoked when an {@link AsyncHandler.STATE#UPGRADE} is returned. Currently the library only support {@link com.ning.http.client.websocket.WebSocket} + * Invoked when an {@link AsyncHandler.STATE#UPGRADE} is returned. Currently the library only support {@link org.asynchttpclient.websocket.WebSocket} * as type. * * @param diff --git a/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java similarity index 95% rename from api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java rename to api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java index 62c946f41f..c69ac0698a 100644 --- a/api/src/main/java/com/ning/http/client/consumers/AppendableBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.consumers; +package org.asynchttpclient.consumers; -import com.ning.http.client.BodyConsumer; +import org.asynchttpclient.BodyConsumer; import java.io.Closeable; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java similarity index 94% rename from api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java rename to api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java index e1d07bbaa4..8ab4641220 100644 --- a/api/src/main/java/com/ning/http/client/consumers/ByteBufferBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.consumers; +package org.asynchttpclient.consumers; -import com.ning.http.client.BodyConsumer; +import org.asynchttpclient.BodyConsumer; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java similarity index 95% rename from api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java rename to api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java index 63f9eae4ad..531228bccb 100644 --- a/api/src/main/java/com/ning/http/client/consumers/FileBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.consumers; +package org.asynchttpclient.consumers; -import com.ning.http.client.ResumableBodyConsumer; +import org.asynchttpclient.ResumableBodyConsumer; import java.io.IOException; import java.io.RandomAccessFile; diff --git a/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java similarity index 94% rename from api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java rename to api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java index 09ed1cb282..7ab4d1184b 100644 --- a/api/src/main/java/com/ning/http/client/consumers/OutputStreamBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.consumers; +package org.asynchttpclient.consumers; -import com.ning.http.client.BodyConsumer; +import org.asynchttpclient.BodyConsumer; import java.io.IOException; import java.io.OutputStream; diff --git a/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java b/api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java similarity index 88% rename from api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java rename to api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java index e823e8d18a..546b59a117 100644 --- a/api/src/main/java/com/ning/http/client/extra/ResumableRandomAccessFileListener.java +++ b/api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java @@ -10,16 +10,17 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; -import com.ning.http.client.resumable.ResumableListener; +import org.asynchttpclient.resumable.ResumableListener; +import org.asynchttpclient.resumable.ResumableListener; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.ByteBuffer; /** - * A {@link com.ning.http.client.listener.TransferListener} which use a {@link RandomAccessFile} for storing the received bytes. + * A {@link org.asynchttpclient.listener.TransferListener} which use a {@link RandomAccessFile} for storing the received bytes. */ public class ResumableRandomAccessFileListener implements ResumableListener { private final RandomAccessFile file; diff --git a/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java b/api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java similarity index 87% rename from api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java rename to api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java index 49da8c1572..7676dfb037 100644 --- a/api/src/main/java/com/ning/http/client/extra/ThrottleRequestFilter.java +++ b/api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java @@ -10,15 +10,18 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.extra; - -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.RequestFilter; +package org.asynchttpclient.extra; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.RequestFilter; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.RequestFilter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,7 +29,7 @@ import java.util.concurrent.TimeUnit; /** - * A {@link com.ning.http.client.filter.RequestFilter} throttles requests and block when the number of permits is reached, waiting for + * A {@link org.asynchttpclient.filter.RequestFilter} throttles requests and block when the number of permits is reached, waiting for * the response to arrives before executing the next request. */ public class ThrottleRequestFilter implements RequestFilter { diff --git a/api/src/main/java/com/ning/http/client/filter/FilterContext.java b/api/src/main/java/org/asynchttpclient/filter/FilterContext.java similarity index 92% rename from api/src/main/java/com/ning/http/client/filter/FilterContext.java rename to api/src/main/java/org/asynchttpclient/filter/FilterContext.java index 29228b7259..5a5dc14001 100644 --- a/api/src/main/java/com/ning/http/client/filter/FilterContext.java +++ b/api/src/main/java/org/asynchttpclient/filter/FilterContext.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.filter; +package org.asynchttpclient.filter; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Request; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Request; import java.io.IOException; @@ -26,9 +26,9 @@ * gets invoked before the response gets processed, e.g. before authorization, redirection and invokation of {@link AsyncHandler} * gets processed. *

- * Invoking {@link com.ning.http.client.filter.FilterContext#getResponseStatus()} returns an instance of {@link HttpResponseStatus} + * Invoking {@link FilterContext#getResponseStatus()} returns an instance of {@link HttpResponseStatus} * that can be used to decide if the response processing should continue or not. You can stop the current response processing - * and replay the request but creating a {@link FilterContext}. The {@link com.ning.http.client.AsyncHttpProvider} + * and replay the request but creating a {@link FilterContext}. The {@link org.asynchttpclient.AsyncHttpProvider} * will interrupt the processing and "replay" the associated {@link Request} instance. */ public class FilterContext { diff --git a/api/src/main/java/com/ning/http/client/filter/FilterException.java b/api/src/main/java/org/asynchttpclient/filter/FilterException.java similarity index 88% rename from api/src/main/java/com/ning/http/client/filter/FilterException.java rename to api/src/main/java/org/asynchttpclient/filter/FilterException.java index b467dd4c7e..739ecf7748 100644 --- a/api/src/main/java/com/ning/http/client/filter/FilterException.java +++ b/api/src/main/java/org/asynchttpclient/filter/FilterException.java @@ -10,10 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.filter; +package org.asynchttpclient.filter; /** - * An exception that can be thrown by an {@link com.ning.http.client.AsyncHandler} to interrupt invocation of + * An exception that can be thrown by an {@link org.asynchttpclient.AsyncHandler} to interrupt invocation of * the {@link RequestFilter} and {@link ResponseFilter}. It also interrupt the request and response processing. */ @SuppressWarnings("serial") diff --git a/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java b/api/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java similarity index 85% rename from api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java rename to api/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java index eb0a0fd234..9473146273 100644 --- a/api/src/main/java/com/ning/http/client/filter/IOExceptionFilter.java +++ b/api/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.filter; +package org.asynchttpclient.filter; /** * This filter is invoked when an {@link java.io.IOException} occurs during an http transaction. @@ -18,8 +18,8 @@ public interface IOExceptionFilter { /** - * An {@link com.ning.http.client.AsyncHttpProvider} will invoke {@link IOExceptionFilter#filter} and will - * use the returned {@link FilterContext} to replay the {@link com.ning.http.client.Request} or abort the processing. + * An {@link org.asynchttpclient.AsyncHttpProvider} will invoke {@link IOExceptionFilter#filter} and will + * use the returned {@link FilterContext} to replay the {@link org.asynchttpclient.Request} or abort the processing. * * @param ctx a {@link FilterContext} * @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one. diff --git a/api/src/main/java/com/ning/http/client/filter/RequestFilter.java b/api/src/main/java/org/asynchttpclient/filter/RequestFilter.java similarity index 89% rename from api/src/main/java/com/ning/http/client/filter/RequestFilter.java rename to api/src/main/java/org/asynchttpclient/filter/RequestFilter.java index 552cadd085..520db598c5 100644 --- a/api/src/main/java/com/ning/http/client/filter/RequestFilter.java +++ b/api/src/main/java/org/asynchttpclient/filter/RequestFilter.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.filter; +package org.asynchttpclient.filter; /** * A Filter interface that gets invoked before making an actual request. @@ -18,7 +18,7 @@ public interface RequestFilter { /** - * An {@link com.ning.http.client.AsyncHttpProvider} will invoke {@link RequestFilter#filter} and will use the + * An {@link org.asynchttpclient.AsyncHttpProvider} will invoke {@link RequestFilter#filter} and will use the * returned {@link FilterContext#getRequest()} and {@link FilterContext#getAsyncHandler()} to continue the request * processing. * diff --git a/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java b/api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java similarity index 91% rename from api/src/main/java/com/ning/http/client/filter/ResponseFilter.java rename to api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java index c77aea30d5..8c26bcca9a 100644 --- a/api/src/main/java/com/ning/http/client/filter/ResponseFilter.java +++ b/api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.filter; +package org.asynchttpclient.filter; /** * A Filter interface that gets invoked before making the processing of the response bytes. {@link ResponseFilter} are invoked @@ -20,7 +20,7 @@ public interface ResponseFilter { /** - * An {@link com.ning.http.client.AsyncHttpProvider} will invoke {@link ResponseFilter#filter} and will use the + * An {@link org.asynchttpclient.AsyncHttpProvider} will invoke {@link ResponseFilter#filter} and will use the * returned {@link FilterContext#replayRequest()} and {@link FilterContext#getAsyncHandler()} to decide if the response * processing can continue. If {@link FilterContext#replayRequest()} return true, a new request will be made * using {@link FilterContext#getRequest()} and the current response processing will be ignored. diff --git a/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java b/api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java similarity index 94% rename from api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java rename to api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java index c56893d0a1..0ff4a346e6 100644 --- a/api/src/main/java/com/ning/http/client/generators/ByteArrayBodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java @@ -10,10 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.generators; +package org.asynchttpclient.generators; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java b/api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java similarity index 96% rename from api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java rename to api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java index c1ff9ef88a..dd6e88dbf9 100644 --- a/api/src/main/java/com/ning/http/client/generators/FileBodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java @@ -10,10 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.generators; +package org.asynchttpclient.generators; -import com.ning.http.client.BodyGenerator; -import com.ning.http.client.RandomAccessBody; +import org.asynchttpclient.BodyGenerator; +import org.asynchttpclient.RandomAccessBody; import java.io.File; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java b/api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java similarity index 97% rename from api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java rename to api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java index 5beba6e092..797b93af35 100644 --- a/api/src/main/java/com/ning/http/client/generators/InputStreamBodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java @@ -11,10 +11,10 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.generators; +package org.asynchttpclient.generators; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java b/api/src/main/java/org/asynchttpclient/listenable/AbstractListenableFuture.java similarity index 96% rename from api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java rename to api/src/main/java/org/asynchttpclient/listenable/AbstractListenableFuture.java index a0f9575e6a..0317752849 100644 --- a/api/src/main/java/com/ning/http/client/listenable/AbstractListenableFuture.java +++ b/api/src/main/java/org/asynchttpclient/listenable/AbstractListenableFuture.java @@ -26,9 +26,9 @@ * limitations under the License. */ -package com.ning.http.client.listenable; +package org.asynchttpclient.listenable; -import com.ning.http.client.ListenableFuture; +import org.asynchttpclient.ListenableFuture; import java.util.concurrent.Executor; diff --git a/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java b/api/src/main/java/org/asynchttpclient/listenable/ExecutionList.java similarity index 99% rename from api/src/main/java/com/ning/http/client/listenable/ExecutionList.java rename to api/src/main/java/org/asynchttpclient/listenable/ExecutionList.java index 84d9bef13a..a6e3cba837 100644 --- a/api/src/main/java/com/ning/http/client/listenable/ExecutionList.java +++ b/api/src/main/java/org/asynchttpclient/listenable/ExecutionList.java @@ -26,7 +26,7 @@ * limitations under the License. */ -package com.ning.http.client.listenable; +package org.asynchttpclient.listenable; import java.util.Queue; import java.util.concurrent.Executor; diff --git a/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java similarity index 87% rename from api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java rename to api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java index 8e74808cf3..59703c2587 100644 --- a/api/src/main/java/com/ning/http/client/listener/TransferCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java @@ -10,15 +10,15 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.listener; +package org.asynchttpclient.listener; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; -import com.ning.http.client.AsyncCompletionHandlerBase; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicLong; /** - * A {@link com.ning.http.client.AsyncHandler} that can be used to notify a set of {@link com.ning.http.client.listener.TransferListener} + * A {@link org.asynchttpclient.AsyncHandler} that can be used to notify a set of {@link TransferListener} *

*

  * AsyncHttpClient client = new AsyncHttpClient();
@@ -67,8 +67,8 @@ public class TransferCompletionHandler extends AsyncCompletionHandlerBase {
     private AtomicLong totalBytesToTransfer = new AtomicLong(0);
 
     /**
-     * Create a TransferCompletionHandler that will not accumulate bytes. The resulting {@link com.ning.http.client.Response#getResponseBody()},
-     * {@link com.ning.http.client.Response#getResponseBodyAsStream()} and {@link Response#getResponseBodyExcerpt(int)} will
+     * Create a TransferCompletionHandler that will not accumulate bytes. The resulting {@link org.asynchttpclient.Response#getResponseBody()},
+     * {@link org.asynchttpclient.Response#getResponseBodyAsStream()} and {@link Response#getResponseBodyExcerpt(int)} will
      * throw an IllegalStateException if called.
      */
     public TransferCompletionHandler() {
@@ -77,7 +77,7 @@ public TransferCompletionHandler() {
 
     /**
      * Create a TransferCompletionHandler that can or cannot accumulate bytes and make it available when
-     * {@link com.ning.http.client.Response#getResponseBody()} get called. The default is false.
+     * {@link org.asynchttpclient.Response#getResponseBody()} get called. The default is false.
      *
      * @param accumulateResponseBytes true to accumulates bytes in memory.
      */
@@ -86,9 +86,9 @@ public TransferCompletionHandler(boolean accumulateResponseBytes) {
     }
 
     /**
-     * Add a {@link com.ning.http.client.listener.TransferListener}
+     * Add a {@link TransferListener}
      *
-     * @param t a {@link com.ning.http.client.listener.TransferListener}
+     * @param t a {@link TransferListener}
      * @return this
      */
     public TransferCompletionHandler addTransferListener(TransferListener t) {
@@ -97,9 +97,9 @@ public TransferCompletionHandler addTransferListener(TransferListener t) {
     }
 
     /**
-     * Remove a {@link com.ning.http.client.listener.TransferListener}
+     * Remove a {@link TransferListener}
      *
-     * @param t a {@link com.ning.http.client.listener.TransferListener}
+     * @param t a {@link TransferListener}
      * @return this
      */
     public TransferCompletionHandler removeTransferListener(TransferListener t) {
@@ -108,7 +108,7 @@ public TransferCompletionHandler removeTransferListener(TransferListener t) {
     }
 
     /**
-     * Associate a {@link com.ning.http.client.listener.TransferCompletionHandler.TransferAdapter} with this listener.
+     * Associate a {@link TransferCompletionHandler.TransferAdapter} with this listener.
      *
      * @param transferAdapter {@link TransferAdapter}
      */
diff --git a/api/src/main/java/com/ning/http/client/listener/TransferListener.java b/api/src/main/java/org/asynchttpclient/listener/TransferListener.java
similarity index 94%
rename from api/src/main/java/com/ning/http/client/listener/TransferListener.java
rename to api/src/main/java/org/asynchttpclient/listener/TransferListener.java
index 580c3cba53..7ae2344462 100644
--- a/api/src/main/java/com/ning/http/client/listener/TransferListener.java
+++ b/api/src/main/java/org/asynchttpclient/listener/TransferListener.java
@@ -10,9 +10,9 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.listener;
+package org.asynchttpclient.listener;
 
-import com.ning.http.client.FluentCaseInsensitiveStringsMap;
+import org.asynchttpclient.FluentCaseInsensitiveStringsMap;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
diff --git a/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java b/api/src/main/java/org/asynchttpclient/multipart/ByteArrayPartSource.java
similarity index 97%
rename from api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java
rename to api/src/main/java/org/asynchttpclient/multipart/ByteArrayPartSource.java
index 80ae3f59e3..62b218d3d5 100644
--- a/api/src/main/java/com/ning/http/multipart/ByteArrayPartSource.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/ByteArrayPartSource.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
diff --git a/api/src/main/java/com/ning/http/multipart/FilePart.java b/api/src/main/java/org/asynchttpclient/multipart/FilePart.java
similarity index 99%
rename from api/src/main/java/com/ning/http/multipart/FilePart.java
rename to api/src/main/java/org/asynchttpclient/multipart/FilePart.java
index 66e9c8f3bf..6cbab86a56 100644
--- a/api/src/main/java/com/ning/http/multipart/FilePart.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/FilePart.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.File;
 import java.io.FileNotFoundException;
diff --git a/api/src/main/java/com/ning/http/multipart/FilePartSource.java b/api/src/main/java/org/asynchttpclient/multipart/FilePartSource.java
similarity index 98%
rename from api/src/main/java/com/ning/http/multipart/FilePartSource.java
rename to api/src/main/java/org/asynchttpclient/multipart/FilePartSource.java
index 6d6880c044..0e9a74991a 100644
--- a/api/src/main/java/com/ning/http/multipart/FilePartSource.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/FilePartSource.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
diff --git a/api/src/main/java/com/ning/http/multipart/FilePartStallHandler.java b/api/src/main/java/org/asynchttpclient/multipart/FilePartStallHandler.java
similarity index 97%
rename from api/src/main/java/com/ning/http/multipart/FilePartStallHandler.java
rename to api/src/main/java/org/asynchttpclient/multipart/FilePartStallHandler.java
index 460aea8b6c..d52db46af3 100644
--- a/api/src/main/java/com/ning/http/multipart/FilePartStallHandler.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/FilePartStallHandler.java
@@ -10,7 +10,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.util.Timer;
 import java.util.TimerTask;
diff --git a/api/src/main/java/com/ning/http/multipart/FileUploadStalledException.java b/api/src/main/java/org/asynchttpclient/multipart/FileUploadStalledException.java
similarity index 95%
rename from api/src/main/java/com/ning/http/multipart/FileUploadStalledException.java
rename to api/src/main/java/org/asynchttpclient/multipart/FileUploadStalledException.java
index 1533027fdd..031f9354a7 100644
--- a/api/src/main/java/com/ning/http/multipart/FileUploadStalledException.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/FileUploadStalledException.java
@@ -10,7 +10,7 @@
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
 */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.IOException;
 
diff --git a/api/src/main/java/com/ning/http/multipart/MultipartBody.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java
similarity index 92%
rename from api/src/main/java/com/ning/http/multipart/MultipartBody.java
rename to api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java
index dd751a8f31..97a998f8bf 100644
--- a/api/src/main/java/com/ning/http/multipart/MultipartBody.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java
@@ -10,10 +10,11 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
-import com.ning.http.client.RandomAccessBody;
+import org.asynchttpclient.RandomAccessBody;
 
+import org.asynchttpclient.ByteArrayPart;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,7 +35,7 @@ public class MultipartBody implements RandomAccessBody {
 
     private byte[] boundary;
     private long contentLength;
-    private List parts;
+    private List parts;
     private List files;
     private int startPart;
     private final static Logger logger = LoggerFactory.getLogger(MultipartBody.class);
@@ -48,7 +49,7 @@ public class MultipartBody implements RandomAccessBody {
 
     enum FileLocation {NONE, START, MIDDLE, END}
 
-    public MultipartBody(List parts, String contentType, String contentLength) {
+    public MultipartBody(List parts, String contentType, String contentLength) {
         this.boundary = MultipartEncodingUtil.getAsciiBytes(contentType.substring(contentType.indexOf("boundary=") + "boundary=".length()));
         this.contentLength = Long.parseLong(contentLength);
         this.parts = parts;
@@ -85,7 +86,7 @@ public long read(ByteBuffer buffer) throws IOException {
 
             boolean full = false;
             while (!full && !doneWritingParts) {
-                com.ning.http.client.Part part = null;
+                org.asynchttpclient.Part part = null;
                 if (startPart < parts.size()) {
                     part = parts.get(startPart);
                 }
@@ -115,7 +116,7 @@ public long read(ByteBuffer buffer) throws IOException {
                     initializeStringPart(currentPart);
 
                     startPart++;
-                } else if (part instanceof com.ning.http.client.StringPart) {
+                } else if (part instanceof org.asynchttpclient.StringPart) {
                     StringPart currentPart = generateClientStringpart(part);
 
                     initializeStringPart(currentPart);
@@ -135,7 +136,7 @@ public long read(ByteBuffer buffer) throws IOException {
                             doneWritingParts = true;
                         }
                     }
-                } else if (part instanceof com.ning.http.client.FilePart) {
+                } else if (part instanceof org.asynchttpclient.FilePart) {
                     if (fileLocation == FileLocation.NONE) {
                         currentFilePart = generateClientFilePart(part);
                         initializeFilePart(currentFilePart);
@@ -149,9 +150,9 @@ public long read(ByteBuffer buffer) throws IOException {
                             doneWritingParts = true;
                         }
                     }
-                } else if (part instanceof com.ning.http.client.ByteArrayPart) {
-                    com.ning.http.client.ByteArrayPart bytePart =
-                            (com.ning.http.client.ByteArrayPart) part;
+                } else if (part instanceof ByteArrayPart) {
+                    ByteArrayPart bytePart =
+                            (ByteArrayPart) part;
 
                     if (fileLocation == FileLocation.NONE) {
                         currentFilePart =
@@ -316,7 +317,7 @@ public long transferTo(long position, long count, WritableByteChannel target)
 
         int tempPart = startPart;
 
-        for (com.ning.http.client.Part part : parts) {
+        for (org.asynchttpclient.Part part : parts) {
             if (part instanceof Part) {
                 overallLength += handleMultiPart(target, (Part) part);
             } else {
@@ -338,18 +339,18 @@ public long transferTo(long position, long count, WritableByteChannel target)
     }
 
     private long handleClientPart(
-            WritableByteChannel target, com.ning.http.client.Part part) throws IOException {
+            WritableByteChannel target, org.asynchttpclient.Part part) throws IOException {
 
-        if (part.getClass().equals(com.ning.http.client.StringPart.class)) {
+        if (part.getClass().equals(org.asynchttpclient.StringPart.class)) {
             StringPart currentPart = generateClientStringpart(part);
 
             return handleStringPart(target, currentPart);
-        } else if (part.getClass().equals(com.ning.http.client.FilePart.class)) {
+        } else if (part.getClass().equals(org.asynchttpclient.FilePart.class)) {
             FilePart filePart = generateClientFilePart(part);
 
             return handleFilePart(target, filePart);
-        } else if (part.getClass().equals(com.ning.http.client.ByteArrayPart.class)) {
-            com.ning.http.client.ByteArrayPart bytePart = (com.ning.http.client.ByteArrayPart) part;
+        } else if (part.getClass().equals(ByteArrayPart.class)) {
+            ByteArrayPart bytePart = (ByteArrayPart) part;
 
             FilePart filePart = generateClientByteArrayPart(bytePart);
 
@@ -360,23 +361,25 @@ private long handleClientPart(
     }
 
     private FilePart generateClientByteArrayPart(
-            com.ning.http.client.ByteArrayPart bytePart) {
+            ByteArrayPart bytePart) {
         ByteArrayPartSource source = new ByteArrayPartSource(bytePart.getFileName(), bytePart.getData());
 
         FilePart filePart = new FilePart(bytePart.getName(), source, bytePart.getMimeType(), bytePart.getCharSet());
         return filePart;
     }
 
-    private FilePart generateClientFilePart(com.ning.http.client.Part part)
+    private FilePart generateClientFilePart(org.asynchttpclient.Part part)
             throws FileNotFoundException {
-        com.ning.http.client.FilePart currentPart = (com.ning.http.client.FilePart) part;
+        org.asynchttpclient.FilePart
+                currentPart = (org.asynchttpclient.FilePart) part;
 
         FilePart filePart = new FilePart(currentPart.getName(), currentPart.getFile(), currentPart.getMimeType(), currentPart.getCharSet());
         return filePart;
     }
 
-    private StringPart generateClientStringpart(com.ning.http.client.Part part) {
-        com.ning.http.client.StringPart stringPart = (com.ning.http.client.StringPart) part;
+    private StringPart generateClientStringpart(org.asynchttpclient.Part part) {
+        org.asynchttpclient.StringPart
+                stringPart = (org.asynchttpclient.StringPart) part;
 
         StringPart currentPart = new StringPart(stringPart.getName(), stringPart.getValue(), stringPart.getCharset());
         return currentPart;
diff --git a/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartEncodingUtil.java
similarity index 98%
rename from api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java
rename to api/src/main/java/org/asynchttpclient/multipart/MultipartEncodingUtil.java
index 1185100ec4..4542f824ed 100644
--- a/api/src/main/java/com/ning/http/multipart/MultipartEncodingUtil.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartEncodingUtil.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.UnsupportedEncodingException;
 
diff --git a/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java
similarity index 96%
rename from api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java
rename to api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java
index 74dc593583..b47d2b5e3d 100644
--- a/api/src/main/java/com/ning/http/multipart/MultipartRequestEntity.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java
@@ -13,12 +13,11 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
-import static com.ning.http.util.MiscUtil.isNonEmpty;
+import static org.asynchttpclient.util.MiscUtil.isNonEmpty;
 
-import com.ning.http.client.FluentCaseInsensitiveStringsMap;
-import com.ning.http.client.FluentStringsMap;
+import org.asynchttpclient.FluentCaseInsensitiveStringsMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/api/src/main/java/com/ning/http/multipart/Part.java b/api/src/main/java/org/asynchttpclient/multipart/Part.java
similarity index 99%
rename from api/src/main/java/com/ning/http/multipart/Part.java
rename to api/src/main/java/org/asynchttpclient/multipart/Part.java
index 82be0dc446..067558232f 100644
--- a/api/src/main/java/com/ning/http/multipart/Part.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/Part.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -24,7 +24,7 @@
  * 
  * @link http://hc.apache.org/httpclient-3.x/
  */
-public abstract class Part implements com.ning.http.client.Part {
+public abstract class Part implements org.asynchttpclient.Part {
 
     /**
      * The boundary
diff --git a/api/src/main/java/com/ning/http/multipart/PartBase.java b/api/src/main/java/org/asynchttpclient/multipart/PartBase.java
similarity index 98%
rename from api/src/main/java/com/ning/http/multipart/PartBase.java
rename to api/src/main/java/org/asynchttpclient/multipart/PartBase.java
index d2207d7237..c65c006685 100644
--- a/api/src/main/java/com/ning/http/multipart/PartBase.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/PartBase.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 /**
  * This class is an adaptation of the Apache HttpClient implementation
diff --git a/api/src/main/java/com/ning/http/multipart/PartSource.java b/api/src/main/java/org/asynchttpclient/multipart/PartSource.java
similarity index 97%
rename from api/src/main/java/com/ning/http/multipart/PartSource.java
rename to api/src/main/java/org/asynchttpclient/multipart/PartSource.java
index eecf859c3f..798ae16eb0 100644
--- a/api/src/main/java/com/ning/http/multipart/PartSource.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/PartSource.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/api/src/main/java/com/ning/http/multipart/RequestEntity.java b/api/src/main/java/org/asynchttpclient/multipart/RequestEntity.java
similarity index 98%
rename from api/src/main/java/com/ning/http/multipart/RequestEntity.java
rename to api/src/main/java/org/asynchttpclient/multipart/RequestEntity.java
index d0f6bbe069..99bf7bbf4a 100644
--- a/api/src/main/java/com/ning/http/multipart/RequestEntity.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/RequestEntity.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.IOException;
 import java.io.OutputStream;
diff --git a/api/src/main/java/com/ning/http/multipart/StringPart.java b/api/src/main/java/org/asynchttpclient/multipart/StringPart.java
similarity index 98%
rename from api/src/main/java/com/ning/http/multipart/StringPart.java
rename to api/src/main/java/org/asynchttpclient/multipart/StringPart.java
index 1ca71f86a6..447d54035c 100644
--- a/api/src/main/java/com/ning/http/multipart/StringPart.java
+++ b/api/src/main/java/org/asynchttpclient/multipart/StringPart.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.http.multipart;
+package org.asynchttpclient.multipart;
 
 import java.io.IOException;
 import java.io.OutputStream;
diff --git a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java b/api/src/main/java/org/asynchttpclient/ntlm/NTLMEngine.java
similarity index 99%
rename from api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java
rename to api/src/main/java/org/asynchttpclient/ntlm/NTLMEngine.java
index b06249ca7a..00da92497a 100644
--- a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngine.java
+++ b/api/src/main/java/org/asynchttpclient/ntlm/NTLMEngine.java
@@ -36,9 +36,9 @@
  *
  */
 
-package com.ning.http.client.ntlm;
+package org.asynchttpclient.ntlm;
 
-import com.ning.http.util.Base64;
+import org.asynchttpclient.util.Base64;
 
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
diff --git a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java b/api/src/main/java/org/asynchttpclient/ntlm/NTLMEngineException.java
similarity index 98%
rename from api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java
rename to api/src/main/java/org/asynchttpclient/ntlm/NTLMEngineException.java
index d1c557520a..25d3f162e5 100644
--- a/api/src/main/java/com/ning/http/client/ntlm/NTLMEngineException.java
+++ b/api/src/main/java/org/asynchttpclient/ntlm/NTLMEngineException.java
@@ -36,7 +36,7 @@
  *
  */
 
-package com.ning.http.client.ntlm;
+package org.asynchttpclient.ntlm;
 
 /**
  * Signals NTLM protocol failure.
diff --git a/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java b/api/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java
similarity index 98%
rename from api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java
rename to api/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java
index 91f846827d..5b270ac2d1 100644
--- a/api/src/main/java/com/ning/http/client/oauth/ConsumerKey.java
+++ b/api/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java
@@ -14,7 +14,7 @@
  * under the License.
  *
  */
-package com.ning.http.client.oauth;
+package org.asynchttpclient.oauth;
 
 /**
  * Value class for OAuth consumer keys.
diff --git a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java b/api/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java
similarity index 96%
rename from api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java
rename to api/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java
index 4e363745e0..cd25088949 100644
--- a/api/src/main/java/com/ning/http/client/oauth/OAuthSignatureCalculator.java
+++ b/api/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java
@@ -14,15 +14,15 @@
  * under the License.
  *
  */
-package com.ning.http.client.oauth;
-
-import com.ning.http.client.FluentStringsMap;
-import com.ning.http.client.Request;
-import com.ning.http.client.RequestBuilderBase;
-import com.ning.http.client.SignatureCalculator;
-import com.ning.http.util.Base64;
-import com.ning.http.util.UTF8Codec;
-import com.ning.http.util.UTF8UrlEncoder;
+package org.asynchttpclient.oauth;
+
+import org.asynchttpclient.FluentStringsMap;
+import org.asynchttpclient.Request;
+import org.asynchttpclient.RequestBuilderBase;
+import org.asynchttpclient.SignatureCalculator;
+import org.asynchttpclient.util.Base64;
+import org.asynchttpclient.util.UTF8Codec;
+import org.asynchttpclient.util.UTF8UrlEncoder;
 
 import java.util.ArrayList;
 import java.util.Arrays;
diff --git a/api/src/main/java/com/ning/http/client/oauth/RequestToken.java b/api/src/main/java/org/asynchttpclient/oauth/RequestToken.java
similarity index 98%
rename from api/src/main/java/com/ning/http/client/oauth/RequestToken.java
rename to api/src/main/java/org/asynchttpclient/oauth/RequestToken.java
index 8607f8a9ec..78b3758b4c 100644
--- a/api/src/main/java/com/ning/http/client/oauth/RequestToken.java
+++ b/api/src/main/java/org/asynchttpclient/oauth/RequestToken.java
@@ -14,7 +14,7 @@
  * under the License.
  *
  */
-package com.ning.http.client.oauth;
+package org.asynchttpclient.oauth;
 
 /**
  * Value class used for OAuth tokens (request secret, access secret);
diff --git a/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java b/api/src/main/java/org/asynchttpclient/oauth/ThreadSafeHMAC.java
similarity index 93%
rename from api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java
rename to api/src/main/java/org/asynchttpclient/oauth/ThreadSafeHMAC.java
index 966e64ce05..784583f1b6 100644
--- a/api/src/main/java/com/ning/http/client/oauth/ThreadSafeHMAC.java
+++ b/api/src/main/java/org/asynchttpclient/oauth/ThreadSafeHMAC.java
@@ -14,10 +14,10 @@
  * under the License.
  *
  */
-package com.ning.http.client.oauth;
+package org.asynchttpclient.oauth;
 
-import com.ning.http.util.UTF8UrlEncoder;
-import com.ning.http.util.UTF8Codec;
+import org.asynchttpclient.util.UTF8UrlEncoder;
+import org.asynchttpclient.util.UTF8Codec;
 
 import javax.crypto.Mac;
 import javax.crypto.spec.SecretKeySpec;
diff --git a/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java b/api/src/main/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoder.java
similarity index 98%
rename from api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java
rename to api/src/main/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoder.java
index da8a167c10..f71e0e4e0c 100644
--- a/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoder.java
+++ b/api/src/main/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoder.java
@@ -25,7 +25,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.org.jboss.netty.handler.codec.http;
+package org.asynchttpclient.org.jboss.netty.handler.codec.http;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -33,9 +33,9 @@
 import java.util.Set;
 import java.util.TreeSet;
 
-import com.ning.org.jboss.netty.util.internal.StringUtil;
-import com.ning.http.client.Cookie;
-import com.ning.http.util.AsyncHttpProviderUtils;
+import org.asynchttpclient.org.jboss.netty.util.internal.StringUtil;
+import org.asynchttpclient.Cookie;
+import org.asynchttpclient.util.AsyncHttpProviderUtils;
 
 /**
  * Decodes an HTTP header value into {@link Cookie}s. This decoder can decode the HTTP cookie version 0, 1, and 2.
diff --git a/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java b/api/src/main/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieHeaderNames.java
similarity index 96%
rename from api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java
rename to api/src/main/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieHeaderNames.java
index aff65a9580..523cb479df 100644
--- a/api/src/main/java/com/ning/org/jboss/netty/handler/codec/http/CookieHeaderNames.java
+++ b/api/src/main/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieHeaderNames.java
@@ -25,7 +25,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.org.jboss.netty.handler.codec.http;
+package org.asynchttpclient.org.jboss.netty.handler.codec.http;
 
 final class CookieHeaderNames {
     static final String PATH = "Path";
diff --git a/api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java b/api/src/main/java/org/asynchttpclient/org/jboss/netty/util/internal/StringUtil.java
similarity index 97%
rename from api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java
rename to api/src/main/java/org/asynchttpclient/org/jboss/netty/util/internal/StringUtil.java
index b2378dc3e7..b828761d03 100644
--- a/api/src/main/java/com/ning/org/jboss/netty/util/internal/StringUtil.java
+++ b/api/src/main/java/org/asynchttpclient/org/jboss/netty/util/internal/StringUtil.java
@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  */
-package com.ning.org.jboss.netty.util.internal;
+package org.asynchttpclient.org.jboss.netty.util.internal;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java
similarity index 89%
rename from api/src/main/java/com/ning/http/client/providers/ResponseBase.java
rename to api/src/main/java/org/asynchttpclient/providers/ResponseBase.java
index f1b695f392..d22a511eaa 100644
--- a/api/src/main/java/com/ning/http/client/providers/ResponseBase.java
+++ b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java
@@ -1,6 +1,6 @@
-package com.ning.http.client.providers;
+package org.asynchttpclient.providers;
 
-import static com.ning.http.util.MiscUtil.isNonEmpty;
+import static org.asynchttpclient.util.MiscUtil.isNonEmpty;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -9,13 +9,13 @@
 import java.util.Collections;
 import java.util.List;
 
-import com.ning.http.client.Cookie;
-import com.ning.http.client.FluentCaseInsensitiveStringsMap;
-import com.ning.http.client.HttpResponseBodyPart;
-import com.ning.http.client.HttpResponseHeaders;
-import com.ning.http.client.HttpResponseStatus;
-import com.ning.http.client.Response;
-import com.ning.http.util.AsyncHttpProviderUtils;
+import org.asynchttpclient.Cookie;
+import org.asynchttpclient.FluentCaseInsensitiveStringsMap;
+import org.asynchttpclient.HttpResponseBodyPart;
+import org.asynchttpclient.HttpResponseHeaders;
+import org.asynchttpclient.HttpResponseStatus;
+import org.asynchttpclient.Response;
+import org.asynchttpclient.util.AsyncHttpProviderUtils;
 
 public abstract class ResponseBase implements Response
 {
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java
similarity index 95%
rename from api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java
index 8970de8fdb..c8d5ba32b0 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProvider.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java
@@ -10,38 +10,41 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
-
-import static com.ning.http.util.MiscUtil.isNonEmpty;
-
-import com.ning.http.client.AsyncHandler;
-import com.ning.http.client.AsyncHttpClientConfig;
-import com.ning.http.client.AsyncHttpProvider;
-import com.ning.http.client.AsyncHttpProviderConfig;
-import com.ning.http.client.Body;
-import com.ning.http.client.FluentCaseInsensitiveStringsMap;
-import com.ning.http.client.HttpResponseBodyPart;
-import com.ning.http.client.HttpResponseHeaders;
-import com.ning.http.client.HttpResponseStatus;
-import com.ning.http.client.ListenableFuture;
-import com.ning.http.client.MaxRedirectException;
-import com.ning.http.client.ProgressAsyncHandler;
-import com.ning.http.client.ProxyServer;
-import com.ning.http.client.Realm;
-import com.ning.http.client.Request;
-import com.ning.http.client.RequestBuilder;
-import com.ning.http.client.Response;
-import com.ning.http.client.filter.FilterContext;
-import com.ning.http.client.filter.FilterException;
-import com.ning.http.client.filter.IOExceptionFilter;
-import com.ning.http.client.filter.ResponseFilter;
-import com.ning.http.client.listener.TransferCompletionHandler;
-import com.ning.http.multipart.MultipartRequestEntity;
-import com.ning.http.util.AsyncHttpProviderUtils;
-import com.ning.http.util.AuthenticatorUtils;
-import com.ning.http.util.ProxyUtils;
-import com.ning.http.util.SslUtils;
-import com.ning.http.util.UTF8UrlEncoder;
+package org.asynchttpclient.providers.jdk;
+
+import static org.asynchttpclient.util.MiscUtil.isNonEmpty;
+
+import org.asynchttpclient.AsyncHandler;
+import org.asynchttpclient.AsyncHttpClientConfig;
+import org.asynchttpclient.AsyncHttpProvider;
+import org.asynchttpclient.AsyncHttpProviderConfig;
+import org.asynchttpclient.Body;
+import org.asynchttpclient.FluentCaseInsensitiveStringsMap;
+import org.asynchttpclient.HttpResponseBodyPart;
+import org.asynchttpclient.HttpResponseHeaders;
+import org.asynchttpclient.HttpResponseStatus;
+import org.asynchttpclient.ListenableFuture;
+import org.asynchttpclient.MaxRedirectException;
+import org.asynchttpclient.ProgressAsyncHandler;
+import org.asynchttpclient.ProxyServer;
+import org.asynchttpclient.Realm;
+import org.asynchttpclient.Request;
+import org.asynchttpclient.RequestBuilder;
+import org.asynchttpclient.Response;
+import org.asynchttpclient.filter.FilterContext;
+import org.asynchttpclient.filter.FilterException;
+import org.asynchttpclient.filter.IOExceptionFilter;
+import org.asynchttpclient.filter.ResponseFilter;
+import org.asynchttpclient.listener.TransferCompletionHandler;
+import org.asynchttpclient.filter.FilterContext;
+import org.asynchttpclient.filter.FilterException;
+import org.asynchttpclient.filter.IOExceptionFilter;
+import org.asynchttpclient.multipart.MultipartRequestEntity;
+import org.asynchttpclient.util.AsyncHttpProviderUtils;
+import org.asynchttpclient.util.AuthenticatorUtils;
+import org.asynchttpclient.util.ProxyUtils;
+import org.asynchttpclient.util.SslUtils;
+import org.asynchttpclient.util.UTF8UrlEncoder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,7 +80,7 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.zip.GZIPInputStream;
 
-import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET;
+import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET;
 
 public class JDKAsyncHttpProvider implements AsyncHttpProvider {
     private final static Logger logger = LoggerFactory.getLogger(JDKAsyncHttpProvider.class);
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java
similarity index 94%
rename from api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java
index 700c1716ba..8d743a21a5 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKAsyncHttpProviderConfig.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java
@@ -10,9 +10,9 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
+package org.asynchttpclient.providers.jdk;
 
-import com.ning.http.client.AsyncHttpProviderConfig;
+import org.asynchttpclient.AsyncHttpProviderConfig;
 
 import java.util.Map;
 import java.util.Set;
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java
similarity index 93%
rename from api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java
index 6675477368..62dede5fd2 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKDelegateFuture.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java
@@ -10,11 +10,11 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
+package org.asynchttpclient.providers.jdk;
 
-import static com.ning.http.util.DateUtil.millisTime;
-import com.ning.http.client.AsyncHandler;
-import com.ning.http.client.ListenableFuture;
+import static org.asynchttpclient.util.DateUtil.millisTime;
+import org.asynchttpclient.AsyncHandler;
+import org.asynchttpclient.ListenableFuture;
 
 import java.net.HttpURLConnection;
 import java.util.concurrent.Callable;
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java
similarity index 95%
rename from api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java
index ac7799fb7e..2810a33f2f 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKFuture.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java
@@ -10,11 +10,12 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
+package org.asynchttpclient.providers.jdk;
 
-import static com.ning.http.util.DateUtil.millisTime;
-import com.ning.http.client.AsyncHandler;
-import com.ning.http.client.listenable.AbstractListenableFuture;
+import static org.asynchttpclient.util.DateUtil.millisTime;
+import org.asynchttpclient.AsyncHandler;
+import org.asynchttpclient.listenable.AbstractListenableFuture;
+import org.asynchttpclient.listenable.AbstractListenableFuture;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java
similarity index 82%
rename from api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java
index 9eb11949b9..682db9fc4d 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/JDKResponse.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java
@@ -10,15 +10,16 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
-
-import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder;
-import com.ning.http.client.Cookie;
-import com.ning.http.client.HttpResponseBodyPart;
-import com.ning.http.client.HttpResponseHeaders;
-import com.ning.http.client.HttpResponseStatus;
-import com.ning.http.client.providers.ResponseBase;
-import com.ning.http.util.AsyncHttpProviderUtils;
+package org.asynchttpclient.providers.jdk;
+
+import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder;
+import org.asynchttpclient.Cookie;
+import org.asynchttpclient.HttpResponseBodyPart;
+import org.asynchttpclient.HttpResponseHeaders;
+import org.asynchttpclient.HttpResponseStatus;
+import org.asynchttpclient.providers.ResponseBase;
+import org.asynchttpclient.providers.ResponseBase;
+import org.asynchttpclient.util.AsyncHttpProviderUtils;
 
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java
similarity index 94%
rename from api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java
index f745df343c..3081baee6f 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/ResponseBodyPart.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java
@@ -10,10 +10,10 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
+package org.asynchttpclient.providers.jdk;
 
-import com.ning.http.client.AsyncHttpProvider;
-import com.ning.http.client.HttpResponseBodyPart;
+import org.asynchttpclient.AsyncHttpProvider;
+import org.asynchttpclient.HttpResponseBodyPart;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java
similarity index 86%
rename from api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java
index c4f3fe4865..1a07b53c0e 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/ResponseHeaders.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java
@@ -10,11 +10,11 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
+package org.asynchttpclient.providers.jdk;
 
-import com.ning.http.client.AsyncHttpProvider;
-import com.ning.http.client.FluentCaseInsensitiveStringsMap;
-import com.ning.http.client.HttpResponseHeaders;
+import org.asynchttpclient.AsyncHttpProvider;
+import org.asynchttpclient.FluentCaseInsensitiveStringsMap;
+import org.asynchttpclient.HttpResponseHeaders;
 
 import java.net.HttpURLConnection;
 import java.net.URI;
@@ -51,7 +51,7 @@ private FluentCaseInsensitiveStringsMap computerHeaders() {
     /**
      * Return the HTTP header
      *
-     * @return an {@link com.ning.http.client.FluentCaseInsensitiveStringsMap}
+     * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap}
      */
     @Override
     public FluentCaseInsensitiveStringsMap getHeaders() {
diff --git a/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java
similarity index 93%
rename from api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java
rename to api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java
index 7f27e2dc5d..d88d211683 100644
--- a/api/src/main/java/com/ning/http/client/providers/jdk/ResponseStatus.java
+++ b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java
@@ -10,10 +10,10 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.providers.jdk;
+package org.asynchttpclient.providers.jdk;
 
-import com.ning.http.client.AsyncHttpProvider;
-import com.ning.http.client.HttpResponseStatus;
+import org.asynchttpclient.AsyncHttpProvider;
+import org.asynchttpclient.HttpResponseStatus;
 
 import java.io.IOException;
 import java.net.HttpURLConnection;
diff --git a/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java
similarity index 96%
rename from api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java
rename to api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java
index efb6dea06b..ab6c345e9c 100644
--- a/api/src/main/java/com/ning/http/client/resumable/PropertiesBasedResumableProcessor.java
+++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java
@@ -10,7 +10,7 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.resumable;
+package org.asynchttpclient.resumable;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -24,7 +24,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
- * A {@link com.ning.http.client.resumable.ResumableAsyncHandler.ResumableProcessor} which use a properties file
+ * A {@link org.asynchttpclient.resumable.ResumableAsyncHandler.ResumableProcessor} which use a properties file
  * to store the download index information.
  */
 public class PropertiesBasedResumableProcessor implements ResumableAsyncHandler.ResumableProcessor {
diff --git a/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java
similarity index 95%
rename from api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java
rename to api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java
index b1eda42f86..3200f54862 100644
--- a/api/src/main/java/com/ning/http/client/resumable/ResumableAsyncHandler.java
+++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java
@@ -10,17 +10,17 @@
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
  */
-package com.ning.http.client.resumable;
-
-import com.ning.http.client.AsyncHandler;
-import com.ning.http.client.HttpResponseBodyPart;
-import com.ning.http.client.HttpResponseHeaders;
-import com.ning.http.client.HttpResponseStatus;
-import com.ning.http.client.Request;
-import com.ning.http.client.RequestBuilder;
-import com.ning.http.client.Response;
-import com.ning.http.client.Response.ResponseBuilder;
-import com.ning.http.client.listener.TransferCompletionHandler;
+package org.asynchttpclient.resumable;
+
+import org.asynchttpclient.AsyncHandler;
+import org.asynchttpclient.HttpResponseBodyPart;
+import org.asynchttpclient.HttpResponseHeaders;
+import org.asynchttpclient.HttpResponseStatus;
+import org.asynchttpclient.Request;
+import org.asynchttpclient.RequestBuilder;
+import org.asynchttpclient.Response;
+import org.asynchttpclient.Response.ResponseBuilder;
+import org.asynchttpclient.listener.TransferCompletionHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,7 +34,7 @@
 /**
  * An {@link AsyncHandler} which support resumable download, e.g when used with an {@link ResumableIOExceptionFilter},
  * this handler can resume the download operation at the point it was before the interruption occured. This prevent having to
- * download the entire file again. It's the responsibility of the {@link com.ning.http.client.listener.TransferListener}
+ * download the entire file again. It's the responsibility of the {@link org.asynchttpclient.listener.TransferListener}
  * to track how many bytes has been transferred and to properly adjust the file's write position.
  * 

* In case of a JVM crash/shutdown, you can create an instance of this class and pass the last valid bytes position. diff --git a/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java similarity index 73% rename from api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java rename to api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java index 7e2bd1d254..2b686f7bac 100644 --- a/api/src/main/java/com/ning/http/client/resumable/ResumableIOExceptionFilter.java +++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java @@ -10,15 +10,17 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.resumable; +package org.asynchttpclient.resumable; -import com.ning.http.client.Request; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.IOExceptionFilter; +import org.asynchttpclient.Request; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; /** - * Simple {@link IOExceptionFilter} that replay the current {@link com.ning.http.client.Request} using + * Simple {@link org.asynchttpclient.filter.IOExceptionFilter} that replay the current {@link org.asynchttpclient.Request} using * a {@link ResumableAsyncHandler} */ public class ResumableIOExceptionFilter implements IOExceptionFilter { diff --git a/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableListener.java similarity index 97% rename from api/src/main/java/com/ning/http/client/resumable/ResumableListener.java rename to api/src/main/java/org/asynchttpclient/resumable/ResumableListener.java index 0b55ac2257..252236cbae 100644 --- a/api/src/main/java/com/ning/http/client/resumable/ResumableListener.java +++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.resumable; +package org.asynchttpclient.resumable; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/api/src/main/java/com/ning/http/client/simple/HeaderMap.java b/api/src/main/java/org/asynchttpclient/simple/HeaderMap.java similarity index 96% rename from api/src/main/java/com/ning/http/client/simple/HeaderMap.java rename to api/src/main/java/org/asynchttpclient/simple/HeaderMap.java index f081e2ff38..92476cc6a3 100644 --- a/api/src/main/java/com/ning/http/client/simple/HeaderMap.java +++ b/api/src/main/java/org/asynchttpclient/simple/HeaderMap.java @@ -1,4 +1,4 @@ -package com.ning.http.client.simple; +package org.asynchttpclient.simple; /* * Copyright (c) 2010 Sonatype, Inc. All rights reserved. @@ -13,7 +13,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import java.util.Collection; import java.util.List; diff --git a/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java b/api/src/main/java/org/asynchttpclient/simple/SimpleAHCTransferListener.java similarity index 93% rename from api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java rename to api/src/main/java/org/asynchttpclient/simple/SimpleAHCTransferListener.java index 39d780c32f..b8e300f020 100644 --- a/api/src/main/java/com/ning/http/client/simple/SimpleAHCTransferListener.java +++ b/api/src/main/java/org/asynchttpclient/simple/SimpleAHCTransferListener.java @@ -1,4 +1,4 @@ -package com.ning.http.client.simple; +package org.asynchttpclient.simple; /* * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. @@ -13,14 +13,14 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -import com.ning.http.client.SimpleAsyncHttpClient; +import org.asynchttpclient.SimpleAsyncHttpClient; /** * A simple transfer listener for use with the {@link SimpleAsyncHttpClient}. *

* Note: This listener does not cover requests failing before a connection is * established. For error handling, see - * {@link com.ning.http.client.SimpleAsyncHttpClient.Builder#setDefaultThrowableHandler(com.ning.http.client.ThrowableHandler)} + * {@link org.asynchttpclient.SimpleAsyncHttpClient.Builder#setDefaultThrowableHandler(org.asynchttpclient.ThrowableHandler)} * * @author Benjamin Hanzelmann */ diff --git a/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java b/api/src/main/java/org/asynchttpclient/util/AllowAllHostnameVerifier.java similarity index 96% rename from api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java rename to api/src/main/java/org/asynchttpclient/util/AllowAllHostnameVerifier.java index 0223cc1ee6..d32424daf9 100644 --- a/api/src/main/java/com/ning/http/util/AllowAllHostnameVerifier.java +++ b/api/src/main/java/org/asynchttpclient/util/AllowAllHostnameVerifier.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLSession; diff --git a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java similarity index 94% rename from api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java rename to api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index c2519dd337..5830d50975 100644 --- a/api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; @@ -29,22 +29,22 @@ import java.util.Locale; import java.util.Vector; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.ByteArrayPart; -import com.ning.http.client.Cookie; -import com.ning.http.client.FilePart; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.Part; -import com.ning.http.client.Request; -import com.ning.http.client.StringPart; -import com.ning.http.multipart.ByteArrayPartSource; -import com.ning.http.multipart.MultipartRequestEntity; -import com.ning.http.multipart.PartSource; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.ByteArrayPart; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FilePart; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.Part; +import org.asynchttpclient.Request; +import org.asynchttpclient.StringPart; +import org.asynchttpclient.multipart.ByteArrayPartSource; +import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.multipart.PartSource; /** - * {@link com.ning.http.client.AsyncHttpProvider} common utilities. + * {@link org.asynchttpclient.AsyncHttpProvider} common utilities. *

* The cookies's handling code is from the Netty framework. */ @@ -341,25 +341,25 @@ public final static int getPort(URI uri) { * @throws java.io.FileNotFoundException */ public final static MultipartRequestEntity createMultipartRequestEntity(List params, FluentCaseInsensitiveStringsMap requestHeaders) throws FileNotFoundException { - com.ning.http.multipart.Part[] parts = new com.ning.http.multipart.Part[params.size()]; + org.asynchttpclient.multipart.Part[] parts = new org.asynchttpclient.multipart.Part[params.size()]; int i = 0; for (Part part : params) { - if (part instanceof com.ning.http.multipart.Part) { - parts[i] = (com.ning.http.multipart.Part) part; + if (part instanceof org.asynchttpclient.multipart.Part) { + parts[i] = (org.asynchttpclient.multipart.Part) part; } else if (part instanceof StringPart) { - parts[i] = new com.ning.http.multipart.StringPart(part.getName(), + parts[i] = new org.asynchttpclient.multipart.StringPart(part.getName(), ((StringPart) part).getValue(), ((StringPart) part).getCharset()); } else if (part instanceof FilePart) { - parts[i] = new com.ning.http.multipart.FilePart(part.getName(), + parts[i] = new org.asynchttpclient.multipart.FilePart(part.getName(), ((FilePart) part).getFile(), ((FilePart) part).getMimeType(), ((FilePart) part).getCharSet()); } else if (part instanceof ByteArrayPart) { PartSource source = new ByteArrayPartSource(((ByteArrayPart) part).getFileName(), ((ByteArrayPart) part).getData()); - parts[i] = new com.ning.http.multipart.FilePart(part.getName(), + parts[i] = new org.asynchttpclient.multipart.FilePart(part.getName(), source, ((ByteArrayPart) part).getMimeType(), ((ByteArrayPart) part).getCharSet()); diff --git a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java b/api/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java similarity index 94% rename from api/src/main/java/com/ning/http/util/AuthenticatorUtils.java rename to api/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java index ea803cc7a3..27ff662c23 100644 --- a/api/src/main/java/com/ning/http/util/AuthenticatorUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Realm; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Realm; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; diff --git a/api/src/main/java/com/ning/http/util/Base64.java b/api/src/main/java/org/asynchttpclient/util/Base64.java similarity index 99% rename from api/src/main/java/com/ning/http/util/Base64.java rename to api/src/main/java/org/asynchttpclient/util/Base64.java index fe5d54829e..c6141d0654 100644 --- a/api/src/main/java/com/ning/http/util/Base64.java +++ b/api/src/main/java/org/asynchttpclient/util/Base64.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; /** * Implements the "base64" binary encoding scheme as defined by diff --git a/api/src/main/java/com/ning/http/util/DateUtil.java b/api/src/main/java/org/asynchttpclient/util/DateUtil.java similarity index 99% rename from api/src/main/java/com/ning/http/util/DateUtil.java rename to api/src/main/java/org/asynchttpclient/util/DateUtil.java index b845b66f0a..dfc0d55ef6 100644 --- a/api/src/main/java/com/ning/http/util/DateUtil.java +++ b/api/src/main/java/org/asynchttpclient/util/DateUtil.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/util/DateUtil.java,v 1.2 2004/12/24 20:36:13 olegk Exp $ diff --git a/api/src/main/java/com/ning/http/util/MiscUtil.java b/api/src/main/java/org/asynchttpclient/util/MiscUtil.java similarity index 97% rename from api/src/main/java/com/ning/http/util/MiscUtil.java rename to api/src/main/java/org/asynchttpclient/util/MiscUtil.java index 965bec14d9..b65d1e4a7d 100644 --- a/api/src/main/java/com/ning/http/util/MiscUtil.java +++ b/api/src/main/java/org/asynchttpclient/util/MiscUtil.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; import java.util.Collection; import java.util.Map; diff --git a/api/src/main/java/com/ning/http/util/ProxyUtils.java b/api/src/main/java/org/asynchttpclient/util/ProxyUtils.java similarity index 94% rename from api/src/main/java/com/ning/http/util/ProxyUtils.java rename to api/src/main/java/org/asynchttpclient/util/ProxyUtils.java index e53bfff8d8..6e33588f6e 100644 --- a/api/src/main/java/com/ning/http/util/ProxyUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/ProxyUtils.java @@ -10,17 +10,17 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import java.util.List; import java.util.Properties; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.ProxyServer.Protocol; -import com.ning.http.client.Request; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.ProxyServer.Protocol; +import org.asynchttpclient.Request; /** * Utilities for Proxy handling. @@ -29,7 +29,7 @@ */ public class ProxyUtils { - private static final String PROPERTY_PREFIX = "com.ning.http.client.AsyncHttpClientConfig.proxy."; + private static final String PROPERTY_PREFIX = "org.asynchttpclient.AsyncHttpClientConfig.proxy."; /** * The host to use as proxy. diff --git a/api/src/main/java/com/ning/http/util/SslUtils.java b/api/src/main/java/org/asynchttpclient/util/SslUtils.java similarity index 99% rename from api/src/main/java/com/ning/http/util/SslUtils.java rename to api/src/main/java/org/asynchttpclient/util/SslUtils.java index dc5f2643e8..2ac9769b18 100644 --- a/api/src/main/java/com/ning/http/util/SslUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/SslUtils.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.util; +package org.asynchttpclient.util; import javax.net.ssl.KeyManager; import javax.net.ssl.KeyManagerFactory; diff --git a/api/src/main/java/com/ning/http/util/UTF8Codec.java b/api/src/main/java/org/asynchttpclient/util/UTF8Codec.java similarity index 98% rename from api/src/main/java/com/ning/http/util/UTF8Codec.java rename to api/src/main/java/org/asynchttpclient/util/UTF8Codec.java index 29ee4cc20c..8a18326cdd 100644 --- a/api/src/main/java/com/ning/http/util/UTF8Codec.java +++ b/api/src/main/java/org/asynchttpclient/util/UTF8Codec.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.util; +package org.asynchttpclient.util; import java.io.UnsupportedEncodingException; diff --git a/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java b/api/src/main/java/org/asynchttpclient/util/UTF8UrlEncoder.java similarity index 96% rename from api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java rename to api/src/main/java/org/asynchttpclient/util/UTF8UrlEncoder.java index a7d463f4fc..80b5ca4e8e 100644 --- a/api/src/main/java/com/ning/http/util/UTF8UrlEncoder.java +++ b/api/src/main/java/org/asynchttpclient/util/UTF8UrlEncoder.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.util; +package org.asynchttpclient.util; /** * Convenience class that encapsulates details of "percent encoding" * (as per RFC-3986, see [http://www.ietf.org/rfc/rfc3986.txt]). */ public class UTF8UrlEncoder { - private static final boolean encodeSpaceUsingPlus = System.getProperty("com.com.ning.http.util.UTF8UrlEncoder.encodeSpaceUsingPlus") == null ? false : true; + private static final boolean encodeSpaceUsingPlus = System.getProperty("com.UTF8UrlEncoder.encodeSpaceUsingPlus") == null ? false : true; /** * Encoding table used for figuring out ascii characters that must be escaped diff --git a/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java similarity index 93% rename from api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java rename to api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java index 2d025825e6..74ac5ab684 100644 --- a/api/src/main/java/com/ning/http/client/webdav/WebDavCompletionHandlerBase.java +++ b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java @@ -11,14 +11,14 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.webdav; - -import com.ning.http.client.AsyncCompletionHandlerBase; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +package org.asynchttpclient.webdav; + +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; @@ -103,7 +103,7 @@ public void onThrowable(Throwable t) { /** * Invoked once the HTTP response has been fully read. * - * @param response The {@link com.ning.http.client.Response} + * @param response The {@link org.asynchttpclient.Response} * @return Type of the value that will be returned by the associated {@link java.util.concurrent.Future} */ abstract public T onCompleted(WebDavResponse response) throws Exception; diff --git a/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java b/api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java similarity index 95% rename from api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java rename to api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java index 360178d429..340e4be2eb 100644 --- a/api/src/main/java/com/ning/http/client/webdav/WebDavResponse.java +++ b/api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.webdav; +package org.asynchttpclient.webdav; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.Response; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.Response; import org.w3c.dom.Document; import java.io.IOException; diff --git a/api/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java b/api/src/main/java/org/asynchttpclient/websocket/DefaultWebSocketListener.java similarity index 98% rename from api/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java rename to api/src/main/java/org/asynchttpclient/websocket/DefaultWebSocketListener.java index 4db626b0d6..737ad557c1 100644 --- a/api/src/main/java/com/ning/http/client/websocket/DefaultWebSocketListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/DefaultWebSocketListener.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * Default WebSocketListener implementation. Most methods are no-ops. This diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocket.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocket.java similarity index 98% rename from api/src/main/java/com/ning/http/client/websocket/WebSocket.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocket.java index ae7183fe48..9e9c981c16 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocket.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocket.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; import java.io.Closeable; diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketByteListener.java similarity index 96% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketByteListener.java index e4f9362f1a..86ed261807 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketByteListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketByteListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * A {@link WebSocketListener} for bytes diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketCloseCodeReasonListener.java similarity index 96% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketCloseCodeReasonListener.java index af524527b7..ad1b25f0bb 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketCloseCodeReasonListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketCloseCodeReasonListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * Extend the normal close listener with one that support the WebSocket's code and reason. diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketListener.java similarity index 96% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketListener.java index 360f66cf21..bf187be07c 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * A generic {@link WebSocketListener} for WebSocket events. Use the appropriate listener for receiving message bytes. diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketPingListener.java similarity index 95% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketPingListener.java index 5980c67b9e..7abc8ab4a2 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketPingListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketPingListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * A WebSocket's Ping Listener diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketPongListener.java similarity index 95% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketPongListener.java index 559abc97b3..f140a2208d 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketPongListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketPongListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * A WebSocket's Pong Listener diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketTextListener.java similarity index 96% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketTextListener.java index 1b56319a85..d52bfad0ea 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketTextListener.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketTextListener.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; /** * A {@link WebSocketListener} for text message diff --git a/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java b/api/src/main/java/org/asynchttpclient/websocket/WebSocketUpgradeHandler.java similarity index 95% rename from api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java rename to api/src/main/java/org/asynchttpclient/websocket/WebSocketUpgradeHandler.java index 46ef3fa8b7..cb5a76381e 100644 --- a/api/src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java +++ b/api/src/main/java/org/asynchttpclient/websocket/WebSocketUpgradeHandler.java @@ -10,13 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.UpgradeHandler; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.UpgradeHandler; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/api/src/main/resources/com/ning/http/client/version.properties b/api/src/main/resources/org/asynchttpclient/version.properties similarity index 100% rename from api/src/main/resources/com/ning/http/client/version.properties rename to api/src/main/resources/org/asynchttpclient/version.properties diff --git a/api/src/test/java/com/ning/http/client/RealmTest.java b/api/src/test/java/org/asynchttpclient/RealmTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/RealmTest.java rename to api/src/test/java/org/asynchttpclient/RealmTest.java index 71ba2d44ee..1cef822c23 100644 --- a/api/src/test/java/com/ning/http/client/RealmTest.java +++ b/api/src/test/java/org/asynchttpclient/RealmTest.java @@ -10,10 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client; +package org.asynchttpclient; -import com.ning.http.client.Realm.AuthScheme; -import com.ning.http.client.Realm.RealmBuilder; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Realm.AuthScheme; +import org.asynchttpclient.Realm.RealmBuilder; import org.testng.Assert; import java.math.BigInteger; import java.security.MessageDigest; diff --git a/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java rename to api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java index 9fc2c05090..3e6c368f73 100644 --- a/api/src/test/java/com/ning/http/client/async/AbstractBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java @@ -13,16 +13,16 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java similarity index 98% rename from api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java rename to api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index ba7e1207e3..09716df404 100755 --- a/api/src/test/java/com/ning/http/client/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -13,9 +13,9 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import static com.ning.http.util.DateUtil.millisTime; +import static org.asynchttpclient.util.DateUtil.millisTime; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; @@ -46,21 +46,21 @@ import org.testng.Assert; import org.testng.annotations.Test; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpClientConfig.Builder; -import com.ning.http.client.AsyncHttpClientConfigBean; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.Part; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.StringPart; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClientConfig.Builder; +import org.asynchttpclient.AsyncHttpClientConfigBean; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.Part; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.StringPart; public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { private static final String UTF_8 = "text/html;charset=UTF-8"; diff --git a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java similarity index 98% rename from api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java rename to api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index b328aea527..a2ab86cfc3 100644 --- a/api/src/test/java/com/ning/http/client/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -13,16 +13,16 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java rename to api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java index c495e98c67..1c7f78c5e0 100644 --- a/api/src/test/java/com/ning/http/client/async/AsyncStreamLifecycleTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; import org.eclipse.jetty.server.Request; diff --git a/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java rename to api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java index 6de01f31f9..fb91595999 100644 --- a/api/src/test/java/com/ning/http/client/async/AuthTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Realm; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Response; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; diff --git a/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/BasicAuthTest.java rename to api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index 116d67105a..256b1fcbce 100644 --- a/api/src/test/java/com/ning/http/client/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -13,19 +13,19 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Realm; -import com.ning.http.client.Response; -import com.ning.http.client.SimpleAsyncHttpClient; -import com.ning.http.client.consumers.AppendableBodyConsumer; -import com.ning.http.client.generators.InputStreamBodyGenerator; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Response; +import org.asynchttpclient.SimpleAsyncHttpClient; +import org.asynchttpclient.consumers.AppendableBodyConsumer; +import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; diff --git a/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java similarity index 98% rename from api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java rename to api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index 8279d56f7c..619f523223 100644 --- a/api/src/test/java/com/ning/http/client/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig.Builder; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig.Builder; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; diff --git a/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java similarity index 88% rename from api/src/test/java/com/ning/http/client/async/BodyChunkTest.java rename to api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java index 313ebdb2e2..4498632771 100644 --- a/api/src/test/java/com/ning/http/client/async/BodyChunkTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.generators.InputStreamBodyGenerator; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.testng.annotations.Test; import java.io.ByteArrayInputStream; diff --git a/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java rename to api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java index f76ef6b308..e6bf47bf9e 100644 --- a/api/src/test/java/com/ning/http/client/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java @@ -10,13 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.BodyDeferringAsyncHandler; -import com.ning.http.client.BodyDeferringAsyncHandler.BodyDeferringInputStream; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.BodyDeferringAsyncHandler; +import org.asynchttpclient.BodyDeferringAsyncHandler.BodyDeferringInputStream; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; diff --git a/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java rename to api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java index 2c8f9c46fc..1a6763a43f 100644 --- a/api/src/test/java/com/ning/http/client/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java similarity index 93% rename from api/src/test/java/com/ning/http/client/async/ChunkingTest.java rename to api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index 1860da24d1..9334cf38be 100644 --- a/api/src/test/java/com/ning/http/client/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -10,14 +10,15 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.generators.InputStreamBodyGenerator; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Request; +import org.asynchttpclient.Response; +import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.testng.annotations.Test; import java.io.BufferedInputStream; @@ -101,7 +102,7 @@ private void doTest(boolean customChunkedInputStream) throws Exception { // made buff in stream big enough to mark. builder.setBody(new InputStreamBodyGenerator(new BufferedInputStream(new FileInputStream(getTestFile()), 400000))); } - com.ning.http.client.Request r = builder.build(); + Request r = builder.build(); Response res = null; try { diff --git a/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java b/api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java similarity index 94% rename from api/src/test/java/com/ning/http/client/async/ComplexClientTest.java rename to api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java index db2c1ab0ce..8bf0bc6e6e 100644 --- a/api/src/test/java/com/ning/http/client/async/ComplexClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; import org.testng.annotations.Test; import java.util.concurrent.TimeUnit; diff --git a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java rename to api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java index 89e546d2c4..ccc7d3901b 100644 --- a/api/src/test/java/com/ning/http/client/async/ConnectionPoolTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncCompletionHandlerBase; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java b/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/DigestAuthTest.java rename to api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java index 66d1ce3086..dbd83a4000 100644 --- a/api/src/test/java/com/ning/http/client/async/DigestAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Realm; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Response; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; diff --git a/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java similarity index 94% rename from api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java rename to api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java index 4e226f8f40..13924201cc 100644 --- a/api/src/test/java/com/ning/http/client/async/EmptyBodyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java b/api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java rename to api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java index 3481e10899..97d038f59a 100644 --- a/api/src/test/java/com/ning/http/client/async/ErrorResponseTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java @@ -14,10 +14,10 @@ * under the License. * */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java rename to api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java index 54e128426e..d522ab05f5 100644 --- a/api/src/test/java/com/ning/http/client/async/Expect100ContinueTest.java +++ b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java rename to api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java index 905fd0f625..2247181f77 100644 --- a/api/src/test/java/com/ning/http/client/async/FilePartLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java @@ -10,13 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.FilePart; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.FilePart; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; diff --git a/api/src/test/java/com/ning/http/client/async/FilterTest.java b/api/src/test/java/org/asynchttpclient/async/FilterTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/FilterTest.java rename to api/src/test/java/org/asynchttpclient/async/FilterTest.java index cf9ac2676a..6f843e5c44 100644 --- a/api/src/test/java/com/ning/http/client/async/FilterTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilterTest.java @@ -10,17 +10,17 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.extra.ThrottleRequestFilter; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.ResponseFilter; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.extra.ThrottleRequestFilter; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.ResponseFilter; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java b/api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java similarity index 99% rename from api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java rename to api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java index 69e90e4e34..d586318015 100644 --- a/api/src/test/java/com/ning/http/client/async/FluentCaseInsensitiveStringsMapTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java @@ -13,9 +13,9 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.testng.annotations.Test; import java.util.Arrays; diff --git a/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java b/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java similarity index 99% rename from api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java rename to api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java index d6c6795985..d7d39d8eed 100644 --- a/api/src/test/java/com/ning/http/client/async/FluentStringsMapTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java @@ -13,9 +13,9 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.FluentStringsMap; +import org.asynchttpclient.FluentStringsMap; import org.testng.annotations.Test; import java.util.Arrays; diff --git a/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java b/api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java similarity index 92% rename from api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java rename to api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java index 82d6c6d95e..c86ad22ae4 100644 --- a/api/src/test/java/com/ning/http/client/async/FollowingThreadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; import org.testng.annotations.Test; import java.io.IOException; diff --git a/api/src/test/java/com/ning/http/client/async/Head302Test.java b/api/src/test/java/org/asynchttpclient/async/Head302Test.java similarity index 92% rename from api/src/test/java/com/ning/http/client/async/Head302Test.java rename to api/src/test/java/org/asynchttpclient/async/Head302Test.java index 2eef347d36..a01b47c910 100644 --- a/api/src/test/java/com/ning/http/client/async/Head302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/Head302Test.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncCompletionHandlerBase; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java similarity index 98% rename from api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java rename to api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java index 322ebd0fb1..1b5238bab3 100644 --- a/api/src/test/java/com/ning/http/client/async/HostnameVerifierTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig.Builder; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig.Builder; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; diff --git a/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java rename to api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java index f59a68e63d..45fa838423 100644 --- a/api/src/test/java/com/ning/http/client/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java rename to api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java index 2ccd40e2d6..f42b234464 100644 --- a/api/src/test/java/com/ning/http/client/async/IdleStateHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/InputStreamTest.java b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/InputStreamTest.java rename to api/src/test/java/org/asynchttpclient/async/InputStreamTest.java index f6d8c395ae..95d28480af 100644 --- a/api/src/test/java/com/ning/http/client/async/InputStreamTest.java +++ b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java b/api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java similarity index 92% rename from api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java rename to api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java index f80168bc50..9f9f9ef5fd 100644 --- a/api/src/test/java/com/ning/http/client/async/ListenableFutureTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.Response; import org.testng.annotations.Test; import java.util.concurrent.CountDownLatch; diff --git a/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java b/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java similarity index 98% rename from api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java rename to api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java index cf5bb10ed9..5ac600592d 100644 --- a/api/src/test/java/com/ning/http/client/async/MaxConnectionsInThreads.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java @@ -14,10 +14,10 @@ * under the License. * */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; diff --git a/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java rename to api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java index 5a3d1d5dce..947d36c554 100644 --- a/api/src/test/java/com/ning/http/client/async/MaxTotalConnectionTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; diff --git a/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java rename to api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java index e494012384..2b7cc355b6 100644 --- a/api/src/test/java/com/ning/http/client/async/MultipartUploadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java @@ -10,16 +10,17 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ByteArrayPart; -import com.ning.http.client.FilePart; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.StringPart; -import com.ning.http.util.AsyncHttpProviderUtils; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ByteArrayPart; +import org.asynchttpclient.FilePart; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.StringPart; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.apache.commons.fileupload.FileItemIterator; import org.apache.commons.fileupload.FileItemStream; import org.apache.commons.fileupload.FileUploadException; @@ -226,7 +227,7 @@ public void testSendingSmallFilesAndByteArray() { builder.addBodyPart(new ByteArrayPart("file4", "bytearray.txt", expectedContents.getBytes("UTF-8"), "text/plain", "UTF-8")); - com.ning.http.client.Request r = builder.build(); + Request r = builder.build(); Response res = c.executeRequest(r).get(); diff --git a/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java b/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java rename to api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java index 1e13f6ecc5..2ea4d395a2 100644 --- a/api/src/test/java/com/ning/http/client/async/MultipleHeaderTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java @@ -10,15 +10,15 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; diff --git a/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java similarity index 93% rename from api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java rename to api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java index 64dcc01802..9a6cf1bbc9 100644 --- a/api/src/test/java/com/ning/http/client/async/NoNullResponseTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java @@ -14,12 +14,12 @@ * under the License. * */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java rename to api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java index b8401491d5..924a9c90f8 100644 --- a/api/src/test/java/com/ning/http/client/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java b/api/src/test/java/org/asynchttpclient/async/ParamEncodingTest.java similarity index 94% rename from api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java rename to api/src/test/java/org/asynchttpclient/async/ParamEncodingTest.java index 4d05037b52..6fcf4f8c00 100644 --- a/api/src/test/java/com/ning/http/client/async/ParamEncodingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ParamEncodingTest.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java rename to api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java index bd1ea2e18e..6ca782abe6 100644 --- a/api/src/test/java/com/ning/http/client/async/PerRequestRelative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java rename to api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java index 3c4f451b8d..3fbb398ed4 100644 --- a/api/src/test/java/com/ning/http/client/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import static com.ning.http.util.DateUtil.millisTime; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.Response; +import static org.asynchttpclient.util.DateUtil.millisTime; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.Response; import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; import org.eclipse.jetty.server.Request; diff --git a/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java similarity index 94% rename from api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java rename to api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java index 6c75c56cb8..e741a6240b 100644 --- a/api/src/test/java/com/ning/http/client/async/PostRedirectGetTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java @@ -11,17 +11,17 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.ResponseFilter; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.ResponseFilter; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/PostWithQSTest.java rename to api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java index 372233f1d4..a33830f1dc 100644 --- a/api/src/test/java/com/ning/http/client/async/PostWithQSTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java @@ -13,12 +13,12 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncCompletionHandlerBase; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; @@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/ProxyTest.java rename to api/src/test/java/org/asynchttpclient/async/ProxyTest.java index a8dbf8883c..94ee870f84 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; import static org.testng.Assert.*; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Response; import java.io.IOException; import java.net.ConnectException; @@ -222,7 +222,7 @@ public void testProxyActivationProperty() throws IOException, ExecutionException System.setProperty("http.proxyHost", "127.0.0.1"); System.setProperty("http.proxyPort", String.valueOf(port1)); System.setProperty("http.nonProxyHosts", "localhost"); - System.setProperty("com.ning.http.client.AsyncHttpClientConfig.useProxyProperties", "true"); + System.setProperty("org.asynchttpclient.AsyncHttpClientConfig.useProxyProperties", "true"); AsyncHttpClient client = getAsyncHttpClient(null); try { diff --git a/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java similarity index 94% rename from api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java rename to api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index ccfbe65f76..61a2bc551e 100644 --- a/api/src/test/java/com/ning/http/client/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -10,15 +10,15 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncCompletionHandlerBase; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.SimpleAsyncHttpClient; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.SimpleAsyncHttpClient; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; diff --git a/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java rename to api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index 43f1807190..bf7d104897 100644 --- a/api/src/test/java/com/ning/http/client/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; diff --git a/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/async/QueryParametersTest.java rename to api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java index 0554ecd268..2b6437a888 100644 --- a/api/src/test/java/com/ning/http/client/async/QueryParametersTest.java +++ b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.slf4j.LoggerFactory; @@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/api/src/test/java/com/ning/http/client/async/RC10KTest.java b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java similarity index 94% rename from api/src/test/java/com/ning/http/client/async/RC10KTest.java rename to api/src/test/java/org/asynchttpclient/async/RC10KTest.java index 7859f2141c..9b07accd80 100644 --- a/api/src/test/java/com/ning/http/client/async/RC10KTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java similarity index 93% rename from api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java rename to api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java index 1feb09440a..ee1c0c1065 100644 --- a/api/src/test/java/com/ning/http/client/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java @@ -13,14 +13,15 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; @@ -120,7 +121,7 @@ public void testGetRedirectFinalUrl() { RequestBuilder builder = new RequestBuilder("GET"); builder.setUrl(servletEndpointRedirectUrl); - com.ning.http.client.Request r = builder.build(); + Request r = builder.build(); try { ListenableFuture response = c.executeRequest(r); diff --git a/api/src/test/java/com/ning/http/client/async/Relative302Test.java b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java similarity index 97% rename from api/src/test/java/com/ning/http/client/async/Relative302Test.java rename to api/src/test/java/org/asynchttpclient/async/Relative302Test.java index 1c06a2e202..9d73308e7e 100644 --- a/api/src/test/java/com/ning/http/client/async/Relative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java similarity index 93% rename from api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java rename to api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java index 5660342076..153f17e8fd 100644 --- a/api/src/test/java/com/ning/http/client/async/RemoteSiteTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; @@ -25,19 +25,20 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.asynchttpclient.Cookie; import org.testng.Assert; import org.testng.annotations.Test; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.util.AsyncHttpProviderUtils; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.util.AsyncHttpProviderUtils; /** * Unit tests for remote site. @@ -247,8 +248,8 @@ public void evilCoookieTest() throws Throwable { builder2.setFollowRedirects(true); builder2.setUrl("http://www.google.com/"); builder2.addHeader("Content-Type", "text/plain"); - builder2.addCookie(new com.ning.http.client.Cookie(".google.com", "evilcookie", "test", "/", 10, false, 1, false, false, null, null, Collections. emptySet())); - com.ning.http.client.Request request2 = builder2.build(); + builder2.addCookie(new Cookie(".google.com", "evilcookie", "test", "/", 10, false, 1, false, false, null, null, Collections. emptySet())); + Request request2 = builder2.build(); Response response = c.executeRequest(request2).get(); assertNotNull(response); diff --git a/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java b/api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java rename to api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java index 52714d3ed9..586b74a50a 100644 --- a/api/src/test/java/com/ning/http/client/async/RequestBuilderTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RequestBuilderTest.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.FluentStringsMap; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; +import org.asynchttpclient.FluentStringsMap; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; import org.testng.annotations.Test; import java.io.IOException; diff --git a/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/RetryRequestTest.java rename to api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java index 6b6ccd86bd..d9dc0970d2 100644 --- a/api/src/test/java/com/ning/http/client/async/RetryRequestTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java @@ -10,10 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java similarity index 90% rename from api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java rename to api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java index 064b472e09..3baf664f2f 100644 --- a/api/src/test/java/com/ning/http/client/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package org.asynchttpclient.async; import static org.testng.Assert.*; @@ -25,12 +25,12 @@ import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; -import com.ning.http.client.SimpleAsyncHttpClient; -import com.ning.http.client.SimpleAsyncHttpClient.ErrorDocumentBehaviour; -import com.ning.http.client.consumers.OutputStreamBodyConsumer; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.asynchttpclient.SimpleAsyncHttpClient; +import org.asynchttpclient.SimpleAsyncHttpClient.ErrorDocumentBehaviour; +import org.asynchttpclient.consumers.OutputStreamBodyConsumer; /** * @author Benjamin Hanzelmann diff --git a/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java rename to api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index a0ba20249e..30f12a410a 100644 --- a/api/src/test/java/com/ning/http/client/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -10,17 +10,17 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.ByteArrayPart; -import com.ning.http.client.Response; -import com.ning.http.client.SimpleAsyncHttpClient; -import com.ning.http.client.consumers.AppendableBodyConsumer; -import com.ning.http.client.consumers.OutputStreamBodyConsumer; -import com.ning.http.client.generators.FileBodyGenerator; -import com.ning.http.client.generators.InputStreamBodyGenerator; -import com.ning.http.client.simple.HeaderMap; -import com.ning.http.client.simple.SimpleAHCTransferListener; +package org.asynchttpclient.async; + +import org.asynchttpclient.ByteArrayPart; +import org.asynchttpclient.Response; +import org.asynchttpclient.SimpleAsyncHttpClient; +import org.asynchttpclient.consumers.AppendableBodyConsumer; +import org.asynchttpclient.consumers.OutputStreamBodyConsumer; +import org.asynchttpclient.generators.FileBodyGenerator; +import org.asynchttpclient.generators.InputStreamBodyGenerator; +import org.asynchttpclient.simple.HeaderMap; +import org.asynchttpclient.simple.SimpleAHCTransferListener; import org.testng.annotations.Test; import java.io.ByteArrayInputStream; diff --git a/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/async/TransferListenerTest.java rename to api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index fe461336fd..48e18c1bed 100644 --- a/api/src/test/java/com/ning/http/client/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -10,14 +10,14 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.Response; -import com.ning.http.client.generators.FileBodyGenerator; -import com.ning.http.client.listener.TransferCompletionHandler; -import com.ning.http.client.listener.TransferListener; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.Response; +import org.asynchttpclient.generators.FileBodyGenerator; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.listener.TransferListener; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java rename to api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index 709b459649..fb8d5abff4 100644 --- a/api/src/test/java/com/ning/http/client/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -10,14 +10,14 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.webdav.WebDavCompletionHandlerBase; -import com.ning.http.client.webdav.WebDavResponse; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.webdav.WebDavCompletionHandlerBase; +import org.asynchttpclient.webdav.WebDavResponse; import org.apache.catalina.Context; import org.apache.catalina.Engine; import org.apache.catalina.Host; diff --git a/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java rename to api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java index b5400b183e..c11a3ea5dc 100644 --- a/api/src/test/java/com/ning/http/client/async/ZeroCopyFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java @@ -10,15 +10,15 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; - -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.Response; +package org.asynchttpclient.async; + +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; @@ -42,7 +42,7 @@ import static org.testng.Assert.assertTrue; /** - * Zero copy test which use FileChannel.transfer under the hood . The same SSL test is also covered in {@link com.ning.http.client.async.BasicHttpsTest} + * Zero copy test which use FileChannel.transfer under the hood . The same SSL test is also covered in {@link BasicHttpsTest} */ public abstract class ZeroCopyFileTest extends AbstractBasicTest { diff --git a/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java b/api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java rename to api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java index 6ba078d2ba..efd53a3bf6 100644 --- a/api/src/test/java/com/ning/http/client/generators/ByteArrayBodyGeneratorTest.java +++ b/api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java @@ -11,10 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.generators; +package org.asynchttpclient.generators; -import com.ning.http.client.Body; +import org.asynchttpclient.Body; +import org.asynchttpclient.generators.ByteArrayBodyGenerator; import org.testng.annotations.Test; import java.io.IOException; diff --git a/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java b/api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java similarity index 88% rename from api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java rename to api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java index e75a1e981a..f2256fad08 100644 --- a/api/src/test/java/com/ning/http/client/oauth/TestSignatureCalculator.java +++ b/api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java @@ -13,12 +13,15 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.oauth; +package org.asynchttpclient.oauth; +import org.asynchttpclient.oauth.ConsumerKey; +import org.asynchttpclient.oauth.OAuthSignatureCalculator; +import org.asynchttpclient.oauth.RequestToken; import org.testng.Assert; import org.testng.annotations.Test; -import com.ning.http.client.FluentStringsMap; +import org.asynchttpclient.FluentStringsMap; public class TestSignatureCalculator { diff --git a/api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java b/api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java similarity index 87% rename from api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java rename to api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java index eb52cfee79..2c4e3853f6 100644 --- a/api/src/test/java/com/ning/org/jboss/netty/handler/codec/http/CookieDecoderTest.java +++ b/api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java @@ -10,20 +10,22 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.org.jboss.netty.handler.codec.http; +package org.asynchttpclient.org.jboss.netty.handler.codec.http; import java.util.Set; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; import org.testng.Assert; import org.testng.annotations.Test; -import com.ning.http.client.Cookie; +import org.asynchttpclient.Cookie; public class CookieDecoderTest { @Test(groups = "fast") public void testDecodeUnquoted() { - Set cookies = CookieDecoder.decode("foo=value; domain=/; path=/"); + Set cookies = CookieDecoder.decode( + "foo=value; domain=/; path=/"); Assert.assertEquals(cookies.size(), 1); Cookie first = cookies.iterator().next(); diff --git a/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java b/api/src/test/java/org/asynchttpclient/resumable/MapResumableProcessor.java similarity index 82% rename from api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java rename to api/src/test/java/org/asynchttpclient/resumable/MapResumableProcessor.java index 2e5734969f..3dbf4e8276 100644 --- a/api/src/test/java/com/ning/http/client/resumable/MapResumableProcessor.java +++ b/api/src/test/java/org/asynchttpclient/resumable/MapResumableProcessor.java @@ -1,6 +1,6 @@ -package com.ning.http.client.resumable; +package org.asynchttpclient.resumable; -import com.ning.http.client.resumable.ResumableAsyncHandler.ResumableProcessor; +import org.asynchttpclient.resumable.ResumableAsyncHandler.ResumableProcessor; import java.util.HashMap; import java.util.Map; diff --git a/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java b/api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java similarity index 92% rename from api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java rename to api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java index d3e876a4fb..ab958e529f 100644 --- a/api/src/test/java/com/ning/http/client/resumable/PropertiesBasedResumableProcesserTest.java +++ b/api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java @@ -1,4 +1,4 @@ -package com.ning.http.client.resumable; +package org.asynchttpclient.resumable; /* * Copyright (c) 2010 Sonatype, Inc. All rights reserved. @@ -13,6 +13,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ +import org.asynchttpclient.resumable.PropertiesBasedResumableProcessor; import org.testng.annotations.Test; import java.util.Map; diff --git a/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/resumable/ResumableAsyncHandlerTest.java similarity index 90% rename from api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java rename to api/src/test/java/org/asynchttpclient/resumable/ResumableAsyncHandlerTest.java index 298983e0de..7feb70ce74 100644 --- a/api/src/test/java/com/ning/http/client/resumable/ResumableAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/resumable/ResumableAsyncHandlerTest.java @@ -1,4 +1,4 @@ -package com.ning.http.client.resumable; +package org.asynchttpclient.resumable; /* * Copyright (c) 2010 Sonatype, Inc. All rights reserved. @@ -13,8 +13,9 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.resumable.ResumableAsyncHandler; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java b/api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java similarity index 92% rename from api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java rename to api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java index 0b47f2e7e2..d1300614ed 100644 --- a/api/src/test/java/com/ning/http/util/AsyncHttpProviderUtilsTest.java +++ b/api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java @@ -10,10 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; import java.net.URI; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.testng.Assert; import org.testng.annotations.Test; @@ -23,7 +24,8 @@ public class AsyncHttpProviderUtilsTest { public void getRedirectUriShouldHandleProperlyEncodedLocation() { String url = "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505"; - URI uri = AsyncHttpProviderUtils.getRedirectUri(URI.create("http://www.ebay.de"), url); + URI uri = AsyncHttpProviderUtils.getRedirectUri( + URI.create("http://www.ebay.de"), url); Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); } diff --git a/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java b/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java similarity index 91% rename from api/src/test/java/com/ning/http/util/ProxyUtilsTest.java rename to api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java index 1ccd206a80..24f1823d97 100644 --- a/api/src/test/java/com/ning/http/util/ProxyUtilsTest.java +++ b/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java @@ -10,11 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.util; +package org.asynchttpclient.util; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.util.ProxyUtils; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java b/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java similarity index 92% rename from api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java rename to api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java index e675a1a611..21af508699 100644 --- a/api/src/test/java/com/ning/http/util/TestUTF8UrlCodec.java +++ b/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java @@ -13,8 +13,9 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.util; +package org.asynchttpclient.util; +import org.asynchttpclient.util.UTF8UrlEncoder; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/api/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java b/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java similarity index 96% rename from api/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java rename to api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java index a3bf5a6382..bbff1213e9 100644 --- a/api/src/test/java/com/ning/http/client/websocket/AbstractBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java @@ -10,10 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerWrapper; diff --git a/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java similarity index 95% rename from api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java rename to api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java index 134673821b..f9086515c7 100644 --- a/api/src/test/java/com/ning/http/client/websocket/ByteMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java @@ -10,9 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; -import com.ning.http.client.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketByteListener; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.testng.annotations.Test; import javax.servlet.http.HttpServletRequest; @@ -70,7 +73,8 @@ public void echoByte() throws Throwable { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(new byte[0]); - WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + WebSocket + websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { @Override public void onOpen(WebSocket websocket) { diff --git a/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java similarity index 87% rename from api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java rename to api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java index 9cc899b5d5..271ade7912 100644 --- a/api/src/test/java/com/ning/http/client/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java @@ -10,9 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; -import com.ning.http.client.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.testng.annotations.Test; import java.util.concurrent.CountDownLatch; @@ -63,7 +67,8 @@ public void onCloseWithCodeServerClose() throws Throwable { } } - public final static class Listener implements WebSocketListener, WebSocketCloseCodeReasonListener { + public final static class Listener implements WebSocketListener, + WebSocketCloseCodeReasonListener { final CountDownLatch latch; final AtomicReference text; @@ -74,11 +79,11 @@ public Listener(CountDownLatch latch, AtomicReference text) { } // @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } // @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { } public void onClose(WebSocket websocket, int code, String reason) { diff --git a/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java similarity index 91% rename from api/src/test/java/com/ning/http/client/websocket/RedirectTest.java rename to api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java index b127aa8acc..dda8808237 100644 --- a/api/src/test/java/com/ning/http/client/websocket/RedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java @@ -11,10 +11,13 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.handler.HandlerList; @@ -90,13 +93,13 @@ public void testRedirectToWSResource() throws Exception { WebSocket websocket = c.prepareGet(getRedirectURL()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { text.set("OnOpen"); latch.countDown(); } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { } @Override diff --git a/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java similarity index 88% rename from api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java rename to api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java index bf6eac9c56..c64efe4cd7 100644 --- a/api/src/test/java/com/ning/http/client/websocket/TextMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java @@ -10,9 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket; +package org.asynchttpclient.websocket; -import com.ning.http.client.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketTextListener; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.testng.annotations.Test; import javax.servlet.http.HttpServletRequest; @@ -75,13 +79,13 @@ public void onOpen() throws Throwable { /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { text.set("OnOpen"); latch.countDown(); } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { } @Override @@ -140,11 +144,11 @@ public void onTimeoutCloseTest() throws Throwable { /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { text.set("OnClose"); latch.countDown(); } @@ -173,11 +177,11 @@ public void onClose() throws Throwable { WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { text.set("OnClose"); latch.countDown(); } @@ -218,11 +222,11 @@ public void onFragment(String fragment, boolean last) { } @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { latch.countDown(); } @@ -262,11 +266,11 @@ public void onFragment(String fragment, boolean last) { } @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { latch.countDown(); } @@ -288,11 +292,11 @@ public void onFragment(String fragment, boolean last) { } @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { latch.countDown(); } @@ -332,12 +336,12 @@ public void onFragment(String fragment, boolean last) { } @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { websocket.sendTextMessage("ECHO").sendTextMessage("ECHO"); } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { latch.countDown(); } @@ -374,11 +378,11 @@ public void onFragment(String fragment, boolean last) { } @Override - public void onOpen(com.ning.http.client.websocket.WebSocket websocket) { + public void onOpen(WebSocket websocket) { } @Override - public void onClose(com.ning.http.client.websocket.WebSocket websocket) { + public void onClose(WebSocket websocket) { latch.countDown(); } diff --git a/extras/guava/pom.xml b/extras/guava/pom.xml index db33ac3a22..f43c6c950c 100644 --- a/extras/guava/pom.xml +++ b/extras/guava/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-extras-parent 2.0.0-SNAPSHOT diff --git a/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java b/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java index 7d32343fca..d0d1db8cde 100644 --- a/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java +++ b/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java @@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import com.ning.http.client.ListenableFuture; +import org.asynchttpclient.ListenableFuture; public final class ListenableFutureAdapter { diff --git a/extras/jdeferred/pom.xml b/extras/jdeferred/pom.xml index bc49aa1619..c79702732e 100644 --- a/extras/jdeferred/pom.xml +++ b/extras/jdeferred/pom.xml @@ -17,7 +17,7 @@ 4.0.0 async-http-client-extras-parent - com.ning + org.asynchttpclient 2.0.0-SNAPSHOT .. diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java index 5e4ac2675e..8ede1b539f 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java @@ -17,13 +17,14 @@ import java.io.IOException; +import org.asynchttpclient.AsyncHandler; import org.jdeferred.Promise; import org.jdeferred.impl.DeferredObject; -import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.Response; public class AsyncHttpDeferredObject extends DeferredObject { public AsyncHttpDeferredObject(BoundRequestBuilder builder) throws IOException { @@ -40,14 +41,14 @@ public void onThrowable(Throwable t) { } @Override - public com.ning.http.client.AsyncHandler.STATE onContentWriteProgress( + public AsyncHandler.STATE onContentWriteProgress( long amount, long current, long total) { AsyncHttpDeferredObject.this.notify(new ContentWriteProgress(amount, current, total)); return super.onContentWriteProgress(amount, current, total); } @Override - public com.ning.http.client.AsyncHandler.STATE onBodyPartReceived( + public AsyncHandler.STATE onBodyPartReceived( HttpResponseBodyPart content) throws Exception { AsyncHttpDeferredObject.this.notify(new HttpResponseBodyPartProgress(content)); return super.onBodyPartReceived(content); diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java index 79a5f7b5dc..3010a5f1bd 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java +++ b/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java @@ -15,7 +15,7 @@ */ package com.ning.http.client.extra; -import com.ning.http.client.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseBodyPart; public class HttpResponseBodyPartProgress implements HttpProgress { private final HttpResponseBodyPart part; diff --git a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java b/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java index 54bfb0e396..a098cf847a 100644 --- a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java +++ b/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java @@ -28,8 +28,8 @@ import org.jdeferred.impl.DefaultDeferredManager; import org.jdeferred.multiple.MultipleResults; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; public class AsyncHttpTest extends TestCase { protected DefaultDeferredManager deferredManager; diff --git a/extras/pom.xml b/extras/pom.xml index 58ac30f3eb..281689b29b 100644 --- a/extras/pom.xml +++ b/extras/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-project 2.0.0-SNAPSHOT @@ -50,7 +50,7 @@ - com.ning + org.asynchttpclient async-http-client-api ${project.version} diff --git a/pom.xml b/pom.xml index 5aade5ff2e..54292c283e 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 5 4.0.0 - com.ning + org.asynchttpclient async-http-client-project Asynchronous Http Client Project 2.0.0-SNAPSHOT diff --git a/providers/apache/pom.xml b/providers/apache/pom.xml index 26fcfef288..445c800d07 100644 --- a/providers/apache/pom.xml +++ b/providers/apache/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-providers-parent 2.0.0-SNAPSHOT diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java index 201a377a36..2b8c0842af 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java @@ -12,38 +12,38 @@ */ package com.ning.http.client.providers.apache; -import static com.ning.http.util.MiscUtil.isNonEmpty; - -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.Body; -import com.ning.http.client.ByteArrayPart; -import com.ning.http.client.Cookie; -import com.ning.http.client.FilePart; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.Part; -import com.ning.http.client.ProgressAsyncHandler; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Realm; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.StringPart; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.IOExceptionFilter; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.client.listener.TransferCompletionHandler; -import com.ning.http.client.resumable.ResumableAsyncHandler; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.http.util.ProxyUtils; -import com.ning.http.util.UTF8UrlEncoder; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.Body; +import org.asynchttpclient.ByteArrayPart; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FilePart; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.Part; +import org.asynchttpclient.ProgressAsyncHandler; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.StringPart; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.resumable.ResumableAsyncHandler; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.ProxyUtils; +import org.asynchttpclient.util.UTF8UrlEncoder; import org.apache.commons.httpclient.CircularRedirectException; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; @@ -114,11 +114,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.zip.GZIPInputStream; -import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; +import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; /** - * An {@link com.ning.http.client.AsyncHttpProvider} for Apache Http Client 3.1 + * An {@link org.asynchttpclient.AsyncHttpProvider} for Apache Http Client 3.1 */ public class ApacheAsyncHttpProvider implements AsyncHttpProvider { private final static Logger logger = LoggerFactory.getLogger(ApacheAsyncHttpProvider.class); diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java index 8b2aee6d07..e3248479fb 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.apache; -import com.ning.http.client.AsyncHttpProviderConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; import java.util.Map; import java.util.Set; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java index 4c2ee4e7c7..ccf49c9184 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java @@ -12,13 +12,13 @@ */ package com.ning.http.client.providers.apache; -import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; -import com.ning.http.client.Cookie; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.providers.ResponseBase; -import com.ning.http.util.AsyncHttpProviderUtils; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.providers.ResponseBase; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import java.io.IOException; import java.util.ArrayList; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java index de26208d12..77443d12fb 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java @@ -12,8 +12,8 @@ */ package com.ning.http.client.providers.apache; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseBodyPart; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseBodyPart; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java index 48033c7122..1ef3adf9f3 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.apache; -import static com.ning.http.util.DateUtil.millisTime; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.Request; -import com.ning.http.client.listenable.AbstractListenableFuture; +import static org.asynchttpclient.util.DateUtil.millisTime; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.Request; +import org.asynchttpclient.listenable.AbstractListenableFuture; import org.apache.commons.httpclient.HttpMethodBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java index 1940f4c971..049cce44bb 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.apache; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseHeaders; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HttpMethodBase; @@ -58,7 +58,7 @@ private FluentCaseInsensitiveStringsMap computerHeaders() { /** * Return the HTTP header * - * @return an {@link com.ning.http.client.FluentCaseInsensitiveStringsMap} + * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap} */ @Override public FluentCaseInsensitiveStringsMap getHeaders() { diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java index 64702c75a8..a26e957931 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java +++ b/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java @@ -12,8 +12,8 @@ */ package com.ning.http.client.providers.apache; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseStatus; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseStatus; import org.apache.commons.httpclient.HttpMethodBase; import java.net.URI; diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index 5bd599333c..16535753a0 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-providers-parent 2.0.0-SNAPSHOT diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java index c31c40c937..f4569f5c2a 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java @@ -12,8 +12,8 @@ */ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Queue; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java index 4e59ab31ea..15de54350d 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java @@ -6,7 +6,7 @@ import org.ietf.jgss.GSSName; import org.ietf.jgss.Oid; -import com.ning.http.util.Base64; +import org.asynchttpclient.util.Base64; import org.slf4j.LoggerFactory; public class GSSSPNEGOWrapper { diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java index 7961252825..28cd2aa7db 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -13,47 +13,47 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; -import com.ning.http.client.ConnectionPoolKeyStrategy; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.FluentStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Realm; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.UpgradeHandler; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.client.listener.TransferCompletionHandler; -import com.ning.http.client.ntlm.NTLMEngine; -import com.ning.http.client.websocket.WebSocket; -import com.ning.http.client.websocket.WebSocketByteListener; -import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; -import com.ning.http.client.websocket.WebSocketListener; -import com.ning.http.client.websocket.WebSocketPingListener; -import com.ning.http.client.websocket.WebSocketPongListener; -import com.ning.http.client.websocket.WebSocketTextListener; -import com.ning.http.client.websocket.WebSocketUpgradeHandler; -import com.ning.http.multipart.MultipartRequestEntity; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.http.util.AuthenticatorUtils; -import com.ning.http.util.ProxyUtils; -import com.ning.http.util.SslUtils; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; +import org.asynchttpclient.ConnectionPoolKeyStrategy; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.FluentStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.UpgradeHandler; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.ntlm.NTLMEngine; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketByteListener; +import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketPingListener; +import org.asynchttpclient.websocket.WebSocketPongListener; +import org.asynchttpclient.websocket.WebSocketTextListener; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; +import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AuthenticatorUtils; +import org.asynchttpclient.util.ProxyUtils; +import org.asynchttpclient.util.SslUtils; import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.CloseListener; @@ -159,7 +159,7 @@ import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider.SwitchingSSLFilter.SSLSwitchingEvent; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property; import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; /** * A Grizzly 2.0-based implementation of {@link AsyncHttpProvider}. diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java index cd98e82267..fb225f5b23 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java @@ -13,7 +13,7 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpProviderConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; import org.glassfish.grizzly.http.HttpCodecFilter; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; @@ -24,7 +24,7 @@ /** * {@link AsyncHttpProviderConfig} implementation that allows customization * of the Grizzly runtime outside of the scope of what the - * {@link com.ning.http.client.AsyncHttpClientConfig} offers. + * {@link org.asynchttpclient.AsyncHttpClientConfig} offers. * * @see Property * diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java index 6cde1a5e8d..59929744e8 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java @@ -13,8 +13,8 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ConnectionsPool; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ConnectionsPool; import org.glassfish.grizzly.CloseListener; import org.glassfish.grizzly.CloseType; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java index 651676ca96..9d0c8589a8 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java @@ -13,14 +13,14 @@ package com.ning.http.client.providers.grizzly; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; -import com.ning.http.client.Cookie; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.providers.ResponseBase; -import com.ning.http.util.AsyncHttpProviderUtils; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.providers.ResponseBase; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.http.Cookies; @@ -38,7 +38,7 @@ import java.util.List; /** - * {@link com.ning.http.client.HttpResponseBodyPart} implementation using the Grizzly 2.0 HTTP client + * {@link org.asynchttpclient.HttpResponseBodyPart} implementation using the Grizzly 2.0 HTTP client * codec. * * @author The Grizzly Team diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java index c41eba9d74..457efcaf48 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java @@ -13,8 +13,8 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseBodyPart; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseBodyPart; import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.Connection; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java index 2cc3b9420a..5bf45e7962 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java @@ -13,10 +13,10 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Request; -import com.ning.http.client.listenable.AbstractListenableFuture; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.listenable.AbstractListenableFuture; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.impl.FutureImpl; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java index 1b18601c7d..aafff98b6e 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseHeaders; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.util.MimeHeaders; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java index 2f25d35d6c..397a5e48db 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java +++ b/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java @@ -13,8 +13,8 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseStatus; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseStatus; import org.glassfish.grizzly.http.HttpResponsePacket; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java index 76f5d1235e..480df3e71e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -13,10 +13,10 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.AsyncProvidersBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.async.AsyncProvidersBasicTest; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java index 2b5f6409da..bbb0ac794e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AsyncStreamHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AsyncStreamHandlerTest; public class GrizzlyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java index e182096511..6d4f7c7293 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AsyncStreamLifecycleTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AsyncStreamLifecycleTest; public class GrizzlyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java index 3525c042a2..65b02a68e2 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AuthTimeoutTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AuthTimeoutTest; public class GrizzlyAuthTimeoutTest extends AuthTimeoutTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java index 35bfafeac0..ce244f7700 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BasicAuthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BasicAuthTest; public class GrizzlyBasicAuthTest extends BasicAuthTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java index 94cbab8596..e47d0de661 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BasicHttpsTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BasicHttpsTest; public class GrizzlyBasicHttpsTest extends BasicHttpsTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java index 2079ddc1d0..a8c7319326 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BodyChunkTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BodyChunkTest; public class GrizzlyBodyChunkTest extends BodyChunkTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java index 693ce8eaa7..13fd71f852 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BodyDeferringAsyncHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BodyDeferringAsyncHandlerTest; public class GrizzlyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java index af12183e26..587977a37e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ByteBufferCapacityTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ByteBufferCapacityTest; import org.testng.annotations.Test; public class GrizzlyByteBufferCapacityTest extends ByteBufferCapacityTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java index 33fe2a50b8..7c935dd8eb 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ChunkingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ChunkingTest; public class GrizzlyChunkingTest extends ChunkingTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java index 331d20b152..29cbd92bf6 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ComplexClientTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ComplexClientTest; public class GrizzlyComplexClientTest extends ComplexClientTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java index 7be2046d54..a65c938169 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -13,11 +13,11 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.Response; -import com.ning.http.client.async.ConnectionPoolTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.ConnectionPoolTest; import org.glassfish.grizzly.Connection; import org.testng.annotations.Test; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java index 919a572327..ce7542c2ed 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.DigestAuthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.DigestAuthTest; public class GrizzlyDigestAuthTest extends DigestAuthTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java index bbb14e5d08..a55093821c 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.EmptyBodyTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.EmptyBodyTest; public class GrizzlyEmptyBodyTest extends EmptyBodyTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java index 27556b34f5..9712467fcf 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ErrorResponseTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ErrorResponseTest; public class GrizzlyErrorResponseTest extends ErrorResponseTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java index 45d856e4bb..8fe3098cfa 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Expect100ContinueTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Expect100ContinueTest; public class GrizzlyExpectContinue100Test extends Expect100ContinueTest{ diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java index 26a7b1bf11..2cc8811985 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FilterTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FilterTest; public class GrizzlyFilterTest extends FilterTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java index 866c2ddce9..2ecc9c8d8b 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FollowingThreadTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FollowingThreadTest; public class GrizzlyFollowingThreadTest extends FollowingThreadTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java index 401192e07b..18032e52eb 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Head302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Head302Test; public class GrizzlyHead302Test extends Head302Test { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java index cec8f1460f..809d2c7e6d 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.HttpToHttpsRedirectTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.HttpToHttpsRedirectTest; public class GrizzlyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java index 4d240fd2a3..713e048815 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.IdleStateHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.IdleStateHandlerTest; public class GrizzlyIdleStateHandlerTest extends IdleStateHandlerTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java index 6ad86e1438..018bceeb64 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.InputStreamTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.InputStreamTest; public class GrizzlyInputStreamTest extends InputStreamTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java index 789861dc75..1ce2a57a8c 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ListenableFutureTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ListenableFutureTest; public class GrizzlyListenableFutureTest extends ListenableFutureTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java index 8314745a76..8e4862d321 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MaxConnectionsInThreads; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MaxConnectionsInThreads; public class GrizzlyMaxConnectionsInThreadsTest extends MaxConnectionsInThreads { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java index 2c77932ea2..a8c5fd1017 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MaxTotalConnectionTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MaxTotalConnectionTest; public class GrizzlyMaxTotalConnectionTest extends MaxTotalConnectionTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java index e5f12017dc..4ca6946450 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MultipleHeaderTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MultipleHeaderTest; public class GrizzlyMultipleHeaderTest extends MultipleHeaderTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java index 6be836d120..7f4eddcf1a 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.NoNullResponseTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.NoNullResponseTest; public class GrizzlyNoNullResponseTest extends NoNullResponseTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java index 5c8ef74bbd..c526f25325 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.NonAsciiContentLengthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.NonAsciiContentLengthTest; public class GrizzlyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java index ec5462c3ed..6a901ab030 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ParamEncodingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ParamEncodingTest; public class GrizzlyParamEncodingTest extends ParamEncodingTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java index 013a710ac8..9e1d09c1f8 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PerRequestRelative302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PerRequestRelative302Test; public class GrizzlyPerRequestRelative302Test extends PerRequestRelative302Test { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java index 796f28acd7..562808d71d 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PerRequestTimeoutTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PerRequestTimeoutTest; public class GrizzlyPerRequestTimeoutTest extends PerRequestTimeoutTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java index 64d89f533d..f5862dcc06 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PostRedirectGetTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PostRedirectGetTest; public class GrizzlyPostRedirectGetTest extends PostRedirectGetTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java index 372e6cb482..d0611b0bd5 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PostWithQSTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PostWithQSTest; public class GrizzlyPostWithQSTest extends PostWithQSTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java index 2993d05dfb..f37af2d914 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java @@ -15,8 +15,8 @@ */ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; public class GrizzlyProviderUtil { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java index d075b42ed3..6f907e6040 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ProxyTest; public class GrizzlyProxyTest extends ProxyTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java index 1c690c7f35..f54c1d9546 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyTunnellingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ProxyTunnellingTest; public class GrizzlyProxyTunnelingTest extends ProxyTunnellingTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java index 2cbcb371de..eb40e104f0 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PutLargeFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PutLargeFileTest; public class GrizzlyPutLargeFileTest extends PutLargeFileTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java index 936547bf17..7dd85d07ad 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.QueryParametersTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.QueryParametersTest; public class GrizzlyQueryParametersTest extends QueryParametersTest{ diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java index e94e6d11ba..f194542ea4 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RC10KTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RC10KTest; public class GrizzlyRC10KTest extends RC10KTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java index 6553855c0d..be6394fb05 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java @@ -13,10 +13,10 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.RedirectConnectionUsageTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.async.RedirectConnectionUsageTest; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java index c876c51e93..84bf34badd 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Relative302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Relative302Test; public class GrizzlyRelative302Test extends Relative302Test { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java index a5804d9a0f..d7d9cf96d3 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RemoteSiteTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RemoteSiteTest; public class GrizzlyRemoteSiteTest extends RemoteSiteTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java index ae45cf25aa..763b0f2aab 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RetryRequestTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RetryRequestTest; public class GrizzlyRetryRequestTest extends RetryRequestTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java index 261a57d141..51d6e5d657 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.SimpleAsyncHttpClientTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.SimpleAsyncHttpClientTest; public class GrizzlySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java index bed4d51f3b..0648967ff2 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.TransferListenerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.TransferListenerTest; public class GrizzlyTransferListenerTest extends TransferListenerTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java index 3cb45f0447..609a69b6d5 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java @@ -13,11 +13,11 @@ package com.ning.http.client.providers.grizzly; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; import org.eclipse.jetty.continuation.Continuation; import org.eclipse.jetty.continuation.ContinuationSupport; import org.eclipse.jetty.server.Request; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java index 3949d1367e..c5f38b966f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java @@ -12,11 +12,11 @@ */ package com.ning.http.client.providers.grizzly.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; -import com.ning.http.client.websocket.ByteMessageTest; +import org.asynchttpclient.websocket.ByteMessageTest; import org.testng.annotations.Test; public class GrizzlyByteMessageTest extends ByteMessageTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java index f45f6542df..92fbb4618e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java @@ -13,11 +13,11 @@ package com.ning.http.client.providers.grizzly.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; -import com.ning.http.client.websocket.CloseCodeReasonMessageTest; +import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; import org.testng.annotations.Test; public class GrizzlyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java index 0eec9e3fc8..f9c9453e58 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java @@ -13,11 +13,11 @@ package com.ning.http.client.providers.grizzly.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; -import com.ning.http.client.websocket.RedirectTest; +import org.asynchttpclient.websocket.RedirectTest; public class GrizzlyRedirectTest extends RedirectTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java index 3fa62d06b1..96406412ee 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java +++ b/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java @@ -12,11 +12,11 @@ */ package com.ning.http.client.providers.grizzly.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; -import com.ning.http.client.websocket.ByteMessageTest; +import org.asynchttpclient.websocket.ByteMessageTest; import org.testng.annotations.Test; public class GrizzlyTextMessageTest extends ByteMessageTest { diff --git a/providers/netty-4/pom.xml b/providers/netty-4/pom.xml index 4104650bf6..5aefababc7 100644 --- a/providers/netty-4/pom.xml +++ b/providers/netty-4/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-providers-parent 2.0.0-SNAPSHOT diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java index 0b7a754cbc..d1069c3839 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.Body; +import org.asynchttpclient.Body; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.handler.stream.ChunkedInput; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java index d6127bdf6e..6bb85c77e9 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.RandomAccessBody; +import org.asynchttpclient.RandomAccessBody; import io.netty.buffer.AbstractReferenceCounted; import io.netty.buffer.ReferenceCounted; import io.netty.channel.FileRegion; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java index 84ba2bdf61..17513090c6 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java @@ -18,8 +18,8 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; /** * {@link BodyGenerator} which may return just part of the payload at the time diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java index dac5c5bc4f..ca779d3b52 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java @@ -15,47 +15,47 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHandler.STATE; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; -import com.ning.http.client.ConnectionPoolKeyStrategy; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.ProgressAsyncHandler; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.RandomAccessBody; -import com.ning.http.client.Realm; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.IOExceptionFilter; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.client.generators.InputStreamBodyGenerator; -import com.ning.http.client.listener.TransferCompletionHandler; -import com.ning.http.client.ntlm.NTLMEngine; -import com.ning.http.client.ntlm.NTLMEngineException; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHandler.STATE; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; +import org.asynchttpclient.ConnectionPoolKeyStrategy; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.ProgressAsyncHandler; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.RandomAccessBody; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.generators.InputStreamBodyGenerator; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.ntlm.NTLMEngine; +import org.asynchttpclient.ntlm.NTLMEngineException; import com.ning.http.client.providers.netty_4.FeedableBodyGenerator.FeedListener; import com.ning.http.client.providers.netty_4.spnego.SpnegoEngine; -import com.ning.http.client.websocket.WebSocketUpgradeHandler; -import com.ning.http.multipart.MultipartBody; -import com.ning.http.multipart.MultipartRequestEntity; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.http.util.AuthenticatorUtils; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; +import org.asynchttpclient.multipart.MultipartBody; +import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AuthenticatorUtils; import com.ning.http.client.providers.netty_4.util.CleanupChannelGroup; -import com.ning.http.util.ProxyUtils; -import com.ning.http.util.SslUtils; -import com.ning.http.util.UTF8UrlEncoder; +import org.asynchttpclient.util.ProxyUtils; +import org.asynchttpclient.util.SslUtils; +import org.asynchttpclient.util.UTF8UrlEncoder; import io.netty.bootstrap.Bootstrap; import io.netty.buffer.AbstractReferenceCounted; import io.netty.buffer.ByteBuf; @@ -136,8 +136,8 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; -import static com.ning.http.util.MiscUtil.isNonEmpty; -import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; public class NettyAsyncHttpProvider extends ChannelInboundMessageHandlerAdapter implements AsyncHttpProvider { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java index 551a213619..3401b6c2a8 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java @@ -24,7 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.ning.http.client.AsyncHttpProviderConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.socket.SocketChannel; @@ -77,7 +77,7 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java index 9acef964a2..ef831f94f5 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java @@ -15,12 +15,12 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.Cookie; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.providers.ResponseBase; -import com.ning.http.util.AsyncHttpProviderUtils; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.providers.ResponseBase; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import java.io.IOException; import java.io.InputStream; @@ -36,7 +36,7 @@ import io.netty.buffer.Unpooled; /** - * Wrapper around the {@link com.ning.http.client.Response} API. + * Wrapper around the {@link org.asynchttpclient.Response} API. */ public class NettyResponse extends ResponseBase { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java index e467a02b0f..b94b337844 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java @@ -15,11 +15,11 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.ConnectionPoolKeyStrategy; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Request; -import com.ning.http.client.listenable.AbstractListenableFuture; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.ConnectionPoolKeyStrategy; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.listenable.AbstractListenableFuture; import io.netty.channel.Channel; import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.HttpRequest; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java index caa76e1224..86b5667393 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java @@ -12,11 +12,11 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.websocket.WebSocket; -import com.ning.http.client.websocket.WebSocketByteListener; -import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; -import com.ning.http.client.websocket.WebSocketListener; -import com.ning.http.client.websocket.WebSocketTextListener; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketByteListener; +import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketTextListener; import io.netty.channel.Channel; import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import io.netty.handler.codec.http.websocketx.PingWebSocketFrame; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java index f48ad6de8a..0d60746e87 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java @@ -15,8 +15,8 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseBodyPart; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseBodyPart; import io.netty.buffer.ByteBuf; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpContent; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java index 554bc2de09..014c2ff161 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java @@ -15,9 +15,9 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseHeaders; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.LastHttpContent; @@ -68,7 +68,7 @@ private FluentCaseInsensitiveStringsMap computerHeaders() { /** * Return the HTTP header * - * @return an {@link com.ning.http.client.FluentCaseInsensitiveStringsMap} + * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap} */ @Override public FluentCaseInsensitiveStringsMap getHeaders() { diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java index 1f1182c2f5..d46b4857ad 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java @@ -16,8 +16,8 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseStatus; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseStatus; import io.netty.handler.codec.http.HttpResponse; import java.net.URI; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java index 76df9de621..30eacb2532 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.netty_4; -import com.ning.http.util.Base64; +import org.asynchttpclient.util.Base64; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java index 15a3747a14..d80988eb39 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java +++ b/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java @@ -37,7 +37,7 @@ package com.ning.http.client.providers.netty_4.spnego; -import com.ning.http.util.Base64; +import org.asynchttpclient.util.Base64; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSException; import org.ietf.jgss.GSSManager; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java index d98b1539f2..dbb5b40984 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java @@ -19,10 +19,10 @@ import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; public class NettyAsyncHttpProviderTest extends AbstractBasicTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java index 7099604d01..4b2cf4bbfc 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java @@ -15,10 +15,10 @@ import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.AsyncProvidersBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.async.AsyncProvidersBasicTest; @Test public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java index f537cb3bb5..b501ef0157 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java @@ -28,12 +28,12 @@ import org.testng.Assert; import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java index 324894c632..c1cb121d91 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -15,9 +15,9 @@ import com.ning.http.client.providers.netty_4.ResponseStatus; import com.ning.http.client.providers.netty_4.NettyResponse; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseHeaders; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; import org.testng.annotations.Test; import java.text.SimpleDateFormat; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java index 0b59867f6f..c0d4bb5a4a 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AsyncStreamHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AsyncStreamHandlerTest; public class NettyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java index ab10afbcc9..37ed9ed977 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AsyncStreamLifecycleTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AsyncStreamLifecycleTest; public class NettyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java index 94dcab0e91..383543ea8d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AuthTimeoutTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AuthTimeoutTest; public class NettyAuthTimeoutTest extends AuthTimeoutTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java index 7cdb73dbf1..4fb5353b06 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java @@ -17,9 +17,9 @@ import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BasicAuthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BasicAuthTest; @Test public class NettyBasicAuthTest extends BasicAuthTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java index 45025647eb..f41aa19647 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BasicHttpsTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BasicHttpsTest; public class NettyBasicHttpsTest extends BasicHttpsTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java index 908b733ca9..bccf565b42 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BodyChunkTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BodyChunkTest; public class NettyBodyChunkTest extends BodyChunkTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java index 54631c7586..aa1be0a12d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BodyDeferringAsyncHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BodyDeferringAsyncHandlerTest; public class NettyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java index 739821b277..f6a742fb89 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ByteBufferCapacityTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ByteBufferCapacityTest; public class NettyByteBufferCapacityTest extends ByteBufferCapacityTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java index 186a5184c0..f488c2bb8d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java @@ -1,8 +1,8 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ChunkingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ChunkingTest; public class NettyChunkingTest extends ChunkingTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java index 73c37ce246..75f9c0f4bd 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ComplexClientTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ComplexClientTest; public class NettyComplexClientTest extends ComplexClientTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java index 51ede7aa77..675dff5e61 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java @@ -20,10 +20,10 @@ import org.jboss.netty.channel.Channel; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.async.ConnectionPoolTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.async.ConnectionPoolTest; public class NettyConnectionPoolTest extends ConnectionPoolTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java index 005948931e..d354382979 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.DigestAuthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.DigestAuthTest; public class NettyDigestAuthTest extends DigestAuthTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java index 3c501757f3..35d939b586 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.EmptyBodyTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.EmptyBodyTest; public class NettyEmptyBodyTest extends EmptyBodyTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java index 0347132555..d582996b9a 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ErrorResponseTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ErrorResponseTest; public class NettyErrorResponseTest extends ErrorResponseTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java index 698ea253c1..97b1217a8b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Expect100ContinueTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Expect100ContinueTest; public class NettyExpect100ContinueTest extends Expect100ContinueTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java index 459d425140..74eb7a6214 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FilePartLargeFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FilePartLargeFileTest; public class NettyFilePartLargeFileTest extends FilePartLargeFileTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java index 97f0534c00..97b5d1eaa7 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FilterTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FilterTest; public class NettyFilterTest extends FilterTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java index a980551662..6753ff2e35 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FollowingThreadTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FollowingThreadTest; public class NettyFollowingThreadTest extends FollowingThreadTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java index d734236157..dcb6237ff3 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Head302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Head302Test; public class NettyHead302Test extends Head302Test { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java index 30e7397633..1051dc4f00 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.HostnameVerifierTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.HostnameVerifierTest; public class NettyHostnameVerifierTest extends HostnameVerifierTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java index e9afb6598b..e8d5c94915 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.HttpToHttpsRedirectTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.HttpToHttpsRedirectTest; public class NettyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java index eb51fa21a9..e4b238a8c0 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.IdleStateHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.IdleStateHandlerTest; public class NettyIdleStateHandlerTest extends IdleStateHandlerTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java index d963695dd3..d27e5a1bc0 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.InputStreamTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.InputStreamTest; public class NettyInputStreamTest extends InputStreamTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java index 6df542b88c..e197053ada 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ListenableFutureTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ListenableFutureTest; public class NettyListenableFutureTest extends ListenableFutureTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java index e7bd9d4b48..00228e467b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java @@ -11,9 +11,9 @@ *******************************************************************************/ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MaxConnectionsInThreads; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MaxConnectionsInThreads; public class NettyMaxConnectionsInThreads extends MaxConnectionsInThreads { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java index 80f48e755d..e23d50f463 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MaxTotalConnectionTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MaxTotalConnectionTest; public class NettyMaxTotalConnectionTest extends MaxTotalConnectionTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java index b0496db3e5..7c1687958d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MultipartUploadTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MultipartUploadTest; /** * @author dominict diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java index 602755130a..1cdd4f40f2 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MultipleHeaderTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MultipleHeaderTest; public class NettyMultipleHeaderTest extends MultipleHeaderTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java index 4d19e4b1a2..29562b89c7 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.NoNullResponseTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.NoNullResponseTest; public class NettyNoNullResponseTest extends NoNullResponseTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java index c6e1aedb92..9f3ec1403a 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.NonAsciiContentLengthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.NonAsciiContentLengthTest; public class NettyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java index a8c2b0e3f7..6f0b54a37b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ParamEncodingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ParamEncodingTest; public class NettyParamEncodingTest extends ParamEncodingTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java index 13dbd1fea2..6a118f4b52 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PerRequestRelative302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PerRequestRelative302Test; public class NettyPerRequestRelative302Test extends PerRequestRelative302Test { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java index 9e7199ea68..bf797c2faf 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PerRequestTimeoutTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PerRequestTimeoutTest; public class NettyPerRequestTimeoutTest extends PerRequestTimeoutTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java index 138bf45d03..ed89b51cc2 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PostRedirectGetTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PostRedirectGetTest; public class NettyPostRedirectGetTest extends PostRedirectGetTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java index b1e47660ea..7bc6390459 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PostWithQSTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PostWithQSTest; public class NettyPostWithQSTest extends PostWithQSTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java index a37b4bf5d3..72498ebd22 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java @@ -15,8 +15,8 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; public class NettyProviderUtil { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java index 3f82fbea20..abc34a4a01 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ProxyTest; public class NettyProxyTest extends ProxyTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java index 7c24784de0..438fc5b3de 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyTunnellingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ProxyTunnellingTest; public class NettyProxyTunnellingTest extends ProxyTunnellingTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java index e2fbc403ad..6f8da1e749 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PutLargeFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PutLargeFileTest; public class NettyPutLargeFileTest extends PutLargeFileTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java index 659a910648..cc21fe5487 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.QueryParametersTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.QueryParametersTest; public class NettyQueryParametersTest extends QueryParametersTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java index 5f79e9861c..0ad44fb8a1 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RC10KTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RC10KTest; public class NettyRC10KTest extends RC10KTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java index 55337b8488..2a3191bd2d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java @@ -13,10 +13,10 @@ package com.ning.http.client.providers.netty; import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.RedirectConnectionUsageTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.async.RedirectConnectionUsageTest; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java index 89c098bbc6..47bdb1ebd8 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Relative302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Relative302Test; public class NettyRelative302Test extends Relative302Test { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java index 438b322319..71cf7cc5c8 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java @@ -15,9 +15,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RemoteSiteTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RemoteSiteTest; public class NettyRemoteSiteTest extends RemoteSiteTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java index 991d2003d2..323468bdbe 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -33,11 +33,11 @@ import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { private static final String MSG = "Enough is enough."; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java index 0e5779b9fa..3dc6e7d474 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java @@ -16,9 +16,9 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RetryRequestTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RetryRequestTest; public class NettyRetryRequestTest extends RetryRequestTest{ @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java index 2173bc046b..6c16e42550 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java @@ -12,14 +12,14 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.SimpleAsyncHttpClientTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.SimpleAsyncHttpClientTest; public class NettySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { /** - * Not Used with {@link com.ning.http.client.SimpleAsyncHttpClient} + * Not Used with {@link org.asynchttpclient.SimpleAsyncHttpClient} * @param config * @return */ diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java index 4508b550a1..85e4f47174 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.TransferListenerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.TransferListenerTest; public class NettyTransferListenerTest extends TransferListenerTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java index 7251633ed4..f40a49511a 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.WebDavBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.WebDavBasicTest; public class NettyWebDavBasicTest extends WebDavBasicTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java index a1731a5235..16cf99d4fd 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ZeroCopyFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ZeroCopyFileTest; public class NettyZeroCopyFileTest extends ZeroCopyFileTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java index 2ccc601bbd..2095622275 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java @@ -12,11 +12,12 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Request; +import org.asynchttpclient.Response; import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; @@ -112,7 +113,7 @@ private ListenableFuture testMethodRequest(AsyncHttpClient builder.addQueryParameter("maxRequests", "" + requests); builder.addQueryParameter("id", id); builder.setUrl(servletEndpointUri.toString()); - com.ning.http.client.Request r = builder.build(); + Request r = builder.build(); return fetcher.executeRequest(r); } diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java index ef4d8d606f..62b88a199d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.ByteMessageTest; +import org.asynchttpclient.websocket.ByteMessageTest; public class NettyByteMessageTest extends ByteMessageTest { @Override diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index 3e764e3d8e..42463a8343 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -13,10 +13,10 @@ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.CloseCodeReasonMessageTest; +import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java index a30eacbc52..245b76d76b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.RedirectTest; +import org.asynchttpclient.websocket.RedirectTest; public class NettyRedirectTest extends RedirectTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java index b62c77cd2e..e5ed1cb30d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.TextMessageTest; +import org.asynchttpclient.websocket.TextMessageTest; public class NettyTextMessageTest extends TextMessageTest { @Override diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index c374d0e80c..3f36b4fc6b 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-providers-parent 2.0.0-SNAPSHOT diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java index 102f6d84f4..042a8b9bc5 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.Body; +import org.asynchttpclient.Body; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.handler.stream.ChunkedInput; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java index 9679ba43f1..7391e5f941 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.RandomAccessBody; +import org.asynchttpclient.RandomAccessBody; import org.jboss.netty.channel.FileRegion; import java.io.IOException; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java index 36c4d6f90e..fe3bf8980b 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java @@ -18,8 +18,8 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; /** * {@link BodyGenerator} which may return just part of the payload at the time diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index e1898d286a..7db7882c1c 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -15,9 +15,9 @@ */ package com.ning.http.client.providers.netty; -import static com.ning.http.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; -import static com.ning.http.util.DateUtil.millisTime; -import static com.ning.http.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; +import static org.asynchttpclient.util.DateUtil.millisTime; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import static org.jboss.netty.channel.Channels.pipeline; import java.io.File; @@ -99,48 +99,48 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.AsyncHandler.STATE; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.Body; -import com.ning.http.client.BodyGenerator; -import com.ning.http.client.ConnectionPoolKeyStrategy; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.MaxRedirectException; -import com.ning.http.client.ProgressAsyncHandler; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.RandomAccessBody; -import com.ning.http.client.Realm; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.filter.FilterContext; -import com.ning.http.client.filter.FilterException; -import com.ning.http.client.filter.IOExceptionFilter; -import com.ning.http.client.filter.ResponseFilter; -import com.ning.http.client.generators.InputStreamBodyGenerator; -import com.ning.http.client.listener.TransferCompletionHandler; -import com.ning.http.client.ntlm.NTLMEngine; -import com.ning.http.client.ntlm.NTLMEngineException; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHandler.STATE; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; +import org.asynchttpclient.ConnectionPoolKeyStrategy; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.ProgressAsyncHandler; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.RandomAccessBody; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.generators.InputStreamBodyGenerator; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.ntlm.NTLMEngine; +import org.asynchttpclient.ntlm.NTLMEngineException; import com.ning.http.client.providers.netty.FeedableBodyGenerator.FeedListener; import com.ning.http.client.providers.netty.spnego.SpnegoEngine; import com.ning.http.client.providers.netty.util.CleanupChannelGroup; -import com.ning.http.client.websocket.WebSocketUpgradeHandler; -import com.ning.http.multipart.MultipartBody; -import com.ning.http.multipart.MultipartRequestEntity; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.http.util.AuthenticatorUtils; -import com.ning.http.util.ProxyUtils; -import com.ning.http.util.SslUtils; -import com.ning.http.util.UTF8UrlEncoder; -import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; +import org.asynchttpclient.multipart.MultipartBody; +import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AuthenticatorUtils; +import org.asynchttpclient.util.ProxyUtils; +import org.asynchttpclient.util.SslUtils; +import org.asynchttpclient.util.UTF8UrlEncoder; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { private final static String WEBSOCKET_KEY = "Sec-WebSocket-Key"; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java index b22cba0a9a..53eb22ac3a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java @@ -25,7 +25,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.ning.http.client.AsyncHttpProviderConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; /** * This class can be used to pass Netty's internal configuration options. See Netty documentation for more information. @@ -75,7 +75,7 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java index 170c12d0fe..aebad6ed7d 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java @@ -28,17 +28,17 @@ import org.jboss.netty.buffer.ChannelBufferInputStream; import org.jboss.netty.buffer.ChannelBuffers; -import com.ning.http.client.Cookie; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.HttpResponseHeaders; -import com.ning.http.client.HttpResponseStatus; -import com.ning.http.client.providers.ResponseBase; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.providers.ResponseBase; import com.ning.http.client.providers.netty.util.ChannelBufferUtil; -import com.ning.http.util.AsyncHttpProviderUtils; -import com.ning.org.jboss.netty.handler.codec.http.CookieDecoder; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; /** - * Wrapper around the {@link com.ning.http.client.Response} API. + * Wrapper around the {@link org.asynchttpclient.Response} API. */ public class NettyResponse extends ResponseBase { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java index d56637faa6..3e9db308b2 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java @@ -15,12 +15,12 @@ */ package com.ning.http.client.providers.netty; -import static com.ning.http.util.DateUtil.millisTime; -import com.ning.http.client.AsyncHandler; -import com.ning.http.client.ConnectionPoolKeyStrategy; -import com.ning.http.client.ProxyServer; -import com.ning.http.client.Request; -import com.ning.http.client.listenable.AbstractListenableFuture; +import static org.asynchttpclient.util.DateUtil.millisTime; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.ConnectionPoolKeyStrategy; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.listenable.AbstractListenableFuture; import org.jboss.netty.channel.Channel; import org.jboss.netty.handler.codec.http.HttpRequest; import org.jboss.netty.handler.codec.http.HttpResponse; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java index 2cd8bb17bd..d4c20a8a2d 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java @@ -12,11 +12,11 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.websocket.WebSocket; -import com.ning.http.client.websocket.WebSocketByteListener; -import com.ning.http.client.websocket.WebSocketCloseCodeReasonListener; -import com.ning.http.client.websocket.WebSocketListener; -import com.ning.http.client.websocket.WebSocketTextListener; +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketByteListener; +import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketTextListener; import org.jboss.netty.channel.Channel; import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java index cde8459287..382ead9440 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java @@ -27,8 +27,8 @@ import org.jboss.netty.handler.codec.http.HttpChunk; import org.jboss.netty.handler.codec.http.HttpResponse; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseBodyPart; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseBodyPart; import com.ning.http.client.providers.netty.util.ChannelBufferUtil; /** diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java index 8f94f8925b..3b1c144b99 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java @@ -15,9 +15,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseHeaders; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; import org.jboss.netty.handler.codec.http.HttpChunkTrailer; import org.jboss.netty.handler.codec.http.HttpResponse; @@ -68,7 +68,7 @@ private FluentCaseInsensitiveStringsMap computerHeaders() { /** * Return the HTTP header * - * @return an {@link com.ning.http.client.FluentCaseInsensitiveStringsMap} + * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap} */ @Override public FluentCaseInsensitiveStringsMap getHeaders() { diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java index 12024ecaa6..729ec90334 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java @@ -16,8 +16,8 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpProvider; -import com.ning.http.client.HttpResponseStatus; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.HttpResponseStatus; import org.jboss.netty.handler.codec.http.HttpResponse; import java.net.URI; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java index 5e20a499cf..0ebec15b9b 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java @@ -12,7 +12,7 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.util.Base64; +import org.asynchttpclient.util.Base64; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java index 201061c317..63cbc53dc0 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java @@ -37,7 +37,7 @@ package com.ning.http.client.providers.netty.spnego; -import com.ning.http.util.Base64; +import org.asynchttpclient.util.Base64; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSException; import org.ietf.jgss.GSSManager; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java index 8e29dd08bf..e6ca1974ff 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java @@ -18,10 +18,10 @@ import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; public class NettyAsyncHttpProviderTest extends AbstractBasicTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java index 2d23644716..d130577ba7 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java @@ -14,10 +14,10 @@ import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.AsyncProvidersBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.async.AsyncProvidersBasicTest; @Test public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java index 90ee1da0ef..5ae3106f4b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java @@ -27,12 +27,12 @@ import org.testng.Assert; import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Request; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java index c49eee8dc2..3909a2c7b3 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.Cookie; -import com.ning.http.client.FluentCaseInsensitiveStringsMap; -import com.ning.http.client.HttpResponseHeaders; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; import org.testng.annotations.Test; import java.text.SimpleDateFormat; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java index 0b59867f6f..c0d4bb5a4a 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AsyncStreamHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AsyncStreamHandlerTest; public class NettyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java index ab10afbcc9..37ed9ed977 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AsyncStreamLifecycleTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AsyncStreamLifecycleTest; public class NettyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java index 94dcab0e91..383543ea8d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AuthTimeoutTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.AuthTimeoutTest; public class NettyAuthTimeoutTest extends AuthTimeoutTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java index 7cdb73dbf1..4fb5353b06 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java @@ -17,9 +17,9 @@ import org.testng.annotations.Test; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BasicAuthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BasicAuthTest; @Test public class NettyBasicAuthTest extends BasicAuthTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java index 45025647eb..f41aa19647 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BasicHttpsTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BasicHttpsTest; public class NettyBasicHttpsTest extends BasicHttpsTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java index 908b733ca9..bccf565b42 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BodyChunkTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BodyChunkTest; public class NettyBodyChunkTest extends BodyChunkTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java index 54631c7586..aa1be0a12d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.BodyDeferringAsyncHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.BodyDeferringAsyncHandlerTest; public class NettyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java index 739821b277..f6a742fb89 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ByteBufferCapacityTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ByteBufferCapacityTest; public class NettyByteBufferCapacityTest extends ByteBufferCapacityTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java index 186a5184c0..f488c2bb8d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java @@ -1,8 +1,8 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ChunkingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ChunkingTest; public class NettyChunkingTest extends ChunkingTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java index 73c37ce246..75f9c0f4bd 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ComplexClientTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ComplexClientTest; public class NettyComplexClientTest extends ComplexClientTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java index 51ede7aa77..675dff5e61 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java @@ -20,10 +20,10 @@ import org.jboss.netty.channel.Channel; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ConnectionsPool; -import com.ning.http.client.async.ConnectionPoolTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.async.ConnectionPoolTest; public class NettyConnectionPoolTest extends ConnectionPoolTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java index 005948931e..d354382979 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.DigestAuthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.DigestAuthTest; public class NettyDigestAuthTest extends DigestAuthTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java index 3c501757f3..35d939b586 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.EmptyBodyTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.EmptyBodyTest; public class NettyEmptyBodyTest extends EmptyBodyTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java index 0347132555..d582996b9a 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ErrorResponseTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ErrorResponseTest; public class NettyErrorResponseTest extends ErrorResponseTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java index 698ea253c1..97b1217a8b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Expect100ContinueTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Expect100ContinueTest; public class NettyExpect100ContinueTest extends Expect100ContinueTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java index 459d425140..74eb7a6214 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FilePartLargeFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FilePartLargeFileTest; public class NettyFilePartLargeFileTest extends FilePartLargeFileTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java index 97f0534c00..97b5d1eaa7 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FilterTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FilterTest; public class NettyFilterTest extends FilterTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java index a980551662..6753ff2e35 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.FollowingThreadTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.FollowingThreadTest; public class NettyFollowingThreadTest extends FollowingThreadTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java index d734236157..dcb6237ff3 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Head302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Head302Test; public class NettyHead302Test extends Head302Test { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java index 30e7397633..1051dc4f00 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.HostnameVerifierTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.HostnameVerifierTest; public class NettyHostnameVerifierTest extends HostnameVerifierTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java index e9afb6598b..e8d5c94915 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.HttpToHttpsRedirectTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.HttpToHttpsRedirectTest; public class NettyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java index eb51fa21a9..e4b238a8c0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.IdleStateHandlerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.IdleStateHandlerTest; public class NettyIdleStateHandlerTest extends IdleStateHandlerTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java index d963695dd3..d27e5a1bc0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.InputStreamTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.InputStreamTest; public class NettyInputStreamTest extends InputStreamTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java index 6df542b88c..e197053ada 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ListenableFutureTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ListenableFutureTest; public class NettyListenableFutureTest extends ListenableFutureTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java index e7bd9d4b48..00228e467b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java @@ -11,9 +11,9 @@ *******************************************************************************/ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MaxConnectionsInThreads; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MaxConnectionsInThreads; public class NettyMaxConnectionsInThreads extends MaxConnectionsInThreads { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java index 80f48e755d..e23d50f463 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MaxTotalConnectionTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MaxTotalConnectionTest; public class NettyMaxTotalConnectionTest extends MaxTotalConnectionTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java index b0496db3e5..7c1687958d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MultipartUploadTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MultipartUploadTest; /** * @author dominict diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java index 602755130a..1cdd4f40f2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.MultipleHeaderTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.MultipleHeaderTest; public class NettyMultipleHeaderTest extends MultipleHeaderTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java index 4d19e4b1a2..29562b89c7 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.NoNullResponseTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.NoNullResponseTest; public class NettyNoNullResponseTest extends NoNullResponseTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java index c6e1aedb92..9f3ec1403a 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.NonAsciiContentLengthTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.NonAsciiContentLengthTest; public class NettyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java index a8c2b0e3f7..6f0b54a37b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ParamEncodingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ParamEncodingTest; public class NettyParamEncodingTest extends ParamEncodingTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java index 13dbd1fea2..6a118f4b52 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PerRequestRelative302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PerRequestRelative302Test; public class NettyPerRequestRelative302Test extends PerRequestRelative302Test { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java index 9e7199ea68..bf797c2faf 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PerRequestTimeoutTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PerRequestTimeoutTest; public class NettyPerRequestTimeoutTest extends PerRequestTimeoutTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java index 138bf45d03..ed89b51cc2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java @@ -13,9 +13,9 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PostRedirectGetTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PostRedirectGetTest; public class NettyPostRedirectGetTest extends PostRedirectGetTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java index b1e47660ea..7bc6390459 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PostWithQSTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PostWithQSTest; public class NettyPostWithQSTest extends PostWithQSTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java index a37b4bf5d3..72498ebd22 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java @@ -15,8 +15,8 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; public class NettyProviderUtil { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java index 3f82fbea20..abc34a4a01 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ProxyTest; public class NettyProxyTest extends ProxyTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java index 7c24784de0..438fc5b3de 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ProxyTunnellingTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ProxyTunnellingTest; public class NettyProxyTunnellingTest extends ProxyTunnellingTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java index e2fbc403ad..6f8da1e749 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.PutLargeFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.PutLargeFileTest; public class NettyPutLargeFileTest extends PutLargeFileTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java index 659a910648..cc21fe5487 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.QueryParametersTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.QueryParametersTest; public class NettyQueryParametersTest extends QueryParametersTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java index 5f79e9861c..0ad44fb8a1 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RC10KTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RC10KTest; public class NettyRC10KTest extends RC10KTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java index b43a5029e7..dd403a1b0f 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.AsyncHttpProviderConfig; -import com.ning.http.client.async.RedirectConnectionUsageTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.async.RedirectConnectionUsageTest; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java index 89c098bbc6..47bdb1ebd8 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.Relative302Test; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.Relative302Test; public class NettyRelative302Test extends Relative302Test { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java index 438b322319..71cf7cc5c8 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java @@ -15,9 +15,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RemoteSiteTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RemoteSiteTest; public class NettyRemoteSiteTest extends RemoteSiteTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java index 991d2003d2..323468bdbe 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -33,11 +33,11 @@ import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.Response; -import com.ning.http.client.async.AbstractBasicTest; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { private static final String MSG = "Enough is enough."; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java index 0e5779b9fa..3dc6e7d474 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java @@ -16,9 +16,9 @@ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.RetryRequestTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.RetryRequestTest; public class NettyRetryRequestTest extends RetryRequestTest{ @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java index 2173bc046b..6c16e42550 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java @@ -12,14 +12,14 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.SimpleAsyncHttpClientTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.SimpleAsyncHttpClientTest; public class NettySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { /** - * Not Used with {@link com.ning.http.client.SimpleAsyncHttpClient} + * Not Used with {@link org.asynchttpclient.SimpleAsyncHttpClient} * @param config * @return */ diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java index 4508b550a1..85e4f47174 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.TransferListenerTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.TransferListenerTest; public class NettyTransferListenerTest extends TransferListenerTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java index 7251633ed4..f40a49511a 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.WebDavBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.WebDavBasicTest; public class NettyWebDavBasicTest extends WebDavBasicTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java index a1731a5235..16cf99d4fd 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java @@ -12,9 +12,9 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.ZeroCopyFileTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.ZeroCopyFileTest; public class NettyZeroCopyFileTest extends ZeroCopyFileTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java index 19a227e667..befb0e9baf 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java @@ -12,12 +12,13 @@ */ package com.ning.http.client.providers.netty; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.ListenableFuture; -import com.ning.http.client.RequestBuilder; -import com.ning.http.client.Response; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.Request; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; @@ -112,7 +113,7 @@ private ListenableFuture testMethodRequest(AsyncHttpClient builder.addQueryParameter("maxRequests", "" + requests); builder.addQueryParameter("id", id); builder.setUrl(servletEndpointUri.toString()); - com.ning.http.client.Request r = builder.build(); + Request r = builder.build(); return fetcher.executeRequest(r); } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java index ef4d8d606f..62b88a199d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.ByteMessageTest; +import org.asynchttpclient.websocket.ByteMessageTest; public class NettyByteMessageTest extends ByteMessageTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index 3e764e3d8e..42463a8343 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -13,10 +13,10 @@ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.CloseCodeReasonMessageTest; +import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java index a30eacbc52..245b76d76b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.RedirectTest; +import org.asynchttpclient.websocket.RedirectTest; public class NettyRedirectTest extends RedirectTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java index b62c77cd2e..e5ed1cb30d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java @@ -12,10 +12,10 @@ */ package com.ning.http.client.providers.netty.websocket; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; import com.ning.http.client.providers.netty.NettyProviderUtil; -import com.ning.http.client.websocket.TextMessageTest; +import org.asynchttpclient.websocket.TextMessageTest; public class NettyTextMessageTest extends TextMessageTest { @Override diff --git a/providers/pom.xml b/providers/pom.xml index 12f0423a40..5ddc04f8c6 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.ning + org.asynchttpclient async-http-client-project 2.0.0-SNAPSHOT @@ -54,12 +54,12 @@ - com.ning + org.asynchttpclient async-http-client-api ${project.version} - com.ning + org.asynchttpclient async-http-client-api ${project.version} test diff --git a/site/pom.xml b/site/pom.xml index f422483fd0..b6e29bd130 100644 --- a/site/pom.xml +++ b/site/pom.xml @@ -1,11 +1,11 @@ - com.ning + org.asynchttpclient async-http-client-project 2.0.0-SNAPSHOT 4.0.0 - com.ning + org.asynchttpclient async-http-client-site Asynchronous Http Client Project Site 2.0.0-SNAPSHOT From 082bab24a48bb4dbf2da58e73e3999d997d9a32e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 13:56:50 -0700 Subject: [PATCH 0380/2844] - Update API packages (part 2): + com.ning --> org.asynchttpclient + compress package hierarchy to remove now redundant http.client sub-packages. --- .../asynchttpclient}/extra/ListenableFutureAdapter.java | 2 +- .../asynchttpclient}/extra/AsyncHttpDeferredObject.java | 2 +- .../asynchttpclient}/extra/ContentWriteProgress.java | 2 +- .../client => org/asynchttpclient}/extra/HttpProgress.java | 2 +- .../asynchttpclient}/extra/HttpResponseBodyPartProgress.java | 2 +- .../client => org/asynchttpclient}/extra/AsyncHttpTest.java | 4 +++- 6 files changed, 8 insertions(+), 6 deletions(-) rename extras/guava/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/ListenableFutureAdapter.java (98%) rename extras/jdeferred/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/AsyncHttpDeferredObject.java (98%) rename extras/jdeferred/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/ContentWriteProgress.java (97%) rename extras/jdeferred/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/HttpProgress.java (94%) rename extras/jdeferred/src/main/java/{com/ning/http/client => org/asynchttpclient}/extra/HttpResponseBodyPartProgress.java (96%) rename extras/jdeferred/src/test/java/{com/ning/http/client => org/asynchttpclient}/extra/AsyncHttpTest.java (96%) diff --git a/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java b/extras/guava/src/main/java/org/asynchttpclient/extra/ListenableFutureAdapter.java similarity index 98% rename from extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java rename to extras/guava/src/main/java/org/asynchttpclient/extra/ListenableFutureAdapter.java index d0d1db8cde..2576407a04 100644 --- a/extras/guava/src/main/java/com/ning/http/client/extra/ListenableFutureAdapter.java +++ b/extras/guava/src/main/java/org/asynchttpclient/extra/ListenableFutureAdapter.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/AsyncHttpDeferredObject.java similarity index 98% rename from extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java rename to extras/jdeferred/src/main/java/org/asynchttpclient/extra/AsyncHttpDeferredObject.java index 8ede1b539f..570cc739d7 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/AsyncHttpDeferredObject.java +++ b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/AsyncHttpDeferredObject.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; import java.io.IOException; diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/ContentWriteProgress.java similarity index 97% rename from extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java rename to extras/jdeferred/src/main/java/org/asynchttpclient/extra/ContentWriteProgress.java index 321025fea1..d340a89c69 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/ContentWriteProgress.java +++ b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/ContentWriteProgress.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; public class ContentWriteProgress implements HttpProgress { private final long amount; diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/HttpProgress.java similarity index 94% rename from extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java rename to extras/jdeferred/src/main/java/org/asynchttpclient/extra/HttpProgress.java index 7caa1fc232..15af6debbc 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpProgress.java +++ b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/HttpProgress.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; public interface HttpProgress { diff --git a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/HttpResponseBodyPartProgress.java similarity index 96% rename from extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java rename to extras/jdeferred/src/main/java/org/asynchttpclient/extra/HttpResponseBodyPartProgress.java index 3010a5f1bd..16c84e9e1b 100644 --- a/extras/jdeferred/src/main/java/com/ning/http/client/extra/HttpResponseBodyPartProgress.java +++ b/extras/jdeferred/src/main/java/org/asynchttpclient/extra/HttpResponseBodyPartProgress.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; import org.asynchttpclient.HttpResponseBodyPart; diff --git a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java b/extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java similarity index 96% rename from extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java rename to extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java index a098cf847a..b3c2a900b6 100644 --- a/extras/jdeferred/src/test/java/com/ning/http/client/extra/AsyncHttpTest.java +++ b/extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.ning.http.client.extra; +package org.asynchttpclient.extra; import java.io.IOException; import java.util.concurrent.CountDownLatch; @@ -22,6 +22,8 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.asynchttpclient.extra.AsyncHttpDeferredObject; +import org.asynchttpclient.extra.HttpProgress; import org.jdeferred.DoneCallback; import org.jdeferred.ProgressCallback; import org.jdeferred.Promise; From 3b67c20e100aae93884c4233019be5b234cc4c39 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 14:00:39 -0700 Subject: [PATCH 0381/2844] - Update API packages (part 3): + com.ning --> org.asynchttpclient + compress package hierarchy to remove now redundant http.client sub-packages. --- .../providers/apache/ApacheAsyncHttpProvider.java | 2 +- .../apache/ApacheAsyncHttpProviderConfig.java | 2 +- .../providers/apache/ApacheResponse.java | 2 +- .../providers/apache/ApacheResponseBodyPart.java | 2 +- .../providers/apache/ApacheResponseFuture.java | 2 +- .../providers/apache/ApacheResponseHeaders.java | 2 +- .../providers/apache/ApacheResponseStatus.java | 2 +- .../providers/grizzly/FeedableBodyGenerator.java | 2 +- .../providers/grizzly/GSSSPNEGOWrapper.java | 2 +- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 8 ++++---- .../grizzly/GrizzlyAsyncHttpProviderConfig.java | 2 +- .../providers/grizzly/GrizzlyConnectionsPool.java | 2 +- .../providers/grizzly/GrizzlyResponse.java | 2 +- .../providers/grizzly/GrizzlyResponseBodyPart.java | 10 ++++++---- .../providers/grizzly/GrizzlyResponseFuture.java | 2 +- .../providers/grizzly/GrizzlyResponseHeaders.java | 2 +- .../providers/grizzly/GrizzlyResponseStatus.java | 2 +- .../providers/grizzly/TransportCustomizer.java | 2 +- .../grizzly/GrizzlyAsyncProviderBasicTest.java | 6 ++++-- .../grizzly/GrizzlyAsyncStreamHandlerTest.java | 2 +- .../grizzly/GrizzlyAsyncStreamLifecycleTest.java | 2 +- .../providers/grizzly/GrizzlyAuthTimeoutTest.java | 2 +- .../providers/grizzly/GrizzlyBasicAuthTest.java | 2 +- .../providers/grizzly/GrizzlyBasicHttpsTest.java | 2 +- .../providers/grizzly/GrizzlyBodyChunkTest.java | 2 +- .../grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java | 2 +- .../grizzly/GrizzlyByteBufferCapacityTest.java | 2 +- .../providers/grizzly/GrizzlyChunkingTest.java | 2 +- .../providers/grizzly/GrizzlyComplexClientTest.java | 2 +- .../providers/grizzly/GrizzlyConnectionPoolTest.java | 2 +- .../providers/grizzly/GrizzlyDigestAuthTest.java | 2 +- .../providers/grizzly/GrizzlyEmptyBodyTest.java | 2 +- .../providers/grizzly/GrizzlyErrorResponseTest.java | 2 +- .../grizzly/GrizzlyExpectContinue100Test.java | 2 +- .../providers/grizzly/GrizzlyFilterTest.java | 2 +- .../providers/grizzly/GrizzlyFollowingThreadTest.java | 2 +- .../providers/grizzly/GrizzlyHead302Test.java | 2 +- .../grizzly/GrizzlyHttpToHttpsRedirectTest.java | 2 +- .../providers/grizzly/GrizzlyIdleStateHandlerTest.java | 2 +- .../providers/grizzly/GrizzlyInputStreamTest.java | 2 +- .../providers/grizzly/GrizzlyListenableFutureTest.java | 2 +- .../grizzly/GrizzlyMaxConnectionsInThreadsTest.java | 2 +- .../grizzly/GrizzlyMaxTotalConnectionTest.java | 2 +- .../providers/grizzly/GrizzlyMultipleHeaderTest.java | 2 +- .../providers/grizzly/GrizzlyNoNullResponseTest.java | 2 +- .../grizzly/GrizzlyNonAsciiContentLengthTest.java | 2 +- .../providers/grizzly/GrizzlyParamEncodingTest.java | 2 +- .../grizzly/GrizzlyPerRequestRelative302Test.java | 2 +- .../grizzly/GrizzlyPerRequestTimeoutTest.java | 2 +- .../providers/grizzly/GrizzlyPostRedirectGetTest.java | 2 +- .../providers/grizzly/GrizzlyPostWithQSTest.java | 2 +- .../providers/grizzly/GrizzlyProviderUtil.java | 3 ++- .../providers/grizzly/GrizzlyProxyTest.java | 2 +- .../providers/grizzly/GrizzlyProxyTunnelingTest.java | 2 +- .../providers/grizzly/GrizzlyPutLargeFileTest.java | 2 +- .../providers/grizzly/GrizzlyQueryParametersTest.java | 2 +- .../providers/grizzly/GrizzlyRC10KTest.java | 2 +- .../grizzly/GrizzlyRedirectConnectionUsageTest.java | 6 ++++-- .../providers/grizzly/GrizzlyRelative302Test.java | 2 +- .../providers/grizzly/GrizzlyRemoteSiteTest.java | 2 +- .../providers/grizzly/GrizzlyRetryRequestTest.java | 2 +- .../grizzly/GrizzlySimpleAsyncHttpClientTest.java | 2 +- .../providers/grizzly/GrizzlyTransferListenerTest.java | 2 +- .../grizzly/GrizzlyUnexpectingTimeoutTest.java | 2 +- .../grizzly/websocket/GrizzlyByteMessageTest.java | 6 +++--- .../websocket/GrizzlyCloseCodeReasonMsgTest.java | 5 ++--- .../grizzly/websocket/GrizzlyRedirectTest.java | 7 ++++--- .../grizzly/websocket/GrizzlyTextMessageTest.java | 7 ++++--- .../providers/netty/BodyChunkedInput.java | 2 +- .../providers/netty/BodyFileRegion.java | 2 +- .../providers/netty/FeedableBodyGenerator.java | 2 +- .../providers/netty/NettyAsyncHttpProvider.java | 8 ++++---- .../providers/netty/NettyAsyncHttpProviderConfig.java | 2 +- .../providers/netty/NettyConnectListener.java | 2 +- .../providers/netty/NettyConnectionsPool.java | 2 +- .../providers/netty/NettyResponse.java | 4 ++-- .../providers/netty/NettyResponseFuture.java | 2 +- .../providers/netty/NettyWebSocket.java | 2 +- .../asynchttpclient}/providers/netty/Protocol.java | 2 +- .../providers/netty/ResponseBodyPart.java | 4 ++-- .../providers/netty/ResponseHeaders.java | 2 +- .../providers/netty/ResponseStatus.java | 2 +- .../providers/netty/WebSocketUtil.java | 2 +- .../providers/netty/spnego/SpnegoEngine.java | 2 +- .../providers/netty/spnego/SpnegoTokenGenerator.java | 2 +- .../providers/netty/util/ChannelBufferUtil.java | 2 +- .../providers/netty/util/CleanupChannelGroup.java | 2 +- .../providers/netty/NettyAsyncHttpProviderTest.java | 3 ++- .../providers/netty/NettyAsyncProviderBasicTest.java | 3 ++- .../netty/NettyAsyncProviderPipelineTest.java | 6 ++++-- .../providers/netty/NettyAsyncResponseTest.java | 7 +++++-- .../providers/netty/NettyAsyncStreamHandlerTest.java | 2 +- .../providers/netty/NettyAsyncStreamLifecycleTest.java | 2 +- .../providers/netty/NettyAuthTimeoutTest.java | 2 +- .../providers/netty/NettyBasicAuthTest.java | 2 +- .../providers/netty/NettyBasicHttpsTest.java | 2 +- .../providers/netty/NettyBodyChunkTest.java | 2 +- .../netty/NettyBodyDeferringAsyncHandlerTest.java | 2 +- .../providers/netty/NettyByteBufferCapacityTest.java | 2 +- .../providers/netty/NettyChunkingTest.java | 2 +- .../providers/netty/NettyComplexClientTest.java | 2 +- .../providers/netty/NettyConnectionPoolTest.java | 2 +- .../providers/netty/NettyDigestAuthTest.java | 2 +- .../providers/netty/NettyEmptyBodyTest.java | 2 +- .../providers/netty/NettyErrorResponseTest.java | 2 +- .../providers/netty/NettyExpect100ContinueTest.java | 2 +- .../providers/netty/NettyFilePartLargeFileTest.java | 2 +- .../providers/netty/NettyFilterTest.java | 2 +- .../providers/netty/NettyFollowingThreadTest.java | 2 +- .../providers/netty/NettyHead302Test.java | 2 +- .../providers/netty/NettyHostnameVerifierTest.java | 2 +- .../providers/netty/NettyHttpToHttpsRedirectTest.java | 2 +- .../providers/netty/NettyIdleStateHandlerTest.java | 2 +- .../providers/netty/NettyInputStreamTest.java | 2 +- .../providers/netty/NettyListenableFutureTest.java | 2 +- .../providers/netty/NettyMaxConnectionsInThreads.java | 2 +- .../providers/netty/NettyMaxTotalConnectionTest.java | 2 +- .../providers/netty/NettyMultipartUploadTest.java | 2 +- .../providers/netty/NettyMultipleHeaderTest.java | 2 +- .../providers/netty/NettyNoNullResponseTest.java | 2 +- .../netty/NettyNonAsciiContentLengthTest.java | 2 +- .../providers/netty/NettyParamEncodingTest.java | 2 +- .../netty/NettyPerRequestRelative302Test.java | 2 +- .../providers/netty/NettyPerRequestTimeoutTest.java | 2 +- .../providers/netty/NettyPostRedirectGetTest.java | 2 +- .../providers/netty/NettyPostWithQSTest.java | 2 +- .../providers/netty/NettyProviderUtil.java | 2 +- .../providers/netty/NettyProxyTest.java | 2 +- .../providers/netty/NettyProxyTunnellingTest.java | 2 +- .../providers/netty/NettyPutLargeFileTest.java | 2 +- .../providers/netty/NettyQueryParametersTest.java | 2 +- .../providers/netty/NettyRC10KTest.java | 2 +- .../netty/NettyRedirectConnectionUsageTest.java | 3 ++- .../providers/netty/NettyRelative302Test.java | 2 +- .../providers/netty/NettyRemoteSiteTest.java | 2 +- .../netty/NettyRequestThrottleTimeoutTest.java | 2 +- .../providers/netty/NettyRetryRequestTest.java | 2 +- .../netty/NettySimpleAsyncHttpClientTest.java | 2 +- .../providers/netty/NettyTransferListenerTest.java | 2 +- .../providers/netty/NettyWebDavBasicTest.java | 2 +- .../providers/netty/NettyZeroCopyFileTest.java | 2 +- .../providers/netty/RetryNonBlockingIssue.java | 4 ++-- .../netty/websocket/NettyByteMessageTest.java | 4 ++-- .../netty/websocket/NettyCloseCodeReasonMsgTest.java | 4 ++-- .../providers/netty/websocket/NettyRedirectTest.java | 5 +++-- .../netty/websocket/NettyTextMessageTest.java | 4 ++-- 146 files changed, 191 insertions(+), 174 deletions(-) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheAsyncHttpProvider.java (99%) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheAsyncHttpProviderConfig.java (96%) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheResponse.java (98%) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheResponseBodyPart.java (98%) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheResponseFuture.java (99%) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheResponseHeaders.java (97%) rename providers/apache/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/apache/ApacheResponseStatus.java (97%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/FeedableBodyGenerator.java (98%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GSSSPNEGOWrapper.java (97%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyAsyncHttpProvider.java (99%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java (99%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyConnectionsPool.java (99%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyResponse.java (99%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyResponseBodyPart.java (90%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyResponseFuture.java (99%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyResponseHeaders.java (98%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyResponseStatus.java (98%) rename providers/grizzly/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/TransportCustomizer.java (97%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyAsyncProviderBasicTest.java (88%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyAuthTimeoutTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyBasicAuthTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyBasicHttpsTest.java (96%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyBodyChunkTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyByteBufferCapacityTest.java (96%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyChunkingTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyComplexClientTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyConnectionPoolTest.java (99%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyDigestAuthTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyEmptyBodyTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyErrorResponseTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyExpectContinue100Test.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyFilterTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyFollowingThreadTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyHead302Test.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyIdleStateHandlerTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyInputStreamTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyListenableFutureTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyMaxTotalConnectionTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyMultipleHeaderTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyNoNullResponseTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyParamEncodingTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyPerRequestRelative302Test.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyPerRequestTimeoutTest.java (96%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyPostRedirectGetTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyPostWithQSTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyProviderUtil.java (89%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyProxyTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyProxyTunnelingTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyPutLargeFileTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyQueryParametersTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyRC10KTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java (86%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyRelative302Test.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyRemoteSiteTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyRetryRequestTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyTransferListenerTest.java (95%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java (99%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/websocket/GrizzlyByteMessageTest.java (86%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java (87%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/websocket/GrizzlyRedirectTest.java (80%) rename providers/grizzly/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/grizzly/websocket/GrizzlyTextMessageTest.java (83%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/BodyChunkedInput.java (98%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/BodyFileRegion.java (97%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/FeedableBodyGenerator.java (98%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncHttpProvider.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncHttpProviderConfig.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyConnectListener.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyConnectionsPool.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyResponse.java (97%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyResponseFuture.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyWebSocket.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/Protocol.java (96%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/ResponseBodyPart.java (97%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/ResponseHeaders.java (98%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/ResponseStatus.java (97%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/WebSocketUtil.java (98%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/spnego/SpnegoEngine.java (99%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/spnego/SpnegoTokenGenerator.java (97%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/util/ChannelBufferUtil.java (95%) rename providers/netty/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/util/CleanupChannelGroup.java (98%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncHttpProviderTest.java (93%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncProviderBasicTest.java (92%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncProviderPipelineTest.java (96%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncResponseTest.java (91%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncStreamHandlerTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncStreamLifecycleTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAuthTimeoutTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBasicAuthTest.java (96%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBasicHttpsTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBodyChunkTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBodyDeferringAsyncHandlerTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyByteBufferCapacityTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyChunkingTest.java (88%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyComplexClientTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyConnectionPoolTest.java (98%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyDigestAuthTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyEmptyBodyTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyErrorResponseTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyExpect100ContinueTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyFilePartLargeFileTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyFilterTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyFollowingThreadTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyHead302Test.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyHostnameVerifierTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyHttpToHttpsRedirectTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyIdleStateHandlerTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyInputStreamTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyListenableFutureTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMaxConnectionsInThreads.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMaxTotalConnectionTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMultipartUploadTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMultipleHeaderTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyNoNullResponseTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyNonAsciiContentLengthTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyParamEncodingTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPerRequestRelative302Test.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPerRequestTimeoutTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPostRedirectGetTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPostWithQSTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyProviderUtil.java (96%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyProxyTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyProxyTunnellingTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPutLargeFileTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyQueryParametersTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRC10KTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRedirectConnectionUsageTest.java (92%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRelative302Test.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRemoteSiteTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRequestThrottleTimeoutTest.java (99%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRetryRequestTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettySimpleAsyncHttpClientTest.java (96%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyTransferListenerTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyWebDavBasicTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyZeroCopyFileTest.java (95%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/RetryNonBlockingIssue.java (98%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyByteMessageTest.java (89%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java (90%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyRedirectTest.java (85%) rename providers/netty/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyTextMessageTest.java (89%) diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java similarity index 99% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java index 2b8c0842af..9530fba3fc 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProvider.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java similarity index 96% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java index e3248479fb..ba49da84c7 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheAsyncHttpProviderConfig.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import org.asynchttpclient.AsyncHttpProviderConfig; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java similarity index 98% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java index ccf49c9184..bfd0758c82 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponse.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; import org.asynchttpclient.Cookie; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java similarity index 98% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java index 77443d12fb..eb757ea4b5 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseBodyPart.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseBodyPart; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java similarity index 99% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java index 1ef3adf9f3..3fbe219db0 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseFuture.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import static org.asynchttpclient.util.DateUtil.millisTime; import org.asynchttpclient.AsyncHandler; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java similarity index 97% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java index 049cce44bb..21f9491565 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseHeaders.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; diff --git a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java similarity index 97% rename from providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java rename to providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java index a26e957931..804275a1f8 100644 --- a/providers/apache/src/main/java/com/ning/http/client/providers/apache/ApacheResponseStatus.java +++ b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.apache; +package org.asynchttpclient.providers.apache; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseStatus; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java similarity index 98% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index f4569f5c2a..68b1608873 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.Body; import org.asynchttpclient.BodyGenerator; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java similarity index 97% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java index 15de54350d..2d192cce28 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GSSSPNEGOWrapper.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java @@ -1,4 +1,4 @@ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSException; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java similarity index 99% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 28cd2aa7db..cbef2bf52f 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; @@ -156,9 +156,9 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider.SwitchingSSLFilter.SSLSwitchingEvent; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider.SwitchingSSLFilter.SSLSwitchingEvent; +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property; +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; /** diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java similarity index 99% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java index fb225f5b23..8cd73ff1b4 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProviderConfig.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpProviderConfig; import org.glassfish.grizzly.http.HttpCodecFilter; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java similarity index 99% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java index 59929744e8..7075f47544 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ConnectionsPool; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponse.java similarity index 99% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponse.java index 9d0c8589a8..331bb3b874 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponse.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponse.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java similarity index 90% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java index 457efcaf48..a24636d80d 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseBodyPart; @@ -28,7 +28,7 @@ import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicReference; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider.ConnectionManager.*; +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider.ConnectionManager.*; /** * {@link HttpResponseBodyPart} implementation using the Grizzly 2.0 HTTP client @@ -127,7 +127,8 @@ public boolean isLast() { */ @Override public void markUnderlyingConnectionAsClosed() { - markConnectionAsDoNotCache(connection); + GrizzlyAsyncHttpProvider.ConnectionManager + .markConnectionAsDoNotCache(connection); } /** @@ -135,7 +136,8 @@ public void markUnderlyingConnectionAsClosed() { */ @Override public boolean closeUnderlyingConnection() { - return !isConnectionCacheable(connection); + return !GrizzlyAsyncHttpProvider.ConnectionManager + .isConnectionCacheable(connection); } diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java similarity index 99% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java index 5bf45e7962..67ed5d6595 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseFuture.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.ProxyServer; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java similarity index 98% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java index aafff98b6e..266667f367 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseHeaders.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java similarity index 98% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java index 397a5e48db..ddb633bd24 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyResponseStatus.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseStatus; diff --git a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/TransportCustomizer.java similarity index 97% rename from providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/TransportCustomizer.java index 504fcc42dd..8d86c4b398 100644 --- a/providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/TransportCustomizer.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/TransportCustomizer.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java similarity index 88% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java index 480df3e71e..e393235e03 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -11,18 +11,20 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.AsyncProvidersBasicTest; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.grizzly.TransportCustomizer; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; import org.testng.annotations.Test; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; public class GrizzlyAsyncProviderBasicTest extends AsyncProvidersBasicTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java index bbb0ac794e..3e2c4953fa 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncStreamHandlerTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java index 6d4f7c7293..9b705611a9 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncStreamLifecycleTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAuthTimeoutTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAuthTimeoutTest.java index 65b02a68e2..81a62f933c 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyAuthTimeoutTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAuthTimeoutTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java index ce244f7700..06bd657f24 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java similarity index 96% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java index e47d0de661..b8e2902466 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBasicHttpsTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBodyChunkTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBodyChunkTest.java index a8c7319326..2fa8d6ddb8 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyChunkTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBodyChunkTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java index 13fd71f852..92a2365990 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBodyDeferringAsyncHandlerTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java similarity index 96% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java index 587977a37e..3d43f261bc 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyByteBufferCapacityTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyChunkingTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyChunkingTest.java index 7c935dd8eb..904d17d509 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyChunkingTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyChunkingTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyComplexClientTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyComplexClientTest.java index 29cbd92bf6..8ef3813c5a 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyComplexClientTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyComplexClientTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java similarity index 99% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java index a65c938169..665c91c435 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyDigestAuthTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyDigestAuthTest.java index ce7542c2ed..f6e3435933 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyDigestAuthTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyDigestAuthTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyEmptyBodyTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyEmptyBodyTest.java index a55093821c..161eeb2603 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyEmptyBodyTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyEmptyBodyTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyErrorResponseTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyErrorResponseTest.java index 9712467fcf..c8946c34b9 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyErrorResponseTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyErrorResponseTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyExpectContinue100Test.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyExpectContinue100Test.java index 8fe3098cfa..b58e1a7021 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyExpectContinue100Test.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyExpectContinue100Test.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyFilterTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyFilterTest.java index 2cc8811985..fd138b590d 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFilterTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyFilterTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyFollowingThreadTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyFollowingThreadTest.java index 2ecc9c8d8b..2e602fa670 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyFollowingThreadTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyFollowingThreadTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyHead302Test.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyHead302Test.java index 18032e52eb..d9975af031 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHead302Test.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyHead302Test.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java index 809d2c7e6d..6ac2d1083a 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyHttpToHttpsRedirectTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyIdleStateHandlerTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyIdleStateHandlerTest.java index 713e048815..395c489b3a 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyIdleStateHandlerTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyIdleStateHandlerTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyInputStreamTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyInputStreamTest.java index 018bceeb64..b71ade1dfb 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyInputStreamTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyInputStreamTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyListenableFutureTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyListenableFutureTest.java index 1ce2a57a8c..bdfec6d848 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyListenableFutureTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyListenableFutureTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java index 8e4862d321..f40f8567e5 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMaxConnectionsInThreadsTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMaxTotalConnectionTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMaxTotalConnectionTest.java index a8c5fd1017..f5593bd815 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMaxTotalConnectionTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMaxTotalConnectionTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMultipleHeaderTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMultipleHeaderTest.java index 4ca6946450..e0ceb7ac7a 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyMultipleHeaderTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyMultipleHeaderTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyNoNullResponseTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyNoNullResponseTest.java index 7f4eddcf1a..cb38a7a42f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNoNullResponseTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyNoNullResponseTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java index c526f25325..08a2c51717 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyNonAsciiContentLengthTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyParamEncodingTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyParamEncodingTest.java index 6a901ab030..dad25f32c6 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyParamEncodingTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyParamEncodingTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestRelative302Test.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestRelative302Test.java index 9e1d09c1f8..0ae732dd25 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestRelative302Test.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestRelative302Test.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java similarity index 96% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java index 562808d71d..15d9fb9643 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPostRedirectGetTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPostRedirectGetTest.java index f5862dcc06..aeab91c4c2 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostRedirectGetTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPostRedirectGetTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPostWithQSTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPostWithQSTest.java index d0611b0bd5..975f6e0b38 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPostWithQSTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPostWithQSTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProviderUtil.java similarity index 89% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProviderUtil.java index f37af2d914..67021c9232 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProviderUtil.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProviderUtil.java @@ -13,10 +13,11 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; public class GrizzlyProviderUtil { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTest.java index 6f907e6040..ed024c917d 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java index f54c1d9546..eb6f39cd23 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPutLargeFileTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPutLargeFileTest.java index eb40e104f0..89a52e4f6e 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyPutLargeFileTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPutLargeFileTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyQueryParametersTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyQueryParametersTest.java index 7dd85d07ad..5c57f83230 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyQueryParametersTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyQueryParametersTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRC10KTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRC10KTest.java index f194542ea4..ef43002b51 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRC10KTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRC10KTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java similarity index 86% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java index be6394fb05..c68810799f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java @@ -11,17 +11,19 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.RedirectConnectionUsageTest; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.grizzly.TransportCustomizer; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; -import static com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; public class GrizzlyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRelative302Test.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRelative302Test.java index 84bf34badd..9157550248 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRelative302Test.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRelative302Test.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRemoteSiteTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRemoteSiteTest.java index d7d9cf96d3..3b0126d932 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRemoteSiteTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRemoteSiteTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRetryRequestTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRetryRequestTest.java index 763b0f2aab..37cb4fe2e5 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyRetryRequestTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRetryRequestTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java index 51d6e5d657..6a6d3041f3 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyTransferListenerTest.java similarity index 95% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyTransferListenerTest.java index 0648967ff2..59e24152c3 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyTransferListenerTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyTransferListenerTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java similarity index 99% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java index 609a69b6d5..3698d8e187 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly; +package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHttpClient; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java similarity index 86% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java index c5f38b966f..516e499287 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyByteMessageTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java @@ -10,12 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly.websocket; +package org.asynchttpclient.providers.grizzly.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.ByteMessageTest; import org.testng.annotations.Test; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java similarity index 87% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java index 92fbb4618e..9844fb439f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java @@ -11,12 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly.websocket; +package org.asynchttpclient.providers.grizzly.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; import org.testng.annotations.Test; diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyRedirectTest.java similarity index 80% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyRedirectTest.java index f9c9453e58..8600b57bbe 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyRedirectTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyRedirectTest.java @@ -11,12 +11,13 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly.websocket; +package org.asynchttpclient.providers.grizzly.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.RedirectTest; public class GrizzlyRedirectTest extends RedirectTest { diff --git a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java similarity index 83% rename from providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java rename to providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java index 96406412ee..cf7db9228f 100644 --- a/providers/grizzly/src/test/java/com/ning/http/client/providers/grizzly/websocket/GrizzlyTextMessageTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java @@ -10,12 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.grizzly.websocket; +package org.asynchttpclient.providers.grizzly.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider; -import com.ning.http.client.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; +import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.ByteMessageTest; import org.testng.annotations.Test; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java similarity index 98% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java index 042a8b9bc5..1c9e497765 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.Body; import org.jboss.netty.buffer.ChannelBuffers; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java similarity index 97% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java index 7391e5f941..68a271a4da 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.RandomAccessBody; import org.jboss.netty.channel.FileRegion; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java similarity index 98% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java index fe3bf8980b..2c121c46bb 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/FeedableBodyGenerator.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index 7db7882c1c..71a8683c52 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; import static org.asynchttpclient.util.DateUtil.millisTime; @@ -129,9 +129,9 @@ import org.asynchttpclient.listener.TransferCompletionHandler; import org.asynchttpclient.ntlm.NTLMEngine; import org.asynchttpclient.ntlm.NTLMEngineException; -import com.ning.http.client.providers.netty.FeedableBodyGenerator.FeedListener; -import com.ning.http.client.providers.netty.spnego.SpnegoEngine; -import com.ning.http.client.providers.netty.util.CleanupChannelGroup; +import org.asynchttpclient.providers.netty.FeedableBodyGenerator.FeedListener; +import org.asynchttpclient.providers.netty.spnego.SpnegoEngine; +import org.asynchttpclient.providers.netty.util.CleanupChannelGroup; import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.asynchttpclient.multipart.MultipartBody; import org.asynchttpclient.multipart.MultipartRequestEntity; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java index 53eb22ac3a..110075f202 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.util.HashMap; import java.util.Map; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java index 64c3aa9797..5e3a7cfa62 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.io.IOException; import java.net.ConnectException; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java index 4a6e90cc88..5afd504df4 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.asynchttpclient.util.DateUtil.millisTime; import org.asynchttpclient.ConnectionsPool; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java similarity index 97% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java index aebad6ed7d..81b520fbc6 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.io.IOException; import java.io.InputStream; @@ -33,7 +33,7 @@ import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.providers.ResponseBase; -import com.ning.http.client.providers.netty.util.ChannelBufferUtil; +import org.asynchttpclient.providers.netty.util.ChannelBufferUtil; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java index 3e9db308b2..fd942e4bf6 100755 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.asynchttpclient.util.DateUtil.millisTime; import org.asynchttpclient.AsyncHandler; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java index d4c20a8a2d..8ae4f1ee03 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.websocket.WebSocket; import org.asynchttpclient.websocket.WebSocketByteListener; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java similarity index 96% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java index 3e8e9862c4..f9d6f39eff 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ChannelStateEvent; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java similarity index 97% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java index 382ead9440..b8d6411d8f 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -29,7 +29,7 @@ import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseBodyPart; -import com.ning.http.client.providers.netty.util.ChannelBufferUtil; +import org.asynchttpclient.providers.netty.util.ChannelBufferUtil; /** * A callback class used when an HTTP response body is received. diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java similarity index 98% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java index 3b1c144b99..bb0a66589a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java similarity index 97% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java index 729ec90334..4cec5faf8a 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseStatus; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java similarity index 98% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java index 0ebec15b9b..8aabcc9542 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.util.Base64; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java similarity index 99% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java index 63cbc53dc0..b0d653391c 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java @@ -35,7 +35,7 @@ * . */ -package com.ning.http.client.providers.netty.spnego; +package org.asynchttpclient.providers.netty.spnego; import org.asynchttpclient.util.Base64; import org.ietf.jgss.GSSContext; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoTokenGenerator.java similarity index 97% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoTokenGenerator.java index 1eca8af21a..20d6dcc1ad 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoTokenGenerator.java @@ -36,7 +36,7 @@ * */ -package com.ning.http.client.providers.netty.spnego; +package org.asynchttpclient.providers.netty.spnego; import java.io.IOException; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java similarity index 95% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java index d17a3cc563..e577d54735 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/ChannelBufferUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty.util; +package org.asynchttpclient.providers.netty.util; import org.jboss.netty.buffer.ChannelBuffer; diff --git a/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/CleanupChannelGroup.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java similarity index 98% rename from providers/netty/src/main/java/com/ning/http/client/providers/netty/util/CleanupChannelGroup.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java index c09f28084e..486c61ef32 100644 --- a/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/CleanupChannelGroup.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java @@ -26,7 +26,7 @@ * limitations under the License. */ -package com.ning.http.client.providers.netty.util; +package org.asynchttpclient.providers.netty.util; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java similarity index 93% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java index e6ca1974ff..54262deaad 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java @@ -10,12 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.testng.Assert.assertEquals; import java.util.concurrent.Executors; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.testng.annotations.Test; import org.asynchttpclient.AsyncHttpClient; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java similarity index 92% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java index d130577ba7..d422b202ac 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java @@ -10,8 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.testng.annotations.Test; import org.asynchttpclient.AsyncHttpClient; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java similarity index 96% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java index 5ae3106f4b..a8902eb655 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java @@ -11,13 +11,14 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.testng.Assert.assertEquals; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProvider; import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelPipelineFactory; @@ -67,7 +68,8 @@ public Response onCompleted(Response response) throws Exception { } } - private static class CopyEncodingNettyAsyncHttpProvider extends NettyAsyncHttpProvider { + private static class CopyEncodingNettyAsyncHttpProvider extends + NettyAsyncHttpProvider { public CopyEncodingNettyAsyncHttpProvider(AsyncHttpClientConfig config) { super(config); } diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java similarity index 91% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java index 3909a2c7b3..812a04e0fe 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java @@ -11,11 +11,13 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.Cookie; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.providers.netty.NettyResponse; +import org.asynchttpclient.providers.netty.ResponseStatus; import org.testng.annotations.Test; import java.text.SimpleDateFormat; @@ -41,7 +43,8 @@ public void testCookieParseExpires() { Date date = new Date(System.currentTimeMillis() + 60000); // sdf.parse( dateString ); final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); - NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + NettyResponse + response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamHandlerTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamHandlerTest.java index c0d4bb5a4a..1c1bea8935 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamLifecycleTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamLifecycleTest.java index 37ed9ed977..9760aa4296 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java index 383543ea8d..61a633e002 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java similarity index 96% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java index 4fb5353b06..f8c7d3662d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicHttpsTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicHttpsTest.java index f41aa19647..5790fd96b1 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicHttpsTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBodyChunkTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBodyChunkTest.java index bccf565b42..e8dacd9680 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBodyChunkTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBodyDeferringAsyncHandlerTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBodyDeferringAsyncHandlerTest.java index aa1be0a12d..01e8daba42 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyByteBufferCapacityTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyByteBufferCapacityTest.java index f6a742fb89..8cabb0c637 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyByteBufferCapacityTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyChunkingTest.java similarity index 88% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyChunkingTest.java index f488c2bb8d..7783e21d58 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyChunkingTest.java @@ -1,4 +1,4 @@ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyComplexClientTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyComplexClientTest.java index 75f9c0f4bd..7cb83020d0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyComplexClientTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java similarity index 98% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java index 675dff5e61..945761d5e1 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyDigestAuthTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyDigestAuthTest.java index d354382979..205fb73a1b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyDigestAuthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyEmptyBodyTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyEmptyBodyTest.java index 35d939b586..8cdbe19e68 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyEmptyBodyTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyErrorResponseTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyErrorResponseTest.java index d582996b9a..ee34de01fd 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyErrorResponseTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyExpect100ContinueTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyExpect100ContinueTest.java index 97b1217a8b..ce9759922e 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyExpect100ContinueTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFilePartLargeFileTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFilePartLargeFileTest.java index 74eb7a6214..8b9adcbd6b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFilePartLargeFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFilterTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFilterTest.java index 97b5d1eaa7..d1c6fd0ebb 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFilterTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFollowingThreadTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFollowingThreadTest.java index 6753ff2e35..c3e2c8b757 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyFollowingThreadTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHead302Test.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHead302Test.java index dcb6237ff3..8fc323e3b8 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHead302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHostnameVerifierTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHostnameVerifierTest.java index 1051dc4f00..004a2eb43e 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHostnameVerifierTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHttpToHttpsRedirectTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHttpToHttpsRedirectTest.java index e8d5c94915..ec739b4065 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyIdleStateHandlerTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyIdleStateHandlerTest.java index e4b238a8c0..26dc2a2dbe 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyIdleStateHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyInputStreamTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyInputStreamTest.java index d27e5a1bc0..5854ddc98f 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyInputStreamTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyListenableFutureTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyListenableFutureTest.java index e197053ada..723fc12d59 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyListenableFutureTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMaxConnectionsInThreads.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMaxConnectionsInThreads.java index 00228e467b..0e24c3d55d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMaxConnectionsInThreads.java @@ -9,7 +9,7 @@ * http://www.apache.org/licenses/LICENSE-2.0.html * You may elect to redistribute this code under either of these licenses. *******************************************************************************/ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMaxTotalConnectionTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMaxTotalConnectionTest.java index e23d50f463..15e0892a69 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMaxTotalConnectionTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java index 7c1687958d..fdbfb52d13 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipleHeaderTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipleHeaderTest.java index 1cdd4f40f2..2198b1b1f0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipleHeaderTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyNoNullResponseTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyNoNullResponseTest.java index 29562b89c7..d6b0122263 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyNoNullResponseTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyNonAsciiContentLengthTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyNonAsciiContentLengthTest.java index 9f3ec1403a..50fca62df0 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyNonAsciiContentLengthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyParamEncodingTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyParamEncodingTest.java index 6f0b54a37b..d633d37979 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyParamEncodingTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestRelative302Test.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestRelative302Test.java index 6a118f4b52..b0fabf1ef6 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestRelative302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java index bf797c2faf..637a7ec365 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPostRedirectGetTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPostRedirectGetTest.java index ed89b51cc2..979c761bd7 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPostRedirectGetTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPostWithQSTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPostWithQSTest.java index 7bc6390459..c244b89c0b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPostWithQSTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java similarity index 96% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java index 72498ebd22..499e0025c4 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTest.java index abc34a4a01..7c381c111d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java index 438fc5b3de..a862e9ee8f 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPutLargeFileTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPutLargeFileTest.java index 6f8da1e749..550847c062 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPutLargeFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyQueryParametersTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyQueryParametersTest.java index cc21fe5487..7a38145ef1 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyQueryParametersTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRC10KTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRC10KTest.java index 0ad44fb8a1..17f26efbb8 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRC10KTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java similarity index 92% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java index dd403a1b0f..e376f9a414 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java @@ -10,12 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.RedirectConnectionUsageTest; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRelative302Test.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRelative302Test.java index 47bdb1ebd8..22fca88ad9 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRelative302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRemoteSiteTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRemoteSiteTest.java index 71cf7cc5c8..94c6f0d7aa 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRemoteSiteTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java similarity index 99% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java index 323468bdbe..f0685b4561 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRetryRequestTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRetryRequestTest.java index 3dc6e7d474..d00acde3c2 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRetryRequestTest.java @@ -14,7 +14,7 @@ * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncHttpClientTest.java similarity index 96% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncHttpClientTest.java index 6c16e42550..27834862de 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncHttpClientTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyTransferListenerTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyTransferListenerTest.java index 85e4f47174..504607b654 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyTransferListenerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyWebDavBasicTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyWebDavBasicTest.java index f40a49511a..e3f938171b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyWebDavBasicTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyZeroCopyFileTest.java similarity index 95% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyZeroCopyFileTest.java index 16cf99d4fd..3e98117d0d 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyZeroCopyFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java similarity index 98% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java index befb0e9baf..c99f064f10 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java @@ -10,14 +10,14 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.asynchttpclient.Request; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyByteMessageTest.java similarity index 89% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyByteMessageTest.java index 62b88a199d..695db23d5b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyByteMessageTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.ByteMessageTest; public class NettyByteMessageTest extends ByteMessageTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java similarity index 90% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index 42463a8343..2dc624466b 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -11,11 +11,11 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java similarity index 85% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java index 245b76d76b..63b875480c 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java @@ -10,11 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.RedirectTest; public class NettyRedirectTest extends RedirectTest { diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java similarity index 89% rename from providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java rename to providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java index e5ed1cb30d..c1286255ad 100644 --- a/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java @@ -10,11 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.TextMessageTest; public class NettyTextMessageTest extends TextMessageTest { From 9d555ec38fc4a67ece50f794675551dc2c39fbb8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 14:03:10 -0700 Subject: [PATCH 0382/2844] - Update API packages (part 4): + com.ning --> org.asynchttpclient + compress package hierarchy to remove now redundant http.client sub-packages. --- .../providers/netty_4/BodyChunkedInput.java | 2 +- .../providers/netty_4/BodyFileRegion.java | 2 +- .../providers/netty_4/FeedableBodyGenerator.java | 2 +- .../providers/netty_4/NettyAsyncHttpProvider.java | 9 +++++---- .../providers/netty_4/NettyAsyncHttpProviderConfig.java | 3 +-- .../providers/netty_4/NettyConnectListener.java | 2 +- .../providers/netty_4/NettyConnectionsPool.java | 2 +- .../providers/netty_4/NettyResponse.java | 2 +- .../providers/netty_4/NettyResponseFuture.java | 2 +- .../providers/netty_4/NettyWebSocket.java | 2 +- .../asynchttpclient}/providers/netty_4/Protocol.java | 2 +- .../providers/netty_4/ResponseBodyPart.java | 2 +- .../providers/netty_4/ResponseHeaders.java | 2 +- .../providers/netty_4/ResponseStatus.java | 2 +- .../providers/netty_4/WebSocketUtil.java | 2 +- .../providers/netty_4/spnego/SpnegoEngine.java | 2 +- .../providers/netty_4/spnego/SpnegoTokenGenerator.java | 2 +- .../providers/netty_4/util/CleanupChannelGroup.java | 2 +- .../providers/netty/NettyAsyncHttpProviderTest.java | 4 ++-- .../providers/netty/NettyAsyncProviderBasicTest.java | 4 ++-- .../providers/netty/NettyAsyncProviderPipelineTest.java | 4 ++-- .../providers/netty/NettyAsyncResponseTest.java | 6 +++--- .../providers/netty/NettyAsyncStreamHandlerTest.java | 2 +- .../providers/netty/NettyAsyncStreamLifecycleTest.java | 2 +- .../providers/netty/NettyAuthTimeoutTest.java | 2 +- .../providers/netty/NettyBasicAuthTest.java | 2 +- .../providers/netty/NettyBasicHttpsTest.java | 2 +- .../providers/netty/NettyBodyChunkTest.java | 2 +- .../netty/NettyBodyDeferringAsyncHandlerTest.java | 2 +- .../providers/netty/NettyByteBufferCapacityTest.java | 2 +- .../providers/netty/NettyChunkingTest.java | 2 +- .../providers/netty/NettyComplexClientTest.java | 2 +- .../providers/netty/NettyConnectionPoolTest.java | 2 +- .../providers/netty/NettyDigestAuthTest.java | 2 +- .../providers/netty/NettyEmptyBodyTest.java | 2 +- .../providers/netty/NettyErrorResponseTest.java | 2 +- .../providers/netty/NettyExpect100ContinueTest.java | 2 +- .../providers/netty/NettyFilePartLargeFileTest.java | 2 +- .../providers/netty/NettyFilterTest.java | 2 +- .../providers/netty/NettyFollowingThreadTest.java | 2 +- .../providers/netty/NettyHead302Test.java | 2 +- .../providers/netty/NettyHostnameVerifierTest.java | 2 +- .../providers/netty/NettyHttpToHttpsRedirectTest.java | 2 +- .../providers/netty/NettyIdleStateHandlerTest.java | 2 +- .../providers/netty/NettyInputStreamTest.java | 2 +- .../providers/netty/NettyListenableFutureTest.java | 2 +- .../providers/netty/NettyMaxConnectionsInThreads.java | 2 +- .../providers/netty/NettyMaxTotalConnectionTest.java | 2 +- .../providers/netty/NettyMultipartUploadTest.java | 2 +- .../providers/netty/NettyMultipleHeaderTest.java | 2 +- .../providers/netty/NettyNoNullResponseTest.java | 2 +- .../providers/netty/NettyNonAsciiContentLengthTest.java | 2 +- .../providers/netty/NettyParamEncodingTest.java | 2 +- .../providers/netty/NettyPerRequestRelative302Test.java | 2 +- .../providers/netty/NettyPerRequestTimeoutTest.java | 2 +- .../providers/netty/NettyPostRedirectGetTest.java | 2 +- .../providers/netty/NettyPostWithQSTest.java | 2 +- .../providers/netty/NettyProviderUtil.java | 2 +- .../asynchttpclient}/providers/netty/NettyProxyTest.java | 2 +- .../providers/netty/NettyProxyTunnellingTest.java | 2 +- .../providers/netty/NettyPutLargeFileTest.java | 2 +- .../providers/netty/NettyQueryParametersTest.java | 2 +- .../asynchttpclient}/providers/netty/NettyRC10KTest.java | 2 +- .../netty/NettyRedirectConnectionUsageTest.java | 4 ++-- .../providers/netty/NettyRelative302Test.java | 2 +- .../providers/netty/NettyRemoteSiteTest.java | 2 +- .../providers/netty/NettyRequestThrottleTimeoutTest.java | 2 +- .../providers/netty/NettyRetryRequestTest.java | 2 +- .../providers/netty/NettySimpleAsyncHttpClientTest.java | 2 +- .../providers/netty/NettyTransferListenerTest.java | 2 +- .../providers/netty/NettyWebDavBasicTest.java | 2 +- .../providers/netty/NettyZeroCopyFileTest.java | 2 +- .../providers/netty/RetryNonBlockingIssue.java | 4 ++-- .../providers/netty/websocket/NettyByteMessageTest.java | 5 +++-- .../netty/websocket/NettyCloseCodeReasonMsgTest.java | 5 +++-- .../providers/netty/websocket/NettyRedirectTest.java | 5 +++-- .../providers/netty/websocket/NettyTextMessageTest.java | 5 +++-- 77 files changed, 96 insertions(+), 92 deletions(-) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/BodyChunkedInput.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/BodyFileRegion.java (97%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/FeedableBodyGenerator.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyAsyncHttpProvider.java (99%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyAsyncHttpProviderConfig.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyConnectListener.java (99%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyConnectionsPool.java (99%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyResponse.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyResponseFuture.java (99%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/NettyWebSocket.java (99%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/Protocol.java (95%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/ResponseBodyPart.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/ResponseHeaders.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/ResponseStatus.java (97%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/WebSocketUtil.java (98%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/spnego/SpnegoEngine.java (99%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/spnego/SpnegoTokenGenerator.java (97%) rename providers/netty-4/src/main/java/{com/ning/http/client => org/asynchttpclient}/providers/netty_4/util/CleanupChannelGroup.java (98%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncHttpProviderTest.java (93%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncProviderBasicTest.java (92%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncProviderPipelineTest.java (97%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncResponseTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncStreamHandlerTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAsyncStreamLifecycleTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyAuthTimeoutTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBasicAuthTest.java (96%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBasicHttpsTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBodyChunkTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyBodyDeferringAsyncHandlerTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyByteBufferCapacityTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyChunkingTest.java (88%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyComplexClientTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyConnectionPoolTest.java (98%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyDigestAuthTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyEmptyBodyTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyErrorResponseTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyExpect100ContinueTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyFilePartLargeFileTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyFilterTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyFollowingThreadTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyHead302Test.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyHostnameVerifierTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyHttpToHttpsRedirectTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyIdleStateHandlerTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyInputStreamTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyListenableFutureTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMaxConnectionsInThreads.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMaxTotalConnectionTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMultipartUploadTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyMultipleHeaderTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyNoNullResponseTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyNonAsciiContentLengthTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyParamEncodingTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPerRequestRelative302Test.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPerRequestTimeoutTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPostRedirectGetTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPostWithQSTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyProviderUtil.java (96%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyProxyTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyProxyTunnellingTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyPutLargeFileTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyQueryParametersTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRC10KTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRedirectConnectionUsageTest.java (92%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRelative302Test.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRemoteSiteTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRequestThrottleTimeoutTest.java (99%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyRetryRequestTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettySimpleAsyncHttpClientTest.java (96%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyTransferListenerTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyWebDavBasicTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/NettyZeroCopyFileTest.java (95%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/RetryNonBlockingIssue.java (98%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyByteMessageTest.java (85%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java (85%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyRedirectTest.java (85%) rename providers/netty-4/src/test/java/{com/ning/http/client => org/asynchttpclient}/providers/netty/websocket/NettyTextMessageTest.java (85%) diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/BodyChunkedInput.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/BodyChunkedInput.java index d1069c3839..d9704ca7a9 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyChunkedInput.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/BodyChunkedInput.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.Body; import io.netty.buffer.ByteBuf; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/BodyFileRegion.java similarity index 97% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/BodyFileRegion.java index 6bb85c77e9..f5da85db3b 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/BodyFileRegion.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/BodyFileRegion.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.RandomAccessBody; import io.netty.buffer.AbstractReferenceCounted; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/FeedableBodyGenerator.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/FeedableBodyGenerator.java index 17513090c6..cd75684988 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/FeedableBodyGenerator.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/FeedableBodyGenerator.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyAsyncHttpProvider.java similarity index 99% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyAsyncHttpProvider.java index ca779d3b52..9026fe3a3b 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProvider.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyAsyncHttpProvider.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHandler.STATE; @@ -45,14 +45,15 @@ import org.asynchttpclient.listener.TransferCompletionHandler; import org.asynchttpclient.ntlm.NTLMEngine; import org.asynchttpclient.ntlm.NTLMEngineException; -import com.ning.http.client.providers.netty_4.FeedableBodyGenerator.FeedListener; -import com.ning.http.client.providers.netty_4.spnego.SpnegoEngine; +import org.asynchttpclient.providers.netty_4.FeedableBodyGenerator.FeedListener; +import org.asynchttpclient.providers.netty_4.spnego.SpnegoEngine; +import org.asynchttpclient.providers.netty_4.spnego.SpnegoEngine; import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.asynchttpclient.multipart.MultipartBody; import org.asynchttpclient.multipart.MultipartRequestEntity; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.asynchttpclient.util.AuthenticatorUtils; -import com.ning.http.client.providers.netty_4.util.CleanupChannelGroup; +import org.asynchttpclient.providers.netty_4.util.CleanupChannelGroup; import org.asynchttpclient.util.ProxyUtils; import org.asynchttpclient.util.SslUtils; import org.asynchttpclient.util.UTF8UrlEncoder; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyAsyncHttpProviderConfig.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyAsyncHttpProviderConfig.java index 3401b6c2a8..86beea6864 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyAsyncHttpProviderConfig.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyAsyncHttpProviderConfig.java @@ -14,12 +14,11 @@ * under the License. * */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import java.util.HashMap; import java.util.Map; import java.util.Set; -import java.util.concurrent.ExecutorService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyConnectListener.java similarity index 99% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyConnectListener.java index 3fd87b076b..6a634de9e9 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectListener.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyConnectListener.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import java.io.IOException; import java.net.ConnectException; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyConnectionsPool.java similarity index 99% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyConnectionsPool.java index 3f20e230c3..6b21e49119 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyConnectionsPool.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyConnectionsPool.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.ConnectionsPool; import io.netty.channel.Channel; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponse.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponse.java index ef831f94f5..9e9ea53d29 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponse.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponse.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.Cookie; import org.asynchttpclient.HttpResponseBodyPart; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java similarity index 99% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java index b94b337844..1a7bba54a6 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyResponseFuture.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.ConnectionPoolKeyStrategy; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyWebSocket.java similarity index 99% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyWebSocket.java index 86b5667393..b885930569 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/NettyWebSocket.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyWebSocket.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.websocket.WebSocket; import org.asynchttpclient.websocket.WebSocketByteListener; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/Protocol.java similarity index 95% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/Protocol.java index 3d9f93c1aa..c83043148f 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/Protocol.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/Protocol.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import io.netty.channel.ChannelHandlerContext; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseBodyPart.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseBodyPart.java index 0d60746e87..43ced26dec 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseBodyPart.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseBodyPart.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseBodyPart; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseHeaders.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseHeaders.java index 014c2ff161..3ee78ae74e 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseHeaders.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseHeaders.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseStatus.java similarity index 97% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseStatus.java index d46b4857ad..0f9ae49d2a 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/ResponseStatus.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/ResponseStatus.java @@ -14,7 +14,7 @@ * under the License. * */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseStatus; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/WebSocketUtil.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/WebSocketUtil.java index 30eacb2532..b4ffdeb543 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/WebSocketUtil.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/WebSocketUtil.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty_4; +package org.asynchttpclient.providers.netty_4; import org.asynchttpclient.util.Base64; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/spnego/SpnegoEngine.java similarity index 99% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/spnego/SpnegoEngine.java index d80988eb39..a712421ccc 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoEngine.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/spnego/SpnegoEngine.java @@ -35,7 +35,7 @@ * . */ -package com.ning.http.client.providers.netty_4.spnego; +package org.asynchttpclient.providers.netty_4.spnego; import org.asynchttpclient.util.Base64; import org.ietf.jgss.GSSContext; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/spnego/SpnegoTokenGenerator.java similarity index 97% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/spnego/SpnegoTokenGenerator.java index ff112dbdf7..bc989540d1 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/spnego/SpnegoTokenGenerator.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/spnego/SpnegoTokenGenerator.java @@ -36,7 +36,7 @@ * */ -package com.ning.http.client.providers.netty_4.spnego; +package org.asynchttpclient.providers.netty_4.spnego; import java.io.IOException; diff --git a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/util/CleanupChannelGroup.java similarity index 98% rename from providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java rename to providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/util/CleanupChannelGroup.java index d052078c60..74c2ec9525 100644 --- a/providers/netty-4/src/main/java/com/ning/http/client/providers/netty_4/util/CleanupChannelGroup.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/util/CleanupChannelGroup.java @@ -26,7 +26,7 @@ * limitations under the License. */ -package com.ning.http.client.providers.netty_4.util; +package org.asynchttpclient.providers.netty_4.util; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java similarity index 93% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java index dbb5b40984..51739b1688 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; -import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty_4.NettyAsyncHttpProviderConfig; import static org.testng.Assert.assertEquals; import java.util.concurrent.Executors; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java similarity index 92% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java index 4b2cf4bbfc..41aea3c951 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; -import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty_4.NettyAsyncHttpProviderConfig; import org.testng.annotations.Test; import org.asynchttpclient.AsyncHttpClient; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java similarity index 97% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java index b501ef0157..806c3a7ead 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java @@ -11,9 +11,9 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; -import com.ning.http.client.providers.netty_4.NettyAsyncHttpProvider; +import org.asynchttpclient.providers.netty_4.NettyAsyncHttpProvider; import static org.testng.Assert.assertEquals; import java.util.concurrent.CountDownLatch; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java index c1cb121d91..441048134a 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java @@ -11,10 +11,10 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; -import com.ning.http.client.providers.netty_4.ResponseStatus; -import com.ning.http.client.providers.netty_4.NettyResponse; +import org.asynchttpclient.providers.netty_4.ResponseStatus; +import org.asynchttpclient.providers.netty_4.NettyResponse; import org.asynchttpclient.Cookie; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseHeaders; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamHandlerTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamHandlerTest.java index c0d4bb5a4a..1c1bea8935 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamLifecycleTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamLifecycleTest.java index 37ed9ed977..9760aa4296 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java index 383543ea8d..61a633e002 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java similarity index 96% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java index 4fb5353b06..f8c7d3662d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBasicHttpsTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBasicHttpsTest.java index f41aa19647..5790fd96b1 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBasicHttpsTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBodyChunkTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBodyChunkTest.java index bccf565b42..e8dacd9680 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBodyChunkTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBodyDeferringAsyncHandlerTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBodyDeferringAsyncHandlerTest.java index aa1be0a12d..01e8daba42 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyByteBufferCapacityTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyByteBufferCapacityTest.java index f6a742fb89..8cabb0c637 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyByteBufferCapacityTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyChunkingTest.java similarity index 88% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyChunkingTest.java index f488c2bb8d..7783e21d58 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyChunkingTest.java @@ -1,4 +1,4 @@ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyComplexClientTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyComplexClientTest.java index 75f9c0f4bd..7cb83020d0 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyComplexClientTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java similarity index 98% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java index 675dff5e61..945761d5e1 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyDigestAuthTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyDigestAuthTest.java index d354382979..205fb73a1b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyDigestAuthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyEmptyBodyTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyEmptyBodyTest.java index 35d939b586..8cdbe19e68 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyEmptyBodyTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyErrorResponseTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyErrorResponseTest.java index d582996b9a..ee34de01fd 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyErrorResponseTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyExpect100ContinueTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyExpect100ContinueTest.java index 97b1217a8b..ce9759922e 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyExpect100ContinueTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFilePartLargeFileTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFilePartLargeFileTest.java index 74eb7a6214..8b9adcbd6b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFilePartLargeFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFilterTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFilterTest.java index 97b5d1eaa7..d1c6fd0ebb 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFilterTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFollowingThreadTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFollowingThreadTest.java index 6753ff2e35..c3e2c8b757 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyFollowingThreadTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHead302Test.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHead302Test.java index dcb6237ff3..8fc323e3b8 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHead302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHostnameVerifierTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHostnameVerifierTest.java index 1051dc4f00..004a2eb43e 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHostnameVerifierTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHttpToHttpsRedirectTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHttpToHttpsRedirectTest.java index e8d5c94915..ec739b4065 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyIdleStateHandlerTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyIdleStateHandlerTest.java index e4b238a8c0..26dc2a2dbe 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyIdleStateHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyInputStreamTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyInputStreamTest.java index d27e5a1bc0..5854ddc98f 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyInputStreamTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyListenableFutureTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyListenableFutureTest.java index e197053ada..723fc12d59 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyListenableFutureTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMaxConnectionsInThreads.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMaxConnectionsInThreads.java index 00228e467b..0e24c3d55d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMaxConnectionsInThreads.java @@ -9,7 +9,7 @@ * http://www.apache.org/licenses/LICENSE-2.0.html * You may elect to redistribute this code under either of these licenses. *******************************************************************************/ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMaxTotalConnectionTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMaxTotalConnectionTest.java index e23d50f463..15e0892a69 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMaxTotalConnectionTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java index 7c1687958d..fdbfb52d13 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMultipleHeaderTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMultipleHeaderTest.java index 1cdd4f40f2..2198b1b1f0 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyMultipleHeaderTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyNoNullResponseTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyNoNullResponseTest.java index 29562b89c7..d6b0122263 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyNoNullResponseTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyNonAsciiContentLengthTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyNonAsciiContentLengthTest.java index 9f3ec1403a..50fca62df0 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyNonAsciiContentLengthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyParamEncodingTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyParamEncodingTest.java index 6f0b54a37b..d633d37979 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyParamEncodingTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestRelative302Test.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestRelative302Test.java index 6a118f4b52..b0fabf1ef6 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestRelative302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java index bf797c2faf..637a7ec365 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPostRedirectGetTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPostRedirectGetTest.java index ed89b51cc2..979c761bd7 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPostRedirectGetTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPostWithQSTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPostWithQSTest.java index 7bc6390459..c244b89c0b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPostWithQSTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java similarity index 96% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java index 72498ebd22..499e0025c4 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProviderUtil.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTest.java index abc34a4a01..7c381c111d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java index 438fc5b3de..a862e9ee8f 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPutLargeFileTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPutLargeFileTest.java index 6f8da1e749..550847c062 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyPutLargeFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyQueryParametersTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyQueryParametersTest.java index cc21fe5487..7a38145ef1 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyQueryParametersTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRC10KTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRC10KTest.java index 0ad44fb8a1..17f26efbb8 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRC10KTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java similarity index 92% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java index 2a3191bd2d..33810c3d3b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java @@ -10,9 +10,9 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; -import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty_4.NettyAsyncHttpProviderConfig; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRelative302Test.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRelative302Test.java index 47bdb1ebd8..22fca88ad9 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRelative302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRemoteSiteTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRemoteSiteTest.java index 71cf7cc5c8..94c6f0d7aa 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRemoteSiteTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java similarity index 99% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java index 323468bdbe..f0685b4561 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRetryRequestTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRetryRequestTest.java index 3dc6e7d474..d00acde3c2 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyRetryRequestTest.java @@ -14,7 +14,7 @@ * under the License. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncHttpClientTest.java similarity index 96% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncHttpClientTest.java index 6c16e42550..27834862de 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncHttpClientTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyTransferListenerTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyTransferListenerTest.java index 85e4f47174..504607b654 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyTransferListenerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyWebDavBasicTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyWebDavBasicTest.java index f40a49511a..e3f938171b 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyWebDavBasicTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyZeroCopyFileTest.java similarity index 95% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyZeroCopyFileTest.java index 16cf99d4fd..3e98117d0d 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/NettyZeroCopyFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java similarity index 98% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java index 2095622275..0b781e7c6a 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty; +package org.asynchttpclient.providers.netty; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -18,7 +18,7 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Request; import org.asynchttpclient.Response; -import com.ning.http.client.providers.netty_4.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty_4.NettyAsyncHttpProviderConfig; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyByteMessageTest.java similarity index 85% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyByteMessageTest.java index 62b88a199d..95b8d4cd53 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyByteMessageTest.java @@ -10,11 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.ByteMessageTest; public class NettyByteMessageTest extends ByteMessageTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java similarity index 85% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index 42463a8343..39feea5659 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -11,11 +11,12 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java similarity index 85% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java index 245b76d76b..63b875480c 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java @@ -10,11 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.RedirectTest; public class NettyRedirectTest extends RedirectTest { diff --git a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java similarity index 85% rename from providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java rename to providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java index e5ed1cb30d..7543bb7018 100644 --- a/providers/netty-4/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty-4/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java @@ -10,11 +10,12 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.providers.netty.websocket; +package org.asynchttpclient.providers.netty.websocket; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import com.ning.http.client.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; +import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.TextMessageTest; public class NettyTextMessageTest extends TextMessageTest { From 0b7dab36ac476a0343cddab5ae0de83f615c9a03 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 14:12:00 -0700 Subject: [PATCH 0383/2844] Final pass. Fix remaining string references to com.ning. --- .../asynchttpclient/providers/netty_4/NettyResponseFuture.java | 2 +- .../asynchttpclient/providers/netty/NettyResponseFuture.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java index 1a7bba54a6..6f5b2861cf 100644 --- a/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java +++ b/providers/netty-4/src/main/java/org/asynchttpclient/providers/netty_4/NettyResponseFuture.java @@ -49,7 +49,7 @@ public final class NettyResponseFuture extends AbstractListenableFuture { private final static Logger logger = LoggerFactory.getLogger(NettyResponseFuture.class); - public final static String MAX_RETRY = "com.ning.http.client.providers.netty.maxRetry"; + public final static String MAX_RETRY = "org.asynchttpclient.providers.netty.maxRetry"; enum STATE { NEW, diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java index fd942e4bf6..a367399dc1 100755 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java @@ -49,7 +49,7 @@ public final class NettyResponseFuture extends AbstractListenableFuture { private final static Logger logger = LoggerFactory.getLogger(NettyResponseFuture.class); - public final static String MAX_RETRY = "com.ning.http.client.providers.netty.maxRetry"; + public final static String MAX_RETRY = "org.asynchttpclient.providers.netty.maxRetry"; enum STATE { NEW, POOLED, RECONNECTED, CLOSED, From 60c73434e389fe270f45ed55fc69ecee7acfeac7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 28 May 2013 23:40:10 +0200 Subject: [PATCH 0384/2844] Fix timeout tests, close #304 --- .../asynchttpclient/async/PerRequestTimeoutTest.java | 10 ++++------ .../grizzly/GrizzlyPerRequestTimeoutTest.java | 6 ++++-- .../providers/netty/NettyAsyncHttpProvider.java | 4 ++-- .../providers/netty/NettyPerRequestTimeoutTest.java | 9 +++++++++ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java index 3fbb398ed4..c98749bb46 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java @@ -50,9 +50,7 @@ public abstract class PerRequestTimeoutTest extends AbstractBasicTest { private static final String MSG = "Enough is enough."; - protected String getExpectedTimeoutMessage() { - return "No response received after 100"; - } + protected abstract void checkTimeoutMessage(String message); @Override public AbstractHandler configureHandler() throws Exception { @@ -106,7 +104,7 @@ public void testRequestTimeout() throws IOException { fail("Interrupted.", e); } catch (ExecutionException e) { assertTrue(e.getCause() instanceof TimeoutException); - assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); + checkTimeoutMessage(e.getCause().getMessage()); } catch (TimeoutException e) { fail("Timeout.", e); } finally { @@ -125,7 +123,7 @@ public void testGlobalDefaultPerRequestInfiniteTimeout() throws IOException { fail("Interrupted.", e); } catch (ExecutionException e) { assertTrue(e.getCause() instanceof TimeoutException); - assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); + checkTimeoutMessage(e.getCause().getMessage()); } finally { client.close(); } @@ -142,7 +140,7 @@ public void testGlobalRequestTimeout() throws IOException { fail("Interrupted.", e); } catch (ExecutionException e) { assertTrue(e.getCause() instanceof TimeoutException); - assertEquals(e.getCause().getMessage(), getExpectedTimeoutMessage()); + checkTimeoutMessage(e.getCause().getMessage()); } catch (TimeoutException e) { fail("Timeout.", e); } finally { diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java index 15d9fb9643..34f049e4e0 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -13,6 +13,8 @@ package org.asynchttpclient.providers.grizzly; +import static org.testng.Assert.assertEquals; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.PerRequestTimeoutTest; @@ -20,8 +22,8 @@ public class GrizzlyPerRequestTimeoutTest extends PerRequestTimeoutTest { @Override - protected String getExpectedTimeoutMessage() { - return "Timeout exceeded"; + protected void checkTimeoutMessage(String message) { + assertEquals("Timeout exceeded", message); } @Override diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index 71a8683c52..73040363b0 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -1767,10 +1767,10 @@ public synchronized void run() { if (nettyResponseFuture != null && !futureDone && !futureCanceled) { long now = millisTime(); if (nettyResponseFuture.hasRequestTimedOut(now)) { - long age = (now - nettyResponseFuture.getStart()) / 1000000; + long age = now - nettyResponseFuture.getStart(); expire("Request reached time out of " + nettyResponseFuture.getRequestTimeoutInMs() + " ms after " + age + " ms"); } else if (nettyResponseFuture.hasConnectionIdleTimedOut(now)) { - long age = (now - nettyResponseFuture.getStart()) / 1000000; + long age = now - nettyResponseFuture.getStart(); expire("Request reached idle time out of " + nettyResponseFuture.getIdleConnectionTimeoutInMs() + " ms after " + age + " ms"); } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java index 637a7ec365..c4692cb476 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java @@ -12,11 +12,20 @@ */ package org.asynchttpclient.providers.netty; +import static org.testng.Assert.assertTrue; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.PerRequestTimeoutTest; public class NettyPerRequestTimeoutTest extends PerRequestTimeoutTest { + + @Override + protected void checkTimeoutMessage(String message) { + assertTrue(message + .startsWith("Request reached time out of 100 ms after ")); + } + @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); From 26ae219117a6064733bb3bf5b11f7075c2da4e23 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 28 May 2013 23:41:51 +0200 Subject: [PATCH 0385/2844] Use StringBuilders instead of StringBuffers, close #305 --- .../org/asynchttpclient/multipart/MultipartRequestEntity.java | 2 +- .../resumable/PropertiesBasedResumableProcessor.java | 2 +- .../java/org/asynchttpclient/util/AsyncHttpProviderUtils.java | 2 +- api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java | 2 +- .../org/asynchttpclient/async/SimpleAsyncHttpClientTest.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java index b47d2b5e3d..356bb59d07 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java +++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartRequestEntity.java @@ -142,7 +142,7 @@ public String getContentType() { if (contentType.contains("boundary=")) return contentType; else { - StringBuffer buffer = new StringBuffer(contentType); + StringBuilder buffer = new StringBuilder(contentType); if (!contentType.endsWith(";")) buffer.append(";"); buffer.append(" boundary="); diff --git a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java index ab6c345e9c..a54e95446c 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java +++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java @@ -90,7 +90,7 @@ public void save(Map map) { } private static String append(Map.Entry e) { - return new StringBuffer(e.getKey()).append("=").append(e.getValue()).append("\n").toString(); + return new StringBuilder(e.getKey()).append("=").append(e.getValue()).append("\n").toString(); } /** diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index 5830d50975..dc8e06444a 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -505,7 +505,7 @@ private static void add(StringBuilder sb, String name, int val) { public static String constructUserAgent(Class httpProvider, AsyncHttpClientConfig config) { - return new StringBuffer(config.getUserAgent()) + return new StringBuilder(config.getUserAgent()) .append(' ') .append('(') .append(httpProvider.getSimpleName()) diff --git a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index 256b1fcbce..361e57be51 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -473,7 +473,7 @@ public AbstractHandler configureHandler() throws Exception { } @Test(groups = { "standalone", "default_provider" }, enabled = false) - public void StringBufferBodyConsumerTest() throws Throwable { + public void StringBuilderBodyConsumerTest() throws Throwable { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setRealmPrincipal(user).setRealmPassword(admin).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index 30f12a410a..a8f09a3f95 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -57,7 +57,7 @@ public void inpuStreamBodyConsumerTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void StringBufferBodyConsumerTest() throws Throwable { + public void StringBuilderBodyConsumerTest() throws Throwable { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { From 637d9fe93cb45830decb07cdbbd88a131851a14d Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 28 May 2013 23:42:32 +0200 Subject: [PATCH 0386/2844] Upgrade Netty 3.6.6.Final, close #306 --- providers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 3f36b4fc6b..0fcfd6850e 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -17,7 +17,7 @@ io.netty netty - 3.6.5.Final + 3.6.6.Final From 858c2fa1e86711a7c1f015a027a27150efb277aa Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 28 May 2013 23:44:13 +0200 Subject: [PATCH 0387/2844] Upgrade Slf4j 1.7.5, close #307 --- api/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index baa90e8234..78a6cba8d9 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -34,7 +34,7 @@ org.slf4j slf4j-api - 1.6.2 + 1.7.5 diff --git a/pom.xml b/pom.xml index 54292c283e..210c886cc0 100644 --- a/pom.xml +++ b/pom.xml @@ -500,7 +500,7 @@ ch.qos.logback logback-classic - 0.9.26 + 1.0.13 test From 1f5bc6bea637838f14f8705d63dae40e1e7216bb Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 15:23:50 -0700 Subject: [PATCH 0388/2844] Make sure temp files are deleted upon VM exit. --- .../resumable/PropertiesBasedResumableProcessor.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java index a54e95446c..f737a9a4d1 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java +++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java @@ -30,6 +30,9 @@ public class PropertiesBasedResumableProcessor implements ResumableAsyncHandler.ResumableProcessor { private final static Logger log = LoggerFactory.getLogger(PropertiesBasedResumableProcessor.class); private final static File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc"); + static { + TMP.deleteOnExit(); + } private final static String storeName = "ResumableAsyncHandler.properties"; private final ConcurrentHashMap properties = new ConcurrentHashMap(); @@ -64,6 +67,7 @@ public void save(Map map) { throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath()); } File f = new File(TMP, storeName); + f.deleteOnExit(); if (!f.createNewFile()) { throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath()); } @@ -99,7 +103,9 @@ private static String append(Map.Entry e) { /* @Override */ public Map load() { try { - Scanner scan = new Scanner(new File(TMP, storeName), "UTF-8"); + File f = new File(TMP, storeName); + f.deleteOnExit(); + Scanner scan = new Scanner(f, "UTF-8"); scan.useDelimiter("[=\n]"); String key; From 81cabdc757e09a89e88b7812b6620beff6191827 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 15:29:13 -0700 Subject: [PATCH 0389/2844] Revert my prior changes. --- .../resumable/PropertiesBasedResumableProcessor.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java index f737a9a4d1..a54e95446c 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java +++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java @@ -30,9 +30,6 @@ public class PropertiesBasedResumableProcessor implements ResumableAsyncHandler.ResumableProcessor { private final static Logger log = LoggerFactory.getLogger(PropertiesBasedResumableProcessor.class); private final static File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc"); - static { - TMP.deleteOnExit(); - } private final static String storeName = "ResumableAsyncHandler.properties"; private final ConcurrentHashMap properties = new ConcurrentHashMap(); @@ -67,7 +64,6 @@ public void save(Map map) { throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath()); } File f = new File(TMP, storeName); - f.deleteOnExit(); if (!f.createNewFile()) { throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath()); } @@ -103,9 +99,7 @@ private static String append(Map.Entry e) { /* @Override */ public Map load() { try { - File f = new File(TMP, storeName); - f.deleteOnExit(); - Scanner scan = new Scanner(f, "UTF-8"); + Scanner scan = new Scanner(new File(TMP, storeName), "UTF-8"); scan.useDelimiter("[=\n]"); String key; From 13b9bd45e44b8dfd9e257add65eb40374622970c Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 28 May 2013 15:32:03 -0700 Subject: [PATCH 0390/2844] File may exist between vm restarts. Reduce noise for that case. --- .../resumable/PropertiesBasedResumableProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java index a54e95446c..85ebb2bde6 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java +++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java @@ -60,11 +60,11 @@ public void save(Map map) { FileOutputStream os = null; try { - if (!TMP.mkdirs()) { + if (!TMP.exists() && !TMP.mkdirs()) { throw new IllegalStateException("Unable to create directory: " + TMP.getAbsolutePath()); } File f = new File(TMP, storeName); - if (!f.createNewFile()) { + if (!f.exists() && !f.createNewFile()) { throw new IllegalStateException("Unable to create temp file: " + f.getAbsolutePath()); } if (!f.canWrite()) { From c01012f599375000c3b98d681d9848b4b86ee4b7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 30 May 2013 10:33:27 +0200 Subject: [PATCH 0391/2844] Remove additional CRLF when there's no Content-Disposition, close #309 --- .../java/org/asynchttpclient/multipart/Part.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/multipart/Part.java b/api/src/main/java/org/asynchttpclient/multipart/Part.java index 067558232f..3d71bf5240 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/Part.java +++ b/api/src/main/java/org/asynchttpclient/multipart/Part.java @@ -205,7 +205,6 @@ public boolean isRepeatable() { protected void sendStart(OutputStream out) throws IOException { out.write(EXTRA_BYTES); out.write(getPartBoundary()); - out.write(CRLF_BYTES); } /** @@ -215,10 +214,13 @@ protected void sendStart(OutputStream out) throws IOException { * @throws IOException If an IO problem occurs. */ protected void sendDispositionHeader(OutputStream out) throws IOException { - out.write(CONTENT_DISPOSITION_BYTES); - out.write(QUOTE_BYTES); - out.write(MultipartEncodingUtil.getAsciiBytes(getName())); - out.write(QUOTE_BYTES); + if (getName() != null) { + out.write(CRLF_BYTES); + out.write(CONTENT_DISPOSITION_BYTES); + out.write(QUOTE_BYTES); + out.write(MultipartEncodingUtil.getAsciiBytes(getName())); + out.write(QUOTE_BYTES); + } } /** From 1d5c1d2b47c65411dc053648a740caebc4d8f1a3 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 3 Jun 2013 22:32:38 +0200 Subject: [PATCH 0392/2844] Don't use StringBuilder.deleteCharAt to remove last char, close #313 --- .../async/AsyncProvidersBasicTest.java | 20 +++++++++---------- .../grizzly/GrizzlyAsyncHttpProvider.java | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 09716df404..e1c3c9187a 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -559,7 +559,7 @@ public void asyncDoPostBytesTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @@ -602,7 +602,7 @@ public void asyncDoPostInputStreamTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { @@ -645,7 +645,7 @@ public void asyncDoPutInputStreamTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); c.preparePut(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { @@ -689,7 +689,7 @@ public void asyncDoPostEntityWriterTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); byte[] bytes = sb.toString().getBytes(); h.add("Content-Length", String.valueOf(bytes.length)); @@ -771,7 +771,7 @@ public void asyncDoPostBasicGZIPTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @@ -809,7 +809,7 @@ public void asyncDoPostProxyTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); Response response = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandler() { @Override @@ -869,7 +869,7 @@ public void asyncDoPutTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); Response response = c.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); @@ -894,7 +894,7 @@ public void asyncDoPostLatchBytesTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @@ -993,7 +993,7 @@ public void asyncDoPostNullBytesTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); @@ -1019,7 +1019,7 @@ public void asyncDoPostListenerBytesTest() throws Throwable { sb.append(i); sb.append("&"); } - sb.deleteCharAt(sb.length() - 1); + sb.setLength(sb.length() - 1); final CountDownLatch l = new CountDownLatch(1); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index cbef2bf52f..d75f00e347 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -1328,7 +1328,8 @@ private void addQueryString(final Request request, } } } - String queryString = sb.deleteCharAt((sb.length() - 1)).toString(); + sb.setLength(sb.length() - 1); + String queryString = sb.toString(); requestPacket.setQueryString(queryString); } From 5e84f4119e5c7ece6efb3bf5099197e34eae832b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 31 May 2013 10:01:08 -0700 Subject: [PATCH 0393/2844] Remove dead code. --- .../grizzly/GrizzlyAsyncHttpProvider.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index d75f00e347..d322d798e1 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -2219,13 +2219,6 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, try { final Connection c = m.obtainConnection(requestToSend, httpTransactionContext.future); -// if (switchingSchemes(orig, uri)) { -// try { -// notifySchemeSwitch(ctx, c, uri); -// } catch (IOException ioe) { -// httpTransactionContext.abort(ioe); -// } -// } final HttpTransactionContext newContext = httpTransactionContext.copy(); httpTransactionContext.future = null; @@ -2258,22 +2251,6 @@ private boolean sendAsGet(final HttpResponsePacket response, && ctx.provider.clientConfig.isStrict302Handling()); } - - private boolean switchingSchemes(final URI oldUri, - final URI newUri) { - - return !oldUri.getScheme().equals(newUri.getScheme()); - - } - - private void notifySchemeSwitch(final FilterChainContext ctx, - final Connection c, - final URI uri) throws IOException { - - ctx.notifyDownstream( - new SSLSwitchingEvent("https".equals(uri.getScheme()), c, null)); - } - } // END RedirectHandler From d7259eabed9ab806e9b6749aa10133d952f021d3 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 4 Jun 2013 14:07:58 -0700 Subject: [PATCH 0394/2844] Enable maxConnectionLifeTimeInMs option for Grizzly connection pool. --- .../grizzly/GrizzlyConnectionsPool.java | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java index 7075f47544..58bc60a091 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java @@ -38,6 +38,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import static org.asynchttpclient.util.DateUtil.millisTime; + /** * {@link ConnectionsPool} implementation. * @@ -58,6 +60,7 @@ public class GrizzlyConnectionsPool implements ConnectionsPool= 0) { - resolver.setTimeoutMs(c, System.currentTimeMillis() + timeout); + long timeoutMs = UNSET_TIMEOUT; + long currentTime = millisTime(); + if (maxConnectionLifeTimeInMs < 0 && timeout >= 0) { + timeoutMs = currentTime + timeout; + } else if (maxConnectionLifeTimeInMs >= 0) { + long t = resolver.getTimeoutMs(c); + if (t == UNSET_TIMEOUT) { + if (timeout >= 0) { + timeoutMs = currentTime + Math.min(maxConnectionLifeTimeInMs, timeout); + } else { + timeoutMs = currentTime + maxConnectionLifeTimeInMs; + } + } else { + if (timeout >= 0) { + timeoutMs = Math.min(t, currentTime + timeout); + } + } } + resolver.setTimeoutMs(c, timeoutMs); queue.offer(c); count.incrementAndGet(); } @@ -458,7 +480,7 @@ void setTimeoutMs(final Connection c, final long timeoutMs) { static final class IdleRecord { - volatile long timeoutMs; + volatile long timeoutMs = UNSET_TIMEOUT; } // END IdleRecord From a6d9a00ec07d10e5aed1612a9b6057d89ef73177 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 4 Jun 2013 14:45:41 -0700 Subject: [PATCH 0395/2844] Minor refactoring. - move ConnectionManager out of the provider - remains package private. --- .../providers/grizzly/ConnectionManager.java | 327 ++++++++++++++++++ .../grizzly/GrizzlyAsyncHttpProvider.java | 269 +------------- .../grizzly/GrizzlyResponseBodyPart.java | 8 +- 3 files changed, 331 insertions(+), 273 deletions(-) create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java new file mode 100644 index 0000000000..d14c5e1d90 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java @@ -0,0 +1,327 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package org.asynchttpclient.providers.grizzly; + +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ConnectionPoolKeyStrategy; +import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.util.ProxyUtils; +import org.glassfish.grizzly.CloseListener; +import org.glassfish.grizzly.CloseType; +import org.glassfish.grizzly.Closeable; +import org.glassfish.grizzly.CompletionHandler; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.Grizzly; +import org.glassfish.grizzly.attributes.Attribute; +import org.glassfish.grizzly.impl.FutureImpl; +import org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler; +import org.glassfish.grizzly.nio.transport.TCPNIOTransport; +import org.glassfish.grizzly.utils.Futures; +import org.glassfish.grizzly.utils.IdleTimeoutFilter; + +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.URI; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +class ConnectionManager { + + private static final Attribute DO_NOT_CACHE = + Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(ConnectionManager.class.getName()); + private final ConnectionsPool pool; + private final TCPNIOConnectorHandler connectionHandler; + private final ConnectionMonitor connectionMonitor; + private final GrizzlyAsyncHttpProvider provider; + + // -------------------------------------------------------- Constructors + + @SuppressWarnings("unchecked") + ConnectionManager(final GrizzlyAsyncHttpProvider provider, + final TCPNIOTransport transport) { + + ConnectionsPool connectionPool; + this.provider = provider; + final AsyncHttpClientConfig config = provider.clientConfig; + if (config.getAllowPoolingConnection()) { + ConnectionsPool pool = config.getConnectionsPool(); + if (pool != null) { + //noinspection unchecked + connectionPool = (ConnectionsPool) pool; + } else { + connectionPool = new GrizzlyConnectionsPool((config)); + } + } else { + connectionPool = new NonCachingPool(); + } + pool = connectionPool; + connectionHandler = TCPNIOConnectorHandler.builder(transport).build(); + final int maxConns = provider.clientConfig.getMaxTotalConnections(); + connectionMonitor = new ConnectionMonitor(maxConns); + + + } + + // ----------------------------------------------------- Private Methods + + static void markConnectionAsDoNotCache(final Connection c) { + DO_NOT_CACHE.set(c, Boolean.TRUE); + } + + static boolean isConnectionCacheable(final Connection c) { + final Boolean canCache = DO_NOT_CACHE.get(c); + return ((canCache != null) ? canCache : false); + } + + void doAsyncTrackedConnection(final Request request, + final GrizzlyResponseFuture requestFuture, + final CompletionHandler connectHandler) + throws IOException, ExecutionException, InterruptedException { + Connection c = pool.poll(getPoolKey(request, requestFuture.getProxyServer())); + if (c == null) { + if (!connectionMonitor.acquire()) { + throw new IOException("Max connections exceeded"); + } + doAsyncConnect(request, requestFuture, connectHandler); + } else { + provider.touchConnection(c, request); + connectHandler.completed(c); + } + + } + + Connection obtainConnection(final Request request, + final GrizzlyResponseFuture requestFuture) + throws IOException, ExecutionException, InterruptedException, TimeoutException { + + final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); + markConnectionAsDoNotCache(c); + return c; + + } + + void doAsyncConnect(final Request request, + final GrizzlyResponseFuture requestFuture, + final CompletionHandler connectHandler) + throws IOException, ExecutionException, InterruptedException { + + ProxyServer proxy = requestFuture.getProxyServer(); + final URI uri = request.getURI(); + String host = proxy != null ? proxy.getHost() : uri.getHost(); + int port = proxy != null ? proxy.getPort() : uri.getPort(); + if (request.getLocalAddress() != null) { + connectionHandler.connect(new InetSocketAddress(host, GrizzlyAsyncHttpProvider + .getPort(uri, port)), new InetSocketAddress(request.getLocalAddress(), 0), + createConnectionCompletionHandler(request, requestFuture, connectHandler)); + } else { + connectionHandler.connect(new InetSocketAddress(host, GrizzlyAsyncHttpProvider + .getPort(uri, port)), + createConnectionCompletionHandler(request, requestFuture, connectHandler)); + } + + } + + private Connection obtainConnection0(final Request request, + final GrizzlyResponseFuture requestFuture, + final ProxyServer proxy) + throws IOException, ExecutionException, InterruptedException, TimeoutException { + + final URI uri = request.getURI(); + String host = proxy != null ? proxy.getHost() : uri.getHost(); + int port = proxy != null ? proxy.getPort() : uri.getPort(); + int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); + FutureImpl future = Futures.createSafeFuture(); + CompletionHandler ch = Futures.toCompletionHandler(future, + createConnectionCompletionHandler(request, requestFuture, null)); + if (cTimeout > 0) { + connectionHandler.connect(new InetSocketAddress(host, GrizzlyAsyncHttpProvider + .getPort(uri, port)), + ch); + return future.get(cTimeout, TimeUnit.MILLISECONDS); + } else { + connectionHandler.connect(new InetSocketAddress(host, GrizzlyAsyncHttpProvider + .getPort(uri, port)), + ch); + return future.get(); + } + } + + boolean returnConnection(final Request request, final Connection c) { + ProxyServer proxyServer = ProxyUtils.getProxyServer( + provider.clientConfig, request); + final boolean result = (DO_NOT_CACHE.get(c) == null + && pool.offer(getPoolKey(request, proxyServer), c)); + if (result) { + if (provider.resolver != null) { + provider.resolver.setTimeoutMillis(c, IdleTimeoutFilter.FOREVER); + } + } + return result; + + } + + + boolean canReturnConnection(final Connection c) { + + return (DO_NOT_CACHE.get(c) != null || pool.canCacheConnection()); + + } + + + void destroy() { + + pool.destroy(); + + } + + CompletionHandler createConnectionCompletionHandler(final Request request, + final GrizzlyResponseFuture future, + final CompletionHandler wrappedHandler) { + return new CompletionHandler() { + public void cancelled() { + if (wrappedHandler != null) { + wrappedHandler.cancelled(); + } else { + future.cancel(true); + } + } + + public void failed(Throwable throwable) { + if (wrappedHandler != null) { + wrappedHandler.failed(throwable); + } else { + future.abort(throwable); + } + } + + public void completed(Connection connection) { + future.setConnection(connection); + provider.touchConnection(connection, request); + if (wrappedHandler != null) { + connection.addCloseListener(connectionMonitor); + wrappedHandler.completed(connection); + } + } + + public void updated(Connection result) { + if (wrappedHandler != null) { + wrappedHandler.updated(result); + } + } + }; + } + + private static String getPoolKey(final Request request, ProxyServer proxyServer) { + final ConnectionPoolKeyStrategy keyStrategy = request.getConnectionPoolKeyStrategy(); + URI uri = proxyServer != null? proxyServer.getURI(): request.getURI(); + return keyStrategy.getKey(uri); + } + + // ------------------------------------------------------ Nested Classes + + private static class ConnectionMonitor implements + CloseListener { + + private final Semaphore connections; + + // ------------------------------------------------------------ Constructors + + + ConnectionMonitor(final int maxConnections) { + if (maxConnections != -1) { + connections = new Semaphore(maxConnections); + } else { + connections = null; + } + } + + // ----------------------------------- Methods from Connection.CloseListener + + + public boolean acquire() { + + return (connections == null || connections.tryAcquire()); + + } + + @Override + public void onClosed(Closeable closeable, CloseType closeType) throws IOException { + + if (connections != null) { + connections.release(); + } + + } + + } // END ConnectionMonitor + + private static final class NonCachingPool implements ConnectionsPool { + + + // ---------------------------------------- Methods from ConnectionsPool + + + public boolean offer(String uri, Connection connection) { + return false; + } + + public Connection poll(String uri) { + return null; + } + + public boolean removeAll(Connection connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { + // no-op + } + + } // END NonCachingPool + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index d322d798e1..678f9067bb 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -21,8 +21,6 @@ import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.Body; import org.asynchttpclient.BodyGenerator; -import org.asynchttpclient.ConnectionPoolKeyStrategy; -import org.asynchttpclient.ConnectionsPool; import org.asynchttpclient.Cookie; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.FluentStringsMap; @@ -56,9 +54,6 @@ import org.asynchttpclient.util.SslUtils; import org.glassfish.grizzly.Buffer; -import org.glassfish.grizzly.CloseListener; -import org.glassfish.grizzly.CloseType; -import org.glassfish.grizzly.Closeable; import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.EmptyCompletionHandler; @@ -85,7 +80,6 @@ import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.Protocol; -import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.npn.ClientSideNegotiator; import org.glassfish.grizzly.spdy.NextProtoNegSupport; import org.glassfish.grizzly.spdy.SpdyFramingFilter; @@ -104,7 +98,6 @@ import org.glassfish.grizzly.impl.SafeFutureImpl; import org.glassfish.grizzly.memory.Buffers; import org.glassfish.grizzly.memory.MemoryManager; -import org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder; import org.glassfish.grizzly.ssl.SSLEngineConfigurator; @@ -113,7 +106,6 @@ import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy; import org.glassfish.grizzly.utils.BufferOutputStream; import org.glassfish.grizzly.utils.DelayedExecutor; -import org.glassfish.grizzly.utils.Futures; import org.glassfish.grizzly.utils.IdleTimeoutFilter; import org.glassfish.grizzly.websockets.DataFrame; import org.glassfish.grizzly.websockets.HandShake; @@ -136,7 +128,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; -import java.net.InetSocketAddress; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; @@ -150,7 +141,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; @@ -180,8 +170,8 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { private final BodyHandlerFactory bodyHandlerFactory = new BodyHandlerFactory(); - private final TCPNIOTransport clientTransport; - private final AsyncHttpClientConfig clientConfig; + final TCPNIOTransport clientTransport; + final AsyncHttpClientConfig clientConfig; private final ConnectionManager connectionManager; DelayedExecutor.Resolver resolver; @@ -2310,35 +2300,6 @@ public boolean applyDecoding(HttpHeader httpPacket) { } // END ClientContentEncoding - private static final class NonCachingPool implements ConnectionsPool { - - - // ---------------------------------------- Methods from ConnectionsPool - - - public boolean offer(String uri, Connection connection) { - return false; - } - - public Connection poll(String uri) { - return null; - } - - public boolean removeAll(Connection connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - // no-op - } - - } // END NonCachingPool - - private static interface BodyHandler { static int MAX_CHUNK_SIZE = 8192; @@ -2842,232 +2803,6 @@ public boolean doHandle(final FilterChainContext ctx, } // END BodyGeneratorBodyHandler - static class ConnectionManager { - - private static final Attribute DO_NOT_CACHE = - Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(ConnectionManager.class.getName()); - private final ConnectionsPool pool; - private final TCPNIOConnectorHandler connectionHandler; - private final ConnectionMonitor connectionMonitor; - private final GrizzlyAsyncHttpProvider provider; - - // -------------------------------------------------------- Constructors - - @SuppressWarnings("unchecked") - ConnectionManager(final GrizzlyAsyncHttpProvider provider, - final TCPNIOTransport transport) { - - ConnectionsPool connectionPool; - this.provider = provider; - final AsyncHttpClientConfig config = provider.clientConfig; - if (config.getAllowPoolingConnection()) { - ConnectionsPool pool = config.getConnectionsPool(); - if (pool != null) { - //noinspection unchecked - connectionPool = (ConnectionsPool) pool; - } else { - connectionPool = new GrizzlyConnectionsPool((config)); - } - } else { - connectionPool = new NonCachingPool(); - } - pool = connectionPool; - connectionHandler = TCPNIOConnectorHandler.builder(transport).build(); - final int maxConns = provider.clientConfig.getMaxTotalConnections(); - connectionMonitor = new ConnectionMonitor(maxConns); - - - } - - // ----------------------------------------------------- Private Methods - - static void markConnectionAsDoNotCache(final Connection c) { - DO_NOT_CACHE.set(c, Boolean.TRUE); - } - - static boolean isConnectionCacheable(final Connection c) { - final Boolean canCache = DO_NOT_CACHE.get(c); - return ((canCache != null) ? canCache : false); - } - - void doAsyncTrackedConnection(final Request request, - final GrizzlyResponseFuture requestFuture, - final CompletionHandler connectHandler) - throws IOException, ExecutionException, InterruptedException { - Connection c = pool.poll(getPoolKey(request, requestFuture.getProxyServer())); - if (c == null) { - if (!connectionMonitor.acquire()) { - throw new IOException("Max connections exceeded"); - } - doAsyncConnect(request, requestFuture, connectHandler); - } else { - provider.touchConnection(c, request); - connectHandler.completed(c); - } - - } - - Connection obtainConnection(final Request request, - final GrizzlyResponseFuture requestFuture) - throws IOException, ExecutionException, InterruptedException, TimeoutException { - - final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); - markConnectionAsDoNotCache(c); - return c; - - } - - void doAsyncConnect(final Request request, - final GrizzlyResponseFuture requestFuture, - final CompletionHandler connectHandler) - throws IOException, ExecutionException, InterruptedException { - - ProxyServer proxy = requestFuture.getProxyServer(); - final URI uri = request.getURI(); - String host = proxy != null ? proxy.getHost() : uri.getHost(); - int port = proxy != null ? proxy.getPort() : uri.getPort(); - if (request.getLocalAddress() != null) { - connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), new InetSocketAddress(request.getLocalAddress(), 0), - createConnectionCompletionHandler(request, requestFuture, connectHandler)); - } else { - connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - createConnectionCompletionHandler(request, requestFuture, connectHandler)); - } - - } - - private Connection obtainConnection0(final Request request, - final GrizzlyResponseFuture requestFuture, - final ProxyServer proxy) - throws IOException, ExecutionException, InterruptedException, TimeoutException { - - final URI uri = request.getURI(); - String host = proxy != null ? proxy.getHost() : uri.getHost(); - int port = proxy != null ? proxy.getPort() : uri.getPort(); - int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); - FutureImpl future = Futures.createSafeFuture(); - CompletionHandler ch = Futures.toCompletionHandler(future, - createConnectionCompletionHandler(request, requestFuture, null)); - if (cTimeout > 0) { - connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - ch); - return future.get(cTimeout, TimeUnit.MILLISECONDS); - } else { - connectionHandler.connect(new InetSocketAddress(host, getPort(uri, port)), - ch); - return future.get(); - } - } - - boolean returnConnection(final Request request, final Connection c) { - ProxyServer proxyServer = ProxyUtils.getProxyServer(provider.clientConfig, request); - final boolean result = (DO_NOT_CACHE.get(c) == null - && pool.offer(getPoolKey(request, proxyServer), c)); - if (result) { - if (provider.resolver != null) { - provider.resolver.setTimeoutMillis(c, IdleTimeoutFilter.FOREVER); - } - } - return result; - - } - - - boolean canReturnConnection(final Connection c) { - - return (DO_NOT_CACHE.get(c) != null || pool.canCacheConnection()); - - } - - - void destroy() { - - pool.destroy(); - - } - - CompletionHandler createConnectionCompletionHandler(final Request request, - final GrizzlyResponseFuture future, - final CompletionHandler wrappedHandler) { - return new CompletionHandler() { - public void cancelled() { - if (wrappedHandler != null) { - wrappedHandler.cancelled(); - } else { - future.cancel(true); - } - } - - public void failed(Throwable throwable) { - if (wrappedHandler != null) { - wrappedHandler.failed(throwable); - } else { - future.abort(throwable); - } - } - - public void completed(Connection connection) { - future.setConnection(connection); - provider.touchConnection(connection, request); - if (wrappedHandler != null) { - connection.addCloseListener(connectionMonitor); - wrappedHandler.completed(connection); - } - } - - public void updated(Connection result) { - if (wrappedHandler != null) { - wrappedHandler.updated(result); - } - } - }; - } - - private static String getPoolKey(final Request request, ProxyServer proxyServer) { - final ConnectionPoolKeyStrategy keyStrategy = request.getConnectionPoolKeyStrategy(); - URI uri = proxyServer != null? proxyServer.getURI(): request.getURI(); - return keyStrategy.getKey(uri); - } - - // ------------------------------------------------------ Nested Classes - - private static class ConnectionMonitor implements CloseListener { - - private final Semaphore connections; - - // ------------------------------------------------------------ Constructors - - - ConnectionMonitor(final int maxConnections) { - if (maxConnections != -1) { - connections = new Semaphore(maxConnections); - } else { - connections = null; - } - } - - // ----------------------------------- Methods from Connection.CloseListener - - - public boolean acquire() { - - return (connections == null || connections.tryAcquire()); - - } - - @Override - public void onClosed(Closeable closeable, CloseType closeType) throws IOException { - - if (connections != null) { - connections.release(); - } - - } - - } // END ConnectionMonitor - - } // END ConnectionManager - static final class SwitchingSSLFilter extends SSLFilter { private final boolean secureByDefault; diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java index a24636d80d..07fdca7eb4 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java @@ -28,8 +28,6 @@ import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicReference; -import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider.ConnectionManager.*; - /** * {@link HttpResponseBodyPart} implementation using the Grizzly 2.0 HTTP client * codec. @@ -127,8 +125,7 @@ public boolean isLast() { */ @Override public void markUnderlyingConnectionAsClosed() { - GrizzlyAsyncHttpProvider.ConnectionManager - .markConnectionAsDoNotCache(connection); + ConnectionManager.markConnectionAsDoNotCache(connection); } /** @@ -136,8 +133,7 @@ public void markUnderlyingConnectionAsClosed() { */ @Override public boolean closeUnderlyingConnection() { - return !GrizzlyAsyncHttpProvider.ConnectionManager - .isConnectionCacheable(connection); + return !ConnectionManager.isConnectionCacheable(connection); } From 3869c25fa2d6aacf1276a5d9cf94bee70ec406ce Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 5 Jun 2013 00:04:18 +0200 Subject: [PATCH 0396/2844] Don't force FluentStringsMap null values into empty strings, close #234 --- .../org/asynchttpclient/FluentStringsMap.java | 32 ++++--------------- .../async/FluentStringsMapTest.java | 4 +-- .../asynchttpclient/async/PostWithQSTest.java | 23 +++++++++++++ 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/FluentStringsMap.java b/api/src/main/java/org/asynchttpclient/FluentStringsMap.java index b54db29717..4aaa5b8237 100644 --- a/api/src/main/java/org/asynchttpclient/FluentStringsMap.java +++ b/api/src/main/java/org/asynchttpclient/FluentStringsMap.java @@ -16,6 +16,8 @@ */ package org.asynchttpclient; +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -67,24 +69,6 @@ public FluentStringsMap add(String key, String... values) { return this; } - private List fetchValues(Collection values) { - List result = null; - - if (values != null) { - for (String value : values) { - if (value == null) { - value = ""; - } - if (result == null) { - // lazy initialization - result = new ArrayList(); - } - result.add(value); - } - } - return result; - } - /** * Adds the specified values and returns this object. * @@ -95,16 +79,14 @@ private List fetchValues(Collection values) { */ public FluentStringsMap add(String key, Collection values) { if (key != null) { - List nonNullValues = fetchValues(values); - - if (nonNullValues != null) { + if (isNonEmpty(values)) { List curValues = this.values.get(key); if (curValues == null) { curValues = new ArrayList(); this.values.put(key, curValues); } - curValues.addAll(nonNullValues); + curValues.addAll(values); } } return this; @@ -160,12 +142,10 @@ public FluentStringsMap replace(final String key, final String... values) { */ public FluentStringsMap replace(final String key, final Collection values) { if (key != null) { - List nonNullValues = fetchValues(values); - - if (nonNullValues == null) { + if (values == null) { this.values.remove(key); } else { - this.values.put(key, nonNullValues); + this.values.put(key, new ArrayList(values)); } } return this; diff --git a/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java b/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java index d7d39d8eed..ffbb651a7a 100644 --- a/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java @@ -119,8 +119,8 @@ public void nullValueTest() { map.add("foo", (String) null); - assertEquals(map.getFirstValue("foo"), ""); - assertEquals(map.getJoinedValue("foo", ", "), ""); + assertEquals(map.getFirstValue("foo"), null); + assertEquals(map.getJoinedValue("foo", ", "), null); assertEquals(map.get("foo").size(), 1); } diff --git a/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java index a33830f1dc..442f389082 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java @@ -112,6 +112,29 @@ public void postWithNulParamsQS() throws IOException, ExecutionException, Timeou try { Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b&c&d=e").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { + /* @Override */ + public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { + if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c&d=e")) { + throw new IOException("failed to parse the query properly"); + } + return super.onStatusReceived(status); + } + + }); + Response resp = f.get(3, TimeUnit.SECONDS); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + } finally { + client.close(); + } + } + + @Test(groups = { "standalone", "default_provider" }) + public void postWithEmptyParamsQS() throws IOException, ExecutionException, TimeoutException, InterruptedException { + AsyncHttpClient client = getAsyncHttpClient(null); + try { + Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { + /* @Override */ public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { From b19f69ae3c818057c191fe3785111011045d8003 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 4 Jun 2013 17:01:17 -0700 Subject: [PATCH 0397/2844] Fix copyright. --- .../providers/grizzly/ConnectionManager.java | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java index d14c5e1d90..133935b731 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java @@ -1,42 +1,16 @@ /* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can - * obtain a copy of the License at - * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html - * or packager/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at packager/legal/LICENSE.txt. - * - * GPL Classpath Exception: - * Oracle designates this particular file as subject to the "Classpath" - * exception as provided by Oracle in the GPL Version 2 section of the License - * file that accompanied this code. - * - * Modifications: - * If applicable, add the following below the License Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyright [year] [name of copyright owner]" - * - * Contributor(s): - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ + package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClientConfig; From c376a4c0766b1b42883d7ab6833e42ae01c6e4d0 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 5 Jun 2013 10:34:22 +0200 Subject: [PATCH 0398/2844] Don't eagerly create AsyncHttpClientConfig pool threads, close #315 --- .../AsyncHttpClientConfig.java | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 59f4eb8ecd..c53ced29ce 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -574,20 +574,8 @@ public static class Builder { private boolean useProxyProperties = Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties"); private boolean allowPoolingConnection = true; private boolean useRelativeURIsWithSSLProxies = Boolean.getBoolean(ASYNC_CLIENT + "useRelativeURIsWithSSLProxies"); - private ScheduledExecutorService reaper = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors(), new ThreadFactory() { - public Thread newThread(Runnable r) { - Thread t = new Thread(r, "AsyncHttpClient-Reaper"); - t.setDaemon(true); - return t; - } - }); - private ExecutorService applicationThreadPool = Executors.newCachedThreadPool(new ThreadFactory() { - public Thread newThread(Runnable r) { - Thread t = new Thread(r, "AsyncHttpClient-Callback"); - t.setDaemon(true); - return t; - } - }); + private ScheduledExecutorService reaper; + private ExecutorService applicationThreadPool; private ProxyServer proxyServer = null; private SSLContext sslContext; private SSLEngineFactory sslEngineFactory; @@ -768,7 +756,6 @@ public Builder setKeepAlive(boolean allowPoolingConnection) { * @return a {@link Builder} */ public Builder setScheduledExecutorService(ScheduledExecutorService reaper) { - if (this.reaper != null) this.reaper.shutdown(); this.reaper = reaper; return this; } @@ -782,7 +769,6 @@ public Builder setScheduledExecutorService(ScheduledExecutorService reaper) { * @return a {@link Builder} */ public Builder setExecutorService(ExecutorService applicationThreadPool) { - if (this.applicationThreadPool != null) this.applicationThreadPool.shutdown(); this.applicationThreadPool = applicationThreadPool; return this; } @@ -1161,6 +1147,26 @@ public Builder(AsyncHttpClientConfig prototype) { * @return an {@link AsyncHttpClientConfig} */ public AsyncHttpClientConfig build() { + + if (reaper == null) { + reaper = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors(), new ThreadFactory() { + public Thread newThread(Runnable r) { + Thread t = new Thread(r, "AsyncHttpClient-Reaper"); + t.setDaemon(true); + return t; + } + }) + } + + if (applicationThreadPool == null) { + applicationThreadPool = Executors.newCachedThreadPool(new ThreadFactory() { + public Thread newThread(Runnable r) { + Thread t = new Thread(r, "AsyncHttpClient-Callback"); + t.setDaemon(true); + return t; + } + }) + } if (applicationThreadPool.isShutdown()) { throw new IllegalStateException("ExecutorServices closed"); From 07cbcc410895093844903bd0e1b7488134844a8a Mon Sep 17 00:00:00 2001 From: jfarcand Date: Wed, 5 Jun 2013 11:31:26 -0400 Subject: [PATCH 0399/2844] Fix build --- .../main/java/org/asynchttpclient/AsyncHttpClientConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index c53ced29ce..6178359b44 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -1155,7 +1155,7 @@ public Thread newThread(Runnable r) { t.setDaemon(true); return t; } - }) + }); } if (applicationThreadPool == null) { @@ -1165,7 +1165,7 @@ public Thread newThread(Runnable r) { t.setDaemon(true); return t; } - }) + }); } if (applicationThreadPool.isShutdown()) { From 326d3249a15df1bf5b2b7957e1e33020572dc76e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 5 Jun 2013 09:46:43 -0700 Subject: [PATCH 0400/2844] Update to 2.3.3. --- providers/grizzly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index 16535753a0..a60cce6215 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -14,7 +14,7 @@ - 2.3.3-SNAPSHOT + 2.3.3 1.0 From 2c3ec3c6eb73ca27a0dcccd981b18b0096fdba09 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 5 Jun 2013 17:41:46 -0700 Subject: [PATCH 0401/2844] Re-organization of the Grizzly provider code. --- .../providers/grizzly/ConnectionManager.java | 30 +- .../providers/grizzly/EventHandler.java | 517 ++++ .../grizzly/FeedableBodyGenerator.java | 2 +- .../providers/grizzly/GSSSPNEGOWrapper.java | 48 - .../grizzly/GrizzlyAsyncHttpProvider.java | 2661 +---------------- .../grizzly/HttpTransactionContext.java | 310 ++ .../bodyhandler/BodyGeneratorBodyHandler.java | 91 + .../grizzly/bodyhandler/BodyHandler.java | 32 + .../bodyhandler/BodyHandlerFactory.java | 45 + .../bodyhandler/ByteArrayBodyHandler.java | 66 + .../bodyhandler/EntityWriterBodyHandler.java | 57 + .../grizzly/bodyhandler/ExpectHandler.java | 57 + .../grizzly/bodyhandler/FileBodyHandler.java | 141 + .../grizzly/bodyhandler/NoBodyHandler.java | 47 + .../bodyhandler/ParamsBodyHandler.java | 100 + .../grizzly/bodyhandler/PartsBodyHandler.java | 66 + .../bodyhandler/StreamDataBodyHandler.java | 77 + .../bodyhandler/StringBodyHandler.java | 67 + .../filters/AsyncHttpClientEventFilter.java | 92 + .../filters/AsyncHttpClientFilter.java | 443 +++ .../AsyncHttpClientTransportFilter.java | 73 + .../filters/AsyncSpdyClientEventFilter.java | 88 + .../grizzly/filters/ClientEncodingFilter.java | 45 + .../grizzly/filters/SwitchingSSLFilter.java | 174 ++ .../grizzly/filters/events/ContinueEvent.java | 51 + .../filters/events/SSLSwitchingEvent.java | 64 + .../statushandler/AuthorizationHandler.java | 122 + .../ProxyAuthorizationHandler.java | 252 ++ .../statushandler/RedirectHandler.java | 118 + .../grizzly/statushandler/StatusHandler.java | 33 + .../AHCWebSocketListenerAdapter.java | 191 ++ .../websocket/GrizzlyWebSocketAdapter.java | 116 + 32 files changed, 3602 insertions(+), 2674 deletions(-) create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java delete mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ExpectHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/NoBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ParamsBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StreamDataBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StringBodyHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncSpdyClientEventFilter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/SwitchingSSLFilter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/AHCWebSocketListenerAdapter.java create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyWebSocketAdapter.java diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java index 133935b731..3e48b99edf 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java @@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -class ConnectionManager { +public class ConnectionManager { private static final Attribute DO_NOT_CACHE = Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(ConnectionManager.class.getName()); @@ -57,7 +57,7 @@ class ConnectionManager { ConnectionsPool connectionPool; this.provider = provider; - final AsyncHttpClientConfig config = provider.clientConfig; + final AsyncHttpClientConfig config = provider.getClientConfig(); if (config.getAllowPoolingConnection()) { ConnectionsPool pool = config.getConnectionsPool(); if (pool != null) { @@ -71,7 +71,7 @@ class ConnectionManager { } pool = connectionPool; connectionHandler = TCPNIOConnectorHandler.builder(transport).build(); - final int maxConns = provider.clientConfig.getMaxTotalConnections(); + final int maxConns = provider.getClientConfig().getMaxTotalConnections(); connectionMonitor = new ConnectionMonitor(maxConns); @@ -88,9 +88,9 @@ static boolean isConnectionCacheable(final Connection c) { return ((canCache != null) ? canCache : false); } - void doAsyncTrackedConnection(final Request request, - final GrizzlyResponseFuture requestFuture, - final CompletionHandler connectHandler) + public void doAsyncTrackedConnection(final Request request, + final GrizzlyResponseFuture requestFuture, + final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { Connection c = pool.poll(getPoolKey(request, requestFuture.getProxyServer())); if (c == null) { @@ -105,8 +105,8 @@ void doAsyncTrackedConnection(final Request request, } - Connection obtainConnection(final Request request, - final GrizzlyResponseFuture requestFuture) + public Connection obtainConnection(final Request request, + final GrizzlyResponseFuture requestFuture) throws IOException, ExecutionException, InterruptedException, TimeoutException { final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); @@ -115,9 +115,9 @@ Connection obtainConnection(final Request request, } - void doAsyncConnect(final Request request, - final GrizzlyResponseFuture requestFuture, - final CompletionHandler connectHandler) + public void doAsyncConnect(final Request request, + final GrizzlyResponseFuture requestFuture, + final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { ProxyServer proxy = requestFuture.getProxyServer(); @@ -144,7 +144,7 @@ private Connection obtainConnection0(final Request request, final URI uri = request.getURI(); String host = proxy != null ? proxy.getHost() : uri.getHost(); int port = proxy != null ? proxy.getPort() : uri.getPort(); - int cTimeout = provider.clientConfig.getConnectionTimeoutInMs(); + int cTimeout = provider.getClientConfig().getConnectionTimeoutInMs(); FutureImpl future = Futures.createSafeFuture(); CompletionHandler ch = Futures.toCompletionHandler(future, createConnectionCompletionHandler(request, requestFuture, null)); @@ -163,12 +163,12 @@ private Connection obtainConnection0(final Request request, boolean returnConnection(final Request request, final Connection c) { ProxyServer proxyServer = ProxyUtils.getProxyServer( - provider.clientConfig, request); + provider.getClientConfig(), request); final boolean result = (DO_NOT_CACHE.get(c) == null && pool.offer(getPoolKey(request, proxyServer), c)); if (result) { - if (provider.resolver != null) { - provider.resolver.setTimeoutMillis(c, IdleTimeoutFilter.FOREVER); + if (provider.getResolver() != null) { + provider.getResolver().setTimeoutMillis(c, IdleTimeoutFilter.FOREVER); } } return result; diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java new file mode 100644 index 0000000000..2895a84541 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -0,0 +1,517 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; +import org.asynchttpclient.providers.grizzly.filters.events.ContinueEvent; +import org.asynchttpclient.providers.grizzly.statushandler.AuthorizationHandler; +import org.asynchttpclient.providers.grizzly.statushandler.ProxyAuthorizationHandler; +import org.asynchttpclient.providers.grizzly.statushandler.RedirectHandler; +import org.asynchttpclient.providers.grizzly.statushandler.StatusHandler; +import org.asynchttpclient.providers.grizzly.websocket.GrizzlyWebSocketAdapter; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpHeader; +import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.util.Header; +import org.glassfish.grizzly.http.util.HttpStatus; +import org.glassfish.grizzly.utils.IdleTimeoutFilter; +import org.glassfish.grizzly.websockets.HandshakeException; +import org.glassfish.grizzly.websockets.SimpleWebSocket; +import org.glassfish.grizzly.websockets.WebSocketHolder; + +import java.io.IOException; +import java.net.URI; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import static org.asynchttpclient.AsyncHandler.STATE.ABORT; +import static org.asynchttpclient.AsyncHandler.STATE.UPGRADE; +import static org.asynchttpclient.providers.grizzly.statushandler.StatusHandler.InvocationStatus.CONTINUE; + +public final class EventHandler { + + private static final Map HANDLER_MAP = + new HashMap(); + + static { + HANDLER_MAP.put(HttpStatus.UNAUTHORIZED_401.getStatusCode(), + AuthorizationHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.getStatusCode(), + ProxyAuthorizationHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.MOVED_PERMANENTLY_301.getStatusCode(), + RedirectHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.FOUND_302.getStatusCode(), + RedirectHandler.INSTANCE); + HANDLER_MAP.put(HttpStatus.TEMPORARY_REDIRECT_307.getStatusCode(), + RedirectHandler.INSTANCE); + } + + + private final GrizzlyAsyncHttpProvider provider; + GrizzlyAsyncHttpProvider.Cleanup cleanup; + + + // -------------------------------------------------------- Constructors + + + EventHandler(final GrizzlyAsyncHttpProvider provider) { + this.provider = provider; + } + + + // ----------------------------------------------------- Event Callbacks + + + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + + HttpTransactionContext.get(ctx.getConnection()).abort(error); + + } + + + public void onHttpContentParsed(HttpContent content, + FilterChainContext ctx) { + + final HttpTransactionContext context = + HttpTransactionContext.get(ctx.getConnection()); + final AsyncHandler handler = context.getHandler(); + if (handler != null && context.getCurrentState() != ABORT) { + try { + context.setCurrentState(handler.onBodyPartReceived( + new GrizzlyResponseBodyPart(content, + null, + ctx.getConnection(), + provider))); + } catch (Exception e) { + handler.onThrowable(e); + } + } + + } + + @SuppressWarnings("UnusedParameters") + public void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { + ((TransferCompletionHandler) handler).onHeaderWriteCompleted(); + } + } + } + + public void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { + final int written = content.getContent().remaining(); + final long total = context.getTotalBodyWritten().addAndGet( + written); + ((TransferCompletionHandler) handler).onContentWriteProgress( + written, + total, + content.getHttpHeader().getContentLength()); + } + } + } + + public void onInitialLineParsed(HttpHeader httpHeader, + FilterChainContext ctx) { + + //super.onInitialLineParsed(httpHeader, ctx); + if (httpHeader.isSkipRemainder()) { + return; + } + final Connection connection = ctx.getConnection(); + final HttpTransactionContext context = + HttpTransactionContext.get(connection); + final int status = ((HttpResponsePacket) httpHeader).getStatus(); + if (context.isEstablishingTunnel() && HttpStatus.OK_200.statusMatches(status)) { + return; + } + if (HttpStatus.CONINTUE_100.statusMatches(status)) { + ctx.notifyUpstream(new ContinueEvent(context)); + return; + } + + StatusHandler statusHandler = context.getStatusHandler(); + context.setStatusHandler(null); + if (statusHandler != null && !statusHandler.handlesStatus(status)) { + context.setStatusHandler(null); + context.setInvocationStatus(CONTINUE); + } + + if (context.getInvocationStatus() == CONTINUE) { + if (HANDLER_MAP.containsKey(status)) { + context.setStatusHandler(HANDLER_MAP.get(status)); + } + if (context.getStatusHandler() instanceof RedirectHandler) { + if (!isRedirectAllowed(context)) { + context.setStatusHandler(null); + } + } + } + if (isRedirectAllowed(context)) { + if (isRedirect(status)) { + if (context.getStatusHandler() == null) { + context.setStatusHandler(RedirectHandler.INSTANCE); + } + context.getRedirectCount().incrementAndGet(); + if (redirectCountExceeded(context)) { + httpHeader.setSkipRemainder(true); + context.abort(new MaxRedirectException()); + } + } else { + if (context.getRedirectCount().get() > 0) { + context.getRedirectCount().set(0); + } + } + } + final GrizzlyResponseStatus responseStatus = + new GrizzlyResponseStatus((HttpResponsePacket) httpHeader, + context.getRequest().getURI(), + provider); + context.setResponseStatus(responseStatus); + if (context.getStatusHandler() != null) { + return; + } + if (context.getCurrentState() != ABORT) { + + try { + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + context.setCurrentState(handler.onStatusReceived(responseStatus)); + if (context.isWSRequest() && context.getCurrentState() == ABORT) { + httpHeader.setSkipRemainder(true); + context.abort(new HandshakeException("Upgrade failed")); + } + } + } catch (Exception e) { + httpHeader.setSkipRemainder(true); + context.abort(e); + } + } + + } + + + public void onHttpHeaderError(final HttpHeader httpHeader, + final FilterChainContext ctx, + final Throwable t) throws IOException { + + t.printStackTrace(); + httpHeader.setSkipRemainder(true); + final HttpTransactionContext context = + HttpTransactionContext.get(ctx.getConnection()); + context.abort(t); + } + + @SuppressWarnings({"unchecked"}) + public void onHttpHeadersParsed(HttpHeader httpHeader, + FilterChainContext ctx) { + + //super.onHttpHeadersParsed(httpHeader, ctx); + GrizzlyAsyncHttpProvider.LOGGER.debug("RESPONSE: {}", httpHeader); + if (httpHeader.containsHeader(Header.Connection)) { + if ("close".equals(httpHeader.getHeader(Header.Connection))) { + ConnectionManager.markConnectionAsDoNotCache(ctx.getConnection()); + } + } + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + + if (httpHeader.isSkipRemainder() + || (context.isEstablishingTunnel() + && context.getStatusHandler() == null)) { + return; + } + + final AsyncHandler handler = context.getHandler(); + final List filters = context.getProvider() + .getClientConfig().getResponseFilters(); + final GrizzlyResponseHeaders responseHeaders = + new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, + null, + provider); + if (!filters.isEmpty()) { + FilterContext fc = new FilterContext.FilterContextBuilder() + .asyncHandler(handler).request(context.getRequest()) + .responseHeaders(responseHeaders) + .responseStatus(context.getResponseStatus()).build(); + try { + for (final ResponseFilter f : filters) { + fc = f.filter(fc); + } + } catch (Exception e) { + context.abort(e); + } + if (fc.replayRequest()) { + httpHeader.setSkipRemainder(true); + final Request newRequest = fc.getRequest(); + final AsyncHandler newHandler = fc.getAsyncHandler(); + try { + final ConnectionManager m = + context.getProvider().getConnectionManager(); + final Connection c = + m.obtainConnection(newRequest, + context.getFuture()); + final HttpTransactionContext newContext = + context.copy(); + context.setFuture(null); + HttpTransactionContext.set(c, newContext); + try { + context.getProvider().execute(c, + newRequest, + newHandler, + context.getFuture()); + } catch (IOException ioe) { + newContext.abort(ioe); + } + } catch (Exception e) { + context.abort(e); + } + return; + } + } + if (context.getStatusHandler() != null && context.getInvocationStatus() == CONTINUE) { + final boolean result = + context.getStatusHandler().handleStatus( + ((HttpResponsePacket) httpHeader), + context, + ctx); + if (!result) { + httpHeader.setSkipRemainder(true); + return; + } + } + if (context.isWSRequest()) { + try { + //in case of DIGEST auth protocol handler is null and just returning here is working + if(context.getProtocolHandler() == null) + { + return; + //context.protocolHandler = Version.DRAFT17.createHandler(true); + //context.currentState = AsyncHandler.STATE.UPGRADE; + } + + context.getProtocolHandler().setConnection( + ctx.getConnection()); + + final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context); + context.setWebSocket(webSocketAdapter); + SimpleWebSocket ws = webSocketAdapter.getGrizzlyWebSocket(); + if (context.getCurrentState() == UPGRADE) { + httpHeader.setChunked(false); + ws.onConnect(); + WebSocketHolder.set(ctx.getConnection(), + context.getProtocolHandler(), + ws); + ((WebSocketUpgradeHandler) context.getHandler()).onSuccess(context.getWebSocket()); + final int wsTimeout = context.getProvider().getClientConfig().getWebSocketIdleTimeoutInMs(); + IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), + ((wsTimeout <= 0) + ? IdleTimeoutFilter.FOREVER + : wsTimeout), + TimeUnit.MILLISECONDS); + context.result(handler.onCompleted()); + } else { + httpHeader.setSkipRemainder(true); + ((WebSocketUpgradeHandler) context.getHandler()). + onClose(context.getWebSocket(), + 1002, + "WebSocket protocol error: unexpected HTTP response status during handshake."); + context.result(null); + } + } catch (Exception e) { + httpHeader.setSkipRemainder(true); + context.abort(e); + } + } else { + if (context.getCurrentState() != ABORT) { + try { + context.setCurrentState( + handler.onHeadersReceived(responseHeaders)); + } catch (Exception e) { + httpHeader.setSkipRemainder(true); + context.abort(e); + } + } + } + + } + + @SuppressWarnings("unchecked") + public boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { + + boolean result; + final String proxy_auth = httpHeader.getHeader(Header.ProxyAuthenticate); + + if (httpHeader.isSkipRemainder()) { + if (!ProxyAuthorizationHandler.isNTLMSecondHandShake(proxy_auth)) { + cleanup.cleanup(ctx); + cleanup(ctx); + return false; + } else { + //super.onHttpPacketParsed(httpHeader, ctx); + cleanup.cleanup(ctx); + httpHeader.getProcessingState().setKeepAlive(true); + return false; + } + } + + //result = super.onHttpPacketParsed(httpHeader, ctx); + if (cleanup != null) { + cleanup.cleanup(ctx); + } + result = false; + + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + if (context.isEstablishingTunnel() + && HttpStatus.OK_200.statusMatches( + ((HttpResponsePacket) httpHeader).getStatus())) { + context.setEstablishingTunnel(false); + final Connection c = ctx.getConnection(); + context.tunnelEstablished(c); + try { + context.getProvider().execute(c, + context.getRequest(), + context.getHandler(), + context.getFuture()); + return result; + } catch (IOException e) { + context.abort(e); + return result; + } + } else { + cleanup(ctx); + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + try { + context.result(handler.onCompleted()); + } catch (Exception e) { + context.abort(e); + } + } else { + context.done(null); + } + + return result; + } + } + + + // ----------------------------------------------------- Private Methods + + private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) { + SimpleWebSocket ws = new SimpleWebSocket(context.getProtocolHandler()); + AsyncHttpProviderConfig config = context.getProvider().getClientConfig().getAsyncHttpProviderConfig(); + boolean bufferFragments = true; + if (config instanceof GrizzlyAsyncHttpProviderConfig) { + bufferFragments = (Boolean) ((GrizzlyAsyncHttpProviderConfig) config).getProperty( + GrizzlyAsyncHttpProviderConfig.Property.BUFFER_WEBSOCKET_FRAGMENTS); + } + + return new GrizzlyWebSocketAdapter(ws, bufferFragments); + } + + private static boolean isRedirectAllowed(final HttpTransactionContext ctx) { + boolean allowed = ctx.getRequest().isRedirectEnabled(); + if (ctx.getRequest().isRedirectOverrideSet()) { + return allowed; + } + if (!allowed) { + allowed = ctx.isRedirectsAllowed(); + } + return allowed; + } + + private static HttpTransactionContext cleanup(final FilterChainContext ctx) { + + final Connection c = ctx.getConnection(); + final HttpTransactionContext context = + HttpTransactionContext.get(c); + HttpTransactionContext.set(c, null); + final ConnectionManager manager = context.getProvider().getConnectionManager(); + if (!manager.canReturnConnection(c)) { + context.abort(new IOException("Maximum pooled connections exceeded")); + } else { + if (!manager.returnConnection(context.getRequest(), c)) { + ctx.getConnection().close(); + } + } + + return context; + + } + + + private static boolean redirectCountExceeded(final HttpTransactionContext context) { + + return (context.getRedirectCount().get() > context.getMaxRedirectCount()); + + } + + + public static boolean isRedirect(final int status) { + + return HttpStatus.MOVED_PERMANENTLY_301.statusMatches(status) + || HttpStatus.FOUND_302.statusMatches(status) + || HttpStatus.SEE_OTHER_303.statusMatches(status) + || HttpStatus.TEMPORARY_REDIRECT_307.statusMatches(status); + + } + + + // ----------------------------------------------------- Private Methods + + + public static Request newRequest(final URI uri, + final HttpResponsePacket response, + final HttpTransactionContext ctx, + boolean asGet) { + + final RequestBuilder builder = new RequestBuilder(ctx.getRequest()); + if (asGet) { + builder.setMethod("GET"); + } + builder.setUrl(uri.toString()); + + if (ctx.getProvider().getClientConfig().isRemoveQueryParamOnRedirect()) { + builder.setQueryParameters(null); + } + for (String cookieStr : response.getHeaders().values(Header.Cookie)) { + for (Cookie c : CookieDecoder.decode(cookieStr)) { + builder.addOrReplaceCookie(c); + } + } + return builder.build(); + + } + + +} // END AsyncHttpClientEventFilter diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index 68b1608873..a9d11a1476 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -55,7 +55,7 @@ public void feed(final Buffer buffer, final boolean isLast) } } - void initializeAsynchronousTransfer(final FilterChainContext context, + public void initializeAsynchronousTransfer(final FilterChainContext context, final HttpRequestPacket requestPacket) throws IOException { this.context = context; this.requestPacket = requestPacket; diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java deleted file mode 100644 index 2d192cce28..0000000000 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GSSSPNEGOWrapper.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.asynchttpclient.providers.grizzly; - -import org.ietf.jgss.GSSContext; -import org.ietf.jgss.GSSException; -import org.ietf.jgss.GSSManager; -import org.ietf.jgss.GSSName; -import org.ietf.jgss.Oid; - -import org.asynchttpclient.util.Base64; -import org.slf4j.LoggerFactory; - -public class GSSSPNEGOWrapper { - private final static org.slf4j.Logger LOGGER = LoggerFactory.getLogger(GSSSPNEGOWrapper.class); - private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; - - static GSSManager getManager() { - return GSSManager.getInstance(); - } - - static byte[] generateGSSToken( - final byte[] input, final Oid oid, final String authServer) throws GSSException { - byte[] token = input; - if (token == null) { - token = new byte[0]; - } - GSSManager manager = getManager(); - GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE); - GSSContext gssContext = manager.createContext( - serverName.canonicalize(oid), oid, null, GSSContext.DEFAULT_LIFETIME); - gssContext.requestMutualAuth(true); - gssContext.requestCredDeleg(true); - return gssContext.initSecContext(token, 0, token.length); - } - - public static String generateToken(String authServer) { - String returnVal = ""; - Oid oid; - try { - oid = new Oid(KERBEROS_OID); - byte[] token = GSSSPNEGOWrapper.generateGSSToken(null, oid, authServer); - returnVal = Base64.encode(token); - } catch (GSSException e) { - LOGGER.warn(e.toString(), e); - } - - return returnVal; - } -} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 678f9067bb..5015ffbdb6 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -14,72 +14,42 @@ package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.AsyncHttpProviderConfig; -import org.asynchttpclient.Body; -import org.asynchttpclient.BodyGenerator; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.FluentStringsMap; import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.MaxRedirectException; import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Realm; import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; -import org.asynchttpclient.UpgradeHandler; -import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.ResponseFilter; -import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.ntlm.NTLMEngine; -import org.asynchttpclient.websocket.WebSocket; -import org.asynchttpclient.websocket.WebSocketByteListener; -import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; -import org.asynchttpclient.websocket.WebSocketListener; -import org.asynchttpclient.websocket.WebSocketPingListener; -import org.asynchttpclient.websocket.WebSocketPongListener; -import org.asynchttpclient.websocket.WebSocketTextListener; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; -import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; +import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandlerFactory; +import org.asynchttpclient.providers.grizzly.bodyhandler.ExpectHandler; +import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientEventFilter; +import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientFilter; +import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientTransportFilter; +import org.asynchttpclient.providers.grizzly.filters.AsyncSpdyClientEventFilter; +import org.asynchttpclient.providers.grizzly.filters.ClientEncodingFilter; +import org.asynchttpclient.providers.grizzly.filters.SwitchingSSLFilter; import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.util.AuthenticatorUtils; import org.asynchttpclient.util.ProxyUtils; import org.asynchttpclient.util.SslUtils; -import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.Connection; -import org.glassfish.grizzly.EmptyCompletionHandler; -import org.glassfish.grizzly.FileTransfer; -import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.WriteResult; -import org.glassfish.grizzly.attributes.Attribute; -import org.glassfish.grizzly.attributes.AttributeStorage; -import org.glassfish.grizzly.filterchain.BaseFilter; import org.glassfish.grizzly.filterchain.Filter; import org.glassfish.grizzly.filterchain.FilterChain; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.filterchain.FilterChainContext; -import org.glassfish.grizzly.filterchain.FilterChainEvent; -import org.glassfish.grizzly.filterchain.NextAction; -import org.glassfish.grizzly.filterchain.TransportFilter; import org.glassfish.grizzly.http.ContentEncoding; -import org.glassfish.grizzly.http.EncodingFilter; import org.glassfish.grizzly.http.GZipContentEncoding; import org.glassfish.grizzly.http.HttpClientFilter; import org.glassfish.grizzly.http.HttpContent; -import org.glassfish.grizzly.http.HttpHeader; import org.glassfish.grizzly.http.HttpRequestPacket; -import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.Method; -import org.glassfish.grizzly.http.Protocol; import org.glassfish.grizzly.npn.ClientSideNegotiator; import org.glassfish.grizzly.spdy.NextProtoNegSupport; import org.glassfish.grizzly.spdy.SpdyFramingFilter; @@ -89,67 +59,34 @@ import org.glassfish.grizzly.ssl.SSLBaseFilter; import org.glassfish.grizzly.ssl.SSLConnectionContext; import org.glassfish.grizzly.ssl.SSLUtils; -import org.glassfish.grizzly.utils.Charsets; -import org.glassfish.grizzly.http.util.CookieSerializerUtils; -import org.glassfish.grizzly.http.util.DataChunk; import org.glassfish.grizzly.http.util.Header; -import org.glassfish.grizzly.http.util.HttpStatus; -import org.glassfish.grizzly.http.util.MimeHeaders; import org.glassfish.grizzly.impl.SafeFutureImpl; -import org.glassfish.grizzly.memory.Buffers; -import org.glassfish.grizzly.memory.MemoryManager; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder; import org.glassfish.grizzly.ssl.SSLEngineConfigurator; import org.glassfish.grizzly.ssl.SSLFilter; import org.glassfish.grizzly.strategies.SameThreadIOStrategy; import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy; -import org.glassfish.grizzly.utils.BufferOutputStream; import org.glassfish.grizzly.utils.DelayedExecutor; import org.glassfish.grizzly.utils.IdleTimeoutFilter; -import org.glassfish.grizzly.websockets.DataFrame; -import org.glassfish.grizzly.websockets.HandShake; -import org.glassfish.grizzly.websockets.HandshakeException; -import org.glassfish.grizzly.websockets.ProtocolHandler; -import org.glassfish.grizzly.websockets.SimpleWebSocket; -import org.glassfish.grizzly.websockets.Version; import org.glassfish.grizzly.websockets.WebSocketClientFilter; -import org.glassfish.grizzly.websockets.WebSocketHolder; -import org.glassfish.grizzly.websockets.draft06.ClosingFrame; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; -import java.io.ByteArrayOutputStream; -import java.io.EOFException; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; import java.net.URI; -import java.net.URISyntaxException; -import java.net.URLEncoder; -import java.security.NoSuchAlgorithmException; -import java.util.Collection; -import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider.SwitchingSSLFilter.SSLSwitchingEvent; import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property; import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.MAX_HTTP_PACKET_HEADER_SIZE; -import static org.asynchttpclient.util.MiscUtil.isNonEmpty; /** * A Grizzly 2.0-based implementation of {@link AsyncHttpProvider}. @@ -160,24 +97,18 @@ @SuppressWarnings("rawtypes") public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { - private final static Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); - private static final boolean SEND_FILE_SUPPORT; - static { - SEND_FILE_SUPPORT = configSendFileSupport(); - } - private final Attribute REQUEST_STATE_ATTR = - Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTransactionContext.class.getName()); + public static final Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); - private final BodyHandlerFactory bodyHandlerFactory = new BodyHandlerFactory(); + private final BodyHandlerFactory bodyHandlerFactory; - final TCPNIOTransport clientTransport; - final AsyncHttpClientConfig clientConfig; + private final TCPNIOTransport clientTransport; + private final AsyncHttpClientConfig clientConfig; private final ConnectionManager connectionManager; - DelayedExecutor.Resolver resolver; + private DelayedExecutor.Resolver resolver; private DelayedExecutor timeoutExecutor; - private final static NTLMEngine ntlmEngine = new NTLMEngine(); + // ------------------------------------------------------------ Constructors @@ -194,6 +125,7 @@ public GrizzlyAsyncHttpProvider(final AsyncHttpClientConfig clientConfig) { } catch (IOException ioe) { throw new RuntimeException(ioe); } + bodyHandlerFactory = new BodyHandlerFactory(this); } @@ -284,20 +216,34 @@ public Response prepareResponse(HttpResponseStatus status, } + // ---------------------------------------------------------- Public Methods + + + public AsyncHttpClientConfig getClientConfig() { + return clientConfig; + } + + public ConnectionManager getConnectionManager() { + return connectionManager; + } + + public DelayedExecutor.Resolver getResolver() { + return resolver; + } + // ------------------------------------------------------- Protected Methods @SuppressWarnings({"unchecked"}) - protected ListenableFuture execute(final Connection c, - final Request request, - final AsyncHandler handler, - final GrizzlyResponseFuture future) + public ListenableFuture execute(final Connection c, + final Request request, + final AsyncHandler handler, + final GrizzlyResponseFuture future) throws IOException { try { - if (getHttpTransactionContext(c) == null) { - setHttpTransactionContext(c, - new HttpTransactionContext(future, request, handler)); + if (HttpTransactionContext.get(c) == null) { + HttpTransactionContext.create(this, future, request, handler, c); } c.write(request, createWriteCompletionHandler(future)); } catch (Exception e) { @@ -316,7 +262,7 @@ protected ListenableFuture execute(final Connection c, protected void initializeTransport(final AsyncHttpClientConfig clientConfig) { final FilterChainBuilder fcb = FilterChainBuilder.stateless(); - fcb.add(new AsyncHttpClientTransportFilter()); + fcb.add(new AsyncHttpClientTransportFilter(this)); final int timeout = clientConfig.getRequestTimeoutInMs(); if (timeout > 0) { @@ -334,12 +280,12 @@ protected void initializeTransport(final AsyncHttpClientConfig clientConfig) { @Override public long getTimeout(FilterChainContext ctx) { final HttpTransactionContext context = - GrizzlyAsyncHttpProvider.this.getHttpTransactionContext(ctx.getConnection()); + HttpTransactionContext.get(ctx.getConnection()); if (context != null) { - if (context.isWSRequest) { + if (context.isWSRequest()) { return clientConfig.getWebSocketIdleTimeoutInMs(); } - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(clientConfig, context.request); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(clientConfig, context.getRequest()); if (requestTimeout > 0) { return requestTimeout; } @@ -373,9 +319,6 @@ public void onTimeout(Connection connection) { false, false); final SwitchingSSLFilter filter = new SwitchingSSLFilter(configurator, defaultSecState); - ProtocolHandshakeListener handshakeListener = - new ProtocolHandshakeListener(); - filter.addHandshakeListener(handshakeListener); fcb.add(filter); GrizzlyAsyncHttpProviderConfig providerConfig = (GrizzlyAsyncHttpProviderConfig) clientConfig.getAsyncHttpProviderConfig(); @@ -424,7 +367,7 @@ public void onTimeout(Connection connection) { } fcb.add(eventFilter); final AsyncHttpClientFilter clientFilter = - new AsyncHttpClientFilter(clientConfig); + new AsyncHttpClientFilter(this, clientConfig); fcb.add(clientFilter); fcb.add(new WebSocketClientFilter()); @@ -515,27 +458,7 @@ private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb, } - private static boolean configSendFileSupport() { - - return !((System.getProperty("os.name").equalsIgnoreCase("linux") - && !linuxSendFileSupported()) - || System.getProperty("os.name").equalsIgnoreCase("HP-UX")); - } - - private static boolean linuxSendFileSupported() { - final String version = System.getProperty("java.version"); - if (version.startsWith("1.6")) { - int idx = version.indexOf('_'); - if (idx == -1) { - return false; - } - final int patchRev = Integer.parseInt(version.substring(idx + 1)); - return (patchRev >= 18); - } else { - return version.startsWith("1.7") || version.startsWith("1.8"); - } - } private void doDefaultTransportConfig() { final ExecutorService service = clientConfig.executorService(); @@ -569,28 +492,10 @@ public void updated(WriteResult result) { } - void setHttpTransactionContext(final AttributeStorage storage, - final HttpTransactionContext httpTransactionState) { - - if (httpTransactionState == null) { - REQUEST_STATE_ATTR.remove(storage); - } else { - REQUEST_STATE_ATTR.set(storage, httpTransactionState); - } - - } - - HttpTransactionContext getHttpTransactionContext(final AttributeStorage storage) { - - return REQUEST_STATE_ATTR.get(storage); - - } - - void timeout(final Connection c) { - final HttpTransactionContext context = getHttpTransactionContext(c); - setHttpTransactionContext(c, null); + final HttpTransactionContext context = HttpTransactionContext.get(c); + HttpTransactionContext.set(c, null); context.abort(new TimeoutException("Timeout exceeded")); } @@ -612,15 +517,15 @@ static int getPort(final URI uri, final int p) { @SuppressWarnings({"unchecked"}) - boolean sendRequest(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) + public boolean sendRequest(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) throws IOException { boolean isWriteComplete = true; if (requestHasEntityBody(request)) { - final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); BodyHandler handler = bodyHandlerFactory.getBodyHandler(request); if (requestPacket.getHeaders().contains(Header.Expect) && requestPacket.getHeaders().getValue(1).equalsIgnoreCase("100-Continue")) { @@ -634,7 +539,7 @@ boolean sendRequest(final FilterChainContext ctx, } handler = new ExpectHandler(handler); } - context.bodyHandler = handler; + context.setBodyHandler(handler); isWriteComplete = handler.doHandle(ctx, request, requestPacket); } else { HttpContent content = HttpContent.builder(requestPacket).last(true).build(); @@ -659,7 +564,7 @@ boolean sendRequest(final FilterChainContext ctx, } - private static boolean requestHasEntityBody(final Request request) { + public static boolean requestHasEntityBody(final Request request) { final String method = request.getMethod(); return (Method.POST.matchesMethod(method) @@ -673,168 +578,9 @@ private static boolean requestHasEntityBody(final Request request) { // ----------------------------------------------------------- Inner Classes - private interface StatusHandler { - - public enum InvocationStatus { - CONTINUE, - STOP - } - - boolean handleStatus(final HttpResponsePacket httpResponse, - final HttpTransactionContext httpTransactionContext, - final FilterChainContext ctx); - - boolean handlesStatus(final int statusCode); - - } // END StatusHandler - - - final class HttpTransactionContext { - - final AtomicInteger redirectCount = new AtomicInteger(0); - - final int maxRedirectCount; - final boolean redirectsAllowed; - final GrizzlyAsyncHttpProvider provider = - GrizzlyAsyncHttpProvider.this; - - Request request; - String requestUrl; - AsyncHandler handler; - BodyHandler bodyHandler; - StatusHandler statusHandler; - StatusHandler.InvocationStatus invocationStatus = - StatusHandler.InvocationStatus.CONTINUE; - GrizzlyResponseStatus responseStatus; - GrizzlyResponseFuture future; - String lastRedirectURI; - AtomicLong totalBodyWritten = new AtomicLong(); - AsyncHandler.STATE currentState; - - String wsRequestURI; - boolean isWSRequest; - HandShake handshake; - ProtocolHandler protocolHandler; - WebSocket webSocket; - boolean establishingTunnel; - - - // -------------------------------------------------------- Constructors - - - HttpTransactionContext(final GrizzlyResponseFuture future, - final Request request, - final AsyncHandler handler) { - - this.future = future; - this.request = request; - this.handler = handler; - redirectsAllowed = provider.clientConfig.isRedirectEnabled(); - maxRedirectCount = provider.clientConfig.getMaxRedirects(); - this.requestUrl = request.getUrl(); - - } - - - // ----------------------------------------------------- Private Methods - - - HttpTransactionContext copy() { - final HttpTransactionContext newContext = - new HttpTransactionContext(future, - request, - handler); - newContext.invocationStatus = invocationStatus; - newContext.bodyHandler = bodyHandler; - newContext.currentState = currentState; - newContext.statusHandler = statusHandler; - newContext.lastRedirectURI = lastRedirectURI; - newContext.redirectCount.set(redirectCount.get()); - return newContext; - - } - - - void abort(final Throwable t) { - if (future != null) { - future.abort(t); - } - } - - void done(final Callable c) { - if (future != null) { - future.done(c); - } - } - - @SuppressWarnings({"unchecked"}) - void result(Object result) { - if (future != null) { - future.delegate.result(result); - future.done(null); - } - } - - boolean isTunnelEstablished(final Connection c) { - return c.getAttributes().getAttribute("tunnel-established") != null; - } - - - void tunnelEstablished(final Connection c) { - c.getAttributes().setAttribute("tunnel-established", Boolean.TRUE); - } - - - } // END HttpTransactionContext - - // ---------------------------------------------------------- Nested Classes - static final class ProtocolHandshakeListener implements - SSLBaseFilter.HandshakeListener { - - - static ConcurrentHashMap listeners = - new ConcurrentHashMap(); - - - // --------------------------------------- Method from HandshakeListener - - - @Override - public void onStart(Connection connection) { - // no-op - } - - @Override - public void onComplete(Connection connection) { - final HandshakeCompleteListener listener = listeners.get(connection); - if (listener != null) { - removeListener(connection); - listener.complete(); - } - } - - - // --------------------------------------------- Package Private Methods - - - public static void addListener(final Connection c, - final HandshakeCompleteListener listener) { - listeners.putIfAbsent(c, listener); - } - - static void removeListener(final Connection c) { - listeners.remove(c); - } - } - - private static interface HandshakeCompleteListener { - void complete(); - } - - private static final class ProtocolNegotiator implements ClientSideNegotiator { @@ -903,2318 +649,13 @@ public void onNoDeal(SSLEngine engine) { } - private static final class ContinueEvent implements FilterChainEvent { - - private final HttpTransactionContext context; - - - // -------------------------------------------------------- Constructors - - - ContinueEvent(final HttpTransactionContext context) { - - this.context = context; - - } - - - // --------------------------------------- Methods from FilterChainEvent - - - @Override - public Object type() { - return ContinueEvent.class; - } - - } // END ContinueEvent - - - private final class AsyncHttpClientTransportFilter extends TransportFilter { - - @Override - public NextAction handleRead(FilterChainContext ctx) throws IOException { - final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); - if (context == null) { - return super.handleRead(ctx); - } - ctx.getTransportContext().setCompletionHandler(new CompletionHandler() { - @Override - public void cancelled() { - - } - - @Override - public void failed(Throwable throwable) { - if (throwable instanceof EOFException) { - context.abort(new IOException("Remotely Closed")); - } - } - - @Override - public void completed(Object result) { - } - - @Override - public void updated(Object result) { - } - }); - return super.handleRead(ctx); - } - - @Override - public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); - if (context != null) { - context.abort(error.getCause()); - } - } - } // END AsyncHttpClientTransportFilter - - - private final class AsyncHttpClientFilter extends BaseFilter { - - - private final AsyncHttpClientConfig config; - - - // -------------------------------------------------------- Constructors - - - AsyncHttpClientFilter(final AsyncHttpClientConfig config) { - - this.config = config; - - } - - - // --------------------------------------------- Methods from BaseFilter - - - @Override - public NextAction handleWrite(final FilterChainContext ctx) - throws IOException { - - Object message = ctx.getMessage(); - if (message instanceof Request) { - ctx.setMessage(null); - if (!sendAsGrizzlyRequest((Request) message, ctx)) { - return ctx.getSuspendAction(); - } - } else if (message instanceof Buffer) { - return ctx.getInvokeAction(); - } - - return ctx.getStopAction(); - } - - @Override - public NextAction handleEvent(final FilterChainContext ctx, - final FilterChainEvent event) - throws IOException { - - final Object type = event.type(); - if (type == ContinueEvent.class) { - final ContinueEvent continueEvent = (ContinueEvent) event; - ((ExpectHandler) continueEvent.context.bodyHandler).finish(ctx); - } - - return ctx.getStopAction(); - - } - - - // ----------------------------------------------------- Private Methods - - - private boolean sendAsGrizzlyRequest(final Request request, - final FilterChainContext ctx) - throws IOException { - - final HttpTransactionContext httpCtx = getHttpTransactionContext(ctx.getConnection()); - if (isUpgradeRequest(httpCtx.handler) && isWSRequest(httpCtx.requestUrl)) { - httpCtx.isWSRequest = true; - convertToUpgradeRequest(httpCtx); - } - final URI uri = httpCtx.request.getURI(); - final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); - final String scheme = uri.getScheme(); - boolean secure = isSecure(scheme); - builder.method(request.getMethod()); - builder.protocol(Protocol.HTTP_1_1); - addHostHeader(request, uri, builder); - final ProxyServer proxy = ProxyUtils.getProxyServer(config, request); - final boolean useProxy = proxy != null; - if (useProxy) { - if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) { - ctx.notifyDownstream(new SSLSwitchingEvent(false, ctx.getConnection(), null)); - secure = false; - httpCtx.establishingTunnel = true; - builder.method(Method.CONNECT); - builder.uri(AsyncHttpProviderUtils.getAuthority(uri)); - } else if (secure && config.isUseRelativeURIsWithSSLProxies()){ - builder.uri(uri.getPath()); - } else { - builder.uri(uri.toString()); - } - } else { - builder.uri(uri.getPath()); - } - if (requestHasEntityBody(request)) { - final long contentLength = request.getContentLength(); - if (contentLength > 0) { - builder.contentLength(contentLength); - builder.chunked(false); - } else { - builder.chunked(true); - } - } - - HttpRequestPacket requestPacket; - if (httpCtx.isWSRequest && !httpCtx.establishingTunnel) { - try { - final URI wsURI = new URI(httpCtx.wsRequestURI); - httpCtx.protocolHandler = Version.DRAFT17.createHandler(true); - httpCtx.handshake = httpCtx.protocolHandler.createHandShake(wsURI); - requestPacket = (HttpRequestPacket) - httpCtx.handshake.composeHeaders().getHttpHeader(); - } catch (URISyntaxException e) { - throw new IllegalArgumentException("Invalid WS URI: " + httpCtx.wsRequestURI); - } - } else { - requestPacket = builder.build(); - } - requestPacket.setSecure(secure); - if (!useProxy && !httpCtx.isWSRequest) { - addQueryString(request, requestPacket); - } - addHeaders(request, requestPacket, proxy); - addCookies(request, requestPacket); - - final AsyncHandler h = httpCtx.handler; - if (h != null) { - if (TransferCompletionHandler.class.isAssignableFrom( - h.getClass())) { - final FluentCaseInsensitiveStringsMap map = - new FluentCaseInsensitiveStringsMap( - request.getHeaders()); - TransferCompletionHandler.class.cast(h) - .transferAdapter(new GrizzlyTransferAdapter(map)); - } - } - final HttpRequestPacket requestPacketLocal = requestPacket; - final Callable action = new Callable() { - @Override - public Boolean call() throws Exception { - FilterChainContext sendingCtx = ctx; - - // Check to see if the ProtocolNegotiator has given - // us a different FilterChain to use. - SSLConnectionContext sslCtx = - SSLUtils.getSslConnectionContext(ctx.getConnection()); - if (sslCtx != null) { - FilterChain fc = sslCtx.getNewConnectionFilterChain(); - - if (fc != null) { - // Create a new FilterChain context using the new - // FilterChain. - // TODO: We need to mark this connection somehow - // as being only suitable for this type of - // request. - sendingCtx = obtainProtocolChainContext(ctx, fc); - } - } - return sendRequest(sendingCtx, request, requestPacketLocal); - } - }; - if (secure) { - ctx.notifyDownstream(new SSLSwitchingEvent(true, ctx.getConnection(), action)); - return false; - } - try { - return action.call(); - } catch (Exception e) { - httpCtx.abort(e); - return true; - } - - } - - private FilterChainContext obtainProtocolChainContext( - final FilterChainContext ctx, - final FilterChain completeProtocolFilterChain) { - - final FilterChainContext newFilterChainContext = - completeProtocolFilterChain.obtainFilterChainContext( - ctx.getConnection(), - ctx.getStartIdx() + 1, - completeProtocolFilterChain.size(), - ctx.getFilterIdx() + 1); - - newFilterChainContext.setAddressHolder(ctx.getAddressHolder()); - newFilterChainContext.setMessage(ctx.getMessage()); - newFilterChainContext.getInternalContext().setIoEvent( - ctx.getInternalContext().getIoEvent()); - ctx.getConnection().setProcessor(completeProtocolFilterChain); - return newFilterChainContext; - } - - private boolean isSecure(String scheme) { - return "https".equals(scheme) || "wss".equals(scheme); - } - - private void addHostHeader(final Request request, - final URI uri, - final HttpRequestPacket.Builder builder) { - String host = request.getVirtualHost(); - if (host != null) { - builder.header(Header.Host, host); - } else { - if (uri.getPort() == -1) { - builder.header(Header.Host, uri.getHost()); - } else { - builder.header(Header.Host, uri.getHost() + ':' + uri.getPort()); - } - } - } - - private boolean isUpgradeRequest(final AsyncHandler handler) { - return (handler instanceof UpgradeHandler); - } - - - private boolean isWSRequest(final String requestUri) { - return (requestUri.charAt(0) == 'w' && requestUri.charAt(1) == 's'); - } - - - private void convertToUpgradeRequest(final HttpTransactionContext ctx) { - final int colonIdx = ctx.requestUrl.indexOf(':'); - - if (colonIdx < 2 || colonIdx > 3) { - throw new IllegalArgumentException("Invalid websocket URL: " + ctx.requestUrl); - } - - final StringBuilder sb = new StringBuilder(ctx.requestUrl); - sb.replace(0, colonIdx, ((colonIdx == 2) ? "http" : "https")); - ctx.wsRequestURI = ctx.requestUrl; - ctx.requestUrl = sb.toString(); - } - - - /* private ProxyServer getProxyServer(Request request) { - - ProxyServer proxyServer = request.getProxyServer(); - if (proxyServer == null) { - proxyServer = config.getProxyServer(); - } - return proxyServer; - - }*/ - - - private void addHeaders(final Request request, - final HttpRequestPacket requestPacket, - final ProxyServer proxy) throws IOException { - - final FluentCaseInsensitiveStringsMap map = request.getHeaders(); - if (isNonEmpty(map)) { - for (final Map.Entry> entry : map.entrySet()) { - final String headerName = entry.getKey(); - final List headerValues = entry.getValue(); - if (isNonEmpty(headerValues)) { - for (final String headerValue : headerValues) { - requestPacket.addHeader(headerName, headerValue); - } - } - } - } - - final MimeHeaders headers = requestPacket.getHeaders(); - if (!headers.contains(Header.Connection)) { - //final boolean canCache = context.provider.clientConfig.getAllowPoolingConnection(); - requestPacket.addHeader(Header.Connection, /*(canCache ? */"keep-alive" /*: "close")*/); - } - - if (!headers.contains(Header.Accept)) { - requestPacket.addHeader(Header.Accept, "*/*"); - } - - if (!headers.contains(Header.UserAgent)) { - requestPacket.addHeader(Header.UserAgent, config.getUserAgent()); - } - - boolean avoidProxy = ProxyUtils.avoidProxy(proxy, request); - if (!avoidProxy) { - if (!requestPacket.getHeaders().contains(Header.ProxyConnection)) { - requestPacket.setHeader(Header.ProxyConnection, "keep-alive"); - } - - if(null == requestPacket.getHeader(Header.ProxyAuthorization) ) - { - requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils.computeBasicAuthentication(proxy)); - } - - } - - - } - - - private void addCookies(final Request request, - final HttpRequestPacket requestPacket) { - - final Collection cookies = request.getCookies(); - if (isNonEmpty(cookies)) { - StringBuilder sb = new StringBuilder(128); - org.glassfish.grizzly.http.Cookie[] gCookies = - new org.glassfish.grizzly.http.Cookie[cookies.size()]; - convertCookies(cookies, gCookies); - CookieSerializerUtils.serializeClientCookies(sb, gCookies); - requestPacket.addHeader(Header.Cookie, sb.toString()); - } - - } - - - private void convertCookies(final Collection cookies, - final org.glassfish.grizzly.http.Cookie[] gCookies) { - int idx = 0; - for (final Cookie cookie : cookies) { - final org.glassfish.grizzly.http.Cookie gCookie = - new org.glassfish.grizzly.http.Cookie(cookie.getName(), cookie.getValue()); - gCookie.setDomain(cookie.getDomain()); - gCookie.setPath(cookie.getPath()); - gCookie.setVersion(cookie.getVersion()); - gCookie.setMaxAge(cookie.getMaxAge()); - gCookie.setSecure(cookie.isSecure()); - gCookies[idx] = gCookie; - idx++; - } - - } - - - private void addQueryString(final Request request, - final HttpRequestPacket requestPacket) { - - final FluentStringsMap map = request.getQueryParams(); - if (isNonEmpty(map)) { - StringBuilder sb = new StringBuilder(128); - for (final Map.Entry> entry : map.entrySet()) { - final String name = entry.getKey(); - final List values = entry.getValue(); - if (isNonEmpty(values)) { - try { - for (int i = 0, len = values.size(); i < len; i++) { - final String value = values.get(i); - if (isNonEmpty(value)) { - sb.append(URLEncoder.encode(name, "UTF-8")).append('=') - .append(URLEncoder.encode(values.get(i), "UTF-8")).append('&'); - } else { - sb.append(URLEncoder.encode(name, "UTF-8")).append('&'); - } - } - } catch (UnsupportedEncodingException ignored) { - } - } - } - sb.setLength(sb.length() - 1); - String queryString = sb.toString(); - - requestPacket.setQueryString(queryString); - } - - } - - } // END AsyncHttpClientFiler - - - private interface Cleanup { + public static interface Cleanup { void cleanup(final FilterChainContext ctx); } - private static final class AsyncHttpClientEventFilter extends HttpClientFilter implements Cleanup { - - - private final EventHandler eventHandler; - - // -------------------------------------------------------- Constructors - - - AsyncHttpClientEventFilter(final EventHandler eventHandler) { - this(eventHandler, DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); - } - - - AsyncHttpClientEventFilter(final EventHandler eventHandler, - final int maxHeaderSize) { - - super(maxHeaderSize); - this.eventHandler = eventHandler; - } - - - @Override - public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - eventHandler.exceptionOccurred(ctx, error); - } - - @Override - protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { - eventHandler.onHttpContentParsed(content, ctx); - } - - @Override - protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { - eventHandler.onHttpHeadersEncoded(httpHeader, ctx); - } - - @Override - protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { - eventHandler.onHttpContentEncoded(content, ctx); - } - - @Override - protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { - eventHandler.onInitialLineParsed(httpHeader, ctx); - } - - @Override - protected void onHttpHeaderError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException { - eventHandler.onHttpHeaderError(httpHeader, ctx, t); - } - - @Override - protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { - eventHandler.onHttpHeadersParsed(httpHeader, ctx); - } - - @Override - protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { - return eventHandler.onHttpPacketParsed(httpHeader, ctx); - } - - @Override - public void cleanup(final FilterChainContext ctx) { - clearResponse(ctx.getConnection()); - } - } // END AsyncHttpClientEventFilter - - - private static final class AsyncSpdyClientEventFilter extends SpdyHandlerFilter implements Cleanup { - - - private final EventHandler eventHandler; - - // -------------------------------------------------------- Constructors - - - AsyncSpdyClientEventFilter(final EventHandler eventHandler, - SpdyMode mode, - ExecutorService threadPool) { - super(mode, threadPool); - this.eventHandler = eventHandler; - } - - @Override - public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - eventHandler.exceptionOccurred(ctx, error); - } - - @Override - protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { - eventHandler.onHttpContentParsed(content, ctx); - } - - @Override - protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { - eventHandler.onHttpHeadersEncoded(httpHeader, ctx); - } - - @Override - protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { - eventHandler.onHttpContentEncoded(content, ctx); - } - - @Override - protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { - eventHandler.onInitialLineParsed(httpHeader, ctx); - } - - @Override - protected void onHttpHeaderError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException { - eventHandler.onHttpHeaderError(httpHeader, ctx, t); - } - - @Override - protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { - eventHandler.onHttpHeadersParsed(httpHeader, ctx); - } - - @Override - protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { - return eventHandler.onHttpPacketParsed(httpHeader, ctx); - } - - @Override - public void cleanup(FilterChainContext ctx) { - - } - - } // END AsyncSpdyClientEventFilter - - - private static final class EventHandler { - - private static final Map HANDLER_MAP = - new HashMap(); - - static { - HANDLER_MAP.put(HttpStatus.UNAUTHORIZED_401.getStatusCode(), - AuthorizationHandler.INSTANCE); - HANDLER_MAP.put(HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.getStatusCode(), - ProxyAuthorizationHandler.INSTANCE); - HANDLER_MAP.put(HttpStatus.MOVED_PERMANENTLY_301.getStatusCode(), - RedirectHandler.INSTANCE); - HANDLER_MAP.put(HttpStatus.FOUND_302.getStatusCode(), - RedirectHandler.INSTANCE); - HANDLER_MAP.put(HttpStatus.TEMPORARY_REDIRECT_307.getStatusCode(), - RedirectHandler.INSTANCE); - } - - - private final GrizzlyAsyncHttpProvider provider; - Cleanup cleanup; - - - // -------------------------------------------------------- Constructors - - - EventHandler(final GrizzlyAsyncHttpProvider provider) { - this.provider = provider; - } - - - // ----------------------------------------------------- Event Callbacks - - - public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - - provider.getHttpTransactionContext(ctx.getConnection()).abort(error); - - } - - - protected void onHttpContentParsed(HttpContent content, - FilterChainContext ctx) { - - final HttpTransactionContext context = - provider.getHttpTransactionContext(ctx.getConnection()); - final AsyncHandler handler = context.handler; - if (handler != null && context.currentState != AsyncHandler.STATE.ABORT) { - try { - context.currentState = handler.onBodyPartReceived( - new GrizzlyResponseBodyPart(content, - null, - ctx.getConnection(), - provider)); - } catch (Exception e) { - handler.onThrowable(e); - } - } - - } - - @SuppressWarnings("UnusedParameters") - protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { - final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); - final AsyncHandler handler = context.handler; - if (handler != null) { - if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { - ((TransferCompletionHandler) handler).onHeaderWriteCompleted(); - } - } - } - - protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { - final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); - final AsyncHandler handler = context.handler; - if (handler != null) { - if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { - final int written = content.getContent().remaining(); - final long total = context.totalBodyWritten.addAndGet(written); - ((TransferCompletionHandler) handler).onContentWriteProgress( - written, - total, - content.getHttpHeader().getContentLength()); - } - } - } - - protected void onInitialLineParsed(HttpHeader httpHeader, - FilterChainContext ctx) { - - //super.onInitialLineParsed(httpHeader, ctx); - if (httpHeader.isSkipRemainder()) { - return; - } - final Connection connection = ctx.getConnection(); - final HttpTransactionContext context = - provider.getHttpTransactionContext(connection); - final int status = ((HttpResponsePacket) httpHeader).getStatus(); - if (context.establishingTunnel && HttpStatus.OK_200.statusMatches(status)) { - return; - } - if (HttpStatus.CONINTUE_100.statusMatches(status)) { - ctx.notifyUpstream(new ContinueEvent(context)); - return; - } - - - if (context.statusHandler != null && !context.statusHandler.handlesStatus(status)) { - context.statusHandler = null; - context.invocationStatus = StatusHandler.InvocationStatus.CONTINUE; - } else { - context.statusHandler = null; - } - if (context.invocationStatus == StatusHandler.InvocationStatus.CONTINUE) { - if (HANDLER_MAP.containsKey(status)) { - context.statusHandler = HANDLER_MAP.get(status); - } - if (context.statusHandler instanceof RedirectHandler) { - if (!isRedirectAllowed(context)) { - context.statusHandler = null; - } - } - } - if (isRedirectAllowed(context)) { - if (isRedirect(status)) { - if (context.statusHandler == null) { - context.statusHandler = RedirectHandler.INSTANCE; - } - context.redirectCount.incrementAndGet(); - if (redirectCountExceeded(context)) { - httpHeader.setSkipRemainder(true); - context.abort(new MaxRedirectException()); - } - } else { - if (context.redirectCount.get() > 0) { - context.redirectCount.set(0); - } - } - } - final GrizzlyResponseStatus responseStatus = - new GrizzlyResponseStatus((HttpResponsePacket) httpHeader, - context.request.getURI(), - provider); - context.responseStatus = responseStatus; - if (context.statusHandler != null) { - return; - } - if (context.currentState != AsyncHandler.STATE.ABORT) { - - try { - final AsyncHandler handler = context.handler; - if (handler != null) { - context.currentState = handler.onStatusReceived(responseStatus); - if (context.isWSRequest && context.currentState == AsyncHandler.STATE.ABORT) { - httpHeader.setSkipRemainder(true); - context.abort(new HandshakeException("Upgrade failed")); - } - } - } catch (Exception e) { - httpHeader.setSkipRemainder(true); - context.abort(e); - } - } - - } - - - protected void onHttpHeaderError(final HttpHeader httpHeader, - final FilterChainContext ctx, - final Throwable t) throws IOException { - - t.printStackTrace(); - httpHeader.setSkipRemainder(true); - final HttpTransactionContext context = - provider.getHttpTransactionContext(ctx.getConnection()); - context.abort(t); - } - - @SuppressWarnings({"unchecked"}) - protected void onHttpHeadersParsed(HttpHeader httpHeader, - FilterChainContext ctx) { - - //super.onHttpHeadersParsed(httpHeader, ctx); - LOGGER.debug("RESPONSE: {}", httpHeader); - if (httpHeader.containsHeader(Header.Connection)) { - if ("close".equals(httpHeader.getHeader(Header.Connection))) { - ConnectionManager.markConnectionAsDoNotCache(ctx.getConnection()); - } - } - final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); - - if (httpHeader.isSkipRemainder() || (context.establishingTunnel && context.statusHandler==null)) { - return; - } - - final AsyncHandler handler = context.handler; - final List filters = context.provider.clientConfig.getResponseFilters(); - final GrizzlyResponseHeaders responseHeaders = new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, - null, - provider); - if (!filters.isEmpty()) { - FilterContext fc = new FilterContext.FilterContextBuilder() - .asyncHandler(handler).request(context.request) - .responseHeaders(responseHeaders) - .responseStatus(context.responseStatus).build(); - try { - for (final ResponseFilter f : filters) { - fc = f.filter(fc); - } - } catch (Exception e) { - context.abort(e); - } - if (fc.replayRequest()) { - httpHeader.setSkipRemainder(true); - final Request newRequest = fc.getRequest(); - final AsyncHandler newHandler = fc.getAsyncHandler(); - try { - final ConnectionManager m = - context.provider.connectionManager; - final Connection c = - m.obtainConnection(newRequest, - context.future); - final HttpTransactionContext newContext = - context.copy(); - context.future = null; - provider.setHttpTransactionContext(c, newContext); - try { - context.provider.execute(c, - newRequest, - newHandler, - context.future); - } catch (IOException ioe) { - newContext.abort(ioe); - } - } catch (Exception e) { - context.abort(e); - } - return; - } - } - if (context.statusHandler != null && context.invocationStatus == StatusHandler.InvocationStatus.CONTINUE) { - final boolean result = context.statusHandler.handleStatus(((HttpResponsePacket) httpHeader), - context, - ctx); - if (!result) { - httpHeader.setSkipRemainder(true); - return; - } - } - if (context.isWSRequest) { - try { - //in case of DIGEST auth protocol handler is null and just returning here is working - if(context.protocolHandler == null) - { - return; - //context.protocolHandler = Version.DRAFT17.createHandler(true); - //context.currentState = AsyncHandler.STATE.UPGRADE; - } - - context.protocolHandler.setConnection(ctx.getConnection()); - - final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context); - context.webSocket = webSocketAdapter; - SimpleWebSocket ws = webSocketAdapter.gWebSocket; - if (context.currentState == AsyncHandler.STATE.UPGRADE) { - httpHeader.setChunked(false); - ws.onConnect(); - WebSocketHolder.set(ctx.getConnection(), - context.protocolHandler, - ws); - ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket); - final int wsTimeout = context.provider.clientConfig.getWebSocketIdleTimeoutInMs(); - IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), - ((wsTimeout <= 0) - ? IdleTimeoutFilter.FOREVER - : wsTimeout), - TimeUnit.MILLISECONDS); - context.result(handler.onCompleted()); - } else { - httpHeader.setSkipRemainder(true); - ((WebSocketUpgradeHandler) context.handler). - onClose(context.webSocket, - 1002, - "WebSocket protocol error: unexpected HTTP response status during handshake."); - context.result(null); - } - } catch (Exception e) { - httpHeader.setSkipRemainder(true); - context.abort(e); - } - } else { - if (context.currentState != AsyncHandler.STATE.ABORT) { - try { - context.currentState = handler.onHeadersReceived( - responseHeaders); - } catch (Exception e) { - httpHeader.setSkipRemainder(true); - context.abort(e); - } - } - } - - } - - @SuppressWarnings("unchecked") - protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { - - boolean result; - final String proxy_auth = httpHeader.getHeader(Header.ProxyAuthenticate); - - if (httpHeader.isSkipRemainder()) { - if (!ProxyAuthorizationHandler.isNTLMSecondHandShake(proxy_auth)) { - cleanup.cleanup(ctx); - cleanup(ctx, provider); - return false; - } else { - //super.onHttpPacketParsed(httpHeader, ctx); - cleanup.cleanup(ctx); - httpHeader.getProcessingState().setKeepAlive(true); - return false; - } - } - - //result = super.onHttpPacketParsed(httpHeader, ctx); - if (cleanup != null) { - cleanup.cleanup(ctx); - } - result = false; - - final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection()); - if (context.establishingTunnel - && HttpStatus.OK_200.statusMatches( - ((HttpResponsePacket) httpHeader).getStatus())) { - context.establishingTunnel = false; - final Connection c = ctx.getConnection(); - context.tunnelEstablished(c); - try { - context.provider.execute(c, - context.request, - context.handler, - context.future); - return result; - } catch (IOException e) { - context.abort(e); - return result; - } - } else { - cleanup(ctx, provider); - final AsyncHandler handler = context.handler; - if (handler != null) { - try { - context.result(handler.onCompleted()); - } catch (Exception e) { - context.abort(e); - } - } else { - context.done(null); - } - - return result; - } - } - - - // ----------------------------------------------------- Private Methods - - private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) { - SimpleWebSocket ws = new SimpleWebSocket(context.protocolHandler); - AsyncHttpProviderConfig config = context.provider.clientConfig.getAsyncHttpProviderConfig(); - boolean bufferFragments = true; - if (config instanceof GrizzlyAsyncHttpProviderConfig) { - bufferFragments = (Boolean) ((GrizzlyAsyncHttpProviderConfig) config).getProperty(Property.BUFFER_WEBSOCKET_FRAGMENTS); - } - - return new GrizzlyWebSocketAdapter(ws, bufferFragments); - } - - private static boolean isRedirectAllowed(final HttpTransactionContext ctx) { - boolean allowed = ctx.request.isRedirectEnabled(); - if (ctx.request.isRedirectOverrideSet()) { - return allowed; - } - if (!allowed) { - allowed = ctx.redirectsAllowed; - } - return allowed; - } - - private static HttpTransactionContext cleanup(final FilterChainContext ctx, - final GrizzlyAsyncHttpProvider provider) { - - final Connection c = ctx.getConnection(); - final HttpTransactionContext context = - provider.getHttpTransactionContext(c); - context.provider.setHttpTransactionContext(c, null); - if (!context.provider.connectionManager.canReturnConnection(c)) { - context.abort(new IOException("Maximum pooled connections exceeded")); - } else { - if (!context.provider.connectionManager.returnConnection(context.request, c)) { - ctx.getConnection().close(); - } - } - - return context; - - } - - - private static boolean redirectCountExceeded(final HttpTransactionContext context) { - - return (context.redirectCount.get() > context.maxRedirectCount); - - } - - - private static boolean isRedirect(final int status) { - - return HttpStatus.MOVED_PERMANENTLY_301.statusMatches(status) - || HttpStatus.FOUND_302.statusMatches(status) - || HttpStatus.SEE_OTHER_303.statusMatches(status) - || HttpStatus.TEMPORARY_REDIRECT_307.statusMatches(status); - - } - - - // ------------------------------------------------------- Inner Classes - - - private static final class AuthorizationHandler implements StatusHandler { - - private static final AuthorizationHandler INSTANCE = - new AuthorizationHandler(); - - // -------------------------------------- Methods from StatusHandler - - - public boolean handlesStatus(int statusCode) { - return (HttpStatus.UNAUTHORIZED_401.statusMatches(statusCode)); - } - - @SuppressWarnings({"unchecked"}) - public boolean handleStatus(final HttpResponsePacket responsePacket, - final HttpTransactionContext httpTransactionContext, - final FilterChainContext ctx) { - - final String auth = responsePacket.getHeader(Header.WWWAuthenticate); - if (auth == null) { - throw new IllegalStateException("401 response received, but no WWW-Authenticate header was present"); - } - - Realm realm = httpTransactionContext.request.getRealm(); - if (realm == null) { - realm = httpTransactionContext.provider.clientConfig.getRealm(); - } - if (realm == null) { - httpTransactionContext.invocationStatus = InvocationStatus.STOP; - return true; - } - - responsePacket.setSkipRemainder(true); // ignore the remainder of the response - - final Request req = httpTransactionContext.request; - realm = new Realm.RealmBuilder().clone(realm) - .setScheme(realm.getAuthScheme()) - .setUri(httpTransactionContext.request.getURI().getPath()) - .setMethodName(req.getMethod()) - .setUsePreemptiveAuth(true) - .parseWWWAuthenticateHeader(auth) - .build(); - if (auth.toLowerCase().startsWith("basic")) { - req.getHeaders().remove(Header.Authorization.toString()); - try { - req.getHeaders().add(Header.Authorization.toString(), - AuthenticatorUtils.computeBasicAuthentication(realm)); - } catch (UnsupportedEncodingException ignored) { - } - } else if (auth.toLowerCase().startsWith("digest")) { - req.getHeaders().remove(Header.Authorization.toString()); - try { - req.getHeaders().add(Header.Authorization.toString(), - AuthenticatorUtils.computeDigestAuthentication(realm)); - } catch (NoSuchAlgorithmException e) { - throw new IllegalStateException("Digest authentication not supported", e); - } catch (UnsupportedEncodingException e) { - throw new IllegalStateException("Unsupported encoding.", e); - } - } else { - throw new IllegalStateException("Unsupported authorization method: " + auth); - } - - final ConnectionManager m = httpTransactionContext.provider.connectionManager; - try { - final Connection c = m.obtainConnection(req, - httpTransactionContext.future); - final HttpTransactionContext newContext = - httpTransactionContext.copy(); - httpTransactionContext.future = null; - httpTransactionContext.provider.setHttpTransactionContext(c, newContext); - newContext.invocationStatus = InvocationStatus.STOP; - try { - httpTransactionContext.provider.execute(c, - req, - httpTransactionContext.handler, - httpTransactionContext.future); - return false; - } catch (IOException ioe) { - newContext.abort(ioe); - return false; - } - } catch (Exception e) { - httpTransactionContext.abort(e); - } - httpTransactionContext.invocationStatus = InvocationStatus.STOP; - return false; - } - - } // END AuthorizationHandler - - private static final class ProxyAuthorizationHandler implements StatusHandler { - - private static final ProxyAuthorizationHandler INSTANCE = - new ProxyAuthorizationHandler(); - - // -------------------------------------- Methods from StatusHandler - - - public boolean handlesStatus(int statusCode) { - return (HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.statusMatches(statusCode)); - } - - @SuppressWarnings({"unchecked"}) - public boolean handleStatus(final HttpResponsePacket responsePacket, - final HttpTransactionContext httpTransactionContext, - final FilterChainContext ctx) { - - final String proxy_auth = responsePacket.getHeader(Header.ProxyAuthenticate); - if (proxy_auth == null) { - throw new IllegalStateException("407 response received, but no Proxy Authenticate header was present"); - } - - final Request req = httpTransactionContext.request; - ProxyServer proxyServer = httpTransactionContext.provider.clientConfig.getProxyServer(); - String principal = proxyServer.getPrincipal(); - String password = proxyServer.getPassword(); - Realm realm = new Realm.RealmBuilder().setPrincipal(principal) - .setPassword(password) - .setUri("/") - .setMethodName("CONNECT") - .setUsePreemptiveAuth(true) - .parseProxyAuthenticateHeader(proxy_auth) - .build(); - if (proxy_auth.toLowerCase().startsWith("basic")) { - req.getHeaders().remove(Header.ProxyAuthenticate.toString()); - req.getHeaders().remove(Header.ProxyAuthorization.toString()); - try { - req.getHeaders().add(Header.ProxyAuthorization.toString(), - AuthenticatorUtils.computeBasicAuthentication(realm)); - } catch (UnsupportedEncodingException ignored) { - } - } else if (proxy_auth.toLowerCase().startsWith("digest")) { - req.getHeaders().remove(Header.ProxyAuthenticate.toString()); - req.getHeaders().remove(Header.ProxyAuthorization.toString()); - try { - req.getHeaders().add(Header.ProxyAuthorization.toString(), - AuthenticatorUtils.computeDigestAuthentication(realm)); - } catch (NoSuchAlgorithmException e) { - throw new IllegalStateException("Digest authentication not supported", e); - } catch (UnsupportedEncodingException e) { - throw new IllegalStateException("Unsupported encoding.", e); - } - }else if (proxy_auth.toLowerCase().startsWith("ntlm")) { - - req.getHeaders().remove(Header.ProxyAuthenticate.toString()); - req.getHeaders().remove(Header.ProxyAuthorization.toString()); - - String msg; - try { - - if(isNTLMFirstHandShake(proxy_auth)) - { - msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), ""); - }else { - String serverChallenge = proxy_auth.trim().substring("NTLM ".length()); - msg = ntlmEngine.generateType3Msg(principal, password, proxyServer.getNtlmDomain(), proxyServer.getHost(), serverChallenge); - } - - req.getHeaders().add(Header.ProxyAuthorization.toString(), "NTLM " + msg); - } catch (Exception e1) { - e1.printStackTrace(); - } - } else if (proxy_auth.toLowerCase().startsWith("negotiate")){ - //this is for kerberos - req.getHeaders().remove(Header.ProxyAuthenticate.toString()); - req.getHeaders().remove(Header.ProxyAuthorization.toString()); - - }else { - throw new IllegalStateException("Unsupported authorization method: " + proxy_auth); - } - - final ConnectionManager m = httpTransactionContext.provider.connectionManager; - InvocationStatus tempInvocationStatus = InvocationStatus.STOP; - - try { - - if(isNTLMFirstHandShake(proxy_auth)) - { - tempInvocationStatus = InvocationStatus.CONTINUE; - - } - - if(proxy_auth.toLowerCase().startsWith("negotiate")) - { - final Connection c = m.obtainConnection(req, httpTransactionContext.future); - final HttpTransactionContext newContext = httpTransactionContext.copy(); - httpTransactionContext.future = null; - httpTransactionContext.provider.setHttpTransactionContext(c, newContext); - - newContext.invocationStatus = tempInvocationStatus; - - String challengeHeader; - String server = proxyServer.getHost(); - - challengeHeader = GSSSPNEGOWrapper.generateToken(server); - - req.getHeaders().add(Header.ProxyAuthorization.toString(), "Negotiate " + challengeHeader); - - - return exceuteRequest(httpTransactionContext, req, c, - newContext); - }else if(isNTLMSecondHandShake(proxy_auth)) - { - final Connection c = ctx.getConnection(); - final HttpTransactionContext newContext = httpTransactionContext.copy(); - - httpTransactionContext.future = null; - httpTransactionContext.provider.setHttpTransactionContext(c, newContext); - - newContext.invocationStatus = tempInvocationStatus; - httpTransactionContext.establishingTunnel = true; - - return exceuteRequest(httpTransactionContext, req, c, - newContext); - - } - else{ - final Connection c = m.obtainConnection(req, httpTransactionContext.future); - final HttpTransactionContext newContext = httpTransactionContext.copy(); - httpTransactionContext.future = null; - httpTransactionContext.provider.setHttpTransactionContext(c, newContext); - - newContext.invocationStatus = tempInvocationStatus; - - //NTLM needs the same connection to be used for exchange of tokens - return exceuteRequest(httpTransactionContext, req, c, - newContext); - } - } catch (Exception e) { - httpTransactionContext.abort(e); - } - httpTransactionContext.invocationStatus = tempInvocationStatus; - return false; - } - - private boolean exceuteRequest( - final HttpTransactionContext httpTransactionContext, - final Request req, final Connection c, - final HttpTransactionContext newContext) { - try { - httpTransactionContext.provider.execute(c, - req, - httpTransactionContext.handler, - httpTransactionContext.future); - return false; - } catch (IOException ioe) { - newContext.abort(ioe); - return false; - } - } - - public static boolean isNTLMSecondHandShake(final String proxy_auth) { - return (proxy_auth != null && proxy_auth.toLowerCase().startsWith("ntlm") && !proxy_auth.equalsIgnoreCase("ntlm")); - } - public static boolean isNTLMFirstHandShake(final String proxy_auth) { - return (proxy_auth.equalsIgnoreCase("ntlm")); - } - - - } // END AuthorizationHandler - - - private static final class RedirectHandler implements StatusHandler { - - private static final RedirectHandler INSTANCE = new RedirectHandler(); - - - // ------------------------------------------ Methods from StatusHandler - - - public boolean handlesStatus(int statusCode) { - return (isRedirect(statusCode)); - } - - @SuppressWarnings({"unchecked"}) - public boolean handleStatus(final HttpResponsePacket responsePacket, - final HttpTransactionContext httpTransactionContext, - final FilterChainContext ctx) { - - final String redirectURL = responsePacket.getHeader(Header.Location); - if (redirectURL == null) { - throw new IllegalStateException("redirect received, but no location header was present"); - } - - URI orig; - if (httpTransactionContext.lastRedirectURI == null) { - orig = httpTransactionContext.request.getURI(); - } else { - orig = AsyncHttpProviderUtils.getRedirectUri(httpTransactionContext.request.getURI(), - httpTransactionContext.lastRedirectURI); - } - httpTransactionContext.lastRedirectURI = redirectURL; - Request requestToSend; - URI uri = AsyncHttpProviderUtils.getRedirectUri(orig, redirectURL); - if (!uri.toString().equalsIgnoreCase(orig.toString())) { - requestToSend = newRequest(uri, - responsePacket, - httpTransactionContext, - sendAsGet(responsePacket, httpTransactionContext)); - } else { - httpTransactionContext.statusHandler = null; - httpTransactionContext.invocationStatus = InvocationStatus.CONTINUE; - try { - httpTransactionContext.handler.onStatusReceived(httpTransactionContext.responseStatus); - } catch (Exception e) { - httpTransactionContext.abort(e); - } - return true; - } - - final ConnectionManager m = httpTransactionContext.provider.connectionManager; - try { - final Connection c = m.obtainConnection(requestToSend, - httpTransactionContext.future); - final HttpTransactionContext newContext = - httpTransactionContext.copy(); - httpTransactionContext.future = null; - newContext.invocationStatus = InvocationStatus.CONTINUE; - newContext.request = requestToSend; - newContext.requestUrl = requestToSend.getUrl(); - httpTransactionContext.provider.setHttpTransactionContext(c, newContext); - httpTransactionContext.provider.execute(c, - requestToSend, - newContext.handler, - newContext.future); - return false; - } catch (Exception e) { - httpTransactionContext.abort(e); - } - - httpTransactionContext.invocationStatus = InvocationStatus.CONTINUE; - return true; - - } - - - // ------------------------------------------------- Private Methods - - private boolean sendAsGet(final HttpResponsePacket response, - final HttpTransactionContext ctx) { - final int statusCode = response.getStatus(); - return !(statusCode < 302 || statusCode > 303) - && !(statusCode == 302 - && ctx.provider.clientConfig.isStrict302Handling()); - } - - } // END RedirectHandler - - - // ----------------------------------------------------- Private Methods - - - private static Request newRequest(final URI uri, - final HttpResponsePacket response, - final HttpTransactionContext ctx, - boolean asGet) { - - final RequestBuilder builder = new RequestBuilder(ctx.request); - if (asGet) { - builder.setMethod("GET"); - } - builder.setUrl(uri.toString()); - - if (ctx.provider.clientConfig.isRemoveQueryParamOnRedirect()) { - builder.setQueryParameters(null); - } - for (String cookieStr : response.getHeaders().values(Header.Cookie)) { - for (Cookie c : CookieDecoder.decode(cookieStr)) { - builder.addOrReplaceCookie(c); - } - } - return builder.build(); - - } - - - } // END AsyncHttpClientEventFilter - - - private static final class ClientEncodingFilter implements EncodingFilter { - - - // ----------------------------------------- Methods from EncodingFilter - - - public boolean applyEncoding(HttpHeader httpPacket) { - - httpPacket.addHeader(Header.AcceptEncoding, "gzip"); - return true; - - } - - - public boolean applyDecoding(HttpHeader httpPacket) { - - final HttpResponsePacket httpResponse = (HttpResponsePacket) httpPacket; - final DataChunk bc = httpResponse.getHeaders().getValue(Header.ContentEncoding); - return bc != null && bc.indexOf("gzip", 0) != -1; - - } - - - } // END ClientContentEncoding - - - private static interface BodyHandler { - - static int MAX_CHUNK_SIZE = 8192; - - boolean handlesBodyType(final Request request); - - boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) throws IOException; - - } // END BodyHandler - - - private final class BodyHandlerFactory { - - private final BodyHandler[] HANDLERS = new BodyHandler[] { - new StringBodyHandler(), - new ByteArrayBodyHandler(), - new ParamsBodyHandler(), - new EntityWriterBodyHandler(), - new StreamDataBodyHandler(), - new PartsBodyHandler(), - new FileBodyHandler(), - new BodyGeneratorBodyHandler() - }; - - public BodyHandler getBodyHandler(final Request request) { - for (final BodyHandler h : HANDLERS) { - if (h.handlesBodyType(request)) { - return h; - } - } - return new NoBodyHandler(); - } - - } // END BodyHandlerFactory - - - private static final class ExpectHandler implements BodyHandler { - - private final BodyHandler delegate; - private Request request; - private HttpRequestPacket requestPacket; - - // -------------------------------------------------------- Constructors - - - private ExpectHandler(final BodyHandler delegate) { - - this.delegate = delegate; - - } - - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(Request request) { - return delegate.handlesBodyType(request); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(FilterChainContext ctx, Request request, HttpRequestPacket requestPacket) throws IOException { - this.request = request; - this.requestPacket = requestPacket; - ctx.write(requestPacket, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - return true; - } - - public void finish(final FilterChainContext ctx) throws IOException { - delegate.doHandle(ctx, request, requestPacket); - } - - } // END ContinueHandler - - - private final class ByteArrayBodyHandler implements BodyHandler { - - - // -------------------------------------------- Methods from BodyHandler - - public boolean handlesBodyType(final Request request) { - return (request.getByteData() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - String charset = request.getBodyEncoding(); - if (charset == null) { - charset = Charsets.ASCII_CHARSET.name(); - } - final byte[] data = new String(request.getByteData(), charset).getBytes(charset); - final MemoryManager mm = ctx.getMemoryManager(); - final Buffer gBuffer = Buffers.wrap(mm, data); - if (requestPacket.getContentLength() == -1) { - if (!clientConfig.isCompressionEnabled()) { - requestPacket.setContentLengthLong(data.length); - } - } - final HttpContent content = requestPacket.httpContentBuilder().content(gBuffer).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - return true; - } - } - - - private final class StringBodyHandler implements BodyHandler { - - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return (request.getStringData() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - String charset = request.getBodyEncoding(); - if (charset == null) { - charset = Charsets.ASCII_CHARSET.name(); - } - final byte[] data = request.getStringData().getBytes(charset); - final MemoryManager mm = ctx.getMemoryManager(); - final Buffer gBuffer = Buffers.wrap(mm, data); - if (requestPacket.getContentLength() == -1) { - if (!clientConfig.isCompressionEnabled()) { - requestPacket.setContentLengthLong(data.length); - } - } - final HttpContent content = requestPacket.httpContentBuilder().content(gBuffer).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - return true; - } - - } // END StringBodyHandler - - - private static final class NoBodyHandler implements BodyHandler { - - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return false; - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - final HttpContent content = requestPacket.httpContentBuilder().content(Buffers.EMPTY_BUFFER).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - return true; - } - - } // END NoBodyHandler - - - private final class ParamsBodyHandler implements BodyHandler { - - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - final FluentStringsMap params = request.getParams(); - return isNonEmpty(params); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - if (requestPacket.getContentType() == null) { - requestPacket.setContentType("application/x-www-form-urlencoded"); - } - StringBuilder sb = null; - String charset = request.getBodyEncoding(); - if (charset == null) { - charset = Charsets.ASCII_CHARSET.name(); - } - final FluentStringsMap params = request.getParams(); - if (!params.isEmpty()) { - for (Map.Entry> entry : params.entrySet()) { - String name = entry.getKey(); - List values = entry.getValue(); - if (isNonEmpty(values)) { - if (sb == null) { - sb = new StringBuilder(128); - } - for (String value : values) { - if (sb.length() > 0) { - sb.append('&'); - } - sb.append(URLEncoder.encode(name, charset)) - .append('=').append(URLEncoder.encode(value, charset)); - } - } - } - } - if (sb != null) { - final byte[] data = sb.toString().getBytes(charset); - final MemoryManager mm = ctx.getMemoryManager(); - final Buffer gBuffer = Buffers.wrap(mm, data); - final HttpContent content = requestPacket.httpContentBuilder().content(gBuffer).build(); - if (requestPacket.getContentLength() == -1) { - if (!clientConfig.isCompressionEnabled()) { - requestPacket.setContentLengthLong(data.length); - } - } - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - return true; - } - - } // END ParamsBodyHandler - - - private static final class EntityWriterBodyHandler implements BodyHandler { - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return (request.getEntityWriter() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - final MemoryManager mm = ctx.getMemoryManager(); - Buffer b = mm.allocate(512); - BufferOutputStream o = new BufferOutputStream(mm, b, true); - final Request.EntityWriter writer = request.getEntityWriter(); - writer.writeEntity(o); - b = o.getBuffer(); - b.trim(); - if (b.hasRemaining()) { - final HttpContent content = requestPacket.httpContentBuilder().content(b).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - - return true; - } - - } // END EntityWriterBodyHandler - - - private static final class StreamDataBodyHandler implements BodyHandler { - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return (request.getStreamData() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - final MemoryManager mm = ctx.getMemoryManager(); - Buffer buffer = mm.allocate(512); - final byte[] b = new byte[512]; - int read; - final InputStream in = request.getStreamData(); - try { - in.reset(); - } catch (IOException ioe) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug(ioe.toString(), ioe); - } - } - if (in.markSupported()) { - in.mark(0); - } - - while ((read = in.read(b)) != -1) { - if (read > buffer.remaining()) { - buffer = mm.reallocate(buffer, buffer.capacity() + 512); - } - buffer.put(b, 0, read); - } - buffer.trim(); - if (buffer.hasRemaining()) { - final HttpContent content = requestPacket.httpContentBuilder().content(buffer).build(); - buffer.allowBufferDispose(false); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - - return true; - } - - } // END StreamDataBodyHandler - - - private static final class PartsBodyHandler implements BodyHandler { - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return isNonEmpty(request.getParts()); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - MultipartRequestEntity mre = - AsyncHttpProviderUtils.createMultipartRequestEntity( - request.getParts(), - request.getHeaders()); - requestPacket.setContentLengthLong(mre.getContentLength()); - requestPacket.setContentType(mre.getContentType()); - final MemoryManager mm = ctx.getMemoryManager(); - Buffer b = mm.allocate(512); - BufferOutputStream o = new BufferOutputStream(mm, b, true); - mre.writeRequest(o); - b = o.getBuffer(); - b.trim(); - if (b.hasRemaining()) { - final HttpContent content = requestPacket.httpContentBuilder().content(b).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - - return true; - } - - } // END PartsBodyHandler - - - private final class FileBodyHandler implements BodyHandler { - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return (request.getFile() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - final File f = request.getFile(); - requestPacket.setContentLengthLong(f.length()); - final HttpTransactionContext context = getHttpTransactionContext(ctx.getConnection()); - if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { - final FileInputStream fis = new FileInputStream(request.getFile()); - final MemoryManager mm = ctx.getMemoryManager(); - AtomicInteger written = new AtomicInteger(); - boolean last = false; - try { - for (byte[] buf = new byte[MAX_CHUNK_SIZE]; !last; ) { - Buffer b = null; - int read; - if ((read = fis.read(buf)) < 0) { - last = true; - b = Buffers.EMPTY_BUFFER; - } - if (b != Buffers.EMPTY_BUFFER) { - written.addAndGet(read); - b = Buffers.wrap(mm, buf, 0, read); - } - - final HttpContent content = - requestPacket.httpContentBuilder().content(b). - last(last).build(); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - } finally { - try { - fis.close(); - } catch (IOException ignored) { - } - } - } else { - // write the headers - ctx.write(requestPacket, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - ctx.write(new FileTransfer(f), new EmptyCompletionHandler() { - - @Override - public void updated(WriteResult result) { - final AsyncHandler handler = context.handler; - if (handler != null) { - if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { - // WriteResult keeps a track of the total amount written, - // so we need to calculate the delta ourselves. - final long resultTotal = result.getWrittenSize(); - final long written = resultTotal - context.totalBodyWritten.get(); - final long total = context.totalBodyWritten.addAndGet(written); - ((TransferCompletionHandler) handler).onContentWriteProgress( - written, - total, - requestPacket.getContentLength()); - } - } - } - }); - } - - return true; - } - - } // END FileBodyHandler - - - private static final class BodyGeneratorBodyHandler implements BodyHandler { - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return (request.getBodyGenerator() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - final BodyGenerator generator = request.getBodyGenerator(); - final Body bodyLocal = generator.createBody(); - final long len = bodyLocal.getContentLength(); - if (len > 0) { - requestPacket.setContentLengthLong(len); - } else { - requestPacket.setChunked(true); - } - - final MemoryManager mm = ctx.getMemoryManager(); - boolean last = false; - - while (!last) { - Buffer buffer = mm.allocate(MAX_CHUNK_SIZE); - buffer.allowBufferDispose(true); - - final long readBytes = bodyLocal.read(buffer.toByteBuffer()); - if (readBytes > 0) { - buffer.position((int) readBytes); - buffer.trim(); - } else { - buffer.dispose(); - - if (readBytes < 0) { - last = true; - buffer = Buffers.EMPTY_BUFFER; - } else { - // pass the context to bodyLocal to be able to - // continue body transferring once more data is available - if (generator instanceof FeedableBodyGenerator) { - ((FeedableBodyGenerator) generator).initializeAsynchronousTransfer(ctx, requestPacket); - return false; - } else { - throw new IllegalStateException("BodyGenerator unexpectedly returned 0 bytes available"); - } - } - } - - final HttpContent content = - requestPacket.httpContentBuilder().content(buffer). - last(last).build(); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - - return true; - } - - } // END BodyGeneratorBodyHandler - - - static final class SwitchingSSLFilter extends SSLFilter { - - private final boolean secureByDefault; - final Attribute CONNECTION_IS_SECURE = - Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(SwitchingSSLFilter.class.getName()); - - // -------------------------------------------------------- Constructors - - - SwitchingSSLFilter(final SSLEngineConfigurator clientConfig, - final boolean secureByDefault) { - - super(null, clientConfig); - this.secureByDefault = secureByDefault; - - } - - - // ---------------------------------------------- Methods from SSLFilter - - - @Override - protected void notifyHandshakeFailed(Connection connection, Throwable t) { - throw new RuntimeException(t); - } - - @Override - public NextAction handleEvent(final FilterChainContext ctx, FilterChainEvent event) throws IOException { - - if (event.type() == SSLSwitchingEvent.class) { - final SSLSwitchingEvent se = (SSLSwitchingEvent) event; - - if (se.secure) { - if (se.action != null) { - ProtocolHandshakeListener.addListener( - ctx.getConnection(), - new HandshakeCompleteListener() { - @Override - public void complete() { - try { - se.action.call(); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - ); - } - handshake(ctx.getConnection(), null); - } - setSecureStatus(se.connection, se.secure); - return ctx.getStopAction(); - } - return ctx.getInvokeAction(); - - } - - @Override - public NextAction handleRead(FilterChainContext ctx) throws IOException { - - if (isSecure(ctx.getConnection())) { - return super.handleRead(ctx); - } - return ctx.getInvokeAction(); - - } - - @Override - public NextAction handleWrite(FilterChainContext ctx) throws IOException { - - if (isSecure(ctx.getConnection())) { - return super.handleWrite(ctx); - } - return ctx.getInvokeAction(); - - } - - @Override - public void onFilterChainChanged(FilterChain filterChain) { - // no-op - } - - // ----------------------------------------------------- Private Methods - - - private boolean isSecure(final Connection c) { - - Boolean secStatus = CONNECTION_IS_SECURE.get(c); - if (secStatus == null) { - secStatus = secureByDefault; - } - return secStatus; - - } - - private void setSecureStatus(final Connection c, final boolean secure) { - CONNECTION_IS_SECURE.set(c, secure); - } - - - // ------------------------------------------------------ Nested Classes - - static final class SSLSwitchingEvent implements FilterChainEvent { - - final boolean secure; - final Connection connection; - final Callable action; - - // ---------------------------------------------------- Constructors - - - SSLSwitchingEvent(final boolean secure, - final Connection c, - final Callable action) { - - this.secure = secure; - connection = c; - this.action = action; - - } - - // ----------------------------------- Methods from FilterChainEvent - - - @Override - public Object type() { - return SSLSwitchingEvent.class; - } - - } // END SSLSwitchingEvent - - } // END SwitchingSSLFilter - - private static final class GrizzlyTransferAdapter extends TransferCompletionHandler.TransferAdapter { - - - // -------------------------------------------------------- Constructors - - - public GrizzlyTransferAdapter(FluentCaseInsensitiveStringsMap headers) throws IOException { - super(headers); - } - - - // ---------------------------------------- Methods from TransferAdapter - - - @Override - public void getBytes(byte[] bytes) { - // TODO implement - } - - } // END GrizzlyTransferAdapter - - - private static final class GrizzlyWebSocketAdapter implements WebSocket { - - private final SimpleWebSocket gWebSocket; - private final boolean bufferFragments; - - // -------------------------------------------------------- Constructors - - - GrizzlyWebSocketAdapter(final SimpleWebSocket gWebSocket, - final boolean bufferFragements) { - this.gWebSocket = gWebSocket; - this.bufferFragments = bufferFragements; - } - - - // ------------------------------------------ Methods from AHC WebSocket - - - @Override - public WebSocket sendMessage(byte[] message) { - gWebSocket.send(message); - return this; - } - - @Override - public WebSocket stream(byte[] fragment, boolean last) { - if (isNonEmpty(fragment)) { - gWebSocket.stream(last, fragment, 0, fragment.length); - } - return this; - } - - @Override - public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { - if (isNonEmpty(fragment)) { - gWebSocket.stream(last, fragment, offset, len); - } - return this; - } - - @Override - public WebSocket sendTextMessage(String message) { - gWebSocket.send(message); - return this; - } - - @Override - public WebSocket streamText(String fragment, boolean last) { - gWebSocket.stream(last, fragment); - return this; - } - - @Override - public WebSocket sendPing(byte[] payload) { - gWebSocket.sendPing(payload); - return this; - } - - @Override - public WebSocket sendPong(byte[] payload) { - gWebSocket.sendPong(payload); - return this; - } - - @Override - public WebSocket addWebSocketListener(WebSocketListener l) { - gWebSocket.add(new AHCWebSocketListenerAdapter(l, this)); - return this; - } - - @Override - public WebSocket removeWebSocketListener(WebSocketListener l) { - gWebSocket.remove(new AHCWebSocketListenerAdapter(l, this)); - return this; - } - - @Override - public boolean isOpen() { - return gWebSocket.isConnected(); - } - - @Override - public void close() { - gWebSocket.close(); - } - - } // END GrizzlyWebSocketAdapter - - - private static final class AHCWebSocketListenerAdapter implements org.glassfish.grizzly.websockets.WebSocketListener { - - private final WebSocketListener ahcListener; - private final GrizzlyWebSocketAdapter webSocket; - private final StringBuilder stringBuffer; - private final ByteArrayOutputStream byteArrayOutputStream; - - // -------------------------------------------------------- Constructors - - - AHCWebSocketListenerAdapter(final WebSocketListener ahcListener, - final GrizzlyWebSocketAdapter webSocket) { - this.ahcListener = ahcListener; - this.webSocket = webSocket; - if (webSocket.bufferFragments) { - stringBuffer = new StringBuilder(); - byteArrayOutputStream = new ByteArrayOutputStream(); - } else { - stringBuffer = null; - byteArrayOutputStream = null; - } - } - - - // ------------------------------ Methods from Grizzly WebSocketListener - - - @Override - public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataFrame dataFrame) { - try { - if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(ahcListener.getClass())) { - ClosingFrame cf = ClosingFrame.class.cast(dataFrame); - WebSocketCloseCodeReasonListener.class.cast(ahcListener).onClose(webSocket, cf.getCode(), cf.getReason()); - } else { - ahcListener.onClose(webSocket); - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onConnect(org.glassfish.grizzly.websockets.WebSocket gWebSocket) { - try { - ahcListener.onOpen(webSocket); - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, String s) { - try { - if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketTextListener.class.cast(ahcListener).onMessage(s); - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - try { - if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketByteListener.class.cast(ahcListener).onMessage(bytes); - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onPing(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - try { - if (WebSocketPingListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketPingListener.class.cast(ahcListener).onPing(bytes); - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onPong(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { - try { - if (WebSocketPongListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketPongListener.class.cast(ahcListener).onPong(bytes); - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean last) { - try { - if (this.webSocket.bufferFragments) { - synchronized (this.webSocket) { - stringBuffer.append(s); - if (last) { - if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { - final String message = stringBuffer.toString(); - stringBuffer.setLength(0); - WebSocketTextListener.class.cast(ahcListener).onMessage(message); - } - } - } - } else { - if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketTextListener.class.cast(ahcListener).onFragment(s, last); - } - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean last) { - try { - if (this.webSocket.bufferFragments) { - synchronized (this.webSocket) { - byteArrayOutputStream.write(bytes); - if (last) { - if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { - final byte[] bytesLocal = byteArrayOutputStream.toByteArray(); - byteArrayOutputStream.reset(); - WebSocketByteListener.class.cast(ahcListener).onMessage(bytesLocal); - } - } - } - } else { - if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { - WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, last); - } - } - } catch (Throwable e) { - ahcListener.onError(e); - } - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - AHCWebSocketListenerAdapter that = (AHCWebSocketListenerAdapter) o; - - if (ahcListener != null ? !ahcListener.equals(that.ahcListener) : that.ahcListener != null) - return false; - //noinspection RedundantIfStatement - if (webSocket != null ? !webSocket.equals(that.webSocket) : that.webSocket != null) - return false; - - return true; - } - - @Override - public int hashCode() { - int result = ahcListener != null ? ahcListener.hashCode() : 0; - result = 31 * result + (webSocket != null ? webSocket.hashCode() : 0); - return result; - } - } // END AHCWebSocketListenerAdapter - - - public static void main(String[] args) { AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setSpdyEnabled( diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java new file mode 100644 index 0000000000..0f02aa80ab --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java @@ -0,0 +1,310 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; +import org.asynchttpclient.providers.grizzly.statushandler.StatusHandler; +import org.asynchttpclient.websocket.WebSocket; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.Grizzly; +import org.glassfish.grizzly.attributes.Attribute; +import org.glassfish.grizzly.attributes.AttributeStorage; +import org.glassfish.grizzly.websockets.HandShake; +import org.glassfish.grizzly.websockets.ProtocolHandler; + +import java.util.concurrent.Callable; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; + +import static org.asynchttpclient.providers.grizzly.statushandler.StatusHandler.InvocationStatus; + +public final class HttpTransactionContext { + + private static final Attribute REQUEST_STATE_ATTR = + Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTransactionContext.class.getName()); + + private final AtomicInteger redirectCount = new AtomicInteger(0); + + private final int maxRedirectCount; + private final boolean redirectsAllowed; + private final GrizzlyAsyncHttpProvider provider; + + private Request request; + private String requestUrl; + private AsyncHandler handler; + private BodyHandler bodyHandler; + private StatusHandler statusHandler; + private InvocationStatus invocationStatus = InvocationStatus.CONTINUE; + private GrizzlyResponseStatus responseStatus; + private GrizzlyResponseFuture future; + private String lastRedirectURI; + private AtomicLong totalBodyWritten = new AtomicLong(); + private AsyncHandler.STATE currentState; + + private String wsRequestURI; + private boolean isWSRequest; + private HandShake handshake; + private ProtocolHandler protocolHandler; + private WebSocket webSocket; + private boolean establishingTunnel; + + + // -------------------------------------------------------- Constructors + + + private HttpTransactionContext(GrizzlyAsyncHttpProvider provider, + final GrizzlyResponseFuture future, + final Request request, + final AsyncHandler handler) { + this.provider = provider; + + this.future = future; + this.request = request; + this.handler = handler; + redirectsAllowed = this.provider.getClientConfig().isRedirectEnabled(); + maxRedirectCount = this.provider.getClientConfig().getMaxRedirects(); + this.requestUrl = request.getUrl(); + + } + + + // ---------------------------------------------------------- Public Methods + + + public static void set(final AttributeStorage storage, + final HttpTransactionContext httpTransactionState) { + + if (httpTransactionState == null) { + REQUEST_STATE_ATTR.remove(storage); + } else { + REQUEST_STATE_ATTR.set(storage, httpTransactionState); + } + + } + + public static HttpTransactionContext get(final AttributeStorage storage) { + + return REQUEST_STATE_ATTR.get(storage); + + } + + + public static HttpTransactionContext create(final GrizzlyAsyncHttpProvider provider, + final GrizzlyResponseFuture future, + final Request request, + final AsyncHandler handler, + final AttributeStorage storage) { + final HttpTransactionContext context = + new HttpTransactionContext(provider, future, request, handler); + set(storage, context); + return context; + } + + + public void abort(final Throwable t) { + if (future != null) { + future.abort(t); + } + } + + public AtomicInteger getRedirectCount() { + return redirectCount; + } + + public int getMaxRedirectCount() { + return maxRedirectCount; + } + + public boolean isRedirectsAllowed() { + return redirectsAllowed; + } + + public GrizzlyAsyncHttpProvider getProvider() { + return provider; + } + + public Request getRequest() { + return request; + } + + public void setRequest(Request request) { + this.request = request; + } + + public String getRequestUrl() { + return requestUrl; + } + + public void setRequestUrl(String requestUrl) { + this.requestUrl = requestUrl; + } + + public AsyncHandler getHandler() { + return handler; + } + + public BodyHandler getBodyHandler() { + return bodyHandler; + } + + public void setBodyHandler(BodyHandler bodyHandler) { + this.bodyHandler = bodyHandler; + } + + public StatusHandler getStatusHandler() { + return statusHandler; + } + + public void setStatusHandler(StatusHandler statusHandler) { + this.statusHandler = statusHandler; + } + + public InvocationStatus getInvocationStatus() { + return invocationStatus; + } + + public void setInvocationStatus(InvocationStatus invocationStatus) { + this.invocationStatus = invocationStatus; + } + + public GrizzlyResponseStatus getResponseStatus() { + return responseStatus; + } + + public void setResponseStatus(GrizzlyResponseStatus responseStatus) { + this.responseStatus = responseStatus; + } + + public GrizzlyResponseFuture getFuture() { + return future; + } + + public void setFuture(GrizzlyResponseFuture future) { + this.future = future; + } + + public String getLastRedirectURI() { + return lastRedirectURI; + } + + public void setLastRedirectURI(String lastRedirectURI) { + this.lastRedirectURI = lastRedirectURI; + } + + public AtomicLong getTotalBodyWritten() { + return totalBodyWritten; + } + + public AsyncHandler.STATE getCurrentState() { + return currentState; + } + + public void setCurrentState(AsyncHandler.STATE currentState) { + this.currentState = currentState; + } + + public String getWsRequestURI() { + return wsRequestURI; + } + + public void setWsRequestURI(String wsRequestURI) { + this.wsRequestURI = wsRequestURI; + } + + public boolean isWSRequest() { + return isWSRequest; + } + + public void setWSRequest(boolean WSRequest) { + isWSRequest = WSRequest; + } + + public HandShake getHandshake() { + return handshake; + } + + public void setHandshake(HandShake handshake) { + this.handshake = handshake; + } + + public ProtocolHandler getProtocolHandler() { + return protocolHandler; + } + + public void setProtocolHandler(ProtocolHandler protocolHandler) { + this.protocolHandler = protocolHandler; + } + + public WebSocket getWebSocket() { + return webSocket; + } + + public void setWebSocket(WebSocket webSocket) { + this.webSocket = webSocket; + } + + public boolean isEstablishingTunnel() { + return establishingTunnel; + } + + public void setEstablishingTunnel(boolean establishingTunnel) { + this.establishingTunnel = establishingTunnel; + } + + + // ------------------------------------------------- Package Private Methods + + + public HttpTransactionContext copy() { + final HttpTransactionContext newContext = + new HttpTransactionContext(provider, + future, + request, + handler); + newContext.invocationStatus = invocationStatus; + newContext.bodyHandler = bodyHandler; + newContext.currentState = currentState; + newContext.statusHandler = statusHandler; + newContext.lastRedirectURI = lastRedirectURI; + newContext.redirectCount.set(redirectCount.get()); + return newContext; + + } + + void done(final Callable c) { + if (future != null) { + future.done(c); + } + } + + @SuppressWarnings({"unchecked"}) + void result(Object result) { + if (future != null) { + future.delegate.result(result); + future.done(null); + } + } + + public boolean isTunnelEstablished(final Connection c) { + return c.getAttributes().getAttribute("tunnel-established") != null; + } + + + public void tunnelEstablished(final Connection c) { + c.getAttributes().setAttribute("tunnel-established", Boolean.TRUE); + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java new file mode 100644 index 0000000000..b8f3437c56 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Body; +import org.asynchttpclient.BodyGenerator; +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.FeedableBodyGenerator; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; +import org.glassfish.grizzly.memory.MemoryManager; + +import java.io.IOException; + +public final class BodyGeneratorBodyHandler implements BodyHandler { + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return (request.getBodyGenerator() != null); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + final BodyGenerator generator = request.getBodyGenerator(); + final Body bodyLocal = generator.createBody(); + final long len = bodyLocal.getContentLength(); + if (len > 0) { + requestPacket.setContentLengthLong(len); + } else { + requestPacket.setChunked(true); + } + + final MemoryManager mm = ctx.getMemoryManager(); + boolean last = false; + + while (!last) { + Buffer buffer = mm.allocate(MAX_CHUNK_SIZE); + buffer.allowBufferDispose(true); + + final long readBytes = bodyLocal.read(buffer.toByteBuffer()); + if (readBytes > 0) { + buffer.position((int) readBytes); + buffer.trim(); + } else { + buffer.dispose(); + + if (readBytes < 0) { + last = true; + buffer = Buffers.EMPTY_BUFFER; + } else { + // pass the context to bodyLocal to be able to + // continue body transferring once more data is available + if (generator instanceof FeedableBodyGenerator) { + ((FeedableBodyGenerator) generator).initializeAsynchronousTransfer(ctx, requestPacket); + return false; + } else { + throw new IllegalStateException("BodyGenerator unexpectedly returned 0 bytes available"); + } + } + } + + final HttpContent content = + requestPacket.httpContentBuilder().content(buffer). + last(last).build(); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + } + + return true; + } + +} // END BodyGeneratorBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandler.java new file mode 100644 index 0000000000..e476fdd264 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandler.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpRequestPacket; + +import java.io.IOException; + +public interface BodyHandler { + + static int MAX_CHUNK_SIZE = 8192; + + boolean handlesBodyType(final Request request); + + boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) throws IOException; + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java new file mode 100644 index 0000000000..18ad3839e6 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; + +public final class BodyHandlerFactory { + + private final BodyHandler[] handlers; + + public BodyHandlerFactory(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider) { + handlers = new BodyHandler[]{ + new StringBodyHandler(grizzlyAsyncHttpProvider), + new ByteArrayBodyHandler(grizzlyAsyncHttpProvider), + new ParamsBodyHandler(grizzlyAsyncHttpProvider), + new EntityWriterBodyHandler(), + new StreamDataBodyHandler(), + new PartsBodyHandler(), + new FileBodyHandler(), + new BodyGeneratorBodyHandler() + }; + } + + public BodyHandler getBodyHandler(final Request request) { + for (final BodyHandler h : handlers) { + if (h.handlesBodyType(request)) { + return h; + } + } + return new NoBodyHandler(); + } + +} // END BodyHandlerFactory diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java new file mode 100644 index 0000000000..9ed538e5fe --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; +import org.glassfish.grizzly.memory.MemoryManager; +import org.glassfish.grizzly.utils.Charsets; + +import java.io.IOException; + +public final class ByteArrayBodyHandler implements BodyHandler { + + private final boolean compressionEnabled; + + public ByteArrayBodyHandler(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider) { + compressionEnabled = grizzlyAsyncHttpProvider.getClientConfig().isCompressionEnabled(); + } + + + // -------------------------------------------- Methods from BodyHandler + + public boolean handlesBodyType(final Request request) { + return (request.getByteData() != null); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + String charset = request.getBodyEncoding(); + if (charset == null) { + charset = Charsets.ASCII_CHARSET.name(); + } + final byte[] data = new String(request.getByteData(), charset).getBytes(charset); + final MemoryManager mm = ctx.getMemoryManager(); + final Buffer gBuffer = Buffers.wrap(mm, data); + if (requestPacket.getContentLength() == -1) { + if (!compressionEnabled) { + requestPacket.setContentLengthLong(data.length); + } + } + final HttpContent content = requestPacket.httpContentBuilder().content(gBuffer).build(); + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + return true; + } +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java new file mode 100644 index 0000000000..7b2aad63a3 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.MemoryManager; +import org.glassfish.grizzly.utils.BufferOutputStream; + +import java.io.IOException; + +public final class EntityWriterBodyHandler implements BodyHandler { + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return (request.getEntityWriter() != null); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + final MemoryManager mm = ctx.getMemoryManager(); + Buffer b = mm.allocate(512); + BufferOutputStream o = new BufferOutputStream(mm, b, true); + final Request.EntityWriter writer = request.getEntityWriter(); + writer.writeEntity(o); + b = o.getBuffer(); + b.trim(); + if (b.hasRemaining()) { + final HttpContent content = requestPacket.httpContentBuilder().content(b).build(); + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + } + + return true; + } + +} // END EntityWriterBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ExpectHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ExpectHandler.java new file mode 100644 index 0000000000..dff737580a --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ExpectHandler.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpRequestPacket; + +import java.io.IOException; + +public final class ExpectHandler implements BodyHandler { + + private final BodyHandler delegate; + private Request request; + private HttpRequestPacket requestPacket; + + // -------------------------------------------------------- Constructors + + + public ExpectHandler(final BodyHandler delegate) { + + this.delegate = delegate; + + } + + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(Request request) { + return delegate.handlesBodyType(request); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(FilterChainContext ctx, Request request, HttpRequestPacket requestPacket) throws IOException { + this.request = request; + this.requestPacket = requestPacket; + ctx.write(requestPacket, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + return true; + } + + public void finish(final FilterChainContext ctx) throws IOException { + delegate.doHandle(ctx, request, requestPacket); + } + +} // END ContinueHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java new file mode 100644 index 0000000000..3085f7c147 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.Request; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.EmptyCompletionHandler; +import org.glassfish.grizzly.FileTransfer; +import org.glassfish.grizzly.WriteResult; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; +import org.glassfish.grizzly.memory.MemoryManager; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.concurrent.atomic.AtomicInteger; + +public final class FileBodyHandler implements BodyHandler { + + private static final boolean SEND_FILE_SUPPORT; + static { + SEND_FILE_SUPPORT = configSendFileSupport(); + } + + + // ------------------------------------------------ Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return (request.getFile() != null); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + final File f = request.getFile(); + requestPacket.setContentLengthLong(f.length()); + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { + final FileInputStream fis = new FileInputStream(request.getFile()); + final MemoryManager mm = ctx.getMemoryManager(); + AtomicInteger written = new AtomicInteger(); + boolean last = false; + try { + for (byte[] buf = new byte[MAX_CHUNK_SIZE]; !last; ) { + Buffer b = null; + int read; + if ((read = fis.read(buf)) < 0) { + last = true; + b = Buffers.EMPTY_BUFFER; + } + if (b != Buffers.EMPTY_BUFFER) { + written.addAndGet(read); + b = Buffers.wrap(mm, buf, 0, read); + } + + final HttpContent content = + requestPacket.httpContentBuilder().content(b). + last(last).build(); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + } + } finally { + try { + fis.close(); + } catch (IOException ignored) { + } + } + } else { + // write the headers + ctx.write(requestPacket, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + ctx.write(new FileTransfer(f), new EmptyCompletionHandler() { + + @Override + public void updated(WriteResult result) { + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + if (TransferCompletionHandler.class.isAssignableFrom(handler.getClass())) { + // WriteResult keeps a track of the total amount written, + // so we need to calculate the delta ourselves. + final long resultTotal = result.getWrittenSize(); + final long written = resultTotal - context.getTotalBodyWritten().get(); + final long total = context.getTotalBodyWritten().addAndGet(written); + ((TransferCompletionHandler) handler).onContentWriteProgress( + written, + total, + requestPacket.getContentLength()); + } + } + } + }); + } + + return true; + } + + + // --------------------------------------------------------- Private Methods + + + private static boolean configSendFileSupport() { + return !((System.getProperty("os.name").equalsIgnoreCase("linux") + && !linuxSendFileSupported()) + || System.getProperty("os.name").equalsIgnoreCase("HP-UX")); + } + + + private static boolean linuxSendFileSupported() { + final String version = System.getProperty("java.version"); + if (version.startsWith("1.6")) { + int idx = version.indexOf('_'); + if (idx == -1) { + return false; + } + final int patchRev = Integer.parseInt(version.substring(idx + 1)); + return (patchRev >= 18); + } else { + return version.startsWith("1.7") || version.startsWith("1.8"); + } + } + +} // END FileBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/NoBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/NoBodyHandler.java new file mode 100644 index 0000000000..55eef5fb54 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/NoBodyHandler.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; + +import java.io.IOException; + +public final class NoBodyHandler implements BodyHandler { + + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return false; + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + final HttpContent content = requestPacket.httpContentBuilder().content( + Buffers.EMPTY_BUFFER).build(); + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + return true; + } + +} // END NoBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ParamsBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ParamsBodyHandler.java new file mode 100644 index 0000000000..dc5a9d8813 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ParamsBodyHandler.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.FluentStringsMap; +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; +import org.glassfish.grizzly.memory.MemoryManager; +import org.glassfish.grizzly.utils.Charsets; + +import java.io.IOException; +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; + +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; + +public final class ParamsBodyHandler implements BodyHandler { + + private final boolean compressionEnabled; + + public ParamsBodyHandler(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider) { + compressionEnabled = grizzlyAsyncHttpProvider.getClientConfig().isCompressionEnabled(); + } + + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + final FluentStringsMap params = request.getParams(); + return isNonEmpty(params); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + if (requestPacket.getContentType() == null) { + requestPacket.setContentType("application/x-www-form-urlencoded"); + } + StringBuilder sb = null; + String charset = request.getBodyEncoding(); + if (charset == null) { + charset = Charsets.ASCII_CHARSET.name(); + } + final FluentStringsMap params = request.getParams(); + if (!params.isEmpty()) { + for (Map.Entry> entry : params.entrySet()) { + String name = entry.getKey(); + List values = entry.getValue(); + if (isNonEmpty(values)) { + if (sb == null) { + sb = new StringBuilder(128); + } + for (String value : values) { + if (sb.length() > 0) { + sb.append('&'); + } + sb.append(URLEncoder.encode(name, charset)) + .append('=').append(URLEncoder.encode(value, charset)); + } + } + } + } + if (sb != null) { + final byte[] data = sb.toString().getBytes(charset); + final MemoryManager mm = ctx.getMemoryManager(); + final Buffer gBuffer = Buffers.wrap(mm, data); + final HttpContent content = requestPacket.httpContentBuilder().content(gBuffer).build(); + if (requestPacket.getContentLength() == -1) { + if (!compressionEnabled) { + requestPacket.setContentLengthLong(data.length); + } + } + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + } + return true; + } + +} // END ParamsBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java new file mode 100644 index 0000000000..ba656d0d68 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.MemoryManager; +import org.glassfish.grizzly.utils.BufferOutputStream; + +import java.io.IOException; + +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; + +public final class PartsBodyHandler implements BodyHandler { + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return isNonEmpty(request.getParts()); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + MultipartRequestEntity mre = + AsyncHttpProviderUtils.createMultipartRequestEntity( + request.getParts(), + request.getHeaders()); + requestPacket.setContentLengthLong(mre.getContentLength()); + requestPacket.setContentType(mre.getContentType()); + final MemoryManager mm = ctx.getMemoryManager(); + Buffer b = mm.allocate(512); + BufferOutputStream o = new BufferOutputStream(mm, b, true); + mre.writeRequest(o); + b = o.getBuffer(); + b.trim(); + if (b.hasRemaining()) { + final HttpContent content = requestPacket.httpContentBuilder().content(b).build(); + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + } + + return true; + } + +} // END PartsBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StreamDataBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StreamDataBodyHandler.java new file mode 100644 index 0000000000..a9b5948ea8 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StreamDataBodyHandler.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.MemoryManager; + +import java.io.IOException; +import java.io.InputStream; + +import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider.LOGGER; + +public final class StreamDataBodyHandler implements BodyHandler { + + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return (request.getStreamData() != null); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + final MemoryManager mm = ctx.getMemoryManager(); + Buffer buffer = mm.allocate(512); + final byte[] b = new byte[512]; + int read; + final InputStream in = request.getStreamData(); + try { + in.reset(); + } catch (IOException ioe) { + if (LOGGER.isDebugEnabled()) { + LOGGER.debug(ioe.toString(), ioe); + } + } + if (in.markSupported()) { + in.mark(0); + } + + while ((read = in.read(b)) != -1) { + if (read > buffer.remaining()) { + buffer = mm.reallocate(buffer, buffer.capacity() + 512); + } + buffer.put(b, 0, read); + } + buffer.trim(); + if (buffer.hasRemaining()) { + final HttpContent content = requestPacket.httpContentBuilder().content(buffer).build(); + buffer.allowBufferDispose(false); + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + } + + return true; + } + +} // END StreamDataBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StringBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StringBodyHandler.java new file mode 100644 index 0000000000..07beb74e4b --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/StringBodyHandler.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.bodyhandler; + +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; +import org.glassfish.grizzly.memory.MemoryManager; +import org.glassfish.grizzly.utils.Charsets; + +import java.io.IOException; + +public final class StringBodyHandler implements BodyHandler { + private GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider; + + public StringBodyHandler(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider) { + this.grizzlyAsyncHttpProvider = grizzlyAsyncHttpProvider; + } + + + // -------------------------------------------- Methods from BodyHandler + + + public boolean handlesBodyType(final Request request) { + return (request.getStringData() != null); + } + + @SuppressWarnings({"unchecked"}) + public boolean doHandle(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + String charset = request.getBodyEncoding(); + if (charset == null) { + charset = Charsets.ASCII_CHARSET.name(); + } + final byte[] data = request.getStringData().getBytes(charset); + final MemoryManager mm = ctx.getMemoryManager(); + final Buffer gBuffer = Buffers.wrap(mm, data); + if (requestPacket.getContentLength() == -1) { + if (!grizzlyAsyncHttpProvider.getClientConfig().isCompressionEnabled()) { + requestPacket.setContentLengthLong(data.length); + } + } + final HttpContent content = requestPacket.httpContentBuilder().content(gBuffer).build(); + content.setLast(true); + ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + return true; + } + +} // END StringBodyHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java new file mode 100644 index 0000000000..c70c42b7bb --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters; + +import org.asynchttpclient.providers.grizzly.EventHandler; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpClientFilter; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpHeader; + +import java.io.IOException; + +public final class AsyncHttpClientEventFilter extends HttpClientFilter + implements GrizzlyAsyncHttpProvider.Cleanup { + + + private final EventHandler eventHandler; + + // -------------------------------------------------------- Constructors + + + public AsyncHttpClientEventFilter(final EventHandler eventHandler) { + this(eventHandler, DEFAULT_MAX_HTTP_PACKET_HEADER_SIZE); + } + + + public AsyncHttpClientEventFilter(final EventHandler eventHandler, + final int maxHeaderSize) { + + super(maxHeaderSize); + this.eventHandler = eventHandler; + } + + + @Override + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + eventHandler.exceptionOccurred(ctx, error); + } + + @Override + protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentParsed(content, ctx); + } + + @Override + protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersEncoded(httpHeader, ctx); + } + + @Override + protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentEncoded(content, ctx); + } + + @Override + protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onInitialLineParsed(httpHeader, ctx); + } + + @Override + protected void onHttpHeaderError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException { + eventHandler.onHttpHeaderError(httpHeader, ctx, t); + } + + @Override + protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersParsed(httpHeader, ctx); + } + + @Override + protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { + return eventHandler.onHttpPacketParsed(httpHeader, ctx); + } + + @Override + public void cleanup(final FilterChainContext ctx) { + clearResponse(ctx.getConnection()); + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java new file mode 100644 index 0000000000..02da156234 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -0,0 +1,443 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.FluentStringsMap; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Request; +import org.asynchttpclient.UpgradeHandler; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.bodyhandler.ExpectHandler; +import org.asynchttpclient.providers.grizzly.filters.events.ContinueEvent; +import org.asynchttpclient.providers.grizzly.filters.events.SSLSwitchingEvent; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AuthenticatorUtils; +import org.asynchttpclient.util.ProxyUtils; +import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.filterchain.BaseFilter; +import org.glassfish.grizzly.filterchain.FilterChain; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.filterchain.FilterChainEvent; +import org.glassfish.grizzly.filterchain.NextAction; +import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.http.Method; +import org.glassfish.grizzly.http.Protocol; +import org.glassfish.grizzly.http.util.CookieSerializerUtils; +import org.glassfish.grizzly.http.util.Header; +import org.glassfish.grizzly.http.util.MimeHeaders; +import org.glassfish.grizzly.ssl.SSLConnectionContext; +import org.glassfish.grizzly.ssl.SSLUtils; +import org.glassfish.grizzly.websockets.Version; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URLEncoder; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Callable; + +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; + +public final class AsyncHttpClientFilter extends BaseFilter { + + + private final AsyncHttpClientConfig config; + private GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider; + + + // -------------------------------------------------------- Constructors + + + public AsyncHttpClientFilter(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider, final AsyncHttpClientConfig config) { + this.grizzlyAsyncHttpProvider = grizzlyAsyncHttpProvider; + + this.config = config; + + } + + + // --------------------------------------------- Methods from BaseFilter + + + @Override + public NextAction handleWrite(final FilterChainContext ctx) + throws IOException { + + Object message = ctx.getMessage(); + if (message instanceof Request) { + ctx.setMessage(null); + if (!sendAsGrizzlyRequest((Request) message, ctx)) { + return ctx.getSuspendAction(); + } + } else if (message instanceof Buffer) { + return ctx.getInvokeAction(); + } + + return ctx.getStopAction(); + } + + @Override + public NextAction handleEvent(final FilterChainContext ctx, + final FilterChainEvent event) + throws IOException { + + final Object type = event.type(); + if (type == ContinueEvent.class) { + final ContinueEvent + continueEvent = (ContinueEvent) event; + ((ExpectHandler) continueEvent.getContext().getBodyHandler()).finish(ctx); + } + + return ctx.getStopAction(); + + } + + + // ----------------------------------------------------- Private Methods + + + private boolean sendAsGrizzlyRequest(final Request request, + final FilterChainContext ctx) + throws IOException { + + final HttpTransactionContext httpCtx = HttpTransactionContext.get(ctx.getConnection()); + if (isUpgradeRequest(httpCtx.getHandler()) && isWSRequest(httpCtx.getRequestUrl())) { + httpCtx.setWSRequest(true); + convertToUpgradeRequest(httpCtx); + } + final URI uri = httpCtx.getRequest().getURI(); + final HttpRequestPacket.Builder builder = HttpRequestPacket.builder(); + final String scheme = uri.getScheme(); + boolean secure = isSecure(scheme); + builder.method(request.getMethod()); + builder.protocol(Protocol.HTTP_1_1); + addHostHeader(request, uri, builder); + final ProxyServer proxy = ProxyUtils.getProxyServer(config, request); + final boolean useProxy = proxy != null; + if (useProxy) { + if ((secure || httpCtx.isWSRequest()) && !httpCtx.isTunnelEstablished(ctx.getConnection())) { + ctx.notifyDownstream(new SSLSwitchingEvent(false, ctx.getConnection(), null)); + secure = false; + httpCtx.setEstablishingTunnel(true); + builder.method(Method.CONNECT); + builder.uri(AsyncHttpProviderUtils.getAuthority(uri)); + } else if (secure && config.isUseRelativeURIsWithSSLProxies()){ + builder.uri(uri.getPath()); + } else { + builder.uri(uri.toString()); + } + } else { + builder.uri(uri.getPath()); + } + if (GrizzlyAsyncHttpProvider.requestHasEntityBody(request)) { + final long contentLength = request.getContentLength(); + if (contentLength > 0) { + builder.contentLength(contentLength); + builder.chunked(false); + } else { + builder.chunked(true); + } + } + + HttpRequestPacket requestPacket; + if (httpCtx.isWSRequest() && !httpCtx.isEstablishingTunnel()) { + try { + final URI wsURI = new URI(httpCtx.getWsRequestURI()); + httpCtx.setProtocolHandler(Version.DRAFT17.createHandler(true)); + httpCtx.setHandshake( + httpCtx.getProtocolHandler().createHandShake(wsURI)); + requestPacket = (HttpRequestPacket) + httpCtx.getHandshake().composeHeaders().getHttpHeader(); + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid WS URI: " + httpCtx.getWsRequestURI()); + } + } else { + requestPacket = builder.build(); + } + requestPacket.setSecure(secure); + if (!useProxy && !httpCtx.isWSRequest()) { + addQueryString(request, requestPacket); + } + addHeaders(request, requestPacket, proxy); + addCookies(request, requestPacket); + + final AsyncHandler h = httpCtx.getHandler(); + if (h != null) { + if (TransferCompletionHandler.class.isAssignableFrom( + h.getClass())) { + final FluentCaseInsensitiveStringsMap map = + new FluentCaseInsensitiveStringsMap( + request.getHeaders()); + TransferCompletionHandler.class.cast(h) + .transferAdapter(new GrizzlyTransferAdapter(map)); + } + } + final HttpRequestPacket requestPacketLocal = requestPacket; + final Callable action = new Callable() { + @Override + public Boolean call() throws Exception { + FilterChainContext sendingCtx = ctx; + + // Check to see if the ProtocolNegotiator has given + // us a different FilterChain to use. + SSLConnectionContext sslCtx = + SSLUtils.getSslConnectionContext(ctx.getConnection()); + if (sslCtx != null) { + FilterChain fc = sslCtx.getNewConnectionFilterChain(); + + if (fc != null) { + // Create a new FilterChain context using the new + // FilterChain. + // TODO: We need to mark this connection somehow + // as being only suitable for this type of + // request. + sendingCtx = obtainProtocolChainContext(ctx, fc); + } + } + return grizzlyAsyncHttpProvider.sendRequest(sendingCtx, request, + requestPacketLocal); + } + }; + if (secure) { + ctx.notifyDownstream(new SSLSwitchingEvent(true, ctx.getConnection(), action)); + return false; + } + try { + return action.call(); + } catch (Exception e) { + httpCtx.abort(e); + return true; + } + + } + + private FilterChainContext obtainProtocolChainContext( + final FilterChainContext ctx, + final FilterChain completeProtocolFilterChain) { + + final FilterChainContext newFilterChainContext = + completeProtocolFilterChain.obtainFilterChainContext( + ctx.getConnection(), + ctx.getStartIdx() + 1, + completeProtocolFilterChain.size(), + ctx.getFilterIdx() + 1); + + newFilterChainContext.setAddressHolder(ctx.getAddressHolder()); + newFilterChainContext.setMessage(ctx.getMessage()); + newFilterChainContext.getInternalContext().setIoEvent( + ctx.getInternalContext().getIoEvent()); + ctx.getConnection().setProcessor(completeProtocolFilterChain); + return newFilterChainContext; + } + + private boolean isSecure(String scheme) { + return "https".equals(scheme) || "wss".equals(scheme); + } + + private void addHostHeader(final Request request, + final URI uri, + final HttpRequestPacket.Builder builder) { + String host = request.getVirtualHost(); + if (host != null) { + builder.header(Header.Host, host); + } else { + if (uri.getPort() == -1) { + builder.header(Header.Host, uri.getHost()); + } else { + builder.header(Header.Host, uri.getHost() + ':' + uri.getPort()); + } + } + } + + private boolean isUpgradeRequest(final AsyncHandler handler) { + return (handler instanceof UpgradeHandler); + } + + + private boolean isWSRequest(final String requestUri) { + return (requestUri.charAt(0) == 'w' && requestUri.charAt(1) == 's'); + } + + + private void convertToUpgradeRequest(final HttpTransactionContext ctx) { + final int colonIdx = ctx.getRequestUrl().indexOf(':'); + + if (colonIdx < 2 || colonIdx > 3) { + throw new IllegalArgumentException("Invalid websocket URL: " + ctx.getRequestUrl()); + } + + final StringBuilder sb = new StringBuilder(ctx.getRequestUrl()); + sb.replace(0, colonIdx, ((colonIdx == 2) ? "http" : "https")); + ctx.setWsRequestURI(ctx.getRequestUrl()); + ctx.setRequestUrl(sb.toString()); + } + + + /* private ProxyServer getProxyServer(Request request) { + + ProxyServer proxyServer = request.getProxyServer(); + if (proxyServer == null) { + proxyServer = config.getProxyServer(); + } + return proxyServer; + + }*/ + + + private void addHeaders(final Request request, + final HttpRequestPacket requestPacket, + final ProxyServer proxy) throws IOException { + + final FluentCaseInsensitiveStringsMap map = request.getHeaders(); + if (isNonEmpty(map)) { + for (final Map.Entry> entry : map.entrySet()) { + final String headerName = entry.getKey(); + final List headerValues = entry.getValue(); + if (isNonEmpty(headerValues)) { + for (final String headerValue : headerValues) { + requestPacket.addHeader(headerName, headerValue); + } + } + } + } + + final MimeHeaders headers = requestPacket.getHeaders(); + if (!headers.contains(Header.Connection)) { + //final boolean canCache = context.provider.clientConfig.getAllowPoolingConnection(); + requestPacket.addHeader(Header.Connection, /*(canCache ? */"keep-alive" /*: "close")*/); + } + + if (!headers.contains(Header.Accept)) { + requestPacket.addHeader(Header.Accept, "*/*"); + } + + if (!headers.contains(Header.UserAgent)) { + requestPacket.addHeader(Header.UserAgent, config.getUserAgent()); + } + + boolean avoidProxy = ProxyUtils.avoidProxy(proxy, request); + if (!avoidProxy) { + if (!requestPacket.getHeaders().contains(Header.ProxyConnection)) { + requestPacket.setHeader(Header.ProxyConnection, "keep-alive"); + } + + if(null == requestPacket.getHeader(Header.ProxyAuthorization) ) + { + requestPacket.setHeader(Header.ProxyAuthorization, AuthenticatorUtils + .computeBasicAuthentication(proxy)); + } + + } + + + } + + + private void addCookies(final Request request, + final HttpRequestPacket requestPacket) { + + final Collection cookies = request.getCookies(); + if (isNonEmpty(cookies)) { + StringBuilder sb = new StringBuilder(128); + org.glassfish.grizzly.http.Cookie[] gCookies = + new org.glassfish.grizzly.http.Cookie[cookies.size()]; + convertCookies(cookies, gCookies); + CookieSerializerUtils.serializeClientCookies(sb, gCookies); + requestPacket.addHeader(Header.Cookie, sb.toString()); + } + + } + + + private void convertCookies(final Collection cookies, + final org.glassfish.grizzly.http.Cookie[] gCookies) { + int idx = 0; + for (final Cookie cookie : cookies) { + final org.glassfish.grizzly.http.Cookie gCookie = + new org.glassfish.grizzly.http.Cookie(cookie.getName(), cookie.getValue()); + gCookie.setDomain(cookie.getDomain()); + gCookie.setPath(cookie.getPath()); + gCookie.setVersion(cookie.getVersion()); + gCookie.setMaxAge(cookie.getMaxAge()); + gCookie.setSecure(cookie.isSecure()); + gCookies[idx] = gCookie; + idx++; + } + + } + + + private void addQueryString(final Request request, + final HttpRequestPacket requestPacket) { + + final FluentStringsMap map = request.getQueryParams(); + if (isNonEmpty(map)) { + StringBuilder sb = new StringBuilder(128); + for (final Map.Entry> entry : map.entrySet()) { + final String name = entry.getKey(); + final List values = entry.getValue(); + if (isNonEmpty(values)) { + try { + for (int i = 0, len = values.size(); i < len; i++) { + final String value = values.get(i); + if (isNonEmpty(value)) { + sb.append(URLEncoder.encode(name, "UTF-8")).append('=') + .append(URLEncoder.encode(values.get(i), + "UTF-8")).append('&'); + } else { + sb.append(URLEncoder.encode(name, "UTF-8")).append('&'); + } + } + } catch (UnsupportedEncodingException ignored) { + } + } + } + sb.setLength(sb.length() - 1); + String queryString = sb.toString(); + + requestPacket.setQueryString(queryString); + } + + } + + public static final class GrizzlyTransferAdapter extends TransferCompletionHandler.TransferAdapter { + + + // -------------------------------------------------------- Constructors + + + public GrizzlyTransferAdapter(FluentCaseInsensitiveStringsMap headers) throws IOException { + super(headers); + } + + + // ---------------------------------------- Methods from TransferAdapter + + + @Override + public void getBytes(byte[] bytes) { + // TODO implement + } + + } // END GrizzlyTransferAdapter +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java new file mode 100644 index 0000000000..dc3beb5977 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters; + +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.glassfish.grizzly.CompletionHandler; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.filterchain.NextAction; +import org.glassfish.grizzly.filterchain.TransportFilter; + +import java.io.EOFException; +import java.io.IOException; + +public final class AsyncHttpClientTransportFilter extends TransportFilter { + + private GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider; + + public AsyncHttpClientTransportFilter(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider) { + this.grizzlyAsyncHttpProvider = grizzlyAsyncHttpProvider; + } + + @Override + public NextAction handleRead(FilterChainContext ctx) throws IOException { + final HttpTransactionContext context = + HttpTransactionContext.get(ctx.getConnection()); + if (context == null) { + return super.handleRead(ctx); + } + ctx.getTransportContext().setCompletionHandler(new CompletionHandler() { + @Override + public void cancelled() { + + } + + @Override + public void failed(Throwable throwable) { + if (throwable instanceof EOFException) { + context.abort(new IOException("Remotely Closed")); + } + } + + @Override + public void completed(Object result) { + } + + @Override + public void updated(Object result) { + } + }); + return super.handleRead(ctx); + } + + @Override + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + if (context != null) { + context.abort(error.getCause()); + } + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncSpdyClientEventFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncSpdyClientEventFilter.java new file mode 100644 index 0000000000..21e3d4e28f --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncSpdyClientEventFilter.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters; + +import org.asynchttpclient.providers.grizzly.EventHandler; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpHeader; +import org.glassfish.grizzly.spdy.SpdyHandlerFilter; +import org.glassfish.grizzly.spdy.SpdyMode; + +import java.io.IOException; +import java.util.concurrent.ExecutorService; + +public final class AsyncSpdyClientEventFilter extends SpdyHandlerFilter + implements GrizzlyAsyncHttpProvider.Cleanup { + + + private final EventHandler eventHandler; + + // -------------------------------------------------------- Constructors + + + public AsyncSpdyClientEventFilter(final EventHandler eventHandler, + SpdyMode mode, + ExecutorService threadPool) { + super(mode, threadPool); + this.eventHandler = eventHandler; + } + + @Override + public void exceptionOccurred(FilterChainContext ctx, Throwable error) { + eventHandler.exceptionOccurred(ctx, error); + } + + @Override + protected void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentParsed(content, ctx); + } + + @Override + protected void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersEncoded(httpHeader, ctx); + } + + @Override + protected void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { + eventHandler.onHttpContentEncoded(content, ctx); + } + + @Override + protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onInitialLineParsed(httpHeader, ctx); + } + + @Override + protected void onHttpHeaderError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException { + eventHandler.onHttpHeaderError(httpHeader, ctx, t); + } + + @Override + protected void onHttpHeadersParsed(HttpHeader httpHeader, FilterChainContext ctx) { + eventHandler.onHttpHeadersParsed(httpHeader, ctx); + } + + @Override + protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) { + return eventHandler.onHttpPacketParsed(httpHeader, ctx); + } + + @Override + public void cleanup(FilterChainContext ctx) { + + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java new file mode 100644 index 0000000000..c080203b01 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters; + +import org.glassfish.grizzly.http.EncodingFilter; +import org.glassfish.grizzly.http.HttpHeader; +import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.util.DataChunk; +import org.glassfish.grizzly.http.util.Header; + +public final class ClientEncodingFilter implements EncodingFilter { + + + // --------------------------------------------- Methods from EncodingFilter + + + public boolean applyEncoding(HttpHeader httpPacket) { + + httpPacket.addHeader(Header.AcceptEncoding, "gzip"); + return true; + + } + + + public boolean applyDecoding(HttpHeader httpPacket) { + + final HttpResponsePacket httpResponse = (HttpResponsePacket) httpPacket; + final DataChunk bc = httpResponse.getHeaders().getValue(Header.ContentEncoding); + return bc != null && bc.indexOf("gzip", 0) != -1; + + } + + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/SwitchingSSLFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/SwitchingSSLFilter.java new file mode 100644 index 0000000000..42080e70af --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/SwitchingSSLFilter.java @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters; + +import org.asynchttpclient.providers.grizzly.filters.events.SSLSwitchingEvent; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.Grizzly; +import org.glassfish.grizzly.attributes.Attribute; +import org.glassfish.grizzly.filterchain.FilterChain; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.filterchain.FilterChainEvent; +import org.glassfish.grizzly.filterchain.NextAction; +import org.glassfish.grizzly.ssl.SSLEngineConfigurator; +import org.glassfish.grizzly.ssl.SSLFilter; + +import java.io.IOException; +import java.util.concurrent.ConcurrentHashMap; + +public final class SwitchingSSLFilter extends SSLFilter { + + private final boolean secureByDefault; + final Attribute CONNECTION_IS_SECURE = + Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(SwitchingSSLFilter.class.getName()); + + // ------------------------------------------------------------ Constructors + + + public SwitchingSSLFilter(final SSLEngineConfigurator clientConfig, + final boolean secureByDefault) { + + super(null, clientConfig); + this.secureByDefault = secureByDefault; + addHandshakeListener(new ProtocolHandshakeListener()); + } + + + // -------------------------------------------------- Methods from SSLFilter + + + @Override + protected void notifyHandshakeFailed(Connection connection, Throwable t) { + throw new RuntimeException(t); + } + + @Override + public NextAction handleEvent(final FilterChainContext ctx, FilterChainEvent event) throws IOException { + + if (event.type() == SSLSwitchingEvent.class) { + final SSLSwitchingEvent se = (SSLSwitchingEvent) event; + + if (se.isSecure()) { + if (se.getAction() != null) { + ProtocolHandshakeListener + .addListener(ctx.getConnection(), + new HandshakeCompleteListener() { + @Override + public void complete() { + try { + se.getAction().call(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }); + } + handshake(ctx.getConnection(), null); + } + setSecureStatus(se.getConnection(), se.isSecure()); + return ctx.getStopAction(); + } + return ctx.getInvokeAction(); + + } + + @Override + public NextAction handleRead(FilterChainContext ctx) throws IOException { + + if (isSecure(ctx.getConnection())) { + return super.handleRead(ctx); + } + return ctx.getInvokeAction(); + + } + + @Override + public NextAction handleWrite(FilterChainContext ctx) throws IOException { + + if (isSecure(ctx.getConnection())) { + return super.handleWrite(ctx); + } + return ctx.getInvokeAction(); + + } + + @Override + public void onFilterChainChanged(FilterChain filterChain) { + // no-op + } + + // --------------------------------------------------------- Private Methods + + + private boolean isSecure(final Connection c) { + + Boolean secStatus = CONNECTION_IS_SECURE.get(c); + if (secStatus == null) { + secStatus = secureByDefault; + } + return secStatus; + + } + + private void setSecureStatus(final Connection c, final boolean secure) { + CONNECTION_IS_SECURE.set(c, secure); + } + + + // ---------------------------------------------------------- Nested Classes + + + private static interface HandshakeCompleteListener { + void complete(); + } + + private static final class ProtocolHandshakeListener implements HandshakeListener { + + + static ConcurrentHashMap listeners = + new ConcurrentHashMap(); + + + // --------------------------------------- Method from HandshakeListener + + + @Override + public void onStart(Connection connection) { + // no-op + } + + @Override + public void onComplete(Connection connection) { + final HandshakeCompleteListener listener = listeners.get(connection); + if (listener != null) { + removeListener(connection); + listener.complete(); + } + } + + + // --------------------------------------------- Package Private Methods + + + public static void addListener(final Connection c, + final HandshakeCompleteListener listener) { + listeners.putIfAbsent(c, listener); + } + + static void removeListener(final Connection c) { + listeners.remove(c); + } + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java new file mode 100644 index 0000000000..2d90f2abe5 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters.events; + +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.glassfish.grizzly.filterchain.FilterChainEvent; + +public final class ContinueEvent implements FilterChainEvent { + + private final HttpTransactionContext context; + + + // -------------------------------------------------------- Constructors + + + public ContinueEvent(final HttpTransactionContext context) { + + this.context = context; + + } + + + // --------------------------------------- Methods from FilterChainEvent + + + @Override + public Object type() { + return ContinueEvent.class; + } + + + // ---------------------------------------------------------- Public Methods + + + public HttpTransactionContext getContext() { + return context; + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java new file mode 100644 index 0000000000..ac2792368b --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.filters.events; + +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.filterchain.FilterChainEvent; + +import java.util.concurrent.Callable; + +public final class SSLSwitchingEvent implements FilterChainEvent { + + private final boolean secure; + private final Connection connection; + private final Callable action; + + // ------------------------------------------------------------ Constructors + + + public SSLSwitchingEvent(final boolean secure, + final Connection c, + final Callable action) { + + this.secure = secure; + connection = c; + this.action = action; + + } + + // ------------------------------------------- Methods from FilterChainEvent + + + @Override + public Object type() { + return SSLSwitchingEvent.class; + } + + + // ---------------------------------------------------------- Public Methods + + + public boolean isSecure() { + return secure; + } + + public Connection getConnection() { + return connection; + } + + public Callable getAction() { + return action; + } + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java new file mode 100644 index 0000000000..16fa4be817 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.statushandler; + +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.ConnectionManager; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.util.AuthenticatorUtils; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.util.Header; +import org.glassfish.grizzly.http.util.HttpStatus; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.security.NoSuchAlgorithmException; + +import static org.asynchttpclient.providers.grizzly.statushandler.StatusHandler.InvocationStatus.STOP; + +public final class AuthorizationHandler implements StatusHandler { + + public static final AuthorizationHandler INSTANCE = + new AuthorizationHandler(); + + // ---------------------------------------------- Methods from StatusHandler + + + public boolean handlesStatus(int statusCode) { + return (HttpStatus.UNAUTHORIZED_401.statusMatches(statusCode)); + } + + @SuppressWarnings({"unchecked"}) + public boolean handleStatus(final HttpResponsePacket responsePacket, + final HttpTransactionContext httpTransactionContext, + final FilterChainContext ctx) { + + final String auth = responsePacket.getHeader(Header.WWWAuthenticate); + if (auth == null) { + throw new IllegalStateException("401 response received, but no WWW-Authenticate header was present"); + } + + Realm realm = httpTransactionContext.getRequest().getRealm(); + if (realm == null) { + realm = httpTransactionContext.getProvider().getClientConfig().getRealm(); + } + if (realm == null) { + httpTransactionContext.setInvocationStatus(STOP); + return true; + } + + responsePacket.setSkipRemainder(true); // ignore the remainder of the response + + final Request req = httpTransactionContext.getRequest(); + realm = new Realm.RealmBuilder().clone(realm) + .setScheme(realm.getAuthScheme()) + .setUri(req.getURI().getPath()) + .setMethodName(req.getMethod()) + .setUsePreemptiveAuth(true) + .parseWWWAuthenticateHeader(auth) + .build(); + if (auth.toLowerCase().startsWith("basic")) { + req.getHeaders().remove(Header.Authorization.toString()); + try { + req.getHeaders().add(Header.Authorization.toString(), + AuthenticatorUtils.computeBasicAuthentication( + realm)); + } catch (UnsupportedEncodingException ignored) { + } + } else if (auth.toLowerCase().startsWith("digest")) { + req.getHeaders().remove(Header.Authorization.toString()); + try { + req.getHeaders().add(Header.Authorization.toString(), + AuthenticatorUtils.computeDigestAuthentication(realm)); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException("Digest authentication not supported", e); + } catch (UnsupportedEncodingException e) { + throw new IllegalStateException("Unsupported encoding.", e); + } + } else { + throw new IllegalStateException("Unsupported authorization method: " + auth); + } + + final ConnectionManager m = httpTransactionContext.getProvider().getConnectionManager(); + try { + final Connection c = m.obtainConnection(req, + httpTransactionContext.getFuture()); + final HttpTransactionContext newContext = + httpTransactionContext.copy(); + httpTransactionContext.setFuture(null); + HttpTransactionContext.set(c, newContext); + newContext.setInvocationStatus(STOP); + try { + httpTransactionContext.getProvider().execute(c, + req, + httpTransactionContext.getHandler(), + httpTransactionContext.getFuture()); + return false; + } catch (IOException ioe) { + newContext.abort(ioe); + return false; + } + } catch (Exception e) { + httpTransactionContext.abort(e); + } + httpTransactionContext.setInvocationStatus(STOP); + return false; + } + +} // END AuthorizationHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java new file mode 100644 index 0000000000..44f7db2dc0 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.statushandler; + +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.ntlm.NTLMEngine; +import org.asynchttpclient.providers.grizzly.ConnectionManager; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.util.AuthenticatorUtils; +import org.asynchttpclient.util.Base64; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.util.Header; +import org.glassfish.grizzly.http.util.HttpStatus; +import org.ietf.jgss.GSSContext; +import org.ietf.jgss.GSSException; +import org.ietf.jgss.GSSManager; +import org.ietf.jgss.GSSName; +import org.ietf.jgss.Oid; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.security.NoSuchAlgorithmException; + +public final class ProxyAuthorizationHandler implements StatusHandler { + + public static final ProxyAuthorizationHandler INSTANCE = + new ProxyAuthorizationHandler(); + + private final static NTLMEngine ntlmEngine = new NTLMEngine(); + + + // ---------------------------------------------- Methods from StatusHandler + + + public boolean handlesStatus(int statusCode) { + return (HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407.statusMatches(statusCode)); + } + + @SuppressWarnings({"unchecked"}) + public boolean handleStatus(final HttpResponsePacket responsePacket, + final HttpTransactionContext httpTransactionContext, + final FilterChainContext ctx) { + + final String proxy_auth = responsePacket.getHeader(Header.ProxyAuthenticate); + if (proxy_auth == null) { + throw new IllegalStateException("407 response received, but no Proxy Authenticate header was present"); + } + + final Request req = httpTransactionContext.getRequest(); + ProxyServer proxyServer = httpTransactionContext.getProvider().getClientConfig().getProxyServer(); + String principal = proxyServer.getPrincipal(); + String password = proxyServer.getPassword(); + Realm realm = new Realm.RealmBuilder().setPrincipal(principal) + .setPassword(password) + .setUri("/") + .setMethodName("CONNECT") + .setUsePreemptiveAuth(true) + .parseProxyAuthenticateHeader(proxy_auth) + .build(); + if (proxy_auth.toLowerCase().startsWith("basic")) { + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + try { + req.getHeaders().add(Header.ProxyAuthorization.toString(), + AuthenticatorUtils.computeBasicAuthentication( + realm)); + } catch (UnsupportedEncodingException ignored) { + } + } else if (proxy_auth.toLowerCase().startsWith("digest")) { + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + try { + req.getHeaders().add(Header.ProxyAuthorization.toString(), + AuthenticatorUtils.computeDigestAuthentication(realm)); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException("Digest authentication not supported", e); + } catch (UnsupportedEncodingException e) { + throw new IllegalStateException("Unsupported encoding.", e); + } + }else if (proxy_auth.toLowerCase().startsWith("ntlm")) { + + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + + String msg; + try { + + if(isNTLMFirstHandShake(proxy_auth)) + { + msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), ""); + }else { + String serverChallenge = proxy_auth.trim().substring("NTLM ".length()); + msg = ntlmEngine.generateType3Msg(principal, password, proxyServer.getNtlmDomain(), proxyServer.getHost(), serverChallenge); + } + + req.getHeaders().add(Header.ProxyAuthorization.toString(), "NTLM " + msg); + } catch (Exception e1) { + e1.printStackTrace(); + } + } else if (proxy_auth.toLowerCase().startsWith("negotiate")){ + //this is for kerberos + req.getHeaders().remove(Header.ProxyAuthenticate.toString()); + req.getHeaders().remove(Header.ProxyAuthorization.toString()); + + }else { + throw new IllegalStateException("Unsupported authorization method: " + proxy_auth); + } + + final ConnectionManager m = httpTransactionContext.getProvider().getConnectionManager(); + InvocationStatus tempInvocationStatus = InvocationStatus.STOP; + + try { + + if(isNTLMFirstHandShake(proxy_auth)) + { + tempInvocationStatus = InvocationStatus.CONTINUE; + + } + + if(proxy_auth.toLowerCase().startsWith("negotiate")) + { + final Connection c = m.obtainConnection(req, httpTransactionContext.getFuture()); + final HttpTransactionContext newContext = httpTransactionContext.copy(); + httpTransactionContext.setFuture(null); + HttpTransactionContext.set(c, newContext); + + newContext.setInvocationStatus(tempInvocationStatus); + + String challengeHeader; + String server = proxyServer.getHost(); + + challengeHeader = GSSSPNEGOWrapper.generateToken(server); + + req.getHeaders().add(Header.ProxyAuthorization.toString(), "Negotiate " + challengeHeader); + + + return exceuteRequest(httpTransactionContext, req, c, + newContext); + }else if(isNTLMSecondHandShake(proxy_auth)) + { + final Connection c = ctx.getConnection(); + final HttpTransactionContext newContext = httpTransactionContext.copy(); + + httpTransactionContext.setFuture(null); + HttpTransactionContext.set(c, newContext); + + newContext.setInvocationStatus(tempInvocationStatus); + httpTransactionContext.setEstablishingTunnel(true); + + return exceuteRequest(httpTransactionContext, req, c, + newContext); + + } + else{ + final Connection c = m.obtainConnection(req, httpTransactionContext.getFuture()); + final HttpTransactionContext newContext = httpTransactionContext.copy(); + httpTransactionContext.setFuture(null); + HttpTransactionContext.set(c, newContext); + + newContext.setInvocationStatus(tempInvocationStatus); + + //NTLM needs the same connection to be used for exchange of tokens + return exceuteRequest(httpTransactionContext, req, c, + newContext); + } + } catch (Exception e) { + httpTransactionContext.abort(e); + } + httpTransactionContext.setInvocationStatus(tempInvocationStatus); + return false; + } + + private boolean exceuteRequest( + final HttpTransactionContext httpTransactionContext, + final Request req, final Connection c, + final HttpTransactionContext newContext) { + try { + httpTransactionContext.getProvider().execute(c, + req, + httpTransactionContext.getHandler(), + httpTransactionContext.getFuture()); + return false; + } catch (IOException ioe) { + newContext.abort(ioe); + return false; + } + } + + public static boolean isNTLMSecondHandShake(final String proxy_auth) { + return (proxy_auth != null && proxy_auth.toLowerCase().startsWith("ntlm") && !proxy_auth.equalsIgnoreCase("ntlm")); + } + public static boolean isNTLMFirstHandShake(final String proxy_auth) { + return (proxy_auth.equalsIgnoreCase("ntlm")); + } + + + private static final class GSSSPNEGOWrapper { + private final static org.slf4j.Logger LOGGER = LoggerFactory.getLogger( + GSSSPNEGOWrapper.class); + private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; + + static GSSManager getManager() { + return GSSManager.getInstance(); + } + + static byte[] generateGSSToken( + final byte[] input, final Oid oid, final String authServer) throws GSSException { + byte[] token = input; + if (token == null) { + token = new byte[0]; + } + GSSManager manager = getManager(); + GSSName serverName = manager.createName("HTTP@" + authServer, GSSName.NT_HOSTBASED_SERVICE); + GSSContext gssContext = manager.createContext( + serverName.canonicalize(oid), oid, null, GSSContext.DEFAULT_LIFETIME); + gssContext.requestMutualAuth(true); + gssContext.requestCredDeleg(true); + return gssContext.initSecContext(token, 0, token.length); + } + + public static String generateToken(String authServer) { + String returnVal = ""; + Oid oid; + try { + oid = new Oid(KERBEROS_OID); + byte[] token = GSSSPNEGOWrapper.generateGSSToken(null, oid, + authServer); + returnVal = Base64.encode(token); + } catch (GSSException e) { + LOGGER.warn(e.toString(), e); + } + + return returnVal; + } + } +} // END AuthorizationHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java new file mode 100644 index 0000000000..b9e2d6519d --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.statushandler; + +import org.asynchttpclient.Request; +import org.asynchttpclient.providers.grizzly.ConnectionManager; +import org.asynchttpclient.providers.grizzly.EventHandler; +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.util.Header; + +import java.net.URI; + +import static org.asynchttpclient.providers.grizzly.statushandler.StatusHandler.InvocationStatus.CONTINUE; + +public final class RedirectHandler implements StatusHandler { + + public static final RedirectHandler INSTANCE = new RedirectHandler(); + + + // ------------------------------------------ Methods from StatusHandler + + + public boolean handlesStatus(int statusCode) { + return (EventHandler.isRedirect(statusCode)); + } + + @SuppressWarnings({"unchecked"}) + public boolean handleStatus(final HttpResponsePacket responsePacket, + final HttpTransactionContext httpTransactionContext, + final FilterChainContext ctx) { + + final String redirectURL = responsePacket.getHeader(Header.Location); + if (redirectURL == null) { + throw new IllegalStateException("redirect received, but no location header was present"); + } + + URI orig; + if (httpTransactionContext.getLastRedirectURI() == null) { + orig = httpTransactionContext.getRequest().getURI(); + } else { + orig = AsyncHttpProviderUtils.getRedirectUri( + httpTransactionContext.getRequest().getURI(), + httpTransactionContext.getLastRedirectURI()); + } + httpTransactionContext.setLastRedirectURI(redirectURL); + Request requestToSend; + URI uri = AsyncHttpProviderUtils.getRedirectUri(orig, redirectURL); + if (!uri.toString().equalsIgnoreCase(orig.toString())) { + requestToSend = EventHandler + .newRequest(uri, + responsePacket, + httpTransactionContext, + sendAsGet( + responsePacket, + httpTransactionContext)); + } else { + httpTransactionContext.setStatusHandler(null); + httpTransactionContext.setInvocationStatus(CONTINUE); + try { + httpTransactionContext.getHandler().onStatusReceived(httpTransactionContext.getResponseStatus()); + } catch (Exception e) { + httpTransactionContext.abort(e); + } + return true; + } + + final ConnectionManager m = httpTransactionContext.getProvider().getConnectionManager(); + try { + final Connection c = m.obtainConnection(requestToSend, + httpTransactionContext.getFuture()); + final HttpTransactionContext newContext = + httpTransactionContext.copy(); + httpTransactionContext.setFuture(null); + newContext.setInvocationStatus(CONTINUE); + newContext.setRequest(requestToSend); + newContext.setRequestUrl(requestToSend.getUrl()); + HttpTransactionContext.set(c, newContext); + httpTransactionContext.getProvider().execute(c, + requestToSend, + newContext.getHandler(), + newContext.getFuture()); + return false; + } catch (Exception e) { + httpTransactionContext.abort(e); + } + + httpTransactionContext.setInvocationStatus(CONTINUE); + return true; + + } + + + // ------------------------------------------------- Private Methods + + private boolean sendAsGet(final HttpResponsePacket response, + final HttpTransactionContext ctx) { + final int statusCode = response.getStatus(); + return !(statusCode < 302 || statusCode > 303) + && !(statusCode == 302 + && ctx.getProvider().getClientConfig().isStrict302Handling()); + } + +} // END RedirectHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java new file mode 100644 index 0000000000..5ec587a422 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.statushandler; + +import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpResponsePacket; + +public interface StatusHandler { + + public enum InvocationStatus { + CONTINUE, + STOP + } + + boolean handleStatus(final HttpResponsePacket httpResponse, + final HttpTransactionContext httpTransactionContext, + final FilterChainContext ctx); + + boolean handlesStatus(final int statusCode); + +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/AHCWebSocketListenerAdapter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/AHCWebSocketListenerAdapter.java new file mode 100644 index 0000000000..0e64a37f35 --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/AHCWebSocketListenerAdapter.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.websocket; + +import org.asynchttpclient.websocket.WebSocketByteListener; +import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; +import org.asynchttpclient.websocket.WebSocketListener; +import org.asynchttpclient.websocket.WebSocketPingListener; +import org.asynchttpclient.websocket.WebSocketPongListener; +import org.asynchttpclient.websocket.WebSocketTextListener; +import org.glassfish.grizzly.websockets.DataFrame; +import org.glassfish.grizzly.websockets.draft06.ClosingFrame; + +import java.io.ByteArrayOutputStream; + +public final class AHCWebSocketListenerAdapter implements org.glassfish.grizzly.websockets.WebSocketListener { + + private final WebSocketListener ahcListener; + private final GrizzlyWebSocketAdapter webSocket; + private final StringBuilder stringBuffer; + private final ByteArrayOutputStream byteArrayOutputStream; + + // -------------------------------------------------------- Constructors + + + public AHCWebSocketListenerAdapter(final WebSocketListener ahcListener, + final GrizzlyWebSocketAdapter webSocket) { + this.ahcListener = ahcListener; + this.webSocket = webSocket; + if (webSocket.bufferFragments) { + stringBuffer = new StringBuilder(); + byteArrayOutputStream = new ByteArrayOutputStream(); + } else { + stringBuffer = null; + byteArrayOutputStream = null; + } + } + + + // ------------------------------ Methods from Grizzly WebSocketListener + + + @Override + public void onClose(org.glassfish.grizzly.websockets.WebSocket gWebSocket, DataFrame dataFrame) { + try { + if (WebSocketCloseCodeReasonListener.class.isAssignableFrom(ahcListener.getClass())) { + ClosingFrame cf = ClosingFrame.class.cast(dataFrame); + WebSocketCloseCodeReasonListener.class.cast(ahcListener).onClose(webSocket, cf.getCode(), cf.getReason()); + } else { + ahcListener.onClose(webSocket); + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onConnect(org.glassfish.grizzly.websockets.WebSocket gWebSocket) { + try { + ahcListener.onOpen(webSocket); + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, String s) { + try { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onMessage(s); + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onMessage(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { + try { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onMessage(bytes); + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onPing(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { + try { + if (WebSocketPingListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketPingListener.class.cast(ahcListener).onPing(bytes); + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onPong(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes) { + try { + if (WebSocketPongListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketPongListener.class.cast(ahcListener).onPong(bytes); + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, String s, boolean last) { + try { + if (this.webSocket.bufferFragments) { + synchronized (this.webSocket) { + stringBuffer.append(s); + if (last) { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + final String message = stringBuffer.toString(); + stringBuffer.setLength(0); + WebSocketTextListener.class.cast(ahcListener).onMessage(message); + } + } + } + } else { + if (WebSocketTextListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketTextListener.class.cast(ahcListener).onFragment(s, last); + } + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public void onFragment(org.glassfish.grizzly.websockets.WebSocket webSocket, byte[] bytes, boolean last) { + try { + if (this.webSocket.bufferFragments) { + synchronized (this.webSocket) { + byteArrayOutputStream.write(bytes); + if (last) { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + final byte[] bytesLocal = byteArrayOutputStream.toByteArray(); + byteArrayOutputStream.reset(); + WebSocketByteListener.class.cast(ahcListener).onMessage(bytesLocal); + } + } + } + } else { + if (WebSocketByteListener.class.isAssignableFrom(ahcListener.getClass())) { + WebSocketByteListener.class.cast(ahcListener).onFragment(bytes, last); + } + } + } catch (Throwable e) { + ahcListener.onError(e); + } + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + AHCWebSocketListenerAdapter that = (AHCWebSocketListenerAdapter) o; + + if (ahcListener != null ? !ahcListener.equals(that.ahcListener) : that.ahcListener != null) + return false; + //noinspection RedundantIfStatement + if (webSocket != null ? !webSocket.equals(that.webSocket) : that.webSocket != null) + return false; + + return true; + } + + @Override + public int hashCode() { + int result = ahcListener != null ? ahcListener.hashCode() : 0; + result = 31 * result + (webSocket != null ? webSocket.hashCode() : 0); + return result; + } +} // END AHCWebSocketListenerAdapter diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyWebSocketAdapter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyWebSocketAdapter.java new file mode 100644 index 0000000000..f19ba87d3a --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyWebSocketAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly.websocket; + +import org.asynchttpclient.websocket.WebSocket; +import org.asynchttpclient.websocket.WebSocketListener; +import org.glassfish.grizzly.websockets.SimpleWebSocket; + +import static org.asynchttpclient.util.MiscUtil.isNonEmpty; + +public final class GrizzlyWebSocketAdapter implements WebSocket { + + private final SimpleWebSocket gWebSocket; + final boolean bufferFragments; + + // -------------------------------------------------------- Constructors + + + public GrizzlyWebSocketAdapter(final SimpleWebSocket gWebSocket, + final boolean bufferFragements) { + this.gWebSocket = gWebSocket; + this.bufferFragments = bufferFragements; + } + + + // ---------------------------------------------- Methods from AHC WebSocket + + + @Override + public WebSocket sendMessage(byte[] message) { + gWebSocket.send(message); + return this; + } + + @Override + public WebSocket stream(byte[] fragment, boolean last) { + if (isNonEmpty(fragment)) { + gWebSocket.stream(last, fragment, 0, fragment.length); + } + return this; + } + + @Override + public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { + if (isNonEmpty(fragment)) { + gWebSocket.stream(last, fragment, offset, len); + } + return this; + } + + @Override + public WebSocket sendTextMessage(String message) { + gWebSocket.send(message); + return this; + } + + @Override + public WebSocket streamText(String fragment, boolean last) { + gWebSocket.stream(last, fragment); + return this; + } + + @Override + public WebSocket sendPing(byte[] payload) { + gWebSocket.sendPing(payload); + return this; + } + + @Override + public WebSocket sendPong(byte[] payload) { + gWebSocket.sendPong(payload); + return this; + } + + @Override + public WebSocket addWebSocketListener(WebSocketListener l) { + gWebSocket.add(new AHCWebSocketListenerAdapter(l, this)); + return this; + } + + @Override + public WebSocket removeWebSocketListener(WebSocketListener l) { + gWebSocket.remove(new AHCWebSocketListenerAdapter(l, this)); + return this; + } + + @Override + public boolean isOpen() { + return gWebSocket.isConnected(); + } + + @Override + public void close() { + gWebSocket.close(); + } + + + // ---------------------------------------------------------- Public Methods + + + public SimpleWebSocket getGrizzlyWebSocket() { + return gWebSocket; + } + +} // END GrizzlyWebSocketAdapter From dc67bfc5f995d2db77b85edb522f0e3e9bebe36f Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 5 Jun 2013 19:34:46 -0700 Subject: [PATCH 0402/2844] Move GrizzlyConnectionsPool to nested class of ConnectionManager. --- .../providers/grizzly/ConnectionManager.java | 539 +++++++++++++++++- .../grizzly/GrizzlyConnectionsPool.java | 491 ---------------- 2 files changed, 516 insertions(+), 514 deletions(-) delete mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java index 3e48b99edf..9a40196f90 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java @@ -29,16 +29,31 @@ import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; +import org.glassfish.grizzly.utils.DataStructures; import org.glassfish.grizzly.utils.Futures; import org.glassfish.grizzly.utils.IdleTimeoutFilter; +import org.glassfish.grizzly.utils.NullaryFunction; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.net.InetSocketAddress; import java.net.URI; +import java.util.Iterator; +import java.util.Map; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.asynchttpclient.util.DateUtil.millisTime; public class ConnectionManager { @@ -49,7 +64,9 @@ public class ConnectionManager { private final ConnectionMonitor connectionMonitor; private final GrizzlyAsyncHttpProvider provider; - // -------------------------------------------------------- Constructors + + // ------------------------------------------------------------ Constructors + @SuppressWarnings("unchecked") ConnectionManager(final GrizzlyAsyncHttpProvider provider, @@ -64,35 +81,28 @@ public class ConnectionManager { //noinspection unchecked connectionPool = (ConnectionsPool) pool; } else { - connectionPool = new GrizzlyConnectionsPool((config)); + connectionPool = new Pool((config)); } } else { connectionPool = new NonCachingPool(); } pool = connectionPool; connectionHandler = TCPNIOConnectorHandler.builder(transport).build(); - final int maxConns = provider.getClientConfig().getMaxTotalConnections(); - connectionMonitor = new ConnectionMonitor(maxConns); + connectionMonitor = new ConnectionMonitor(provider.getClientConfig().getMaxTotalConnections()); } - // ----------------------------------------------------- Private Methods - static void markConnectionAsDoNotCache(final Connection c) { - DO_NOT_CACHE.set(c, Boolean.TRUE); - } + // ---------------------------------------------------------- Public Methods - static boolean isConnectionCacheable(final Connection c) { - final Boolean canCache = DO_NOT_CACHE.get(c); - return ((canCache != null) ? canCache : false); - } public void doAsyncTrackedConnection(final Request request, final GrizzlyResponseFuture requestFuture, final CompletionHandler connectHandler) throws IOException, ExecutionException, InterruptedException { - Connection c = pool.poll(getPoolKey(request, requestFuture.getProxyServer())); + Connection c = + pool.poll(getPoolKey(request, requestFuture.getProxyServer())); if (c == null) { if (!connectionMonitor.acquire()) { throw new IOException("Max connections exceeded"); @@ -109,7 +119,8 @@ public Connection obtainConnection(final Request request, final GrizzlyResponseFuture requestFuture) throws IOException, ExecutionException, InterruptedException, TimeoutException { - final Connection c = obtainConnection0(request, requestFuture, requestFuture.getProxyServer()); + final Connection c = obtainConnection0(request, requestFuture, + requestFuture.getProxyServer()); markConnectionAsDoNotCache(c); return c; @@ -125,17 +136,37 @@ public void doAsyncConnect(final Request request, String host = proxy != null ? proxy.getHost() : uri.getHost(); int port = proxy != null ? proxy.getPort() : uri.getPort(); if (request.getLocalAddress() != null) { - connectionHandler.connect(new InetSocketAddress(host, GrizzlyAsyncHttpProvider - .getPort(uri, port)), new InetSocketAddress(request.getLocalAddress(), 0), - createConnectionCompletionHandler(request, requestFuture, connectHandler)); + connectionHandler.connect( + new InetSocketAddress(host, GrizzlyAsyncHttpProvider + .getPort(uri, port)), + new InetSocketAddress(request.getLocalAddress(), 0), + createConnectionCompletionHandler(request, requestFuture, + connectHandler)); } else { - connectionHandler.connect(new InetSocketAddress(host, GrizzlyAsyncHttpProvider - .getPort(uri, port)), - createConnectionCompletionHandler(request, requestFuture, connectHandler)); + connectionHandler.connect( + new InetSocketAddress(host, GrizzlyAsyncHttpProvider + .getPort(uri, port)), + createConnectionCompletionHandler(request, requestFuture, + connectHandler)); } } + + // --------------------------------------------------Package Private Methods + + + static void markConnectionAsDoNotCache(final Connection c) { + DO_NOT_CACHE.set(c, Boolean.TRUE); + } + + static boolean isConnectionCacheable(final Connection c) { + final Boolean canCache = DO_NOT_CACHE.get(c); + return ((canCache != null) ? canCache : false); + } + + + private Connection obtainConnection0(final Request request, final GrizzlyResponseFuture requestFuture, final ProxyServer proxy) @@ -232,14 +263,17 @@ private static String getPoolKey(final Request request, ProxyServer proxyServer) return keyStrategy.getKey(uri); } - // ------------------------------------------------------ Nested Classes + + // ---------------------------------------------------------- Nested Classes + private static class ConnectionMonitor implements CloseListener { private final Semaphore connections; - // ------------------------------------------------------------ Constructors + + // -------------------------------------------------------- Constructors ConnectionMonitor(final int maxConnections) { @@ -250,7 +284,8 @@ private static class ConnectionMonitor implements } } - // ----------------------------------- Methods from Connection.CloseListener + + // ------------------------------------------------------ Public Methods public boolean acquire() { @@ -259,6 +294,10 @@ public boolean acquire() { } + + // ------------------------------- Methods from Connection.CloseListener + + @Override public void onClosed(Closeable closeable, CloseType closeType) throws IOException { @@ -270,6 +309,7 @@ public void onClosed(Closeable closeable, CloseType closeType) throws IOExceptio } // END ConnectionMonitor + private static final class NonCachingPool implements ConnectionsPool { @@ -298,4 +338,457 @@ public void destroy() { } // END NonCachingPool + /** + * {@link org.asynchttpclient.ConnectionsPool} implementation. + * + * @author The Grizzly Team + * @since 1.7.0 + */ + @SuppressWarnings("rawtypes") + public static class Pool implements ConnectionsPool { + + private final static Logger + LOG = LoggerFactory.getLogger(Pool.class); + + private final + ConcurrentHashMap + connectionsPool = + new ConcurrentHashMap(); + private final AtomicBoolean closed = new AtomicBoolean(false); + private final AtomicInteger totalCachedConnections = new AtomicInteger(0); + private final boolean cacheSSLConnections; + private final int maxConnectionsPerHost; + private final int maxConnections; + private final boolean unlimitedConnections; + private final long timeout; + private final long maxConnectionLifeTimeInMs; + private final DelayedExecutor delayedExecutor; + private final CloseListener listener; + + + // -------------------------------------------------------- Constructors + + + public Pool(final AsyncHttpClientConfig config) { + + cacheSSLConnections = config.isSslConnectionPoolEnabled(); + timeout = config.getIdleConnectionInPoolTimeoutInMs(); + maxConnectionLifeTimeInMs = config.getMaxConnectionLifeTimeInMs(); + maxConnectionsPerHost = config.getMaxConnectionPerHost(); + maxConnections = config.getMaxTotalConnections(); + unlimitedConnections = (maxConnections == -1); + delayedExecutor = new DelayedExecutor( + Executors.newSingleThreadExecutor()); + delayedExecutor.start(); + listener = new CloseListener() { + @Override + public void onClosed(Connection connection, CloseType closeType) throws IOException { + if (closeType == CloseType.REMOTELY) { + if (LOG.isInfoEnabled()) { + LOG.info("Remote closed connection ({}). Removing from cache", connection.toString()); + } + } + Pool.this.removeAll(connection); + } + }; + + } + + + // ---------------------------------------- Methods from ConnectionsPool + + + /** + * {@inheritDoc} + */ + public boolean offer(String uri, Connection connection) { + + if (cacheSSLConnections && isSecure(uri)) { + return false; + } + + DelayedExecutor.IdleConnectionQueue conQueue = connectionsPool.get(uri); + if (conQueue == null) { + LOG.debug("Creating new Connection queue for uri [{}] and connection [{}]", + uri, connection); + DelayedExecutor.IdleConnectionQueue newPool = + delayedExecutor.createIdleConnectionQueue(timeout, maxConnectionLifeTimeInMs); + conQueue = connectionsPool.putIfAbsent(uri, newPool); + if (conQueue == null) { + conQueue = newPool; + } + } + + final int size = conQueue.size(); + if (maxConnectionsPerHost == -1 || size < maxConnectionsPerHost) { + conQueue.offer(connection); + connection.addCloseListener(listener); + final int total = totalCachedConnections.incrementAndGet(); + if (LOG.isDebugEnabled()) { + LOG.debug("[offer] Pooling connection [{}] for uri [{}]. Current size (for host; before pooling): [{}]. Max size (for host): [{}]. Total number of cached connections: [{}].", + connection, uri, size, maxConnectionsPerHost, total); + } + return true; + } + if (LOG.isDebugEnabled()) { + LOG.debug("[offer] Unable to pool connection [{}] for uri [{}]. Current size (for host): [{}]. Max size (for host): [{}]. Total number of cached connections: [{}].", + connection, uri, size, maxConnectionsPerHost, totalCachedConnections.get()); + } + + return false; + } + + + /** + * {@inheritDoc} + */ + public Connection poll(String uri) { + + if (!cacheSSLConnections && isSecure(uri)) { + return null; + } + + Connection connection = null; + DelayedExecutor.IdleConnectionQueue conQueue = connectionsPool.get(uri); + if (conQueue != null) { + boolean poolEmpty = false; + while (!poolEmpty && connection == null) { + if (!conQueue.isEmpty()) { + connection = conQueue.poll(); + } + + if (connection == null) { + poolEmpty = true; + } else if (!connection.isOpen()) { + removeAll(connection); + connection = null; + } + } + } else { + if (LOG.isDebugEnabled()) { + LOG.debug("[poll] No existing queue for uri [{}].", + new Object[]{uri}); + } + } + if (connection != null) { + if (LOG.isDebugEnabled()) { + LOG.debug("[poll] Found pooled connection [{}] for uri [{}].", + new Object[]{connection, uri}); + } + totalCachedConnections.decrementAndGet(); + connection.removeCloseListener(listener); + } + return connection; + + } + + + /** + * {@inheritDoc} + */ + public boolean removeAll(Connection connection) { + + if (connection == null || closed.get()) { + return false; + } + connection.removeCloseListener(listener); + boolean isRemoved = false; + for (Map.Entry entry : connectionsPool.entrySet()) { + boolean removed = entry.getValue().remove(connection); + isRemoved |= removed; + } + return isRemoved; + + } + + + /** + * {@inheritDoc} + */ + public boolean canCacheConnection() { + + return !(!closed.get() + && !unlimitedConnections + && totalCachedConnections.get() >= maxConnections); + + } + + /** + * {@inheritDoc} + */ + public void destroy() { + + if (closed.getAndSet(true)) { + return; + } + + for (Map.Entry entry : connectionsPool.entrySet()) { + entry.getValue().destroy(); + } + connectionsPool.clear(); + delayedExecutor.stop(); + delayedExecutor.getThreadPool().shutdownNow(); + + } + + + // ----------------------------------------------------- Private Methods + + + private boolean isSecure(String uri) { + + return (uri.charAt(0) == 'h' && uri.charAt(4) == 's'); + + } + + + // ------------------------------------------------------ Nested Classes + + + private static final class DelayedExecutor { + + public final static long UNSET_TIMEOUT = -1; + private final ExecutorService threadPool; + private final DelayedRunnable runnable = new DelayedRunnable(); + private final BlockingQueue queues = + DataStructures.getLTQInstance(IdleConnectionQueue.class); + private final Object sync = new Object(); + private volatile boolean isStarted; + private final long checkIntervalMs; + + + // ---------------------------------------------------- Constructors + + + private DelayedExecutor(final ExecutorService threadPool) { + this(threadPool, 1000, TimeUnit.MILLISECONDS); + } + + + // ------------------------------------------------- Private Methods + + private DelayedExecutor(final ExecutorService threadPool, + final long checkInterval, + final TimeUnit timeunit) { + this.threadPool = threadPool; + this.checkIntervalMs = TimeUnit.MILLISECONDS.convert(checkInterval, timeunit); + } + + private void start() { + synchronized (sync) { + if (!isStarted) { + isStarted = true; + threadPool.execute(runnable); + } + } + } + + private void stop() { + synchronized (sync) { + if (isStarted) { + isStarted = false; + sync.notify(); + } + } + } + + private ExecutorService getThreadPool() { + return threadPool; + } + + private IdleConnectionQueue createIdleConnectionQueue(final long timeout, final long maxConnectionLifeTimeInMs) { + final IdleConnectionQueue queue = new IdleConnectionQueue(timeout, maxConnectionLifeTimeInMs); + queues.add(queue); + return queue; + } + + @SuppressWarnings({"NumberEquality"}) + private static boolean wasModified(final Long l1, final Long l2) { + return l1 != l2 && (l1 != null ? !l1.equals(l2) : !l2.equals(l1)); + } + + + // --------------------------------------------------- Inner Classes + + + private class DelayedRunnable implements Runnable { + + @Override + public void run() { + while (isStarted) { + final long currentTimeMs = millisTime(); + + for (final IdleConnectionQueue delayQueue : queues) { + if (delayQueue.queue.isEmpty()) continue; + + final TimeoutResolver resolver = delayQueue.resolver; + + for (Iterator it = delayQueue.queue.iterator(); it.hasNext(); ) { + final Connection element = (Connection) it.next(); + final Long timeoutMs = resolver.getTimeoutMs(element); + + if (timeoutMs == null || timeoutMs == UNSET_TIMEOUT) { + it.remove(); + if (wasModified(timeoutMs, + resolver.getTimeoutMs(element))) { + delayQueue.queue.offer(element); + } + } else if (currentTimeMs - timeoutMs >= 0) { + it.remove(); + if (wasModified(timeoutMs, + resolver.getTimeoutMs(element))) { + delayQueue.queue.offer(element); + } else { + try { + if (LOG.isDebugEnabled()) { + LOG.debug("Idle connection ({}) detected. Removing from cache.", element.toString()); + } + element.close().recycle(true); + } catch (Exception ignored) { + } + } + } + } + } + + synchronized (sync) { + if (!isStarted) return; + + try { + sync.wait(checkIntervalMs); + } catch (InterruptedException ignored) { + } + } + } + } + + } // END DelayedRunnable + + + final class IdleConnectionQueue { + final ConcurrentLinkedQueue queue = + new ConcurrentLinkedQueue(); + + + final TimeoutResolver resolver = new TimeoutResolver(); + final long timeout; + final AtomicInteger count = new AtomicInteger(0); + final long maxConnectionLifeTimeInMs; + + // ------------------------------------------------ Constructors + + + public IdleConnectionQueue(final long timeout, final long maxConnectionLifeTimeInMs) { + this.timeout = timeout; + this.maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs; + } + + + // ------------------------------------- Package Private Methods + + + void offer(final Connection c) { + long timeoutMs = UNSET_TIMEOUT; + long currentTime = millisTime(); + if (maxConnectionLifeTimeInMs < 0 && timeout >= 0) { + timeoutMs = currentTime + timeout; + } else if (maxConnectionLifeTimeInMs >= 0) { + long t = resolver.getTimeoutMs(c); + if (t == UNSET_TIMEOUT) { + if (timeout >= 0) { + timeoutMs = currentTime + Math.min(maxConnectionLifeTimeInMs, timeout); + } else { + timeoutMs = currentTime + maxConnectionLifeTimeInMs; + } + } else { + if (timeout >= 0) { + timeoutMs = Math.min(t, currentTime + timeout); + } + } + } + resolver.setTimeoutMs(c, timeoutMs); + queue.offer(c); + count.incrementAndGet(); + } + + Connection poll() { + count.decrementAndGet(); + return queue.poll(); + } + + boolean remove(final Connection c) { + if (timeout >= 0) { + resolver.removeTimeout(c); + + } + count.decrementAndGet(); + return queue.remove(c); + } + + int size() { + return count.get(); + } + + boolean isEmpty() { + return (count.get() == 0); + } + + void destroy() { + for (Connection c : queue) { + c.close().recycle(true); + } + queue.clear(); + queues.remove(this); + } + + } // END IdleConnectionQueue + + + // -------------------------------------------------- Nested Classes + + + static final class TimeoutResolver { + + private static final String IDLE_ATTRIBUTE_NAME = "grizzly-ahc-conn-pool-idle-attribute"; + private static final Attribute IDLE_ATTR = + Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute( + IDLE_ATTRIBUTE_NAME, new NullaryFunction() { + + @Override + public IdleRecord evaluate() { + return new IdleRecord(); + } + }); + + + // --------------------------------------------- Private Methods + + + boolean removeTimeout(final Connection c) { + IDLE_ATTR.get(c).timeoutMs = 0; + return true; + } + + Long getTimeoutMs(final Connection c) { + return IDLE_ATTR.get(c).timeoutMs; + } + + void setTimeoutMs(final Connection c, final long timeoutMs) { + IDLE_ATTR.get(c).timeoutMs = timeoutMs; + } + + + // ---------------------------------------------- Nested Classes + + static final class IdleRecord { + + volatile long timeoutMs = UNSET_TIMEOUT; + + } // END IdleRecord + + } // END TimeoutResolver + + } // END DelayedExecutor + + } // END Pool } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java deleted file mode 100644 index 58bc60a091..0000000000 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionsPool.java +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.grizzly; - -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ConnectionsPool; - -import org.glassfish.grizzly.CloseListener; -import org.glassfish.grizzly.CloseType; -import org.glassfish.grizzly.Connection; -import org.glassfish.grizzly.Grizzly; -import org.glassfish.grizzly.attributes.Attribute; -import org.glassfish.grizzly.utils.DataStructures; -import org.glassfish.grizzly.utils.NullaryFunction; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.Iterator; -import java.util.Map; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.asynchttpclient.util.DateUtil.millisTime; - -/** - * {@link ConnectionsPool} implementation. - * - * @author The Grizzly Team - * @since 1.7.0 - */ -@SuppressWarnings("rawtypes") -public class GrizzlyConnectionsPool implements ConnectionsPool { - - private final static Logger LOG = LoggerFactory.getLogger(GrizzlyConnectionsPool.class); - - private final ConcurrentHashMap connectionsPool = - new ConcurrentHashMap(); - private final AtomicBoolean closed = new AtomicBoolean(false); - private final AtomicInteger totalCachedConnections = new AtomicInteger(0); - private final boolean cacheSSLConnections; - private final int maxConnectionsPerHost; - private final int maxConnections; - private final boolean unlimitedConnections; - private final long timeout; - private final long maxConnectionLifeTimeInMs; - private final DelayedExecutor delayedExecutor; - private final CloseListener listener; - - - // ------------------------------------------------------------ Constructors - - - public GrizzlyConnectionsPool(final AsyncHttpClientConfig config) { - - cacheSSLConnections = config.isSslConnectionPoolEnabled(); - timeout = config.getIdleConnectionInPoolTimeoutInMs(); - maxConnectionLifeTimeInMs = config.getMaxConnectionLifeTimeInMs(); - maxConnectionsPerHost = config.getMaxConnectionPerHost(); - maxConnections = config.getMaxTotalConnections(); - unlimitedConnections = (maxConnections == -1); - delayedExecutor = new DelayedExecutor(Executors.newSingleThreadExecutor()); - delayedExecutor.start(); - listener = new CloseListener() { - @Override - public void onClosed(Connection connection, CloseType closeType) throws IOException { - if (closeType == CloseType.REMOTELY) { - if (LOG.isInfoEnabled()) { - LOG.info("Remote closed connection ({}). Removing from cache", connection.toString()); - } - } - GrizzlyConnectionsPool.this.removeAll(connection); - } - }; - - } - - - // -------------------------------------------- Methods from ConnectionsPool - - - /** - * {@inheritDoc} - */ - public boolean offer(String uri, Connection connection) { - - if (cacheSSLConnections && isSecure(uri)) { - return false; - } - - DelayedExecutor.IdleConnectionQueue conQueue = connectionsPool.get(uri); - if (conQueue == null) { - LOG.debug("Creating new Connection queue for uri [{}] and connection [{}]", - uri, connection); - DelayedExecutor.IdleConnectionQueue newPool = - delayedExecutor.createIdleConnectionQueue(timeout, maxConnectionLifeTimeInMs); - conQueue = connectionsPool.putIfAbsent(uri, newPool); - if (conQueue == null) { - conQueue = newPool; - } - } - - final int size = conQueue.size(); - if (maxConnectionsPerHost == -1 || size < maxConnectionsPerHost) { - conQueue.offer(connection); - connection.addCloseListener(listener); - final int total = totalCachedConnections.incrementAndGet(); - if (LOG.isDebugEnabled()) { - LOG.debug("[offer] Pooling connection [{}] for uri [{}]. Current size (for host; before pooling): [{}]. Max size (for host): [{}]. Total number of cached connections: [{}].", - new Object[]{connection, uri, size, maxConnectionsPerHost, total}); - } - return true; - } - if (LOG.isDebugEnabled()) { - LOG.debug("[offer] Unable to pool connection [{}] for uri [{}]. Current size (for host): [{}]. Max size (for host): [{}]. Total number of cached connections: [{}].", - new Object[]{connection, uri, size, maxConnectionsPerHost, totalCachedConnections.get()}); - } - - return false; - } - - - /** - * {@inheritDoc} - */ - public Connection poll(String uri) { - - if (!cacheSSLConnections && isSecure(uri)) { - return null; - } - - Connection connection = null; - DelayedExecutor.IdleConnectionQueue conQueue = connectionsPool.get(uri); - if (conQueue != null) { - boolean poolEmpty = false; - while (!poolEmpty && connection == null) { - if (!conQueue.isEmpty()) { - connection = conQueue.poll(); - } - - if (connection == null) { - poolEmpty = true; - } else if (!connection.isOpen()) { - removeAll(connection); - connection = null; - } - } - } else { - if (LOG.isDebugEnabled()) { - LOG.debug("[poll] No existing queue for uri [{}].", - new Object[]{uri}); - } - } - if (connection != null) { - if (LOG.isDebugEnabled()) { - LOG.debug("[poll] Found pooled connection [{}] for uri [{}].", - new Object[]{connection, uri}); - } - totalCachedConnections.decrementAndGet(); - connection.removeCloseListener(listener); - } - return connection; - - } - - - /** - * {@inheritDoc} - */ - public boolean removeAll(Connection connection) { - - if (connection == null || closed.get()) { - return false; - } - connection.removeCloseListener(listener); - boolean isRemoved = false; - for (Map.Entry entry : connectionsPool.entrySet()) { - boolean removed = entry.getValue().remove(connection); - isRemoved |= removed; - } - return isRemoved; - - } - - - /** - * {@inheritDoc} - */ - public boolean canCacheConnection() { - - return !(!closed.get() - && !unlimitedConnections - && totalCachedConnections.get() >= maxConnections); - - } - - /** - * {@inheritDoc} - */ - public void destroy() { - - if (closed.getAndSet(true)) { - return; - } - - for (Map.Entry entry : connectionsPool.entrySet()) { - entry.getValue().destroy(); - } - connectionsPool.clear(); - delayedExecutor.stop(); - delayedExecutor.getThreadPool().shutdownNow(); - - } - - - // --------------------------------------------------------- Private Methods - - - private boolean isSecure(String uri) { - - return (uri.charAt(0) == 'h' && uri.charAt(4) == 's'); - - } - - - // ---------------------------------------------------------- Nested Classes - - - private static final class DelayedExecutor { - - public final static long UNSET_TIMEOUT = -1; - private final ExecutorService threadPool; - private final DelayedRunnable runnable = new DelayedRunnable(); - private final BlockingQueue queues = - DataStructures.getLTQInstance(IdleConnectionQueue.class); - private final Object sync = new Object(); - private volatile boolean isStarted; - private final long checkIntervalMs; - - - // -------------------------------------------------------- Constructors - - - private DelayedExecutor(final ExecutorService threadPool) { - this(threadPool, 1000, TimeUnit.MILLISECONDS); - } - - - // ----------------------------------------------------- Private Methods - - private DelayedExecutor(final ExecutorService threadPool, - final long checkInterval, - final TimeUnit timeunit) { - this.threadPool = threadPool; - this.checkIntervalMs = TimeUnit.MILLISECONDS.convert(checkInterval, timeunit); - } - - private void start() { - synchronized (sync) { - if (!isStarted) { - isStarted = true; - threadPool.execute(runnable); - } - } - } - - private void stop() { - synchronized (sync) { - if (isStarted) { - isStarted = false; - sync.notify(); - } - } - } - - private ExecutorService getThreadPool() { - return threadPool; - } - - private IdleConnectionQueue createIdleConnectionQueue(final long timeout, final long maxConnectionLifeTimeInMs) { - final IdleConnectionQueue queue = new IdleConnectionQueue(timeout, maxConnectionLifeTimeInMs); - queues.add(queue); - return queue; - } - - @SuppressWarnings({"NumberEquality"}) - private static boolean wasModified(final Long l1, final Long l2) { - return l1 != l2 && (l1 != null ? !l1.equals(l2) : !l2.equals(l1)); - } - - - // ------------------------------------------------------- Inner Classes - - - private class DelayedRunnable implements Runnable { - - @Override - public void run() { - while (isStarted) { - final long currentTimeMs = millisTime(); - - for (final IdleConnectionQueue delayQueue : queues) { - if (delayQueue.queue.isEmpty()) continue; - - final TimeoutResolver resolver = delayQueue.resolver; - - for (Iterator it = delayQueue.queue.iterator(); it.hasNext(); ) { - final Connection element = (Connection) it.next(); - final Long timeoutMs = resolver.getTimeoutMs(element); - - if (timeoutMs == null || timeoutMs == UNSET_TIMEOUT) { - it.remove(); - if (wasModified(timeoutMs, - resolver.getTimeoutMs(element))) { - delayQueue.queue.offer(element); - } - } else if (currentTimeMs - timeoutMs >= 0) { - it.remove(); - if (wasModified(timeoutMs, - resolver.getTimeoutMs(element))) { - delayQueue.queue.offer(element); - } else { - try { - if (LOG.isDebugEnabled()) { - LOG.debug("Idle connection ({}) detected. Removing from cache.", element.toString()); - } - element.close().recycle(true); - } catch (Exception ignored) { - } - } - } - } - } - - synchronized (sync) { - if (!isStarted) return; - - try { - sync.wait(checkIntervalMs); - } catch (InterruptedException ignored) { - } - } - } - } - - } // END DelayedRunnable - - - final class IdleConnectionQueue { - final ConcurrentLinkedQueue queue = - new ConcurrentLinkedQueue(); - - - final TimeoutResolver resolver = new TimeoutResolver(); - final long timeout; - final AtomicInteger count = new AtomicInteger(0); - final long maxConnectionLifeTimeInMs; - - // ---------------------------------------------------- Constructors - - - public IdleConnectionQueue(final long timeout, final long maxConnectionLifeTimeInMs) { - this.timeout = timeout; - this.maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs; - } - - - // ------------------------------------------------- Private Methods - - - void offer(final Connection c) { - long timeoutMs = UNSET_TIMEOUT; - long currentTime = millisTime(); - if (maxConnectionLifeTimeInMs < 0 && timeout >= 0) { - timeoutMs = currentTime + timeout; - } else if (maxConnectionLifeTimeInMs >= 0) { - long t = resolver.getTimeoutMs(c); - if (t == UNSET_TIMEOUT) { - if (timeout >= 0) { - timeoutMs = currentTime + Math.min(maxConnectionLifeTimeInMs, timeout); - } else { - timeoutMs = currentTime + maxConnectionLifeTimeInMs; - } - } else { - if (timeout >= 0) { - timeoutMs = Math.min(t, currentTime + timeout); - } - } - } - resolver.setTimeoutMs(c, timeoutMs); - queue.offer(c); - count.incrementAndGet(); - } - - Connection poll() { - count.decrementAndGet(); - return queue.poll(); - } - - boolean remove(final Connection c) { - if (timeout >= 0) { - resolver.removeTimeout(c); - - } - count.decrementAndGet(); - return queue.remove(c); - } - - int size() { - return count.get(); - } - - boolean isEmpty() { - return (count.get() == 0); - } - - void destroy() { - for (Connection c : queue) { - c.close().recycle(true); - } - queue.clear(); - queues.remove(this); - } - - } // END IdleConnectionQueue - - - // ------------------------------------------------------ Nested Classes - - - static final class TimeoutResolver { - - private static final String IDLE_ATTRIBUTE_NAME = "grizzly-ahc-conn-pool-idle-attribute"; - private static final Attribute IDLE_ATTR = - Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute( - IDLE_ATTRIBUTE_NAME, new NullaryFunction() { - - @Override - public IdleRecord evaluate() { - return new IdleRecord(); - } - }); - - - // ------------------------------------------------- Private Methods - - - boolean removeTimeout(final Connection c) { - IDLE_ATTR.get(c).timeoutMs = 0; - return true; - } - - Long getTimeoutMs(final Connection c) { - return IDLE_ATTR.get(c).timeoutMs; - } - - void setTimeoutMs(final Connection c, final long timeoutMs) { - IDLE_ATTR.get(c).timeoutMs = timeoutMs; - } - - - // -------------------------------------------------- Nested Classes - - static final class IdleRecord { - - volatile long timeoutMs = UNSET_TIMEOUT; - - } // END IdleRecord - - } // END TimeoutResolver - - } // END DelayedExecutor - -} From 74562aef9a2b177fa98f9d29d2dd23968f2f57d8 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 6 Jun 2013 22:17:30 +0200 Subject: [PATCH 0403/2844] Drop Apache HttpClient 3 support, close #318 Die! --- .../org/asynchttpclient/AsyncHttpClient.java | 5 +- pom.xml | 1 - providers/apache/pom.xml | 34 - .../apache/ApacheAsyncHttpProvider.java | 866 ------------------ .../apache/ApacheAsyncHttpProviderConfig.java | 42 - .../providers/apache/ApacheResponse.java | 65 -- .../apache/ApacheResponseBodyPart.java | 94 -- .../apache/ApacheResponseFuture.java | 232 ----- .../apache/ApacheResponseHeaders.java | 67 -- .../apache/ApacheResponseStatus.java | 71 -- providers/pom.xml | 1 - 11 files changed, 2 insertions(+), 1476 deletions(-) delete mode 100644 providers/apache/pom.xml delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java delete mode 100644 providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java index 73f51bd402..0966f12ba8 100755 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -147,7 +147,6 @@ public class AsyncHttpClient implements Closeable { private static final String[] DEFAULT_PROVIDERS = { "org.asynchttpclient.providers.netty.NettyAsyncHttpProvider", "org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider", - "org.asynchttpclient.providers.apache.ApacheAsyncHttpProvider", "org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider" }; @@ -171,7 +170,7 @@ public class AsyncHttpClient implements Closeable { *
    *
  • netty
  • *
  • grizzly
  • - *
  • apache
  • + *
  • JDK
  • *
* * If none of those providers are found, then the runtime will default to @@ -200,7 +199,7 @@ public AsyncHttpClient(AsyncHttpProvider provider) { *
    *
  • netty
  • *
  • grizzly
  • - *
  • apache
  • + *
  • JDK
  • *
* * If none of those providers are found, then the runtime will default to diff --git a/pom.xml b/pom.xml index 210c886cc0..5227949fc5 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,6 @@ commons-logging:commons-logging junit:junit log4j:log4j - commons-httpclient:commons-httpclient diff --git a/providers/apache/pom.xml b/providers/apache/pom.xml deleted file mode 100644 index 445c800d07..0000000000 --- a/providers/apache/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - org.asynchttpclient - async-http-client-providers-parent - 2.0.0-SNAPSHOT - - 4.0.0 - async-http-client-apache-provider - Asynchronous Http Client Apache Provider - - The Async Http Client Apache Provider. - - - - - commons-httpclient - commons-httpclient - 3.1 - - - commons-lang - commons-lang - 2.4 - - - commons-logging - commons-logging - 1.1.1 - - - - \ No newline at end of file diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java deleted file mode 100644 index 9530fba3fc..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProvider.java +++ /dev/null @@ -1,866 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import static org.asynchttpclient.util.MiscUtil.isNonEmpty; - -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.AsyncHttpProviderConfig; -import org.asynchttpclient.Body; -import org.asynchttpclient.ByteArrayPart; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.FilePart; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.MaxRedirectException; -import org.asynchttpclient.Part; -import org.asynchttpclient.ProgressAsyncHandler; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Realm; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.StringPart; -import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; -import org.asynchttpclient.filter.IOExceptionFilter; -import org.asynchttpclient.filter.ResponseFilter; -import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.resumable.ResumableAsyncHandler; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.util.ProxyUtils; -import org.asynchttpclient.util.UTF8UrlEncoder; -import org.apache.commons.httpclient.CircularRedirectException; -import org.apache.commons.httpclient.Credentials; -import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; -import org.apache.commons.httpclient.Header; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.HttpMethodBase; -import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; -import org.apache.commons.httpclient.NoHttpResponseException; -import org.apache.commons.httpclient.ProxyHost; -import org.apache.commons.httpclient.UsernamePasswordCredentials; -import org.apache.commons.httpclient.auth.AuthScope; -import org.apache.commons.httpclient.cookie.CookiePolicy; -import org.apache.commons.httpclient.methods.ByteArrayRequestEntity; -import org.apache.commons.httpclient.methods.DeleteMethod; -import org.apache.commons.httpclient.methods.EntityEnclosingMethod; -import org.apache.commons.httpclient.methods.GetMethod; -import org.apache.commons.httpclient.methods.HeadMethod; -import org.apache.commons.httpclient.methods.InputStreamRequestEntity; -import org.apache.commons.httpclient.methods.OptionsMethod; -import org.apache.commons.httpclient.methods.PostMethod; -import org.apache.commons.httpclient.methods.PutMethod; -import org.apache.commons.httpclient.methods.StringRequestEntity; -import org.apache.commons.httpclient.methods.multipart.ByteArrayPartSource; -import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity; -import org.apache.commons.httpclient.methods.multipart.PartSource; -import org.apache.commons.httpclient.params.HttpClientParams; -import org.apache.commons.httpclient.params.HttpConnectionParams; -import org.apache.commons.httpclient.params.HttpMethodParams; -import org.apache.commons.httpclient.protocol.Protocol; -import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; -import org.apache.commons.httpclient.util.IdleConnectionTimeoutThread; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.net.SocketFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLHandshakeException; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.ConnectException; -import java.net.InetAddress; -import java.net.Socket; -import java.net.URI; -import java.net.UnknownHostException; -import java.nio.ByteBuffer; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.zip.GZIPInputStream; - -import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; - - -/** - * An {@link org.asynchttpclient.AsyncHttpProvider} for Apache Http Client 3.1 - */ -public class ApacheAsyncHttpProvider implements AsyncHttpProvider { - private final static Logger logger = LoggerFactory.getLogger(ApacheAsyncHttpProvider.class); - - private final AsyncHttpClientConfig config; - private final AtomicBoolean isClose = new AtomicBoolean(false); - private IdleConnectionTimeoutThread idleConnectionTimeoutThread; - private final AtomicInteger maxConnections = new AtomicInteger(); - private final MultiThreadedHttpConnectionManager connectionManager; - private final HttpClientParams params; - - static { - final SocketFactory factory = new TrustingSSLSocketFactory(); - Protocol.registerProtocol("https", new Protocol("https", new ProtocolSocketFactory() { - public Socket createSocket(String string, int i, InetAddress inetAddress, int i1) throws IOException { - return factory.createSocket(string, i, inetAddress, i1); - } - - public Socket createSocket(String string, int i, InetAddress inetAddress, int i1, HttpConnectionParams httpConnectionParams) - throws IOException { - return factory.createSocket(string, i, inetAddress, i1); - } - - public Socket createSocket(String string, int i) throws IOException { - return factory.createSocket(string, i); - } - }, 443)); - } - - public ApacheAsyncHttpProvider(AsyncHttpClientConfig config) { - this.config = config; - connectionManager = new MultiThreadedHttpConnectionManager(); - - params = new HttpClientParams(); - params.setParameter(HttpMethodParams.SINGLE_COOKIE_HEADER, Boolean.TRUE); - params.setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY); - params.setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler()); - - AsyncHttpProviderConfig providerConfig = config.getAsyncHttpProviderConfig(); - if (providerConfig != null && ApacheAsyncHttpProvider.class.isAssignableFrom(providerConfig.getClass())) { - configure(ApacheAsyncHttpProviderConfig.class.cast(providerConfig)); - } - } - - private void configure(ApacheAsyncHttpProviderConfig config) { - } - - public ListenableFuture execute(Request request, AsyncHandler handler) throws IOException { - if (isClose.get()) { - throw new IOException("Closed"); - } - - if (ResumableAsyncHandler.class.isAssignableFrom(handler.getClass())) { - request = ResumableAsyncHandler.class.cast(handler).adjustRequestRange(request); - } - - if (config.getMaxTotalConnections() > -1 && (maxConnections.get() + 1) > config.getMaxTotalConnections()) { - throw new IOException(String.format("Too many connections %s", config.getMaxTotalConnections())); - } - - if (idleConnectionTimeoutThread != null) { - idleConnectionTimeoutThread.shutdown(); - idleConnectionTimeoutThread = null; - } - - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - if (config.getIdleConnectionTimeoutInMs() > 0 && requestTimeout != -1 && requestTimeout < config.getIdleConnectionTimeoutInMs()) { - idleConnectionTimeoutThread = new IdleConnectionTimeoutThread(); - idleConnectionTimeoutThread.setConnectionTimeout(config.getIdleConnectionTimeoutInMs()); - idleConnectionTimeoutThread.addConnectionManager(connectionManager); - idleConnectionTimeoutThread.start(); - } - - HttpClient httpClient = new HttpClient(params, connectionManager); - - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - if (realm != null) { - httpClient.getParams().setAuthenticationPreemptive(realm.getUsePreemptiveAuth()); - Credentials defaultcreds = new UsernamePasswordCredentials(realm.getPrincipal(), realm.getPassword()); - httpClient.getState().setCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds); - } - - HttpMethodBase method = createMethod(httpClient, request); - ApacheResponseFuture f = new ApacheResponseFuture(handler, requestTimeout, request, method); - f.touch(); - - f.setInnerFuture(config.executorService().submit(new ApacheClientRunnable(request, handler, method, f, httpClient))); - maxConnections.incrementAndGet(); - return f; - } - - public void close() { - if (idleConnectionTimeoutThread != null) { - idleConnectionTimeoutThread.shutdown(); - idleConnectionTimeoutThread = null; - } - if (connectionManager != null) { - try { - connectionManager.shutdown(); - } catch (Exception e) { - logger.error("Error shutting down connection manager", e); - } - } - } - - public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { - return new ApacheResponse(status, headers, bodyParts); - } - - private HttpMethodBase createMethod(HttpClient client, Request request) throws IOException, FileNotFoundException { - String methodName = request.getMethod(); - HttpMethodBase method = null; - if (methodName.equalsIgnoreCase("POST") || methodName.equalsIgnoreCase("PUT")) { - EntityEnclosingMethod post = methodName.equalsIgnoreCase("POST") ? new PostMethod(request.getUrl()) : new PutMethod(request.getUrl()); - - String bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : request.getBodyEncoding(); - - post.getParams().setContentCharset("ISO-8859-1"); - if (request.getByteData() != null) { - post.setRequestEntity(new ByteArrayRequestEntity(request.getByteData())); - post.setRequestHeader("Content-Length", String.valueOf(request.getByteData().length)); - } else if (request.getStringData() != null) { - post.setRequestEntity(new StringRequestEntity(request.getStringData(), "text/xml", bodyCharset)); - post.setRequestHeader("Content-Length", String.valueOf(request.getStringData().getBytes(bodyCharset).length)); - } else if (request.getStreamData() != null) { - InputStreamRequestEntity r = new InputStreamRequestEntity(request.getStreamData()); - post.setRequestEntity(r); - post.setRequestHeader("Content-Length", String.valueOf(r.getContentLength())); - - } else if (request.getParams() != null) { - StringBuilder sb = new StringBuilder(); - for (final Map.Entry> paramEntry : request.getParams()) { - final String key = paramEntry.getKey(); - for (final String value : paramEntry.getValue()) { - if (sb.length() > 0) { - sb.append("&"); - } - UTF8UrlEncoder.appendEncoded(sb, key); - sb.append("="); - UTF8UrlEncoder.appendEncoded(sb, value); - } - } - - post.setRequestHeader("Content-Length", String.valueOf(sb.length())); - post.setRequestEntity(new StringRequestEntity(sb.toString(), "text/xml", "ISO-8859-1")); - - if (!request.getHeaders().containsKey("Content-Type")) { - post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - } - } else if (request.getParts() != null) { - MultipartRequestEntity mre = createMultipartRequestEntity(bodyCharset, request.getParts(), post.getParams()); - post.setRequestEntity(mre); - post.setRequestHeader("Content-Type", mre.getContentType()); - post.setRequestHeader("Content-Length", String.valueOf(mre.getContentLength())); - } else if (request.getEntityWriter() != null) { - post.setRequestEntity(new EntityWriterRequestEntity(request.getEntityWriter(), computeAndSetContentLength(request, post))); - } else if (request.getFile() != null) { - File file = request.getFile(); - if (!file.isFile()) { - throw new IOException(String.format(Thread.currentThread() - + "File %s is not a file or doesn't exist", file.getAbsolutePath())); - } - post.setRequestHeader("Content-Length", String.valueOf(file.length())); - - FileInputStream fis = new FileInputStream(file); - try { - InputStreamRequestEntity r = new InputStreamRequestEntity(fis); - post.setRequestEntity(r); - post.setRequestHeader("Content-Length", String.valueOf(r.getContentLength())); - } finally { - fis.close(); - } - } else if (request.getBodyGenerator() != null) { - Body body = request.getBodyGenerator().createBody(); - try { - int length = (int) body.getContentLength(); - if (length < 0) { - length = (int) request.getContentLength(); - } - - // TODO: This is suboptimal - if (length >= 0) { - post.setRequestHeader("Content-Length", String.valueOf(length)); - - // This is totally sub optimal - byte[] bytes = new byte[length]; - ByteBuffer buffer = ByteBuffer.wrap(bytes); - for (; ; ) { - buffer.clear(); - if (body.read(buffer) < 0) { - break; - } - } - post.setRequestEntity(new ByteArrayRequestEntity(bytes)); - } - } finally { - try { - body.close(); - } catch (IOException e) { - logger.warn("Failed to close request body: {}", e.getMessage(), e); - } - } - } - - String expect = request.getHeaders().getFirstValue("Expect"); - if (expect != null && expect.equalsIgnoreCase("100-Continue")) { - post.setUseExpectHeader(true); - } - method = post; - } else if (methodName.equalsIgnoreCase("DELETE")) { - method = new DeleteMethod(request.getUrl()); - } else if (methodName.equalsIgnoreCase("HEAD")) { - method = new HeadMethod(request.getUrl()); - } else if (methodName.equalsIgnoreCase("GET")) { - method = new GetMethod(request.getUrl()); - } else if (methodName.equalsIgnoreCase("OPTIONS")) { - method = new OptionsMethod(request.getUrl()); - } else { - throw new IllegalStateException(String.format("Invalid Method", methodName)); - } - - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - if (proxyServer != null) { - - if (proxyServer.getPrincipal() != null) { - Credentials defaultcreds = new UsernamePasswordCredentials(proxyServer.getPrincipal(), proxyServer.getPassword()); - client.getState().setProxyCredentials(new AuthScope(null, -1, AuthScope.ANY_REALM), defaultcreds); - } - - ProxyHost proxyHost = proxyServer == null ? null : new ProxyHost(proxyServer.getHost(), proxyServer.getPort()); - client.getHostConfiguration().setProxyHost(proxyHost); - } - if(request.getLocalAddress()!=null) { - client.getHostConfiguration().setLocalAddress(request.getLocalAddress()); - } - - method.setFollowRedirects(false); - Collection cookies = request.getCookies(); - if (isNonEmpty(cookies)) { - method.setRequestHeader("Cookie", AsyncHttpProviderUtils.encodeCookies(request.getCookies())); - } - - if (request.getHeaders() != null) { - for (String name : request.getHeaders().keySet()) { - if (!"host".equalsIgnoreCase(name)) { - for (String value : request.getHeaders().get(name)) { - method.setRequestHeader(name, value); - } - } - } - } - - String ua = request.getHeaders().getFirstValue("User-Agent"); - if (ua != null) { - method.setRequestHeader("User-Agent", ua); - } else if (config.getUserAgent() != null) { - method.setRequestHeader("User-Agent", config.getUserAgent()); - } else { - method.setRequestHeader("User-Agent", AsyncHttpProviderUtils.constructUserAgent(ApacheAsyncHttpProvider.class, config)); - } - - if (config.isCompressionEnabled()) { - Header acceptableEncodingHeader = method.getRequestHeader("Accept-Encoding"); - if (acceptableEncodingHeader != null) { - String acceptableEncodings = acceptableEncodingHeader.getValue(); - if (acceptableEncodings.indexOf("gzip") == -1) { - StringBuilder buf = new StringBuilder(acceptableEncodings); - if (buf.length() > 1) { - buf.append(","); - } - buf.append("gzip"); - method.setRequestHeader("Accept-Encoding", buf.toString()); - } - } else { - method.setRequestHeader("Accept-Encoding", "gzip"); - } - } - - if (request.getVirtualHost() != null) { - - String vs = request.getVirtualHost(); - int index = vs.indexOf(":"); - if (index > 0) { - vs = vs.substring(0, index); - } - method.getParams().setVirtualHost(vs); - } - - return method; - } - - private final static int computeAndSetContentLength(Request request, HttpMethodBase m) { - int lenght = (int) request.getContentLength(); - if (lenght == -1 && m.getRequestHeader("Content-Length") != null) { - lenght = Integer.valueOf(m.getRequestHeader("Content-Length").getValue()); - } - - if (lenght != -1) { - m.setRequestHeader("Content-Length", String.valueOf(lenght)); - } - return lenght; - } - - public class ApacheClientRunnable implements Callable { - - private final AsyncHandler asyncHandler; - private HttpMethodBase method; - private final ApacheResponseFuture future; - private Request request; - private final HttpClient httpClient; - private int currentRedirectCount; - private AtomicBoolean isAuth = new AtomicBoolean(false); - private boolean terminate = true; - - public ApacheClientRunnable(Request request, AsyncHandler asyncHandler, HttpMethodBase method, ApacheResponseFuture future, HttpClient httpClient) { - this.asyncHandler = asyncHandler; - this.method = method; - this.future = future; - this.request = request; - this.httpClient = httpClient; - } - - public T call() { - terminate = true; - AsyncHandler.STATE state = AsyncHandler.STATE.ABORT; - try { - URI uri = null; - try { - uri = AsyncHttpProviderUtils.createUri(request.getRawUrl()); - } catch (IllegalArgumentException u) { - uri = AsyncHttpProviderUtils.createUri(request.getUrl()); - } - - int delay = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); - if (delay != -1) { - ReaperFuture reaperFuture = new ReaperFuture(future); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, delay, 500, TimeUnit.MILLISECONDS); - reaperFuture.setScheduledFuture(scheduledFuture); - future.setReaperFuture(reaperFuture); - } - - if (TransferCompletionHandler.class.isAssignableFrom(asyncHandler.getClass())) { - throw new IllegalStateException(TransferCompletionHandler.class.getName() + "not supported by this provider"); - } - - int statusCode = 200; - try { - statusCode = httpClient.executeMethod(method); - } catch (CircularRedirectException ex) { - // Quite ugly, but this is needed to unify - statusCode = 302; - currentRedirectCount = config.getMaxRedirects(); - } - - ApacheResponseStatus status = new ApacheResponseStatus(uri, method, ApacheAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } - - // The request has changed - if (fc.replayRequest()) { - request = fc.getRequest(); - method = createMethod(httpClient, request); - terminate = false; - return call(); - } - - logger.debug("\n\nRequest {}\n\nResponse {}\n", request, method); - - boolean redirectEnabled = (request.isRedirectEnabled() || config.isRedirectEnabled()); - if (redirectEnabled && (statusCode == 302 || statusCode == 301)) { - - isAuth.set(false); - - if (currentRedirectCount++ < config.getMaxRedirects()) { - String location = method.getResponseHeader("Location").getValue(); - URI rediUri = AsyncHttpProviderUtils.getRedirectUri(uri, location); - String newUrl = rediUri.toString(); - - if (!newUrl.equals(uri.toString())) { - RequestBuilder builder = new RequestBuilder(request); - - logger.debug("Redirecting to {}", newUrl); - - request = builder.setUrl(newUrl).build(); - method = createMethod(httpClient, request); - terminate = false; - return call(); - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } - - state = asyncHandler.onStatusReceived(status); - if (state == AsyncHandler.STATE.CONTINUE) { - state = asyncHandler.onHeadersReceived(new ApacheResponseHeaders(uri, method, ApacheAsyncHttpProvider.this)); - } - - if (state == AsyncHandler.STATE.CONTINUE) { - InputStream is = method.getResponseBodyAsStream(); - if (is != null) { - Header h = method.getResponseHeader("Content-Encoding"); - if (h != null) { - String contentEncoding = h.getValue(); - boolean isGZipped = contentEncoding == null ? false : "gzip".equalsIgnoreCase(contentEncoding); - if (isGZipped) { - is = new GZIPInputStream(is); - } - } - - int byteToRead = (int) method.getResponseContentLength(); - InputStream stream = is; - if (byteToRead <= 0) { - int[] lengthWrapper = new int[1]; - byte[] bytes = AsyncHttpProviderUtils.readFully(is, lengthWrapper); - stream = new ByteArrayInputStream(bytes, 0, lengthWrapper[0]); - byteToRead = lengthWrapper[0]; - } - - if (byteToRead > 0) { - int minBytes = Math.min(8192, byteToRead); - byte[] bytes = new byte[minBytes]; - int leftBytes = minBytes < 8192 ? minBytes : byteToRead; - int read = 0; - while (leftBytes > -1) { - - try { - read = stream.read(bytes); - } catch (IOException ex) { - logger.warn("Connection closed", ex); - read = -1; - } - - if (read == -1) { - break; - } - - future.touch(); - - byte[] b = new byte[read]; - System.arraycopy(bytes, 0, b, 0, read); - leftBytes -= read; - - asyncHandler.onBodyPartReceived(new ApacheResponseBodyPart(uri, b, ApacheAsyncHttpProvider.this, leftBytes > -1)); - - } - } - } - - if (method.getName().equalsIgnoreCase("HEAD")) { - asyncHandler.onBodyPartReceived(new ApacheResponseBodyPart(uri, "".getBytes(), ApacheAsyncHttpProvider.this, true)); - } - } - - if (ProgressAsyncHandler.class.isAssignableFrom(asyncHandler.getClass())) { - ProgressAsyncHandler.class.cast(asyncHandler).onHeaderWriteCompleted(); - ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteCompleted(); - } - - try { - return asyncHandler.onCompleted(); - } catch (Throwable t) { - RuntimeException ex = new RuntimeException(); - ex.initCause(t); - throw ex; - } - } catch (Throwable t) { - - if (IOException.class.isAssignableFrom(t.getClass()) && config.getIOExceptionFilters().size() > 0) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler) - .request(future.getRequest()).ioException(IOException.class.cast(t)).build(); - - try { - fc = handleIoException(fc); - } catch (FilterException e) { - if (config.getMaxTotalConnections() != -1) { - maxConnections.decrementAndGet(); - } - future.done(null); - method.releaseConnection(); - } - - if (fc.replayRequest()) { - request = fc.getRequest(); - return call(); - } - } - - if (method.isAborted()) { - return null; - } - - logger.debug(t.getMessage(), t); - - try { - future.abort(filterException(t)); - } catch (Throwable t2) { - logger.error(t2.getMessage(), t2); - } - } finally { - if (terminate) { - if (config.getMaxTotalConnections() != -1) { - maxConnections.decrementAndGet(); - } - future.done(null); - - // Crappy Apache HttpClient who blocks forever here with large files. - config.executorService().submit(new Runnable() { - - public void run() { - method.releaseConnection(); - } - }); - } - } - return null; - } - - private Throwable filterException(Throwable t) { - if (UnknownHostException.class.isAssignableFrom(t.getClass())) { - t = new ConnectException(t.getMessage()); - } - - if (NoHttpResponseException.class.isAssignableFrom(t.getClass())) { - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - t = new TimeoutException(String.format("No response received after %s", requestTimeout)); - } - - if (SSLHandshakeException.class.isAssignableFrom(t.getClass())) { - Throwable t2 = new ConnectException(); - t2.initCause(t); - t = t2; - } - - return t; - } - - private FilterContext handleIoException(FilterContext fc) throws FilterException { - for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } - return fc; - } - } - - private MultipartRequestEntity createMultipartRequestEntity(String charset, List params, HttpMethodParams methodParams) throws FileNotFoundException { - org.apache.commons.httpclient.methods.multipart.Part[] parts = new org.apache.commons.httpclient.methods.multipart.Part[params.size()]; - int i = 0; - - for (Part part : params) { - if (part instanceof StringPart) { - parts[i] = new org.apache.commons.httpclient.methods.multipart.StringPart(part.getName(), - ((StringPart) part).getValue(), - charset); - } else if (part instanceof FilePart) { - parts[i] = new org.apache.commons.httpclient.methods.multipart.FilePart(part.getName(), - ((FilePart) part).getFile(), - ((FilePart) part).getMimeType(), - ((FilePart) part).getCharSet()); - - } else if (part instanceof ByteArrayPart) { - PartSource source = new ByteArrayPartSource(((ByteArrayPart) part).getFileName(), ((ByteArrayPart) part).getData()); - parts[i] = new org.apache.commons.httpclient.methods.multipart.FilePart(part.getName(), - source, - ((ByteArrayPart) part).getMimeType(), - ((ByteArrayPart) part).getCharSet()); - - } else if (part == null) { - throw new NullPointerException("Part cannot be null"); - } else { - throw new IllegalArgumentException(String.format("Unsupported part type for multipart parameter %s", - part.getName())); - } - ++i; - } - return new MultipartRequestEntity(parts, methodParams); - } - - public class EntityWriterRequestEntity implements org.apache.commons.httpclient.methods.RequestEntity { - private Request.EntityWriter entityWriter; - private long contentLength; - - public EntityWriterRequestEntity(Request.EntityWriter entityWriter, long contentLength) { - this.entityWriter = entityWriter; - this.contentLength = contentLength; - } - - public long getContentLength() { - return contentLength; - } - - public String getContentType() { - return null; - } - - public boolean isRepeatable() { - return false; - } - - public void writeRequest(OutputStream out) throws IOException { - entityWriter.writeEntity(out); - } - } - - private static class TrustingSSLSocketFactory extends SSLSocketFactory { - private SSLSocketFactory delegate; - - private TrustingSSLSocketFactory() { - try { - SSLContext sslcontext = SSLContext.getInstance("SSL"); - - sslcontext.init(null, new TrustManager[]{new TrustEveryoneTrustManager()}, new SecureRandom()); - delegate = sslcontext.getSocketFactory(); - } catch (KeyManagementException e) { - throw new IllegalStateException(); - } catch (NoSuchAlgorithmException e) { - throw new IllegalStateException(); - } - } - - @Override - public Socket createSocket(String s, int i) throws IOException, UnknownHostException { - return delegate.createSocket(s, i); - } - - @Override - public Socket createSocket(String s, int i, InetAddress inetAddress, int i1) throws IOException, UnknownHostException { - return delegate.createSocket(s, i, inetAddress, i1); - } - - @Override - public Socket createSocket(InetAddress inetAddress, int i) throws IOException { - return delegate.createSocket(inetAddress, i); - } - - @Override - public Socket createSocket(InetAddress inetAddress, int i, InetAddress inetAddress1, int i1) throws IOException { - return delegate.createSocket(inetAddress, i, inetAddress1, i1); - } - - @Override - public String[] getDefaultCipherSuites() { - return delegate.getDefaultCipherSuites(); - } - - @Override - public String[] getSupportedCipherSuites() { - return delegate.getSupportedCipherSuites(); - } - - @Override - public Socket createSocket(Socket socket, String s, int i, boolean b) throws IOException { - return delegate.createSocket(socket, s, i, b); - } - } - - private static class TrustEveryoneTrustManager implements X509TrustManager { - public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { - // do nothing - } - - public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { - // do nothing - } - - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - } - - private final class ReaperFuture implements Future, Runnable { - private Future scheduledFuture; - private ApacheResponseFuture apacheResponseFuture; - - public ReaperFuture(ApacheResponseFuture apacheResponseFuture) { - this.apacheResponseFuture = apacheResponseFuture; - } - - public void setScheduledFuture(Future scheduledFuture) { - this.scheduledFuture = scheduledFuture; - } - - /** - * @Override - */ - public synchronized boolean cancel(boolean mayInterruptIfRunning) { - //cleanup references to allow gc to reclaim memory independently - //of this Future lifecycle - this.apacheResponseFuture = null; - return this.scheduledFuture.cancel(mayInterruptIfRunning); - } - - /** - * @Override - */ - public Object get() throws InterruptedException, ExecutionException { - return this.scheduledFuture.get(); - } - - /** - * @Override - */ - public Object get(long timeout, TimeUnit unit) - throws InterruptedException, ExecutionException, - TimeoutException { - return this.scheduledFuture.get(timeout, unit); - } - - /** - * @Override - */ - public boolean isCancelled() { - return this.scheduledFuture.isCancelled(); - } - - /** - * @Override - */ - public boolean isDone() { - return this.scheduledFuture.isDone(); - } - - /** - * @Override - */ - public synchronized void run() { - if (this.apacheResponseFuture != null && this.apacheResponseFuture.hasExpired()) { - logger.debug("Request Timeout expired for {}", this.apacheResponseFuture); - - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, apacheResponseFuture.getRequest()); - apacheResponseFuture.abort(new TimeoutException(String.format("No response received after %s", requestTimeout))); - - this.apacheResponseFuture = null; - } - } - } -} diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java deleted file mode 100644 index ba49da84c7..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheAsyncHttpProviderConfig.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import org.asynchttpclient.AsyncHttpProviderConfig; - -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; - -public class ApacheAsyncHttpProviderConfig implements AsyncHttpProviderConfig { - - private final ConcurrentHashMap properties = new ConcurrentHashMap(); - - - public AsyncHttpProviderConfig addProperty(String name, String value) { - properties.put(name, value); - return this; - } - - public String getProperty(String name) { - return properties.get(name); - } - - public String removeProperty(String name) { - return properties.remove(name); - } - - public Set> propertiesSet() { - return properties.entrySet(); - } -} diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java deleted file mode 100644 index bfd0758c82..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.providers.ResponseBase; -import org.asynchttpclient.util.AsyncHttpProviderUtils; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class ApacheResponse extends ResponseBase { - - public ApacheResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) { - super(status, headers, bodyParts); - } - - /* @Override */ - - public String getResponseBodyExcerpt(int maxLength) throws IOException { - return getResponseBodyExcerpt(maxLength, DEFAULT_CHARSET); - } - - /* @Override */ - - public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - charset = calculateCharset(charset); - String response = AsyncHttpProviderUtils.contentToString(bodyParts, charset); - return response.length() <= maxLength ? response : response.substring(0, maxLength); - } - - /* @Override */ - public List buildCookies() { - List cookies = new ArrayList(); - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - cookies.addAll(CookieDecoder.decode(value)); - } - } - } - return Collections.unmodifiableList(cookies); - } -} diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java deleted file mode 100644 index eb757ea4b5..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseBodyPart.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.nio.ByteBuffer; - -/** - * A callback class used when an HTTP response body is received. - */ -public class ApacheResponseBodyPart extends HttpResponseBodyPart { - - private final byte[] chunk; - private final boolean isLast; - private boolean closeConnection; - - public ApacheResponseBodyPart(URI uri, byte[] chunk, AsyncHttpProvider provider, boolean last) { - super(uri, provider); - this.chunk = chunk; - isLast = last; - } - - /** - * Return the response body's part bytes received. - * - * @return the response body's part bytes received. - */ - @Override - public byte[] getBodyPartBytes() { - return chunk; - } - - @Override - public InputStream readBodyPartBytes() { - return new ByteArrayInputStream(chunk); - } - - @Override - public int length() { - return chunk.length; - } - - @Override - public int writeTo(OutputStream outputStream) throws IOException { - outputStream.write(chunk); - return chunk.length; - } - - @Override - public ByteBuffer getBodyByteBuffer() { - return ByteBuffer.wrap(chunk); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isLast() { - return isLast; - } - - /** - * {@inheritDoc} - */ - @Override - public void markUnderlyingConnectionAsClosed() { - closeConnection = true; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean closeUnderlyingConnection() { - return closeConnection; - } -} \ No newline at end of file diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java deleted file mode 100644 index 3fbe219db0..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseFuture.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import static org.asynchttpclient.util.DateUtil.millisTime; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.Request; -import org.asynchttpclient.listenable.AbstractListenableFuture; -import org.apache.commons.httpclient.HttpMethodBase; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.concurrent.Callable; -import java.util.concurrent.CancellationException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; - - -public class ApacheResponseFuture extends AbstractListenableFuture { - - private final static Logger logger = LoggerFactory.getLogger(ApacheResponseFuture.class); - - private Future innerFuture; - private final AsyncHandler asyncHandler; - private final int responseTimeoutInMs; - private final AtomicBoolean cancelled = new AtomicBoolean(false); - private final AtomicBoolean timedOut = new AtomicBoolean(false); - private final AtomicBoolean isDone = new AtomicBoolean(false); - private final AtomicReference exception = new AtomicReference(); - private final AtomicLong touch = new AtomicLong(millisTime()); - private final AtomicBoolean contentProcessed = new AtomicBoolean(false); - private final Request request; - private final HttpMethodBase method; - private Future reaperFuture; - private boolean writeHeaders; - private boolean writeBody; - - public ApacheResponseFuture(AsyncHandler asyncHandler, int responseTimeoutInMs, Request request, HttpMethodBase method) { - this.asyncHandler = asyncHandler; - this.responseTimeoutInMs = responseTimeoutInMs == -1 ? Integer.MAX_VALUE : responseTimeoutInMs; - this.request = request; - this.method = method; - writeHeaders = true; - writeBody = true; - } - - protected void setInnerFuture(Future innerFuture) { - this.innerFuture = innerFuture; - } - - public void done(Callable callable) { - isDone.set(true); - if (reaperFuture != null) { - reaperFuture.cancel(true); - } - super.done(); - } - - /** - * TODO. - * - * @param v The new content - */ - public void content(V v) { - } - - protected void setReaperFuture(Future reaperFuture) { - if (this.reaperFuture != null) { - this.reaperFuture.cancel(true); - } - this.reaperFuture = reaperFuture; - } - - @Override - public String toString() { - return "ApacheResponseFuture{" + - "innerFuture=" + innerFuture + - ", asyncHandler=" + asyncHandler + - ", responseTimeoutInMs=" + responseTimeoutInMs + - ", cancelled=" + cancelled + - ", timedOut=" + timedOut + - ", isDone=" + isDone + - ", exception=" + exception + - ", touch=" + touch + - ", contentProcessed=" + contentProcessed + - ", request=" + request + - ", method=" + method + - ", reaperFuture=" + reaperFuture + - '}'; - } - - public void abort(Throwable t) { - exception.set(t); - if (innerFuture != null) { - innerFuture.cancel(true); - } - - if (method != null) { - method.abort(); - } - - if (reaperFuture != null) { - reaperFuture.cancel(true); - } - if (!timedOut.get() && !cancelled.get()) { - try { - asyncHandler.onThrowable(t); - } catch (Throwable t2) { - logger.debug("asyncHandler.onThrowable", t2); - } - } - super.done(); - } - - public boolean cancel(boolean mayInterruptIfRunning) { - if (!cancelled.get() && innerFuture != null) { - method.abort(); - try { - asyncHandler.onThrowable(new CancellationException()); - } catch (Throwable t) { - logger.debug("asyncHandler.onThrowable", t); - } - cancelled.set(true); - if (reaperFuture != null) { - reaperFuture.cancel(true); - } - super.done(); - return innerFuture.cancel(mayInterruptIfRunning); - } else { - super.done(); - return false; - } - } - - public boolean isCancelled() { - if (innerFuture != null) { - return innerFuture.isCancelled(); - } else { - return false; - } - } - - public boolean isDone() { - contentProcessed.set(true); - return innerFuture.isDone(); - } - - public V get() throws InterruptedException, ExecutionException { - try { - return get(responseTimeoutInMs, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - throw new ExecutionException(e); - } - } - - public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { - V content = null; - try { - if (innerFuture != null) { - content = innerFuture.get(timeout, unit); - } - } catch (TimeoutException t) { - if (!contentProcessed.get() && timeout != -1 && ((millisTime() - touch.get()) <= responseTimeoutInMs)) { - return get(timeout, unit); - } - - if (exception.get() == null) { - timedOut.set(true); - throw new ExecutionException(new TimeoutException(String.format("No response received after %s", responseTimeoutInMs))); - } - } catch (CancellationException ce) { - } - - if (exception.get() != null) { - throw new ExecutionException(exception.get()); - } - return content; - } - - /** - * Is the Future still valid - * - * @return true if response has expired and should be terminated. - */ - public boolean hasExpired() { - return responseTimeoutInMs != -1 && ((millisTime() - touch.get()) >= responseTimeoutInMs); - } - - public void touch() { - touch.set(millisTime()); - } - - public Request getRequest() { - return request; - } - - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean getAndSetWriteHeaders(boolean writeHeaders) { - boolean b = this.writeHeaders; - this.writeHeaders = writeHeaders; - return b; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean getAndSetWriteBody(boolean writeBody) { - boolean b = this.writeBody; - this.writeBody = writeBody; - return b; - } -} diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java deleted file mode 100644 index 21f9491565..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseHeaders.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseHeaders; -import org.apache.commons.httpclient.Header; -import org.apache.commons.httpclient.HttpMethodBase; - -import java.net.URI; - -/** - * A class that represent the HTTP headers. - */ -public class ApacheResponseHeaders extends HttpResponseHeaders { - - private final HttpMethodBase method; - private final FluentCaseInsensitiveStringsMap headers; - - public ApacheResponseHeaders(URI uri, HttpMethodBase method, AsyncHttpProvider provider) { - super(uri, provider, false); - this.method = method; - headers = computerHeaders(); - } - - private FluentCaseInsensitiveStringsMap computerHeaders() { - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - - Header[] uh = method.getResponseHeaders(); - - for (Header e : uh) { - if (e.getName() != null) { - h.add(e.getName(), e.getValue()); - } - } - - uh = method.getResponseFooters(); - for (Header e : uh) { - if (e.getName() != null) { - h.add(e.getName(), e.getValue()); - } - } - - return h; - } - - /** - * Return the HTTP header - * - * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap} - */ - @Override - public FluentCaseInsensitiveStringsMap getHeaders() { - return headers; - } -} \ No newline at end of file diff --git a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java b/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java deleted file mode 100644 index 804275a1f8..0000000000 --- a/providers/apache/src/main/java/org/asynchttpclient/providers/apache/ApacheResponseStatus.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.apache; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseStatus; -import org.apache.commons.httpclient.HttpMethodBase; - -import java.net.URI; - -/** - * A class that represent the HTTP response' status line (code + text) - */ -public class ApacheResponseStatus extends HttpResponseStatus { - - private final HttpMethodBase method; - - public ApacheResponseStatus(URI uri, HttpMethodBase method, AsyncHttpProvider provider) { - super(uri, provider); - this.method = method; - } - - /** - * Return the response status code - * - * @return the response status code - */ - public int getStatusCode() { - return method.getStatusCode(); - } - - /** - * Return the response status text - * - * @return the response status text - */ - public String getStatusText() { - return method.getStatusText(); - } - - @Override - public String getProtocolName() { - return method.getStatusLine().getHttpVersion(); - } - - @Override - public int getProtocolMajorVersion() { - return 1; //TODO - } - - @Override - public int getProtocolMinorVersion() { - return 1; //TODO - } - - @Override - public String getProtocolText() { - return ""; //TODO - } - -} \ No newline at end of file diff --git a/providers/pom.xml b/providers/pom.xml index 5ddc04f8c6..64f8d23763 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -44,7 +44,6 @@ - apache grizzly netty From 99894b7e51d389af6959282d894a9243d45f55fd Mon Sep 17 00:00:00 2001 From: slandelle Date: Mon, 2 Sep 2013 16:23:16 +0200 Subject: [PATCH 0507/2844] Fix NPE --- .../providers/netty4/NettyAsyncHttpProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java index b331f6a61d..28a8a7184b 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java @@ -75,7 +75,7 @@ public void close() { isClose.set(true); try { channels.close(); - config.executorService().shutdown(); +// config.executorService().shutdown(); config.reaper().shutdown(); } catch (Throwable t) { LOGGER.warn("Unexpected error on close", t); From f5adef08f7fa7e8384c75e16e8929b2121278721 Mon Sep 17 00:00:00 2001 From: slandelle Date: Mon, 2 Sep 2013 23:27:36 +0200 Subject: [PATCH 0508/2844] Upgrade surefire, 2.12 causing malloc crashes --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5227949fc5..096d117982 100644 --- a/pom.xml +++ b/pom.xml @@ -584,7 +584,7 @@ 1.6 1.6 - 2.12 + 2.16 From 10b8ad8558e75618cdcccea74f91f1e71f7030ea Mon Sep 17 00:00:00 2001 From: slandelle Date: Mon, 2 Sep 2013 23:28:29 +0200 Subject: [PATCH 0509/2844] Properly configure provider when using a SimpleClient --- .../test/java/org/asynchttpclient/async/BasicAuthTest.java | 5 ++++- .../java/org/asynchttpclient/async/ProxyTunnellingTest.java | 4 +++- .../asynchttpclient/async/SimpleAsyncHttpClientTest.java | 1 - .../providers/grizzly/GrizzlyBasicAuthTest.java | 5 ++++- .../providers/grizzly/GrizzlyProxyTunnelingTest.java | 4 ++++ .../asynchttpclient/providers/netty/ResponseBodyPart.java | 1 + .../asynchttpclient/providers/netty/NettyBasicAuthTest.java | 6 +++++- .../providers/netty/NettyProxyTunnellingTest.java | 4 ++++ .../java/org/asynchttpclient/providers/netty4/Channels.java | 2 +- .../providers/netty4/NettyBasicAuthTest.java | 6 ++++++ .../providers/netty4/NettyProxyTunnellingTest.java | 5 +++++ .../providers/netty4/NettyRedirectConnectionUsageTest.java | 1 - 12 files changed, 37 insertions(+), 7 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index 2a277caa2b..7638571cca 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -48,6 +48,7 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; @@ -72,6 +73,8 @@ public abstract class BasicAuthTest extends AbstractBasicTest { protected final static String admin = "admin"; private Server server2; + + public abstract String getProviderClass(); @BeforeClass(alwaysRun = true) @Override @@ -475,7 +478,7 @@ public AbstractHandler configureHandler() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void stringBuilderBodyConsumerTest() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setRealmPrincipal(user).setRealmPassword(admin).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setRealmPrincipal(user).setRealmPassword(admin).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { StringBuilder s = new StringBuilder(); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index 61a2bc551e..1b29a99f07 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -45,6 +45,8 @@ public abstract class ProxyTunnellingTest extends AbstractBasicTest { private Server server2; + public abstract String getProviderClass(); + public AbstractHandler configureHandler() throws Exception { ProxyHandler proxy = new ProxyHandler(); return proxy; @@ -152,7 +154,7 @@ public Response onCompleted(Response response) throws Exception { @Test(groups = { "online", "default_provider" }) public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProxyProtocol(ProxyServer.Protocol.HTTPS).setProxyHost("127.0.0.1").setProxyPort(port1).setFollowRedirects(true).setUrl(getTargetUrl2()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setProxyProtocol(ProxyServer.Protocol.HTTPS).setProxyHost("127.0.0.1").setProxyPort(port1).setFollowRedirects(true).setUrl(getTargetUrl2()).setHeader("Content-Type", "text/html").build(); try { Response r = client.get().get(); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index 2d7d8e84f4..58265ff379 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -27,7 +27,6 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; -import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import static junit.framework.Assert.assertTrue; diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java index 06bd657f24..f7551168fd 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java @@ -19,10 +19,13 @@ public class GrizzlyBasicAuthTest extends BasicAuthTest { - @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } + @Override + public String getProviderClass() { + return GrizzlyAsyncHttpProvider.class.getName(); + } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java index eb6f39cd23..434cda5730 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyProxyTunnelingTest.java @@ -24,4 +24,8 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } + @Override + public String getProviderClass() { + return GrizzlyAsyncHttpProvider.class.getName(); + } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java index b8d6411d8f..7f138bbc36 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java @@ -45,6 +45,7 @@ public class ResponseBodyPart extends HttpResponseBodyPart { /** * Constructor used for non-chunked GET requests and HEAD requests. */ + // FIXME Why notify with a null chunk??? public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, boolean last) { this(uri, response, provider, null, last); } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java index f8c7d3662d..bce0962953 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java @@ -16,7 +16,6 @@ import java.util.concurrent.TimeoutException; import org.testng.annotations.Test; - import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.BasicAuthTest; @@ -29,6 +28,11 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } + @Override + public String getProviderClass() { + return NettyAsyncHttpProvider.class.getName(); + } + @Override @Test public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java index a862e9ee8f..396964f8cd 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProxyTunnellingTest.java @@ -21,4 +21,8 @@ public class NettyProxyTunnellingTest extends ProxyTunnellingTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } + + public String getProviderClass() { + return NettyAsyncHttpProvider.class.getName(); + } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java index 3fa4d6751c..fb4c15fba9 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java @@ -238,7 +238,6 @@ public Bootstrap getBootstrap(String url, boolean useSSl) { public void close() { connectionsPool.destroy(); - openChannels.close(); for (Channel channel : openChannels) { Object attribute = getDefaultAttribute(channel); if (attribute instanceof NettyResponseFuture) { @@ -246,6 +245,7 @@ public void close() { future.setReaperFuture(null); } } + openChannels.close(); if (this.allowReleaseSocketChannelFactory) { eventLoop.shutdownGracefully(); } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java index 749cf76f2c..971fe6b107 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java @@ -15,6 +15,7 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.BasicAuthTest; +import org.asynchttpclient.providers.netty4.NettyAsyncHttpProvider; public class NettyBasicAuthTest extends BasicAuthTest { @@ -22,4 +23,9 @@ public class NettyBasicAuthTest extends BasicAuthTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } + + @Override + public String getProviderClass() { + return NettyAsyncHttpProvider.class.getName(); + } } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java index 52c21987bc..736b9d3699 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java @@ -15,10 +15,15 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.ProxyTunnellingTest; +import org.asynchttpclient.providers.netty4.NettyAsyncHttpProvider; public class NettyProxyTunnellingTest extends ProxyTunnellingTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } + + public String getProviderClass() { + return NettyAsyncHttpProvider.class.getName(); + } } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java index 1283f47f60..e0e99cff6a 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java @@ -16,7 +16,6 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.RedirectConnectionUsageTest; -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override From 3ab0c6051286dca4f04e82b938a7cccdbfcc88e4 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 00:18:08 +0200 Subject: [PATCH 0510/2844] Add description --- extras/jdeferred/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/extras/jdeferred/pom.xml b/extras/jdeferred/pom.xml index c79702732e..b1db2e59f1 100644 --- a/extras/jdeferred/pom.xml +++ b/extras/jdeferred/pom.xml @@ -22,6 +22,7 @@ .. async-http-client-extras-jdeferred + The Async Http Client jDeffered Extras. org.jdeferred From 68ef9dea37ebf958ac32dfd46245a24d924ed5e4 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 00:18:33 +0200 Subject: [PATCH 0511/2844] Make BasicHttpsTest threadsafe! --- .../asynchttpclient/async/BasicHttpsTest.java | 77 +++++++++---------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index 619f523223..1aa8dc5581 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -207,7 +207,7 @@ public void setUpGlobal() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void zeroCopyPostTest() throws Throwable { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { ClassLoader cl = getClass().getClassLoader(); // override system properties @@ -226,7 +226,7 @@ public void zeroCopyPostTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void multipleSSLRequestsTest() throws Throwable { - final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).build()); + final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { String body = "hello there"; @@ -246,7 +246,7 @@ public void multipleSSLRequestsTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void multipleSSLWithoutCacheTest() throws Throwable { - final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).setAllowSslConnectionPool(false).build()); + final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).setAllowSslConnectionPool(false).build()); try { String body = "hello there"; c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute(); @@ -263,40 +263,36 @@ public void multipleSSLWithoutCacheTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void reconnectsAfterFailedCertificationPath() throws Throwable { - final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext()).build()); + AtomicBoolean trusted = new AtomicBoolean(false); + final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(trusted)).build()); try { final String body = "hello there"; - TRUST_SERVER_CERT.set(false); + // first request fails because server certificate is rejected try { - // first request fails because server certificate is rejected - try { - c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (final ExecutionException e) { - Throwable cause = e.getCause(); - if (cause instanceof ConnectException) { - assertNotNull(cause.getCause()); - assertTrue(cause.getCause() instanceof SSLHandshakeException); - } else { - assertTrue(cause instanceof SSLHandshakeException); - } + c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (final ExecutionException e) { + Throwable cause = e.getCause(); + if (cause instanceof ConnectException) { + assertNotNull(cause.getCause()); + assertTrue(cause.getCause() instanceof SSLHandshakeException); + } else { + assertTrue(cause instanceof SSLHandshakeException); } + } - TRUST_SERVER_CERT.set(true); + trusted.set(true); - // second request should succeed - final Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); + // second request should succeed + final Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); - assertEquals(response.getResponseBody(), body); - } finally { - TRUST_SERVER_CERT.set(true); - } + assertEquals(response.getResponseBody(), body); } finally { c.close(); } } - private static SSLContext createSSLContext() { + private static SSLContext createSSLContext(AtomicBoolean trusted) { try { InputStream keyStoreStream = BasicHttpsTest.class.getResourceAsStream("ssltest-cacerts.jks"); char[] keyStorePassword = "changeit".toCharArray(); @@ -310,7 +306,7 @@ private static SSLContext createSSLContext() { // Initialize the SSLContext to work with our key managers. KeyManager[] keyManagers = kmf.getKeyManagers(); - TrustManager[] trustManagers = new TrustManager[] { DUMMY_TRUST_MANAGER }; + TrustManager[] trustManagers = new TrustManager[] { dummyTrustManager(trusted) }; SecureRandom secureRandom = new SecureRandom(); SSLContext sslContext = SSLContext.getInstance("TLS"); @@ -322,20 +318,21 @@ private static SSLContext createSSLContext() { } } - private static final AtomicBoolean TRUST_SERVER_CERT = new AtomicBoolean(true); - private static final TrustManager DUMMY_TRUST_MANAGER = new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - if (!TRUST_SERVER_CERT.get()) { - throw new CertificateException("Server certificate not trusted."); - } - } - }; + private static final TrustManager dummyTrustManager(final AtomicBoolean trusted) { + return new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + } + + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + if (!trusted.get()) { + throw new CertificateException("Server certificate not trusted."); + } + } + }; + } } From 59494b7c323806055f8ee00d537224269bb7f79e Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 10:23:34 +0200 Subject: [PATCH 0512/2844] Clean up pom --- pom.xml | 143 ++++++++++++++++++++------------------------------------ 1 file changed, 50 insertions(+), 93 deletions(-) diff --git a/pom.xml b/pom.xml index 096d117982..8587006ded 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,6 @@ - + org.sonatype.oss oss-parent @@ -281,75 +280,28 @@ - - + + @@ -376,8 +328,10 @@ 1.0.3 - -hdf project.name "${project.name} ${project.version}" - -d ${project.reporting.outputDirectory}/apidocs + -hdf project.name "${project.name} + ${project.version}" + -d + ${project.reporting.outputDirectory}/apidocs @@ -460,8 +414,7 @@ test-output - false - + false @@ -499,92 +452,96 @@ ch.qos.logback logback-classic - 1.0.13 + ${logback.version} test log4j log4j - 1.2.13 + ${log4j.version} test org.testng testng - 5.8 + ${testng.version} test - jdk15 org.eclipse.jetty jetty-server - 8.1.1.v20120215 + ${jetty.version} test org.eclipse.jetty jetty-servlet - 8.1.1.v20120215 + ${jetty.version} test org.eclipse.jetty jetty-websocket - 8.1.1.v20120215 + ${jetty.version} test org.eclipse.jetty jetty-servlets - 8.1.1.v20120215 + ${jetty.version} test org.eclipse.jetty jetty-security - 8.1.1.v20120215 + ${jetty.version} test org.apache.tomcat coyote - 6.0.29 + ${tomcat.version} test org.apache.tomcat catalina - 6.0.29 + ${tomcat.version} test - servlet-api org.apache.tomcat + servlet-api commons-io commons-io - 2.0.1 + ${commons-io.version} test commons-fileupload commons-fileupload - 1.2.2 + ${commons-fileupload.version} test - - http://oss.sonatype.org/content/repositories/snapshots - + http://oss.sonatype.org/content/repositories/snapshots true 1.6 1.6 2.16 + 1.0.13 + 1.2.17 + 6.8.5 + 8.1.1.v20120215 + 6.0.29 + 2.4 + 1.3 From c8795e5d528080cf053d64480b13877c7820da83 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 10:23:45 +0200 Subject: [PATCH 0513/2844] Make NettyTransferAdapter thread safe --- .../providers/netty4/NettyTransferAdapter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java index fdeb04587c..e388e64545 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java @@ -5,6 +5,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; +import java.util.concurrent.atomic.AtomicInteger; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.listener.TransferCompletionHandler; @@ -13,7 +14,7 @@ class NettyTransferAdapter extends TransferCompletionHandler.TransferAdapter { private final ByteBuf content; private final FileInputStream file; - private int byteRead = 0; + private AtomicInteger byteRead = new AtomicInteger(0); public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ByteBuf content, File file) throws IOException { super(headers); @@ -28,11 +29,10 @@ public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ByteBuf con @Override public void getBytes(byte[] bytes) { if (content.writableBytes() != 0) { - content.getBytes(byteRead, bytes); - byteRead += bytes.length; + content.getBytes(byteRead.getAndAdd(bytes.length), bytes); } else if (file != null) { try { - byteRead += file.read(bytes); + byteRead.getAndAdd(file.read(bytes)); } catch (IOException e) { NettyAsyncHttpProvider.LOGGER.error(e.getMessage(), e); } From bed6e1f30a88a25d8b79ce7ba7da605f27aabbce Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 14:36:02 +0200 Subject: [PATCH 0514/2844] Minor clean up --- .../asynchttpclient/filter/FilterContext.java | 2 +- .../org/asynchttpclient/async/ProxyTest.java | 6 +++- extras/jdeferred/pom.xml | 1 + .../providers/netty/NettyBasicAuthTest.java | 11 +------- .../providers/netty4/Channels.java | 28 +++++++++++-------- .../providers/netty4/NettyChannelHandler.java | 2 ++ .../providers/netty4/NettyRequestSender.java | 1 + .../providers/netty4/Protocol.java | 2 +- 8 files changed, 29 insertions(+), 24 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/filter/FilterContext.java b/api/src/main/java/org/asynchttpclient/filter/FilterContext.java index 5a5dc14001..dfc6f9de22 100644 --- a/api/src/main/java/org/asynchttpclient/filter/FilterContext.java +++ b/api/src/main/java/org/asynchttpclient/filter/FilterContext.java @@ -23,7 +23,7 @@ * A {@link FilterContext} can be used to decorate {@link Request} and {@link AsyncHandler} from a list of {@link RequestFilter}. * {@link RequestFilter} gets executed before the HTTP request is made to the remote server. Once the response bytes are * received, a {@link FilterContext} is then passed to the list of {@link ResponseFilter}. {@link ResponseFilter} - * gets invoked before the response gets processed, e.g. before authorization, redirection and invokation of {@link AsyncHandler} + * gets invoked before the response gets processed, e.g. before authorization, redirection and invocation of {@link AsyncHandler} * gets processed. *

* Invoking {@link FilterContext#getResponseStatus()} returns an instance of {@link HttpResponseStatus} diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java index 1af6c073f1..2cbb8e3677 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java @@ -150,6 +150,7 @@ public void testProxyProperties() throws IOException, ExecutionException, Timeou Properties props = new Properties(); props.putAll(originalProps); + // FIXME most likely non threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -189,6 +190,7 @@ public void testIgnoreProxyPropertiesByDefault() throws IOException, ExecutionEx Properties props = new Properties(); props.putAll(originalProps); + // FIXME most likely non threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -220,6 +222,7 @@ public void testProxyActivationProperty() throws IOException, ExecutionException Properties props = new Properties(); props.putAll(originalProps); + // FIXME most likely non threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -259,6 +262,7 @@ public void testWildcardNonProxyHosts() throws IOException, ExecutionException, Properties props = new Properties(); props.putAll(originalProps); + // FIXME most likely non threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -323,8 +327,8 @@ public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { client.close(); } } finally { + // FIXME is this threadsafe??? ProxySelector.setDefault(originalProxySelector); } } - } diff --git a/extras/jdeferred/pom.xml b/extras/jdeferred/pom.xml index b1db2e59f1..af6ddab2ad 100644 --- a/extras/jdeferred/pom.xml +++ b/extras/jdeferred/pom.xml @@ -22,6 +22,7 @@ .. async-http-client-extras-jdeferred + Async Http Client jDeffered Extras The Async Http Client jDeffered Extras. diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java index bce0962953..d824606453 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java @@ -12,13 +12,10 @@ */ package org.asynchttpclient.providers.netty; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; - -import org.testng.annotations.Test; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.BasicAuthTest; +import org.testng.annotations.Test; @Test public class NettyBasicAuthTest extends BasicAuthTest { @@ -32,10 +29,4 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { public String getProviderClass() { return NettyAsyncHttpProvider.class.getName(); } - - @Override - @Test - public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { - super.redirectAndBasicAuthTest(); // To change body of overridden methods use File | Settings | File Templates. - } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java index fb4c15fba9..a6805581af 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java @@ -25,6 +25,7 @@ import io.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; import io.netty.handler.ssl.SslHandler; import io.netty.handler.stream.ChunkedWriteHandler; +import io.netty.util.Attribute; import io.netty.util.AttributeKey; import java.io.IOException; @@ -66,7 +67,7 @@ public class Channels { private final AsyncHttpClientConfig config; private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; - private EventLoopGroup eventLoop; + private EventLoopGroup eventLoopGroup; private final Class socketChannelFactory; private final boolean allowReleaseSocketChannelFactory; @@ -109,12 +110,12 @@ public Channels(final AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig this.allowReleaseSocketChannelFactory = false; } else { socketChannelFactory = NioSocketChannel.class; - eventLoop = asyncHttpProviderConfig.getEventLoopGroup(); - if (eventLoop == null) { + eventLoopGroup = asyncHttpProviderConfig.getEventLoopGroup(); + if (eventLoopGroup == null) { if (socketChannelFactory == OioSocketChannel.class) { - eventLoop = new OioEventLoopGroup(); + eventLoopGroup = new OioEventLoopGroup(); } else if (socketChannelFactory == NioSocketChannel.class) { - eventLoop = new NioEventLoopGroup(); + eventLoopGroup = new NioEventLoopGroup(); } else { throw new IllegalArgumentException("No set event loop compatbile with socket channel " + scf); } @@ -125,10 +126,10 @@ public Channels(final AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig } } - plainBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop); - secureBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop); - webSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop); - secureWebSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoop); + plainBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); + secureBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); + webSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); + secureWebSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); // This is dangerous as we can't catch a wrong typed ConnectionsPool ConnectionsPool cp = (ConnectionsPool) config.getConnectionsPool(); @@ -247,7 +248,7 @@ public void close() { } openChannels.close(); if (this.allowReleaseSocketChannelFactory) { - eventLoop.shutdownGracefully(); + eventLoopGroup.shutdownGracefully(); } } @@ -494,7 +495,12 @@ public static Object getDefaultAttribute(Channel channel) { } public static Object getDefaultAttribute(ChannelHandlerContext ctx) { - return ctx.attr(DEFAULT_ATTRIBUTE).get(); + if (ctx == null) { + // ctx might be null if the channel never reached the handler + return null; + } + Attribute attr = ctx.attr(DEFAULT_ATTRIBUTE); + return attr != null ? attr.get() : null; } public static void setDefaultAttribute(Channel channel, Object o) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index c35e985be7..570b53cfde 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -835,6 +835,8 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object LOGGER.debug("UpgradeHandler returned a null NettyWebSocket "); } } + } else if (e instanceof LastHttpContent) { + // FIXME what to do with this kind of messages? } else { LOGGER.error("Invalid message {}", e); } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java index 92572ccc74..87386a1ea1 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java @@ -340,6 +340,7 @@ protected final void writeRequest(final Channel channel, final AsyncHttpClie if (Channels.getSslHandler(channel) != null) { writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, Constants.MAX_BUFFERED_BYTES), channel.newProgressivePromise()); } else { + // FIXME why not use io.netty.channel.DefaultFileRegion? FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); writeFuture = channel.write(region, channel.newProgressivePromise()); } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java index 19e62a52d9..57445877e8 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java @@ -16,7 +16,7 @@ public interface Protocol{ - void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object message) throws Exception; + void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object message) throws Exception; void onError(ChannelHandlerContext ctx, Throwable error); From 425c86201f4145171b27c6a0ca0256339812f4f1 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 15:51:41 +0200 Subject: [PATCH 0515/2844] Close clients in test! and in finally blocks! --- .../async/AsyncProvidersBasicTest.java | 16 ++-- .../async/BodyDeferringAsyncHandlerTest.java | 46 +++++----- .../asynchttpclient/async/ChunkingTest.java | 28 +++---- .../async/RedirectConnectionUsageTest.java | 34 +++----- .../asynchttpclient/async/RemoteSiteTest.java | 12 +-- .../async/SimpleAsyncHttpClientTest.java | 5 +- .../async/WebDavBasicTest.java | 9 +- .../websocket/ByteMessageTest.java | 84 ++++++++++--------- 8 files changed, 121 insertions(+), 113 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index c2564716f0..e5a8d4a503 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1704,12 +1704,16 @@ public void asyncHttpClientConfigBeanTest() throws Exception { @Test(groups = { "default_provider", "async" }) public void bodyAsByteTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); - Response r = client.prepareGet(getTargetUrl()).execute().get(); - - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getResponseBodyAsBytes(), new byte[] {}); - - client.close(); + try { + Response r = client.prepareGet(getTargetUrl()).execute().get(); + + assertEquals(r.getStatusCode(), 200); + assertEquals(r.getResponseBodyAsBytes(), new byte[] {}); + + client.close(); + } finally { + client.close(); + } } @Test(groups = { "default_provider", "async" }) diff --git a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java index e6bf47bf9e..cf8a8c9934 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java @@ -214,29 +214,32 @@ public void deferredInputStreamTrick() throws IOException, ExecutionException, T @Test(groups = { "standalone", "default_provider" }) public void deferredInputStreamTrickWithFailure() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredInputStreamTrickWithFailure").addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); - - PipedOutputStream pos = new PipedOutputStream(); - PipedInputStream pis = new PipedInputStream(pos); - BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(pos); - - Future f = r.execute(bdah); - - BodyDeferringInputStream is = new BodyDeferringInputStream(f, bdah, pis); - - Response resp = is.getAsapResponse(); - assertNotNull(resp); - assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); - // "consume" the body, but our code needs input stream - CountingOutputStream cos = new CountingOutputStream(); + try { - copy(is, cos); - Assert.fail("InputStream consumption should fail with IOException!"); - } catch (IOException e) { - // good! + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredInputStreamTrickWithFailure").addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); + PipedOutputStream pos = new PipedOutputStream(); + PipedInputStream pis = new PipedInputStream(pos); + BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(pos); + + Future f = r.execute(bdah); + + BodyDeferringInputStream is = new BodyDeferringInputStream(f, bdah, pis); + + Response resp = is.getAsapResponse(); + assertNotNull(resp); + assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); + assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + // "consume" the body, but our code needs input stream + CountingOutputStream cos = new CountingOutputStream(); + try { + copy(is, cos); + Assert.fail("InputStream consumption should fail with IOException!"); + } catch (IOException e) { + // good! + } + } finally { + client.close(); } - client.close(); } @Test(groups = { "standalone", "default_provider" }) @@ -259,5 +262,4 @@ public void testConnectionRefused() throws IOException, ExecutionException, Time client.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index c4b008ec77..efffe05660 100644 --- a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -73,20 +73,19 @@ abstract public class ChunkingTest extends AbstractBasicTest { */ @Test() public void testCustomChunking() throws Throwable { - AsyncHttpClient c = null; + AsyncHttpClientConfig.Builder bc = + new AsyncHttpClientConfig.Builder(); + + bc.setAllowPoolingConnection(true); + bc.setMaximumConnectionsPerHost(1); + bc.setMaximumConnectionsTotal(1); + bc.setConnectionTimeoutInMs(1000); + bc.setRequestTimeoutInMs(1000); + bc.setFollowRedirects(true); + + + AsyncHttpClient c = getAsyncHttpClient(bc.build()); try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); - - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsPerHost(1); - bc.setMaximumConnectionsTotal(1); - bc.setConnectionTimeoutInMs(1000); - bc.setRequestTimeoutInMs(1000); - bc.setFollowRedirects(true); - - - c = getAsyncHttpClient(bc.build()); RequestBuilder builder = new RequestBuilder("POST"); builder.setUrl(getTargetUrl()); @@ -119,7 +118,7 @@ public void testCustomChunking() throws Throwable { } } finally { - if (c != null) c.close(); + c.close(); } } @@ -163,5 +162,4 @@ private static File getTestFile() { return testResource1File; } - } diff --git a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java index ee1c0c1065..2691ad3f38 100644 --- a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java @@ -104,19 +104,18 @@ public void tearDown() { @Test public void testGetRedirectFinalUrl() { - AsyncHttpClient c = null; + AsyncHttpClientConfig.Builder bc = + new AsyncHttpClientConfig.Builder(); + + bc.setAllowPoolingConnection(true); + bc.setMaximumConnectionsPerHost(1); + bc.setMaximumConnectionsTotal(1); + bc.setConnectionTimeoutInMs(1000); + bc.setRequestTimeoutInMs(1000); + bc.setFollowRedirects(true); + + AsyncHttpClient c = getAsyncHttpClient(bc.build()); try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); - - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsPerHost(1); - bc.setMaximumConnectionsTotal(1); - bc.setConnectionTimeoutInMs(1000); - bc.setRequestTimeoutInMs(1000); - bc.setFollowRedirects(true); - - c = getAsyncHttpClient(bc.build()); RequestBuilder builder = new RequestBuilder("GET"); builder.setUrl(servletEndpointRedirectUrl); @@ -138,14 +137,9 @@ public void testGetRedirectFinalUrl() { fail("Should not get here, The request threw an exception"); } - - } - finally { - // can hang here - if (c != null) c.close(); + } finally { + c.close(); } - - } protected abstract AsyncHttpProviderConfig getProviderConfig(); @@ -182,6 +176,4 @@ public void service(HttpServletRequest req, HttpServletResponse res) throws Serv os.close(); } } - - } diff --git a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java index 8e609af81d..f94ff385a3 100644 --- a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java @@ -90,10 +90,13 @@ public void testMicrosoftCom() throws Throwable { @Test(groups = { "online", "default_provider" }) public void testWwwMicrosoftCom() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); - - Response response = c.prepareGet("http://www.microsoft.com/").execute().get(10, TimeUnit.SECONDS); - assertNotNull(response); - assertEquals(response.getStatusCode(), 302); + try { + Response response = c.prepareGet("http://www.microsoft.com/").execute().get(10, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(response.getStatusCode(), 302); + } finally { + c.close(); + } } @Test(groups = { "online", "default_provider" }) @@ -298,5 +301,4 @@ public Response onCompleted() throws Exception { c.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index 58265ff379..d5849b1dad 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -217,11 +217,14 @@ public void onBytesReceived(String url, long amount, long current, long total) { @Test(groups = { "standalone", "default_provider" }) public void testNullUrl() throws Exception { + SimpleAsyncHttpClient client = null; try { - new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).build().derive().build(); + client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).build().derive().build(); assertTrue(true); } catch (NullPointerException ex) { fail(); + } finally { + if (client != null) client.close(); } } diff --git a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index fb8d5abff4..4d5374d447 100644 --- a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -83,9 +83,12 @@ protected String getTargetUrl() { @AfterMethod(alwaysRun = true) public void clean() throws InterruptedException, Exception { AsyncHttpClient c = getAsyncHttpClient(null); - - Request deleteRequest = new RequestBuilder("DELETE").setUrl(getTargetUrl()).build(); - c.executeRequest(deleteRequest).get(); + try { + Request deleteRequest = new RequestBuilder("DELETE").setUrl(getTargetUrl()).build(); + c.executeRequest(deleteRequest).get(); + } finally { + c.close(); + } } @AfterClass(alwaysRun = true) diff --git a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java index f9086515c7..8676d63628 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java @@ -214,46 +214,50 @@ public void onFragment(byte[] fragment, boolean last) { public void echoFragments() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); - final CountDownLatch latch = new CountDownLatch(1); - final AtomicReference text = new AtomicReference(null); - - WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - - @Override - public void onOpen(WebSocket websocket) { - } - - @Override - public void onClose(WebSocket websocket) { - latch.countDown(); - } - - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - - @Override - public void onMessage(byte[] message) { - if (text.get() == null) { - text.set(message); - } else { - byte[] n = new byte[text.get().length + message.length]; - System.arraycopy(text.get(), 0, n, 0, text.get().length); - System.arraycopy(message, 0, n, text.get().length, message.length); - text.set(n); + try { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicReference text = new AtomicReference(null); + + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + + @Override + public void onOpen(WebSocket websocket) { } - latch.countDown(); - } - - @Override - public void onFragment(byte[] fragment, boolean last) { - } - }).build()).get(); - websocket.stream("ECHO".getBytes(), false); - websocket.stream("ECHO".getBytes(), true); - latch.await(); - assertEquals(text.get(), "ECHOECHO".getBytes()); + + @Override + public void onClose(WebSocket websocket) { + latch.countDown(); + } + + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + + @Override + public void onMessage(byte[] message) { + if (text.get() == null) { + text.set(message); + } else { + byte[] n = new byte[text.get().length + message.length]; + System.arraycopy(text.get(), 0, n, 0, text.get().length); + System.arraycopy(message, 0, n, text.get().length, message.length); + text.set(n); + } + latch.countDown(); + } + + @Override + public void onFragment(byte[] fragment, boolean last) { + } + }).build()).get(); + websocket.stream("ECHO".getBytes(), false); + websocket.stream("ECHO".getBytes(), true); + latch.await(); + assertEquals(text.get(), "ECHOECHO".getBytes()); + } finally { + c.close(); + } } } From 9d62925ff7bd1144f6b138f4bbd47d33e375f935 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 3 Sep 2013 10:26:29 -0700 Subject: [PATCH 0516/2844] Call setMaxPendingBytesPerConnection() at the right time. --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 0f7e66ac94..c91c1af7a6 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -359,7 +359,8 @@ public void onTimeout(Connection connection) { secure.add(clientFilter); secure.add(new WebSocketClientFilter()); - + clientTransport.getAsyncQueueIO().getWriter() + .setMaxPendingBytesPerConnection(AUTO_SIZE); if (providerConfig != null) { final TransportCustomizer customizer = (TransportCustomizer) providerConfig.getProperty(Property.TRANSPORT_CUSTOMIZER); @@ -383,10 +384,6 @@ public void onTimeout(Connection connection) { .setClientSideNegotiator(clientTransport, pn); } - // Don't limit the number of bytes the client can have queued to write. - clientTransport.getAsyncQueueIO().getWriter() - .setMaxPendingBytesPerConnection(AUTO_SIZE); - // Install the HTTP filter chain. //clientTransport.setProcessor(fcb.build()); FilterChainBuilder nonSecure = FilterChainBuilder.stateless(); From 6a92c2d3fefaa23cd6fef20492e58a569f49f35c Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 21:12:14 +0200 Subject: [PATCH 0517/2844] Remove EntityWriter, close #372 --- .../org/asynchttpclient/AsyncHttpClient.java | 10 ---- .../java/org/asynchttpclient/Request.java | 16 ------ .../org/asynchttpclient/RequestBuilder.java | 12 ---- .../asynchttpclient/RequestBuilderBase.java | 23 -------- .../providers/jdk/JDKAsyncHttpProvider.java | 7 --- .../async/AsyncProvidersBasicTest.java | 51 ----------------- .../bodyhandler/BodyHandlerFactory.java | 1 - .../bodyhandler/EntityWriterBodyHandler.java | 57 ------------------- .../netty/NettyAsyncHttpProvider.java | 16 +----- .../providers/netty4/NettyRequests.java | 24 -------- 10 files changed, 1 insertion(+), 216 deletions(-) delete mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java index 4a8661a3b5..bc5c170d7d 100755 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -316,16 +316,6 @@ public BoundRequestBuilder setBody(byte[] data) throws IllegalArgumentException return super.setBody(data); } - @Override - public BoundRequestBuilder setBody(Request.EntityWriter dataWriter, long length) throws IllegalArgumentException { - return super.setBody(dataWriter, length); - } - - @Override - public BoundRequestBuilder setBody(Request.EntityWriter dataWriter) { - return super.setBody(dataWriter); - } - @Override public BoundRequestBuilder setBody(InputStream stream) throws IllegalArgumentException { return super.setBody(stream); diff --git a/api/src/main/java/org/asynchttpclient/Request.java b/api/src/main/java/org/asynchttpclient/Request.java index 34b41bcb27..2c68f6df5b 100644 --- a/api/src/main/java/org/asynchttpclient/Request.java +++ b/api/src/main/java/org/asynchttpclient/Request.java @@ -17,9 +17,7 @@ package org.asynchttpclient; import java.io.File; -import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.net.InetAddress; import java.net.URI; import java.util.Collection; @@ -38,13 +36,6 @@ */ public interface Request { - /** - * An entity that can be used to manipulate the Request's body output before it get sent. - */ - public static interface EntityWriter { - public void writeEntity(OutputStream out) throws IOException; - } - /** * Return the request's method name (GET, POST, etc.) * @@ -122,13 +113,6 @@ public static interface EntityWriter { */ public InputStream getStreamData(); - /** - * Return the current request's body as an EntityWriter - * - * @return an EntityWriter representation of the current request's body. - */ - public EntityWriter getEntityWriter(); - /** * Return the current request's body generator. * diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilder.java b/api/src/main/java/org/asynchttpclient/RequestBuilder.java index b1b608284b..034249a5a7 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilder.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilder.java @@ -15,8 +15,6 @@ */ package org.asynchttpclient; -import org.asynchttpclient.Request.EntityWriter; - import java.io.InputStream; import java.util.Collection; import java.util.Map; @@ -88,16 +86,6 @@ public RequestBuilder setBody(byte[] data) throws IllegalArgumentException { return super.setBody(data); } - @Override - public RequestBuilder setBody(EntityWriter dataWriter, long length) throws IllegalArgumentException { - return super.setBody(dataWriter, length); - } - - @Override - public RequestBuilder setBody(EntityWriter dataWriter) { - return super.setBody(dataWriter); - } - /** * Deprecated - Use setBody(new InputStreamBodyGenerator(inputStream)). * diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java index e082ea8741..c1bbc4b289 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -17,7 +17,6 @@ import static org.asynchttpclient.util.MiscUtil.isNonEmpty; -import org.asynchttpclient.Request.EntityWriter; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.asynchttpclient.util.UTF8UrlEncoder; import org.slf4j.Logger; @@ -59,7 +58,6 @@ private static final class RequestImpl implements Request { private byte[] byteData; private String stringData; private InputStream streamData; - private EntityWriter entityWriter; private BodyGenerator bodyGenerator; private FluentStringsMap params; private List parts; @@ -91,7 +89,6 @@ public RequestImpl(Request prototype) { this.byteData = prototype.getByteData(); this.stringData = prototype.getStringData(); this.streamData = prototype.getStreamData(); - this.entityWriter = prototype.getEntityWriter(); this.bodyGenerator = prototype.getBodyGenerator(); this.params = (prototype.getParams() == null ? null : new FluentStringsMap(prototype.getParams())); this.queryParams = (prototype.getQueryParams() == null ? null : new FluentStringsMap(prototype.getQueryParams())); @@ -247,11 +244,6 @@ public InputStream getStreamData() { return streamData; } - /* @Override */ - public EntityWriter getEntityWriter() { - return entityWriter; - } - /* @Override */ public BodyGenerator getBodyGenerator() { return bodyGenerator; @@ -497,7 +489,6 @@ private void resetNonMultipartData() { request.byteData = null; request.stringData = null; request.streamData = null; - request.entityWriter = null; request.length = -1; } @@ -544,20 +535,6 @@ public T setBody(InputStream stream) throws IllegalArgumentException { return derived.cast(this); } - public T setBody(EntityWriter dataWriter) { - return setBody(dataWriter, -1); - } - - public T setBody(EntityWriter dataWriter, long length) throws IllegalArgumentException { - checkIfBodyAllowed(); - resetParameters(); - resetNonMultipartData(); - resetMultipartData(); - request.entityWriter = dataWriter; - request.length = length; - return derived.cast(this); - } - public T setBody(BodyGenerator bodyGenerator) { checkIfBodyAllowed(); request.bodyGenerator = bodyGenerator; diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java index 7f5ec241dc..9268f67cc9 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java @@ -622,13 +622,6 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request urlConnection.setRequestProperty("Content-Length", String.valueOf(mre.getContentLength())); mre.writeRequest(urlConnection.getOutputStream()); - } else if (request.getEntityWriter() != null) { - int lenght = (int) request.getContentLength(); - if (lenght != -1) { - urlConnection.setRequestProperty("Content-Length", String.valueOf(lenght)); - urlConnection.setFixedLengthStreamingMode(lenght); - } - request.getEntityWriter().writeEntity(urlConnection.getOutputStream()); } else if (request.getFile() != null) { File file = request.getFile(); if (!file.isFile()) { diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index e5a8d4a503..8b412ba97d 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -23,7 +23,6 @@ import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.OutputStream; import java.net.ConnectException; import java.net.HttpURLConnection; import java.net.URL; @@ -673,56 +672,6 @@ public Response onCompleted(Response response) throws Exception { } } - @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostEntityWriterTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - try { - final CountDownLatch l = new CountDownLatch(1); - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - h.add("Content-Type", "application/x-www-form-urlencoded"); - - final StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); - } - sb.setLength(sb.length() - 1); - byte[] bytes = sb.toString().getBytes(); - h.add("Content-Length", String.valueOf(bytes.length)); - - c.preparePost(getTargetUrl()).setHeaders(h).setBody(new Request.EntityWriter() { - - /* @Override */ - public void writeEntity(OutputStream out) throws IOException { - out.write(sb.toString().getBytes("UTF-8")); - } - }).execute(new AsyncCompletionHandlerAdapter() { - - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); - assertEquals(response.getHeader("X-param_" + i), "value_" + i); - } - } finally { - l.countDown(); - } - return response; - } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); - } - } finally { - c.close(); - } - } - @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostMultiPartTest() throws Throwable { AsyncHttpClient c = getAsyncHttpClient(null); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java index f5486f3d8b..ef43fc445e 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyHandlerFactory.java @@ -25,7 +25,6 @@ public BodyHandlerFactory(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider) { new StringBodyHandler(grizzlyAsyncHttpProvider), new ByteArrayBodyHandler(grizzlyAsyncHttpProvider), new ParamsBodyHandler(grizzlyAsyncHttpProvider), - new EntityWriterBodyHandler(), new StreamDataBodyHandler(), new PartsBodyHandler(), new FileBodyHandler(), diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java deleted file mode 100644 index 7b2aad63a3..0000000000 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/EntityWriterBodyHandler.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2013 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.grizzly.bodyhandler; - -import org.asynchttpclient.Request; -import org.glassfish.grizzly.Buffer; -import org.glassfish.grizzly.filterchain.FilterChainContext; -import org.glassfish.grizzly.http.HttpContent; -import org.glassfish.grizzly.http.HttpRequestPacket; -import org.glassfish.grizzly.memory.MemoryManager; -import org.glassfish.grizzly.utils.BufferOutputStream; - -import java.io.IOException; - -public final class EntityWriterBodyHandler implements BodyHandler { - - // -------------------------------------------- Methods from BodyHandler - - - public boolean handlesBodyType(final Request request) { - return (request.getEntityWriter() != null); - } - - @SuppressWarnings({"unchecked"}) - public boolean doHandle(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - final MemoryManager mm = ctx.getMemoryManager(); - Buffer b = mm.allocate(512); - BufferOutputStream o = new BufferOutputStream(mm, b, true); - final Request.EntityWriter writer = request.getEntityWriter(); - writer.writeEntity(o); - b = o.getBuffer(); - b.trim(); - if (b.hasRemaining()) { - final HttpContent content = requestPacket.httpContentBuilder().content(b).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); - } - - return true; - } - -} // END EntityWriterBodyHandler diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index 4559250d3f..33132e549d 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -60,7 +60,6 @@ import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.jboss.netty.bootstrap.ClientBootstrap; import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBufferOutputStream; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; @@ -132,11 +131,9 @@ import java.util.concurrent.Future; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.Semaphore; -import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; import static org.asynchttpclient.util.DateUtil.millisTime; @@ -802,17 +799,6 @@ else if (uri.getRawQuery() != null) nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(mre.getContentLength())); - } else if (request.getEntityWriter() != null) { - int length = getPredefinedContentLength(request, nettyRequest); - - if (length == -1) { - length = MAX_BUFFERED_BYTES; - } - - ChannelBuffer b = ChannelBuffers.dynamicBuffer(length); - request.getEntityWriter().writeEntity(new ChannelBufferOutputStream(b)); - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, b.writerIndex()); - nettyRequest.setContent(b); } else if (request.getFile() != null) { File file = request.getFile(); if (!file.isFile()) { @@ -2209,7 +2195,7 @@ private void invokeOnSucces(ChannelHandlerContext ctx, WebSocketUpgradeHandler h try { h.onSuccess(new NettyWebSocket(ctx.getChannel())); } catch (Exception ex) { - NettyAsyncHttpProvider.this.log.warn("onSuccess unexexpected exception", ex); + NettyAsyncHttpProvider.log.warn("onSuccess unexexpected exception", ex); } } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java index 960bd2009a..d392678abc 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java @@ -6,7 +6,6 @@ import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufOutputStream; import io.netty.buffer.Unpooled; import io.netty.handler.codec.http.DefaultFullHttpRequest; import io.netty.handler.codec.http.DefaultHttpRequest; @@ -49,16 +48,6 @@ public static HttpRequest newNettyRequest(AsyncHttpClientConfig config, Request return construct(config, request, new HttpMethod(method), uri, proxyServer); } - private static int getPredefinedContentLength(Request request, Map headers) { - int length = (int) request.getContentLength(); - Object contentLength = headers.get(HttpHeaders.Names.CONTENT_LENGTH); - if (length == -1 && contentLength != null) { - length = Integer.valueOf(contentLength.toString()); - } - - return length; - } - private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, URI uri, ProxyServer proxyServer) throws IOException { String host = null; @@ -278,19 +267,6 @@ else if (uri.getRawQuery() != null) hasDeferredContent = true; - } else if (request.getEntityWriter() != null) { - int length = getPredefinedContentLength(request, headers); - - if (length == -1) { - length = Constants.MAX_BUFFERED_BYTES; - } - - ByteBuf b = Unpooled.buffer(length); - // FIXME doesn't do what EntityWriter javadoc says - request.getEntityWriter().writeEntity(new ByteBufOutputStream(b)); - // FIXME seems wrong when length was original -1, not sure the ByteBug increase, and feels like should be streaming - headers.put(HttpHeaders.Names.CONTENT_LENGTH, b.writerIndex()); - content = b; } else if (request.getFile() != null) { File file = request.getFile(); if (!file.isFile()) { From c737c0dadff9d3434d5dd95bb709f5f9b19d0573 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 21:13:53 +0200 Subject: [PATCH 0518/2844] Don't deprecate RequestBuilder.setBody(InputStream), close #373 --- api/src/main/java/org/asynchttpclient/RequestBuilder.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilder.java b/api/src/main/java/org/asynchttpclient/RequestBuilder.java index 034249a5a7..09c43c6d9f 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilder.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilder.java @@ -87,18 +87,12 @@ public RequestBuilder setBody(byte[] data) throws IllegalArgumentException { } /** - * Deprecated - Use setBody(new InputStreamBodyGenerator(inputStream)). - * + * Set a Stream for chunking * @param stream - An {@link InputStream} * @return a {@link RequestBuilder} * @throws IllegalArgumentException - * @see #setBody(BodyGenerator) InputStreamBodyGenerator(inputStream) - * @see org.asynchttpclient.generators.InputStreamBodyGenerator - * @deprecated {@link #setBody(BodyGenerator)} setBody(new InputStreamBodyGenerator(inputStream)) */ @Override - // FIXME I'd do the exact opposite: deprecate InputStreamBodyGenerator - @Deprecated public RequestBuilder setBody(InputStream stream) throws IllegalArgumentException { return super.setBody(stream); } From f052c028c767439483d9f8f125c2c958d983a769 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 22:34:10 +0200 Subject: [PATCH 0519/2844] Remove TransferCompletionHandler.TransferAdapter.getBytes, close #374 --- .../AsyncCompletionHandler.java | 2 +- .../ResumableRandomAccessFileListener.java | 3 +- .../listener/TransferCompletionHandler.java | 87 +++---------------- .../listener/TransferListener.java | 6 +- .../resumable/ResumableAsyncHandler.java | 4 +- .../filters/AsyncHttpClientFilter.java | 25 +----- .../netty/NettyAsyncHttpProvider.java | 35 +------- .../providers/netty4/NettyRequestSender.java | 7 +- .../netty4/NettyTransferAdapter.java | 41 --------- 9 files changed, 27 insertions(+), 183 deletions(-) delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java index b8e8d70889..b27a99dfb4 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java @@ -105,7 +105,7 @@ public STATE onContentWriteCompleted() { /** * Invoked when the I/O operation associated with the {@link Request} body as been progressed. * - * @param amount The amount of bytes to transfer. + * @param amount The amount of bytes to transfer * @param current The amount of bytes transferred * @param total The total number of bytes transferred * @return a {@link org.asynchttpclient.AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing. diff --git a/api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java b/api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java index 546b59a117..e8a63a0f6c 100644 --- a/api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java +++ b/api/src/main/java/org/asynchttpclient/extra/ResumableRandomAccessFileListener.java @@ -12,7 +12,6 @@ */ package org.asynchttpclient.extra; -import org.asynchttpclient.resumable.ResumableListener; import org.asynchttpclient.resumable.ResumableListener; import java.io.IOException; @@ -20,7 +19,7 @@ import java.nio.ByteBuffer; /** - * A {@link org.asynchttpclient.listener.TransferListener} which use a {@link RandomAccessFile} for storing the received bytes. + * A {@link org.asynchttpclient.resumable.ResumableListener} which use a {@link RandomAccessFile} for storing the received bytes. */ public class ResumableRandomAccessFileListener implements ResumableListener { private final RandomAccessFile file; diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java index 833387cad7..0fa9a90968 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java @@ -12,8 +12,6 @@ */ package org.asynchttpclient.listener; -import static org.asynchttpclient.util.MiscUtil.isNonEmpty; - import org.asynchttpclient.AsyncCompletionHandlerBase; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseBodyPart; @@ -24,9 +22,7 @@ import java.io.IOException; import java.nio.ByteBuffer; -import java.util.List; import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.atomic.AtomicLong; /** * A {@link org.asynchttpclient.AsyncHandler} that can be used to notify a set of {@link TransferListener} @@ -63,8 +59,6 @@ public class TransferCompletionHandler extends AsyncCompletionHandlerBase { private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); private final boolean accumulateResponseBytes; private TransferAdapter transferAdapter; - private AtomicLong bytesTransferred = new AtomicLong(); - private AtomicLong totalBytesToTransfer = new AtomicLong(0); /** * Create a TransferCompletionHandler that will not accumulate bytes. The resulting {@link org.asynchttpclient.Response#getResponseBody()}, @@ -116,10 +110,7 @@ public void transferAdapter(TransferAdapter transferAdapter) { this.transferAdapter = transferAdapter; } - /** - * {@inheritDoc} - */ - /* @Override */ + @Override public STATE onHeadersReceived(final HttpResponseHeaders headers) throws Exception { fireOnHeaderReceived(headers.getHeaders()); return super.onHeadersReceived(headers); @@ -131,7 +122,7 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep if (accumulateResponseBytes) { s = super.onBodyPartReceived(content); } - fireOnBytesReceived(content.getBodyPartBytes()); + fireOnBytesReceived(content.getBodyByteBuffer()); return s; } @@ -141,46 +132,22 @@ public Response onCompleted(Response response) throws Exception { return response; } - /** - * {@inheritDoc} - */ + @Override public STATE onHeaderWriteCompleted() { - List list = transferAdapter.getHeaders().get("Content-Length"); - if (isNonEmpty(list) && !list.get(0).isEmpty()) { - totalBytesToTransfer.set(Long.valueOf(list.get(0))); + if (transferAdapter != null) { + fireOnHeadersSent(transferAdapter.getHeaders()); } - - fireOnHeadersSent(transferAdapter.getHeaders()); return STATE.CONTINUE; } - /** - * {@inheritDoc} - */ + @Override public STATE onContentWriteCompleted() { return STATE.CONTINUE; } - /** - * {@inheritDoc} - */ + @Override public STATE onContentWriteProgress(long amount, long current, long total) { - if (bytesTransferred.get() == -1) { - return STATE.CONTINUE; - } - - if (totalBytesToTransfer.get() == 0) { - totalBytesToTransfer.set(total); - } - - // We need to track the count because all is asynchronous and Netty may not invoke us on time. - bytesTransferred.addAndGet(amount); - - if (transferAdapter != null) { - byte[] bytes = new byte[(int) (amount)]; - transferAdapter.getBytes(bytes); - fireOnBytesSent(bytes); - } + fireOnBytesSent(amount, current, total); return STATE.CONTINUE; } @@ -211,32 +178,6 @@ private void fireOnHeaderReceived(FluentCaseInsensitiveStringsMap headers) { } private void fireOnEnd() { - // There is a probability that the asynchronous listener never gets called, so we fake it at the end once - // we are 100% sure the response has been received. - long count = bytesTransferred.getAndSet(-1); - if (count != totalBytesToTransfer.get()) { - if (transferAdapter != null) { - byte[] bytes = new byte[8192]; - int leftBytes = (int) (totalBytesToTransfer.get() - count); - int length = 8192; - while (leftBytes > 0) { - if (leftBytes > 8192) { - leftBytes -= 8192; - } else { - length = leftBytes; - leftBytes = 0; - } - - if (length < 8192) { - bytes = new byte[length]; - } - - transferAdapter.getBytes(bytes); - fireOnBytesSent(bytes); - } - } - } - for (TransferListener l : listeners) { try { l.onRequestResponseCompleted(); @@ -246,20 +187,20 @@ private void fireOnEnd() { } } - private void fireOnBytesReceived(byte[] b) { + private void fireOnBytesReceived(ByteBuffer b) { for (TransferListener l : listeners) { try { - l.onBytesReceived(ByteBuffer.wrap(b)); + l.onBytesReceived(b); } catch (Throwable t) { l.onThrowable(t); } } } - private void fireOnBytesSent(byte[] b) { + private void fireOnBytesSent(long amount, long current, long total) { for (TransferListener l : listeners) { try { - l.onBytesSent(ByteBuffer.wrap(b)); + l.onBytesSent(amount, current, total); } catch (Throwable t) { l.onThrowable(t); } @@ -276,7 +217,7 @@ private void fireOnThrowable(Throwable t) { } } - public abstract static class TransferAdapter { + public static class TransferAdapter { private final FluentCaseInsensitiveStringsMap headers; public TransferAdapter(FluentCaseInsensitiveStringsMap headers) throws IOException { @@ -286,7 +227,5 @@ public TransferAdapter(FluentCaseInsensitiveStringsMap headers) throws IOExcepti public FluentCaseInsensitiveStringsMap getHeaders() { return headers; } - - public abstract void getBytes(byte[] bytes); } } diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferListener.java b/api/src/main/java/org/asynchttpclient/listener/TransferListener.java index 7ae2344462..a793996f34 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferListener.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferListener.java @@ -42,9 +42,11 @@ public interface TransferListener { /** * Invoked every time request's chunk are sent. * - * @param buffer a {@link ByteBuffer} + * @param amount The amount of bytes to transfer + * @param current The amount of bytes transferred + * @param total The total number of bytes transferred */ - public void onBytesSent(ByteBuffer buffer); + public void onBytesSent(long amount, long current, long total); /** * Invoked when the response bytes are been fully received. diff --git a/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java index ec3a4f17e7..6991d05383 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java @@ -33,8 +33,8 @@ /** * An {@link AsyncHandler} which support resumable download, e.g when used with an {@link ResumableIOExceptionFilter}, - * this handler can resume the download operation at the point it was before the interruption occured. This prevent having to - * download the entire file again. It's the responsibility of the {@link org.asynchttpclient.listener.TransferListener} + * this handler can resume the download operation at the point it was before the interruption occurred. This prevent having to + * download the entire file again. It's the responsibility of the {@link org.asynchttpclient.resumable.ResumableAsyncHandler} * to track how many bytes has been transferred and to properly adjust the file's write position. *

* In case of a JVM crash/shutdown, you can create an instance of this class and pass the last valid bytes position. diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index fccf36361c..ce9078d5ea 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -25,6 +25,7 @@ import org.asynchttpclient.Response; import org.asynchttpclient.UpgradeHandler; import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; import org.asynchttpclient.providers.grizzly.GrizzlyResponseFuture; import org.asynchttpclient.providers.grizzly.HttpTransactionContext; @@ -289,7 +290,7 @@ private static void initTransferCompletionHandler(final Request request, final FluentCaseInsensitiveStringsMap map = new FluentCaseInsensitiveStringsMap(request.getHeaders()); TransferCompletionHandler.class.cast(h) - .transferAdapter(new GrizzlyTransferAdapter(map)); + .transferAdapter(new TransferAdapter(map)); } } @@ -472,28 +473,6 @@ private static void addQueryString(final Request request, } - public static final class GrizzlyTransferAdapter extends TransferCompletionHandler.TransferAdapter { - - - // -------------------------------------------------------- Constructors - - - public GrizzlyTransferAdapter(FluentCaseInsensitiveStringsMap headers) throws IOException { - super(headers); - } - - - // ---------------------------------------- Methods from TransferAdapter - - - @Override - public void getBytes(byte[] bytes) { - // TODO implement - } - - } // END GrizzlyTransferAdapter - - class HttpRequestPacketImpl extends HttpRequestPacket { private ProcessingState processingState = new ProcessingState(); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index 33132e549d..f5b6879d10 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -43,6 +43,7 @@ import org.asynchttpclient.filter.ResponseFilter; import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; import org.asynchttpclient.multipart.MultipartBody; import org.asynchttpclient.multipart.MultipartRequestEntity; import org.asynchttpclient.ntlm.NTLMEngine; @@ -107,7 +108,6 @@ import javax.net.ssl.SSLEngine; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.RandomAccessFile; import java.net.ConnectException; @@ -452,7 +452,7 @@ protected final void writeRequest(final Channel channel, final AsyncHttpClie } } - TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new NettyTransferAdapter(h, nettyRequest.getContent(), future.getRequest().getFile())); + TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new TransferAdapter(h)); } // Leave it to true. @@ -1833,37 +1833,6 @@ public void releaseExternalResources() { } } - private static class NettyTransferAdapter extends TransferCompletionHandler.TransferAdapter { - - private final ChannelBuffer content; - private final FileInputStream file; - private int byteRead = 0; - - public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ChannelBuffer content, File file) throws IOException { - super(headers); - this.content = content; - if (file != null) { - this.file = new FileInputStream(file); - } else { - this.file = null; - } - } - - @Override - public void getBytes(byte[] bytes) { - if (content.writableBytes() != 0) { - content.getBytes(byteRead, bytes); - byteRead += bytes.length; - } else if (file != null) { - try { - byteRead += file.read(bytes); - } catch (IOException e) { - log.error(e.getMessage(), e); - } - } - } - } - protected AsyncHttpClientConfig getConfig() { return config; } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java index 87386a1ea1..49e1a35b88 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java @@ -3,14 +3,11 @@ import static org.asynchttpclient.providers.netty4.util.HttpUtil.WEBSOCKET; import static org.asynchttpclient.providers.netty4.util.HttpUtil.isSecure; import io.netty.bootstrap.Bootstrap; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelProgressiveFuture; import io.netty.channel.FileRegion; -import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.codec.http.HttpRequest; @@ -44,6 +41,7 @@ import org.asynchttpclient.filter.FilterContext; import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; import org.asynchttpclient.multipart.MultipartBody; import org.asynchttpclient.providers.netty4.FeedableBodyGenerator.FeedListener; import org.asynchttpclient.util.AsyncHttpProviderUtils; @@ -303,8 +301,7 @@ protected final void writeRequest(final Channel channel, final AsyncHttpClie h.add(entries.getKey(), entries.getValue()); } - ByteBuf content = nettyRequest instanceof FullHttpRequest ? FullHttpRequest.class.cast(nettyRequest).content() : Unpooled.buffer(0); - TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new NettyTransferAdapter(h, content, future.getRequest().getFile())); + TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new TransferAdapter(h)); } // Leave it to true. diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java deleted file mode 100644 index e388e64545..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyTransferAdapter.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.asynchttpclient.providers.netty4; - -import io.netty.buffer.ByteBuf; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.concurrent.atomic.AtomicInteger; - -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.listener.TransferCompletionHandler; - -class NettyTransferAdapter extends TransferCompletionHandler.TransferAdapter { - - private final ByteBuf content; - private final FileInputStream file; - private AtomicInteger byteRead = new AtomicInteger(0); - - public NettyTransferAdapter(FluentCaseInsensitiveStringsMap headers, ByteBuf content, File file) throws IOException { - super(headers); - this.content = content; - if (file != null) { - this.file = new FileInputStream(file); - } else { - this.file = null; - } - } - - @Override - public void getBytes(byte[] bytes) { - if (content.writableBytes() != 0) { - content.getBytes(byteRead.getAndAdd(bytes.length), bytes); - } else if (file != null) { - try { - byteRead.getAndAdd(file.read(bytes)); - } catch (IOException e) { - NettyAsyncHttpProvider.LOGGER.error(e.getMessage(), e); - } - } - } -} \ No newline at end of file From 017bc92ee4939546ad7ec525b5fa98f55a45a911 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 22:34:27 +0200 Subject: [PATCH 0520/2844] Make PutLargeFileTest thread safe --- .../async/PutLargeFileTest.java | 84 ++++++++----------- 1 file changed, 35 insertions(+), 49 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index c058c689a9..2fafcdeff7 100644 --- a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -12,6 +12,16 @@ */ package org.asynchttpclient.async; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.UUID; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; import org.asynchttpclient.AsyncHttpClientConfig; @@ -19,37 +29,37 @@ import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; -import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.ServletInputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.UUID; - /** * @author Benjamin Hanzelmann */ public abstract class PutLargeFileTest extends AbstractBasicTest { - private File largeFile; + private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); + private static final byte[] PATTERN_BYTES = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes(Charset.forName("UTF-16")); + + static { + TMP.mkdirs(); + TMP.deleteOnExit(); + } @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutLargeFile() throws Exception { - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 1024 * 100 / bytes.length) + 1; - largeFile = createTempFile(bytes, (int) repeats); - int timeout = (int) (largeFile.length() / 1000); + + long repeats = (1024 * 1024 * 100 / PATTERN_BYTES.length) + 1; + File file = createTempFile(PATTERN_BYTES, (int) repeats); + long expectedFileSize = PATTERN_BYTES.length * repeats; + Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); + + int timeout = (int) (repeats / 1000); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build(); AsyncHttpClient client = getAsyncHttpClient(config); try { BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - rb.setBody(largeFile); + rb.setBody(file); Response response = rb.execute().get(); Assert.assertEquals(200, response.getStatusCode()); @@ -60,16 +70,17 @@ public void testPutLargeFile() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void testPutSmallFile() throws Exception { - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 / bytes.length) + 1; - // int timeout = (5000); - largeFile = createTempFile(bytes, (int) repeats); + + long repeats = (1024 / PATTERN_BYTES.length) + 1; + File file = createTempFile(PATTERN_BYTES, (int) repeats); + long expectedFileSize = PATTERN_BYTES.length * repeats; + Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); AsyncHttpClient client = getAsyncHttpClient(null); try { BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - rb.setBody(largeFile); + rb.setBody(file); Response response = rb.execute().get(); Assert.assertEquals(200, response.getStatusCode()); @@ -78,26 +89,12 @@ public void testPutSmallFile() throws Exception { } } - @AfterMethod - public void after() { - largeFile.delete(); - } - @Override public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { - ServletInputStream in = req.getInputStream(); - byte[] b = new byte[8092]; - - int count = -1; - int total = 0; - while ((count = in.read(b)) != -1) { - total += count; - } - resp.setStatus(200); resp.getOutputStream().flush(); resp.getOutputStream().close(); @@ -107,24 +104,12 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle }; } - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); - public static File createTempFile(byte[] pattern, int repeat) throws IOException { - TMP.mkdirs(); - TMP.deleteOnExit(); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); tmpFile.deleteOnExit(); - write(pattern, repeat, tmpFile); - - return tmpFile; - } - - public static void write(byte[] pattern, int repeat, File file) throws IOException { - file.deleteOnExit(); - file.getParentFile().mkdirs(); FileOutputStream out = null; try { - out = new FileOutputStream(file); + out = new FileOutputStream(tmpFile); for (int i = 0; i < repeat; i++) { out.write(pattern); } @@ -133,6 +118,7 @@ public static void write(byte[] pattern, int repeat, File file) throws IOExcepti out.close(); } } - } + return tmpFile; + } } From 8abdd5ea86c1790df11ebbbaac676d53c9934ac4 Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 23:05:51 +0200 Subject: [PATCH 0521/2844] Make TransferListener. onBytesReceived receive a byte array --- .../listener/TransferCompletionHandler.java | 5 +- .../listener/TransferListener.java | 5 +- .../async/TransferListenerTest.java | 135 ++++++++++-------- 3 files changed, 76 insertions(+), 69 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java index 0fa9a90968..00962814a5 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java @@ -21,7 +21,6 @@ import org.slf4j.LoggerFactory; import java.io.IOException; -import java.nio.ByteBuffer; import java.util.concurrent.ConcurrentLinkedQueue; /** @@ -122,7 +121,7 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep if (accumulateResponseBytes) { s = super.onBodyPartReceived(content); } - fireOnBytesReceived(content.getBodyByteBuffer()); + fireOnBytesReceived(content.getBodyPartBytes()); return s; } @@ -187,7 +186,7 @@ private void fireOnEnd() { } } - private void fireOnBytesReceived(ByteBuffer b) { + private void fireOnBytesReceived(byte[] b) { for (TransferListener l : listeners) { try { l.onBytesReceived(b); diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferListener.java b/api/src/main/java/org/asynchttpclient/listener/TransferListener.java index a793996f34..d61a675295 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferListener.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferListener.java @@ -15,7 +15,6 @@ import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import java.io.IOException; -import java.nio.ByteBuffer; /** * A simple interface an application can implements in order to received byte transfer information. @@ -35,9 +34,9 @@ public interface TransferListener { /** * Invoked every time response's chunk are received. * - * @param buffer a {@link ByteBuffer} + * @param bytes a {@link byte[]} */ - public void onBytesReceived(ByteBuffer buffer) throws IOException; + public void onBytesReceived(byte[] bytes) throws IOException; /** * Invoked every time request's chunk are sent. diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 48e18c1bed..7fb60b8969 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -12,35 +12,46 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.Response; -import org.asynchttpclient.generators.FileBodyGenerator; -import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.listener.TransferListener; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.fail; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.util.Enumeration; import java.util.UUID; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.fail; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.Response; +import org.asynchttpclient.generators.FileBodyGenerator; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.listener.TransferListener; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.Assert; +import org.testng.annotations.Test; public abstract class TransferListenerTest extends AbstractBasicTest { + private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); + private static final byte[] PATTERN_BYTES = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes(Charset.forName("UTF-16")); + + static { + TMP.mkdirs(); + TMP.deleteOnExit(); + } private class BasicHandler extends AbstractHandler { @@ -81,7 +92,7 @@ public void basicGetTest() throws Throwable { final AtomicReference throwable = new AtomicReference(); final AtomicReference hSent = new AtomicReference(); final AtomicReference hRead = new AtomicReference(); - final AtomicReference bb = new AtomicReference(); + final AtomicReference bb = new AtomicReference(); final AtomicBoolean completed = new AtomicBoolean(false); TransferCompletionHandler tl = new TransferCompletionHandler(); @@ -95,11 +106,11 @@ public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { hRead.set(headers); } - public void onBytesReceived(ByteBuffer buffer) { - bb.set(buffer); + public void onBytesReceived(byte[] b) { + bb.set(b); } - public void onBytesSent(ByteBuffer buffer) { + public void onBytesSent(long amount, long current, long total) { } public void onRequestResponseCompleted() { @@ -130,20 +141,24 @@ public void onThrowable(Throwable t) { @Test(groups = { "standalone", "default_provider" }) public void basicPutTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); - try { - final AtomicReference throwable = new AtomicReference(); - final AtomicReference hSent = new AtomicReference(); - final AtomicReference hRead = new AtomicReference(); - final AtomicInteger bbReceivedLenght = new AtomicInteger(0); - final AtomicInteger bbSentLenght = new AtomicInteger(0); + final AtomicReference throwable = new AtomicReference(); + final AtomicReference hSent = new AtomicReference(); + final AtomicReference hRead = new AtomicReference(); + final AtomicInteger bbReceivedLenght = new AtomicInteger(0); + final AtomicLong bbSentLenght = new AtomicLong(0L); - final AtomicBoolean completed = new AtomicBoolean(false); + final AtomicBoolean completed = new AtomicBoolean(false); + + byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); + long repeats = (1024 * 100 * 10 / bytes.length) + 1; + File file = createTempFile(bytes, (int) repeats); + long expectedFileSize = PATTERN_BYTES.length * repeats; + Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File largeFile = createTempFile(bytes, (int) repeats); + int timeout = (int) (repeats / 1000); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build()); + try { TransferCompletionHandler tl = new TransferCompletionHandler(); tl.addTransferListener(new TransferListener() { @@ -155,12 +170,12 @@ public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { hRead.set(headers); } - public void onBytesReceived(ByteBuffer buffer) { - bbReceivedLenght.addAndGet(buffer.capacity()); + public void onBytesReceived(byte[] b) { + bbReceivedLenght.addAndGet(b.length); } - public void onBytesSent(ByteBuffer buffer) { - bbSentLenght.addAndGet(buffer.capacity()); + public void onBytesSent(long amount, long current, long total) { + bbSentLenght.addAndGet(amount); } public void onRequestResponseCompleted() { @@ -173,37 +188,38 @@ public void onThrowable(Throwable t) { }); try { - Response response = c.preparePut(getTargetUrl()).setBody(largeFile).execute(tl).get(); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute(tl).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertNotNull(hRead.get()); assertNotNull(hSent.get()); - assertEquals(bbReceivedLenght.get(), largeFile.length()); - assertEquals(bbSentLenght.get(), largeFile.length()); + assertEquals(bbReceivedLenght.get(), expectedFileSize, "Number of received bytes incorrect"); + assertEquals(bbSentLenght.get(), expectedFileSize, "Number of sent bytes incorrect"); } catch (IOException ex) { fail("Should have timed out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider" }) public void basicPutBodyTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicReference throwable = new AtomicReference(); final AtomicReference hSent = new AtomicReference(); final AtomicReference hRead = new AtomicReference(); final AtomicInteger bbReceivedLenght = new AtomicInteger(0); - final AtomicInteger bbSentLenght = new AtomicInteger(0); + final AtomicLong bbSentLenght = new AtomicLong(0L); final AtomicBoolean completed = new AtomicBoolean(false); - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File largeFile = createTempFile(bytes, (int) repeats); + long repeats = (1024 * 100 * 10 / PATTERN_BYTES.length) + 1; + File file = createTempFile(PATTERN_BYTES, (int) repeats); + long expectedFileSize = PATTERN_BYTES.length * repeats; + Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); TransferCompletionHandler tl = new TransferCompletionHandler(); tl.addTransferListener(new TransferListener() { @@ -216,12 +232,12 @@ public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) { hRead.set(headers); } - public void onBytesReceived(ByteBuffer buffer) { - bbReceivedLenght.addAndGet(buffer.capacity()); + public void onBytesReceived(byte[] b) { + bbReceivedLenght.addAndGet(b.length); } - public void onBytesSent(ByteBuffer buffer) { - bbSentLenght.addAndGet(buffer.capacity()); + public void onBytesSent(long amount, long current, long total) { + bbSentLenght.addAndGet(amount); } public void onRequestResponseCompleted() { @@ -234,19 +250,19 @@ public void onThrowable(Throwable t) { }); try { - Response response = c.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(largeFile)).execute(tl).get(); + Response response = client.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(file)).execute(tl).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertNotNull(hRead.get()); assertNotNull(hSent.get()); - assertEquals(bbReceivedLenght.get(), largeFile.length()); - assertEquals(bbSentLenght.get(), largeFile.length()); + assertEquals(bbReceivedLenght.get(), expectedFileSize, "Number of received bytes incorrect"); + assertEquals(bbSentLenght.get(), expectedFileSize, "Number of sent bytes incorrect"); } catch (IOException ex) { fail("Should have timed out"); } } finally { - c.close(); + client.close(); } } @@ -255,20 +271,11 @@ public String getTargetUrl() { } public static File createTempFile(byte[] pattern, int repeat) throws IOException { - TMP.mkdirs(); - TMP.deleteOnExit(); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); - write(pattern, repeat, tmpFile); - - return tmpFile; - } - - public static void write(byte[] pattern, int repeat, File file) throws IOException { - file.deleteOnExit(); - file.getParentFile().mkdirs(); + tmpFile.deleteOnExit(); FileOutputStream out = null; try { - out = new FileOutputStream(file); + out = new FileOutputStream(tmpFile); for (int i = 0; i < repeat; i++) { out.write(pattern); } @@ -277,5 +284,7 @@ public static void write(byte[] pattern, int repeat, File file) throws IOExcepti out.close(); } } + + return tmpFile; } } From 6993a49b2792a1c8cc7506cd945a18adb14178bd Mon Sep 17 00:00:00 2001 From: slandelle Date: Tue, 3 Sep 2013 23:28:50 +0200 Subject: [PATCH 0522/2844] ChannelProgressiveFutureListener.operationProgressed should be working this way --- .../asynchttpclient/async/TransferListenerTest.java | 5 ++--- .../providers/netty4/ProgressListener.java | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 7fb60b8969..61561a4fb4 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -149,9 +149,8 @@ public void basicPutTest() throws Throwable { final AtomicBoolean completed = new AtomicBoolean(false); - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File file = createTempFile(bytes, (int) repeats); + long repeats = (1024 * 100 * 10 / PATTERN_BYTES.length) + 1; + File file = createTempFile(PATTERN_BYTES, (int) repeats); long expectedFileSize = PATTERN_BYTES.length * repeats; Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java index 5670a3f6be..37f6c68bf0 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java @@ -4,6 +4,7 @@ import io.netty.channel.ChannelProgressiveFutureListener; import java.nio.channels.ClosedChannelException; +import java.util.concurrent.atomic.AtomicLong; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; @@ -16,6 +17,7 @@ public class ProgressListener implements ChannelProgressiveFutureListener { private final boolean notifyHeaders; private final AsyncHandler asyncHandler; private final NettyResponseFuture future; + private final AtomicLong lastProgress = new AtomicLong(0); public ProgressListener(AsyncHttpClientConfig config, boolean notifyHeaders, AsyncHandler asyncHandler, NettyResponseFuture future) { this.config = config; @@ -61,13 +63,13 @@ public void operationComplete(ChannelProgressiveFuture cf) { future.touch(); /** - * We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, causing unpredictable behavior. + * We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, + * causing unpredictable behavior. */ Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : config.getRealm(); boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth(); if (startPublishing && asyncHandler instanceof ProgressAsyncHandler) { - // FIXME WTF if (notifyHeaders) { ProgressAsyncHandler.class.cast(asyncHandler).onHeaderWriteCompleted(); } else { @@ -80,7 +82,8 @@ public void operationComplete(ChannelProgressiveFuture cf) { public void operationProgressed(ChannelProgressiveFuture f, long progress, long total) { future.touch(); if (asyncHandler instanceof ProgressAsyncHandler) { - ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(total - progress, progress, total); + long lastProgressValue = lastProgress.getAndSet(progress); + ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(progress - lastProgressValue, progress, total); } } -} \ No newline at end of file +} From e2401e8e200594b0a2e23b11b728f816f08266a7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 00:40:54 +0200 Subject: [PATCH 0523/2844] Don't forget to shutdown server2 --- .../org/asynchttpclient/async/ProxyTunnellingTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index 1b29a99f07..22e5a9764c 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -25,6 +25,7 @@ import org.eclipse.jetty.server.handler.ProxyHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.server.ssl.SslSocketConnector; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -87,6 +88,12 @@ public void setUpGlobal() throws Exception { server2.start(); log.info("Local HTTP server started successfully"); } + + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws Exception { + super.tearDownGlobal(); + server2.stop(); + } @Test(groups = { "online", "default_provider" }) public void testRequestProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { From c71c7f272a050ae70e40e312856c8cbb13d4ee50 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 00:47:30 +0200 Subject: [PATCH 0524/2844] Workaround for test thread safety issue --- .../async/HttpToHttpsRedirectTest.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java index 45fa838423..90b81dbd43 100644 --- a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java @@ -134,7 +134,15 @@ private static int getPort(URI uri) { } @Test(groups = { "standalone", "default_provider" }) - public void httpToHttpsRedirect() throws Throwable { + // FIXME find a way to make this threadsafe, other, set @Test(singleThreaded = true) + public void httpToHttpsRunAllTestsSequentially() throws Exception { + httpToHttpsRedirect(); + httpToHttpsProperConfig(); + relativeLocationUrl(); + } + + // @Test(groups = { "standalone", "default_provider" }) + public void httpToHttpsRedirect() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); @@ -153,8 +161,8 @@ public String getTargetUrl2() { return String.format("https://127.0.0.1:%d/foo/test", port2); } - @Test(groups = { "standalone", "default_provider" }) - public void httpToHttpsProperConfig() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void httpToHttpsProperConfig() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); @@ -175,8 +183,8 @@ public void httpToHttpsProperConfig() throws Throwable { } } - @Test(groups = { "standalone", "default_provider" }) - public void relativeLocationUrl() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void relativeLocationUrl() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); From 44fb968143d7cfe8a925f1198a1a4a059a4fd360 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 11:35:52 +0200 Subject: [PATCH 0525/2844] Split writeRequest --- .../listener/TransferCompletionHandler.java | 2 +- .../providers/netty4/NettyRequestSender.java | 310 ++++++++++-------- 2 files changed, 172 insertions(+), 140 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java index 00962814a5..f642128d1a 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java @@ -219,7 +219,7 @@ private void fireOnThrowable(Throwable t) { public static class TransferAdapter { private final FluentCaseInsensitiveStringsMap headers; - public TransferAdapter(FluentCaseInsensitiveStringsMap headers) throws IOException { + public TransferAdapter(FluentCaseInsensitiveStringsMap headers) { this.headers = headers; } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java index 49e1a35b88..06402fe576 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java @@ -182,7 +182,7 @@ public ListenableFuture doConnect(final Request request, final AsyncHandl boolean acquiredConnection = !reclaimCache && channels.acquireConnection(asyncHandler); NettyConnectListener cl = new NettyConnectListener.Builder(config, this, request, asyncHandler, future).build(uri); - + boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, uri.getHost()); if (useSSl) { @@ -261,7 +261,158 @@ public ListenableFuture doConnect(final Request request, final AsyncHandl } return cl.future(); } - + + private void sendFileBody(Channel channel, File file, NettyResponseFuture future) throws IOException { + final RandomAccessFile raf = new RandomAccessFile(file, "r"); + + try { + long fileLength = raf.length(); + + ChannelFuture writeFuture; + if (Channels.getSslHandler(channel) != null) { + writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, Constants.MAX_BUFFERED_BYTES), channel.newProgressivePromise()); + } else { + // FIXME why not use io.netty.channel.DefaultFileRegion? + FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); + writeFuture = channel.write(region, channel.newProgressivePromise()); + } + writeFuture.addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { + public void operationComplete(ChannelProgressiveFuture cf) { + try { + raf.close(); + } catch (IOException e) { + LOGGER.warn("Failed to close request body: {}", e.getMessage(), e); + } + super.operationComplete(cf); + } + }); + channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); + } catch (IOException ex) { + if (raf != null) { + try { + raf.close(); + } catch (IOException e) { + } + } + throw ex; + } + } + + private boolean sendStreamAndExit(Channel channel, final InputStream is, NettyResponseFuture future) throws IOException { + + if (future.getAndSetStreamWasAlreadyConsumed()) { + if (is.markSupported()) + is.reset(); + else { + LOGGER.warn("Stream has already been consumed and cannot be reset"); + return true; + } + } + + channel.write(new ChunkedStream(is), channel.newProgressivePromise()).addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { + public void operationComplete(ChannelProgressiveFuture cf) { + try { + is.close(); + } catch (IOException e) { + LOGGER.warn("Failed to close request body: {}", e.getMessage(), e); + } + super.operationComplete(cf); + } + }); + channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); + + return false; + } + + public void sendBody(final Channel channel, final Body body, NettyResponseFuture future) { + Object msg; + if (Channels.getSslHandler(channel) == null && body instanceof RandomAccessBody) { + msg = new BodyFileRegion((RandomAccessBody) body); + } else { + BodyGenerator bg = future.getRequest().getBodyGenerator(); + msg = new BodyChunkedInput(body); + if (bg instanceof FeedableBodyGenerator) { + FeedableBodyGenerator.class.cast(bg).setListener(new FeedListener() { + @Override + public void onContentAdded() { + channel.pipeline().get(ChunkedWriteHandler.class).resumeTransfer(); + } + }); + } + } + ChannelFuture writeFuture = channel.write(msg, channel.newProgressivePromise()); + + final Body b = body; + writeFuture.addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { + public void operationComplete(ChannelProgressiveFuture cf) { + try { + b.close(); + } catch (IOException e) { + LOGGER.warn("Failed to close request body: {}", e.getMessage(), e); + } + super.operationComplete(cf); + } + }); + channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); + } + + private Body computeBody(HttpRequest nettyRequest, NettyResponseFuture future) { + + if (nettyRequest.getMethod().equals(HttpMethod.CONNECT)) { + return null; + } + + HttpHeaders headers = nettyRequest.headers(); + BodyGenerator bg = future.getRequest().getBodyGenerator(); + Body body = null; + if (bg != null) { + try { + body = bg.createBody(); + } catch (IOException ex) { + throw new IllegalStateException(ex); + } + long length = body.getContentLength(); + if (length >= 0) { + headers.set(HttpHeaders.Names.CONTENT_LENGTH, length); + } else { + headers.set(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); + } + } else if (future.getRequest().getParts() != null) { + String contentType = headers.get(HttpHeaders.Names.CONTENT_TYPE); + String length = headers.get(HttpHeaders.Names.CONTENT_LENGTH); + body = new MultipartBody(future.getRequest().getParts(), contentType, length); + } + + return body; + } + + private void configureTransferAdapter(AsyncHandler handler, HttpRequest nettyRequest) { + FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); + for (Map.Entry entries : nettyRequest.headers()) { + h.add(entries.getKey(), entries.getValue()); + } + + TransferCompletionHandler.class.cast(handler).transferAdapter(new TransferAdapter(h)); + } + + private void scheduleReaper(NettyResponseFuture future) { + try { + future.touch(); + int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); + int schedulePeriod = requestTimeout != -1 ? (config.getIdleConnectionTimeoutInMs() != -1 ? Math.min(requestTimeout, config.getIdleConnectionTimeoutInMs()) + : requestTimeout) : config.getIdleConnectionTimeoutInMs(); + + if (schedulePeriod != -1 && !future.isDone() && !future.isCancelled()) { + ReaperFuture reaperFuture = new ReaperFuture(future, config, isClose, channels); + Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, schedulePeriod, TimeUnit.MILLISECONDS); + reaperFuture.setScheduledFuture(scheduledFuture); + future.setReaperFuture(reaperFuture); + } + } catch (RejectedExecutionException ex) { + channels.abort(future, ex); + } + } + protected final void writeRequest(final Channel channel, final AsyncHttpClientConfig config, final NettyResponseFuture future) { try { // If the channel is dead because it was pooled and the remote @@ -272,41 +423,15 @@ protected final void writeRequest(final Channel channel, final AsyncHttpClie } HttpRequest nettyRequest = future.getNettyRequest(); - Body body = null; - if (!nettyRequest.getMethod().equals(HttpMethod.CONNECT)) { - BodyGenerator bg = future.getRequest().getBodyGenerator(); - if (bg != null) { - try { - body = bg.createBody(); - } catch (IOException ex) { - throw new IllegalStateException(ex); - } - long length = body.getContentLength(); - if (length >= 0) { - nettyRequest.headers().set(HttpHeaders.Names.CONTENT_LENGTH, length); - } else { - nettyRequest.headers().set(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); - } - } else if (future.getRequest().getParts() != null) { - String contentType = nettyRequest.headers().get(HttpHeaders.Names.CONTENT_TYPE); - String length = nettyRequest.headers().get(HttpHeaders.Names.CONTENT_LENGTH); - body = new MultipartBody(future.getRequest().getParts(), contentType, length); - } - } - - if (future.getAsyncHandler() instanceof TransferCompletionHandler) { - - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - for (Map.Entry entries : future.getNettyRequest().headers()) { - h.add(entries.getKey(), entries.getValue()); - } + AsyncHandler handler = future.getAsyncHandler(); + Body body = computeBody(nettyRequest, future); - TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new TransferAdapter(h)); + if (handler instanceof TransferCompletionHandler) { + configureTransferAdapter(handler, nettyRequest); } // Leave it to true. - // FIXME Yeah... explain why instead of saying the same thing as the - // code + // FIXME That doesn't just leave to true, the set is always done? and what's the point of not having a is/get? if (future.getAndSetWriteHeaders(true)) { try { channel.writeAndFlush(nettyRequest, channel.newProgressivePromise()).addListener(new ProgressListener(config, true, future.getAsyncHandler(), future)); @@ -322,104 +447,25 @@ protected final void writeRequest(final Channel channel, final AsyncHttpClie } } + // FIXME OK, why? and what's the point of not having a is/get? if (future.getAndSetWriteBody(true)) { if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) { - if (future.getRequest().getFile() != null) { - final File file = future.getRequest().getFile(); - long fileLength = 0; - final RandomAccessFile raf = new RandomAccessFile(file, "r"); - - try { - fileLength = raf.length(); - - ChannelFuture writeFuture; - if (Channels.getSslHandler(channel) != null) { - writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, Constants.MAX_BUFFERED_BYTES), channel.newProgressivePromise()); - } else { - // FIXME why not use io.netty.channel.DefaultFileRegion? - FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); - writeFuture = channel.write(region, channel.newProgressivePromise()); - } - writeFuture.addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { - public void operationComplete(ChannelProgressiveFuture cf) { - try { - raf.close(); - } catch (IOException e) { - LOGGER.warn("Failed to close request body: {}", e.getMessage(), e); - } - super.operationComplete(cf); - } - }); - channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); - } catch (IOException ex) { - if (raf != null) { - try { - raf.close(); - } catch (IOException e) { - } - } - throw ex; - } - } else if (future.getRequest().getStreamData() != null || future.getRequest().getBodyGenerator() instanceof InputStreamBodyGenerator) { - final InputStream is = future.getRequest().getStreamData() != null ? future.getRequest().getStreamData() : InputStreamBodyGenerator.class.cast( - future.getRequest().getBodyGenerator()).getInputStream(); - - if (future.getAndSetStreamWasAlreadyConsumed()) { - if (is.markSupported()) - is.reset(); - else { - LOGGER.warn("Stream has already been consumed and cannot be reset"); - return; - } - } - - channel.write(new ChunkedStream(is), channel.newProgressivePromise()).addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { - public void operationComplete(ChannelProgressiveFuture cf) { - try { - is.close(); - } catch (IOException e) { - LOGGER.warn("Failed to close request body: {}", e.getMessage(), e); - } - super.operationComplete(cf); - } - }); - channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); + sendFileBody(channel, future.getRequest().getFile(), future); - } else if (body != null) { + } else if (future.getRequest().getStreamData() != null) { + if (sendStreamAndExit(channel, future.getRequest().getStreamData(), future)) + return; + } else if (future.getRequest().getBodyGenerator() instanceof InputStreamBodyGenerator) { + if (sendStreamAndExit(channel, InputStreamBodyGenerator.class.cast(future.getRequest().getBodyGenerator()).getInputStream(), future)) + return; - Object msg; - if (Channels.getSslHandler(channel) == null && body instanceof RandomAccessBody) { - msg = new BodyFileRegion((RandomAccessBody) body); - } else { - BodyGenerator bg = future.getRequest().getBodyGenerator(); - msg = new BodyChunkedInput(body); - if (bg instanceof FeedableBodyGenerator) { - FeedableBodyGenerator.class.cast(bg).setListener(new FeedListener() { - @Override - public void onContentAdded() { - channel.pipeline().get(ChunkedWriteHandler.class).resumeTransfer(); - } - }); - } - } - ChannelFuture writeFuture = channel.write(msg, channel.newProgressivePromise()); - - final Body b = body; - writeFuture.addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { - public void operationComplete(ChannelProgressiveFuture cf) { - try { - b.close(); - } catch (IOException e) { - LOGGER.warn("Failed to close request body: {}", e.getMessage(), e); - } - super.operationComplete(cf); - } - }); - channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); + } else if (body != null) { + sendBody(channel, body, future); } } } + } catch (Throwable ioe) { try { channel.close(); @@ -428,23 +474,9 @@ public void operationComplete(ChannelProgressiveFuture cf) { } } - try { - future.touch(); - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); - int schedulePeriod = requestTimeout != -1 ? (config.getIdleConnectionTimeoutInMs() != -1 ? Math.min(requestTimeout, config.getIdleConnectionTimeoutInMs()) - : requestTimeout) : config.getIdleConnectionTimeoutInMs(); - - if (schedulePeriod != -1 && !future.isDone() && !future.isCancelled()) { - ReaperFuture reaperFuture = new ReaperFuture(future, config, isClose, channels); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, schedulePeriod, TimeUnit.MILLISECONDS); - reaperFuture.setScheduledFuture(scheduledFuture); - future.setReaperFuture(reaperFuture); - } - } catch (RejectedExecutionException ex) { - channels.abort(future, ex); - } + scheduleReaper(future); } - + // FIXME Clean up Netty 3: replayRequest's response parameter is unused + // WTF return??? public void replayRequest(final NettyResponseFuture future, FilterContext fc, ChannelHandlerContext ctx) throws IOException { From eb92a69a604609c597f30aea46ff7fda15b9731c Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 11:44:56 +0200 Subject: [PATCH 0526/2844] Rename ReaperFuture into FutureReaper --- .../providers/netty4/{ReaperFuture.java => FutureReaper.java} | 4 ++-- .../asynchttpclient/providers/netty4/NettyRequestSender.java | 2 +- .../asynchttpclient/providers/netty4/NettyResponseFuture.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/{ReaperFuture.java => FutureReaper.java} (96%) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ReaperFuture.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java similarity index 96% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ReaperFuture.java rename to providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java index fa4f5adecb..644359e52c 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ReaperFuture.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java @@ -14,7 +14,7 @@ * Because some implementation of the ThreadSchedulingService do not clean up cancel task until they try to run them, we wrap the task with the future so the when the NettyResponseFuture cancel the reaper future this wrapper will release the references to the channel and the * nettyResponseFuture immediately. Otherwise, the memory referenced this way will only be released after the request timeout period which can be arbitrary long. */ -public final class ReaperFuture implements Runnable { +public final class FutureReaper implements Runnable { private final AtomicBoolean isClose; private final Channels channels; @@ -22,7 +22,7 @@ public final class ReaperFuture implements Runnable { private NettyResponseFuture nettyResponseFuture; private AsyncHttpClientConfig config; - public ReaperFuture(NettyResponseFuture nettyResponseFuture, AsyncHttpClientConfig config, AtomicBoolean isClose, Channels channels) { + public FutureReaper(NettyResponseFuture nettyResponseFuture, AsyncHttpClientConfig config, AtomicBoolean isClose, Channels channels) { this.nettyResponseFuture = nettyResponseFuture; this.channels = channels; this.config = config; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java index 06402fe576..37cc5fac3f 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java @@ -403,7 +403,7 @@ private void scheduleReaper(NettyResponseFuture future) { : requestTimeout) : config.getIdleConnectionTimeoutInMs(); if (schedulePeriod != -1 && !future.isDone() && !future.isCancelled()) { - ReaperFuture reaperFuture = new ReaperFuture(future, config, isClose, channels); + FutureReaper reaperFuture = new FutureReaper(future, config, isClose, channels); Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, schedulePeriod, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java index 7eab45f3bb..ba49de0338 100755 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java @@ -69,7 +69,7 @@ public enum STATE { private HttpResponse httpResponse; private final AtomicReference exEx = new AtomicReference(); private final AtomicInteger redirectCount = new AtomicInteger(); - private volatile ReaperFuture reaperFuture; + private volatile FutureReaper reaperFuture; private final AtomicBoolean inAuth = new AtomicBoolean(false); private final AtomicBoolean statusReceived = new AtomicBoolean(false); private final AtomicLong touch = new AtomicLong(millisTime()); @@ -358,7 +358,7 @@ public int incrementAndGetCurrentRedirectCount() { return redirectCount.incrementAndGet(); } - public void setReaperFuture(ReaperFuture reaperFuture) { + public void setReaperFuture(FutureReaper reaperFuture) { cancelReaper(); this.reaperFuture = reaperFuture; } From b3a95b91101b0aa97f6af6c1908fcc74df542b6c Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 11:53:48 +0200 Subject: [PATCH 0527/2844] Use cached HttpMethod instances --- .../providers/netty4/NettyRequests.java | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java index d392678abc..e41b387115 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java @@ -41,15 +41,12 @@ public class NettyRequests { public static HttpRequest newNettyRequest(AsyncHttpClientConfig config, Request request, URI uri, boolean allowConnect, ProxyServer proxyServer) throws IOException { - String method = request.getMethod(); - if (allowConnect && proxyServer != null && isSecure(uri)) { - method = HttpMethod.CONNECT.toString(); - } - return construct(config, request, new HttpMethod(method), uri, proxyServer); - } - - private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, URI uri, ProxyServer proxyServer) throws IOException { - + HttpMethod method = null; + if (allowConnect && proxyServer != null && isSecure(uri)) + method = HttpMethod.CONNECT; + else + method = HttpMethod.valueOf(request.getMethod()); + String host = null; HttpVersion httpVersion; String requestUri; @@ -63,7 +60,7 @@ private static HttpRequest construct(AsyncHttpClientConfig config, Request reque host = AsyncHttpProviderUtils.getHost(uri); } - if (m.equals(HttpMethod.CONNECT)) { + if (method == HttpMethod.CONNECT) { httpVersion = HttpVersion.HTTP_1_0; requestUri = AsyncHttpProviderUtils.getAuthority(uri); } else { @@ -94,7 +91,7 @@ else if (uri.getRawQuery() != null) host = "127.0.0.1"; } - if (!m.equals(HttpMethod.CONNECT)) { + if (method != HttpMethod.CONNECT) { FluentCaseInsensitiveStringsMap h = request.getHeaders(); if (h != null) { for (Entry> header : h) { @@ -217,12 +214,12 @@ else if (uri.getRawQuery() != null) } boolean hasDeferredContent = false; - if (!m.equals(HttpMethod.CONNECT)) { + if (method != HttpMethod.CONNECT) { if (isNonEmpty(request.getCookies())) { headers.put(HttpHeaders.Names.COOKIE, CookieEncoder.encodeClientSide(request.getCookies(), config.isRfc6265CookieEncoding())); } - if (!m.equals(HttpMethod.HEAD) && !m.equals(HttpMethod.OPTIONS) && !m.equals(HttpMethod.TRACE)) { + if (method != HttpMethod.HEAD && method != HttpMethod.OPTIONS && method != HttpMethod.TRACE) { String bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : request.getBodyEncoding(); @@ -283,11 +280,11 @@ else if (uri.getRawQuery() != null) HttpRequest nettyRequest; if (hasDeferredContent) { - nettyRequest = new DefaultHttpRequest(httpVersion, m, requestUri); + nettyRequest = new DefaultHttpRequest(httpVersion, method, requestUri); } else if (content != null) { - nettyRequest = new DefaultFullHttpRequest(httpVersion, m, requestUri, content); + nettyRequest = new DefaultFullHttpRequest(httpVersion, method, requestUri, content); } else { - nettyRequest = new DefaultFullHttpRequest(httpVersion, m, requestUri); + nettyRequest = new DefaultFullHttpRequest(httpVersion, method, requestUri); } for (Entry header : headers.entrySet()) { nettyRequest.headers().set(header.getKey(), header.getValue()); From db8c908245f022de9af5a58fca2f9caec00502dd Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 12:47:52 +0200 Subject: [PATCH 0528/2844] Minor clean up --- .../providers/netty4/Constants.java | 2 +- .../providers/netty4/FutureReaper.java | 8 +-- .../netty4/NettyAsyncHttpProvider.java | 8 +-- .../providers/netty4/NettyChannelHandler.java | 51 ++++++++----------- .../netty4/NettyConnectionsPool.java | 14 ++--- .../providers/netty4/NettyRequestSender.java | 14 ++--- 6 files changed, 46 insertions(+), 51 deletions(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java index e8f408c095..9fae1fbd2b 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java @@ -4,7 +4,7 @@ public class Constants { - // FIXME move into a state class along with isClose + // FIXME move into a state class along with closed public static final ThreadLocal IN_IO_THREAD = new ThreadLocalBoolean(); // FIXME what to do with this??? diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java index 644359e52c..974e2bc618 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java @@ -16,17 +16,17 @@ */ public final class FutureReaper implements Runnable { - private final AtomicBoolean isClose; + private final AtomicBoolean closed; private final Channels channels; private Future scheduledFuture; private NettyResponseFuture nettyResponseFuture; private AsyncHttpClientConfig config; - public FutureReaper(NettyResponseFuture nettyResponseFuture, AsyncHttpClientConfig config, AtomicBoolean isClose, Channels channels) { + public FutureReaper(NettyResponseFuture nettyResponseFuture, AsyncHttpClientConfig config, AtomicBoolean closed, Channels channels) { this.nettyResponseFuture = nettyResponseFuture; this.channels = channels; this.config = config; - this.isClose = isClose; + this.closed = closed; } public void setScheduledFuture(Future scheduledFuture) { @@ -79,7 +79,7 @@ private void expire(String message) { * @Override */ public synchronized void run() { - if (isClose.get()) { + if (closed.get()) { cancel(true); return; } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java index 28a8a7184b..a17fc9e1e5 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java @@ -37,7 +37,7 @@ public class NettyAsyncHttpProvider implements AsyncHttpProvider { private final AsyncHttpClientConfig config; private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; - private final AtomicBoolean isClose = new AtomicBoolean(false); + private final AtomicBoolean closed = new AtomicBoolean(false); private final Channels channels; private final NettyRequestSender requestSender; private final NettyChannelHandler channelHandler; @@ -53,8 +53,8 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { } channels = new Channels(config, asyncHttpProviderConfig); - requestSender = new NettyRequestSender(isClose, config, channels); - channelHandler = new NettyChannelHandler(config, requestSender, channels, isClose); + requestSender = new NettyRequestSender(closed, config, channels); + channelHandler = new NettyChannelHandler(config, requestSender, channels, closed); channels.configure(channelHandler); executeConnectAsync = asyncHttpProviderConfig.isAsyncConnect(); @@ -72,7 +72,7 @@ public String toString() { @Override public void close() { - isClose.set(true); + closed.set(true); try { channels.close(); // config.executorService().shutdown(); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index 570b53cfde..8dc1ee1fd8 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -1,21 +1,12 @@ package org.asynchttpclient.providers.netty4; -import static io.netty.handler.codec.http.HttpResponseStatus.CONTINUE; -import static io.netty.handler.codec.http.HttpResponseStatus.FOUND; -import static io.netty.handler.codec.http.HttpResponseStatus.MOVED_PERMANENTLY; -import static io.netty.handler.codec.http.HttpResponseStatus.OK; -import static io.netty.handler.codec.http.HttpResponseStatus.PROXY_AUTHENTICATION_REQUIRED; -import static io.netty.handler.codec.http.HttpResponseStatus.SEE_OTHER; -import static io.netty.handler.codec.http.HttpResponseStatus.TEMPORARY_REDIRECT; -import static io.netty.handler.codec.http.HttpResponseStatus.UNAUTHORIZED; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.HTTP; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.WEBSOCKET; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.isNTLM; +import static io.netty.handler.codec.http.HttpResponseStatus.*; +import static org.asynchttpclient.providers.netty4.util.HttpUtil.*; import io.netty.buffer.Unpooled; import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.channel.ChannelHandler.Sharable; import io.netty.handler.codec.PrematureChannelClosureException; import io.netty.handler.codec.http.DefaultHttpContent; import io.netty.handler.codec.http.HttpClientCodec; @@ -73,7 +64,7 @@ public class NettyChannelHandler extends ChannelInboundHandlerAdapter { private final AsyncHttpClientConfig config; private final NettyRequestSender requestSender; private final Channels channels; - private final AtomicBoolean isClose; + private final AtomicBoolean closed; private final Protocol httpProtocol = new HttpProtocol(); private final Protocol webSocketProtocol = new WebSocketProtocol(); @@ -81,7 +72,7 @@ public NettyChannelHandler(AsyncHttpClientConfig config, NettyRequestSender requ this.config = config; this.requestSender = requestSender; this.channels = channels; - this.isClose = isClose; + this.closed = isClose; } @Override @@ -117,7 +108,7 @@ public void channelRead(final ChannelHandlerContext ctx, Object e) throws Except public void channelInactive(ChannelHandlerContext ctx) throws Exception { - if (isClose.get()) { + if (closed.get()) { return; } @@ -137,7 +128,7 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception { callback.call(); } else if (attachment instanceof NettyResponseFuture) { - NettyResponseFuture future = (NettyResponseFuture) attachment; + NettyResponseFuture future = NettyResponseFuture.class.cast(attachment); future.touch(); if (!config.getIOExceptionFilters().isEmpty() && applyIoExceptionFiltersAndReplayRequest(ctx, future, new IOException("Channel Closed"))) { @@ -219,8 +210,8 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Excep } } - Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); - p.onError(ctx, e); + Protocol protocol = ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol; + protocol.onError(ctx, e); channels.closeChannel(ctx); // FIXME not really sure @@ -253,9 +244,11 @@ private boolean applyIoExceptionFiltersAndReplayRequest(ChannelHandlerContext ct private boolean redirect(Request request, NettyResponseFuture future, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { - int statusCode = response.getStatus().code(); + io.netty.handler.codec.http.HttpResponseStatus status = response.getStatus(); + // int statusCode = response.getStatus().code(); boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == MOVED_PERMANENTLY.code() || statusCode == FOUND.code() || statusCode == SEE_OTHER.code() || statusCode == TEMPORARY_REDIRECT.code())) { + boolean isRedirectStatus = status == MOVED_PERMANENTLY || status == FOUND || status == SEE_OTHER || status == TEMPORARY_REDIRECT; + if (redirectEnabled && isRedirectStatus) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { // We must allow 401 handling again. @@ -270,13 +263,12 @@ private boolean redirect(Request request, NettyResponseFuture future, HttpRes nBuilder.setQueryParameters(null); } - // FIXME what about 307? - if (!(statusCode < FOUND.code() || statusCode > SEE_OTHER.code()) && !(statusCode == FOUND.code() && config.isStrict302Handling())) { + // FIXME why not do that for 301 and 307 too? + if ((status == FOUND || status == SEE_OTHER) && !(status == FOUND && config.isStrict302Handling())) { nBuilder.setMethod(HttpMethod.GET.name()); } - // in case of a redirect from HTTP to HTTPS, those values - // might be different + // in case of a redirect from HTTP to HTTPS, future attributes might change final boolean initialConnectionKeepAlive = future.isKeepAlive(); final String initialPoolKey = channels.getPoolKey(future); @@ -285,8 +277,8 @@ private boolean redirect(Request request, NettyResponseFuture future, HttpRes if (request.getUrl().startsWith(WEBSOCKET)) { newUrl = newUrl.replace(HTTP, WEBSOCKET); } - LOGGER.debug("Redirecting to {}", newUrl); + for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE)) { for (Cookie c : CookieDecoder.decode(cookieStr)) { nBuilder.addOrReplaceCookie(c); @@ -310,8 +302,10 @@ public void call() throws Exception { if (HttpHeaders.isTransferEncodingChunked(response)) { // We must make sure there is no bytes left before // executing the next request. + // FIXME investigate this Channels.setDefaultAttribute(ctx, callback); } else { + // FIXME don't understand: this offers the connection to the pool, or even closes it, while the request has not been sent, right? callback.call(); } @@ -590,6 +584,7 @@ public void call() throws Exception { } else if (statusCode == CONTINUE.code()) { future.getAndSetWriteHeaders(false); future.getAndSetWriteBody(true); + // FIXME is this necessary future.setIgnoreNextContents(true); requestSender.writeRequest(ctx.channel(), config, future); return; @@ -623,7 +618,7 @@ public void call() throws Exception { return; } - } else if (statusCode == OK.code() && nettyRequest.getMethod().equals(HttpMethod.CONNECT)) { + } else if (statusCode == OK.code() && nettyRequest.getMethod() == HttpMethod.CONNECT) { LOGGER.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); @@ -764,9 +759,7 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object if (redirect(request, future, response, ctx)) return; - io.netty.handler.codec.http.HttpResponseStatus status = io.netty.handler.codec.http.HttpResponseStatus.SWITCHING_PROTOCOLS; - - boolean validStatus = response.getStatus().equals(status); + boolean validStatus = response.getStatus() == SWITCHING_PROTOCOLS; boolean validUpgrade = response.headers().get(HttpHeaders.Names.UPGRADE) != null; String c = response.headers().get(HttpHeaders.Names.CONNECTION); if (c == null) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java index 16d9c43ecb..0da9e4a0cd 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java @@ -38,7 +38,7 @@ public class NettyConnectionsPool implements ConnectionsPool { private final ConcurrentHashMap> connectionsPool = new ConcurrentHashMap>(); private final ConcurrentHashMap channel2IdleChannel = new ConcurrentHashMap(); private final ConcurrentHashMap channel2CreationDate = new ConcurrentHashMap(); - private final AtomicBoolean isClosed = new AtomicBoolean(false); + private final AtomicBoolean closed = new AtomicBoolean(false); private final Timer idleConnectionDetector; private final boolean sslConnectionPoolEnabled; private final int maxTotalConnections; @@ -93,7 +93,7 @@ private class IdleChannelDetector extends TimerTask { @Override public void run() { try { - if (isClosed.get()) return; + if (closed.get()) return; if (log.isDebugEnabled()) { Set keys = connectionsPool.keySet(); @@ -155,7 +155,7 @@ public void run() { * {@inheritDoc} */ public boolean offer(String uri, Channel channel) { - if (isClosed.get()) return false; + if (closed.get()) return false; if (!sslConnectionPoolEnabled && uri.startsWith("https")) { return false; @@ -232,7 +232,7 @@ public Channel poll(String uri) { } private boolean remove(IdleChannel pooledChannel) { - if (pooledChannel == null || isClosed.get()) return false; + if (pooledChannel == null || closed.get()) return false; boolean isRemoved = false; ConcurrentLinkedQueue pooledConnectionForHost = connectionsPool.get(pooledChannel.uri); @@ -248,14 +248,14 @@ private boolean remove(IdleChannel pooledChannel) { */ public boolean removeAll(Channel channel) { channel2CreationDate.remove(channel); - return !isClosed.get() && remove(channel2IdleChannel.get(channel)); + return !closed.get() && remove(channel2IdleChannel.get(channel)); } /** * {@inheritDoc} */ public boolean canCacheConnection() { - if (!isClosed.get() && maxTotalConnections != -1 && channel2IdleChannel.size() >= maxTotalConnections) { + if (!closed.get() && maxTotalConnections != -1 && channel2IdleChannel.size() >= maxTotalConnections) { return false; } else { return true; @@ -266,7 +266,7 @@ public boolean canCacheConnection() { * {@inheritDoc} */ public void destroy() { - if (isClosed.getAndSet(true)) return; + if (closed.getAndSet(true)) return; // stop timer idleConnectionDetector.cancel(); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java index 37cc5fac3f..cb0810143b 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java @@ -54,12 +54,12 @@ public class NettyRequestSender { private static final Logger LOGGER = LoggerFactory.getLogger(NettyRequestSender.class); - private final AtomicBoolean isClose; + private final AtomicBoolean closed; private final AsyncHttpClientConfig config; private final Channels channels; - public NettyRequestSender(AtomicBoolean isClose, AsyncHttpClientConfig config, Channels channels) { - this.isClose = isClose; + public NettyRequestSender(AtomicBoolean closed, AsyncHttpClientConfig config, Channels channels) { + this.closed = closed; this.config = config; this.channels = channels; } @@ -68,7 +68,7 @@ public boolean retry(Channel channel, NettyResponseFuture future) { boolean success = false; - if (!isClose.get()) { + if (!closed.get()) { channels.removeAll(channel); if (future == null) { @@ -105,6 +105,7 @@ public void execute(final Request request, final NettyResponseFuture f) t doConnect(request, f.getAsyncHandler(), f, true, true, true); } + // FIXME is this useful? Can't we do that when building the request? private final boolean validateWebSocketRequest(Request request, AsyncHandler asyncHandler) { return request.getMethod().equals(HttpMethod.GET.name()) && asyncHandler instanceof WebSocketUpgradeHandler; } @@ -112,7 +113,7 @@ private final boolean validateWebSocketRequest(Request request, AsyncHandler public ListenableFuture doConnect(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture future, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { - if (isClose.get()) { + if (closed.get()) { throw new IOException("Closed"); } @@ -122,6 +123,7 @@ public ListenableFuture doConnect(final Request request, final AsyncHandl ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); boolean useProxy = proxyServer != null; + URI uri; if (config.isUseRawUrl()) { uri = request.getRawURI(); @@ -403,7 +405,7 @@ private void scheduleReaper(NettyResponseFuture future) { : requestTimeout) : config.getIdleConnectionTimeoutInMs(); if (schedulePeriod != -1 && !future.isDone() && !future.isCancelled()) { - FutureReaper reaperFuture = new FutureReaper(future, config, isClose, channels); + FutureReaper reaperFuture = new FutureReaper(future, config, closed, channels); Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, schedulePeriod, TimeUnit.MILLISECONDS); reaperFuture.setScheduledFuture(scheduledFuture); future.setReaperFuture(reaperFuture); From f16fb4fca0ac34118dc3bc6849021755daa1ba60 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 14:37:42 +0200 Subject: [PATCH 0529/2844] Fix TransferListener --- .../listener/TransferCompletionHandler.java | 68 ++++++++++++++----- .../async/TransferListenerTest.java | 4 +- 2 files changed, 52 insertions(+), 20 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java index f642128d1a..ff7417be3b 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java @@ -12,6 +12,9 @@ */ package org.asynchttpclient.listener; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicLong; + import org.asynchttpclient.AsyncCompletionHandlerBase; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseBodyPart; @@ -20,13 +23,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.concurrent.ConcurrentLinkedQueue; - /** * A {@link org.asynchttpclient.AsyncHandler} that can be used to notify a set of {@link TransferListener} *

- *

+ * 
+ * + *
  * AsyncHttpClient client = new AsyncHttpClient();
  * TransferCompletionHandler tl = new TransferCompletionHandler();
  * tl.addTransferListener(new TransferListener() {
@@ -51,28 +53,32 @@
  * });
  * 

* Response response = httpClient.prepareGet("http://...").execute(tl).get(); - *

+ *
+ * + *
*/ public class TransferCompletionHandler extends AsyncCompletionHandlerBase { private final static Logger logger = LoggerFactory.getLogger(TransferCompletionHandler.class); private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); private final boolean accumulateResponseBytes; private TransferAdapter transferAdapter; + private AtomicLong bytesTransferred = new AtomicLong(0); + private AtomicLong totalBytesToTransfer = new AtomicLong(-1); /** * Create a TransferCompletionHandler that will not accumulate bytes. The resulting {@link org.asynchttpclient.Response#getResponseBody()}, - * {@link org.asynchttpclient.Response#getResponseBodyAsStream()} and {@link Response#getResponseBodyExcerpt(int)} will - * throw an IllegalStateException if called. + * {@link org.asynchttpclient.Response#getResponseBodyAsStream()} and {@link Response#getResponseBodyExcerpt(int)} will throw an IllegalStateException if called. */ public TransferCompletionHandler() { this(false); } /** - * Create a TransferCompletionHandler that can or cannot accumulate bytes and make it available when - * {@link org.asynchttpclient.Response#getResponseBody()} get called. The default is false. - * - * @param accumulateResponseBytes true to accumulates bytes in memory. + * Create a TransferCompletionHandler that can or cannot accumulate bytes and make it available when {@link org.asynchttpclient.Response#getResponseBody()} get called. The + * default is false. + * + * @param accumulateResponseBytes + * true to accumulates bytes in memory. */ public TransferCompletionHandler(boolean accumulateResponseBytes) { this.accumulateResponseBytes = accumulateResponseBytes; @@ -80,8 +86,9 @@ public TransferCompletionHandler(boolean accumulateResponseBytes) { /** * Add a {@link TransferListener} - * - * @param t a {@link TransferListener} + * + * @param t + * a {@link TransferListener} * @return this */ public TransferCompletionHandler addTransferListener(TransferListener t) { @@ -91,8 +98,9 @@ public TransferCompletionHandler addTransferListener(TransferListener t) { /** * Remove a {@link TransferListener} - * - * @param t a {@link TransferListener} + * + * @param t + * a {@link TransferListener} * @return this */ public TransferCompletionHandler removeTransferListener(TransferListener t) { @@ -102,8 +110,9 @@ public TransferCompletionHandler removeTransferListener(TransferListener t) { /** * Associate a {@link TransferCompletionHandler.TransferAdapter} with this listener. - * - * @param transferAdapter {@link TransferAdapter} + * + * @param transferAdapter + * {@link TransferAdapter} */ public void transferAdapter(TransferAdapter transferAdapter) { this.transferAdapter = transferAdapter; @@ -127,6 +136,10 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep @Override public Response onCompleted(Response response) throws Exception { + if (bytesTransferred.get() > 0L) { + // onContentWriteCompleted hasn't been notified, it would have been set to -1L (async race) + onContentWriteCompleted(); + } fireOnEnd(); return response; } @@ -141,16 +154,35 @@ public STATE onHeaderWriteCompleted() { @Override public STATE onContentWriteCompleted() { + // onContentWriteProgress might not have been called on last write + long transferred = bytesTransferred.getAndSet(-1L); + long expected = totalBytesToTransfer.get(); + + if (expected <= 0L && transferAdapter != null) { + FluentCaseInsensitiveStringsMap headers = transferAdapter.getHeaders(); + String contentLengthString = headers.getFirstValue("Content-Length"); + if (contentLengthString != null) + expected = Long.valueOf(contentLengthString); + } + + if (expected > 0L && transferred != expected) { + fireOnBytesSent(expected - transferred, expected, expected); + } + return STATE.CONTINUE; } @Override public STATE onContentWriteProgress(long amount, long current, long total) { + bytesTransferred.addAndGet(amount); + + if (total > 0L) + totalBytesToTransfer.set(total); + fireOnBytesSent(amount, current, total); return STATE.CONTINUE; } - @Override public void onThrowable(Throwable t) { fireOnThrowable(t); diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 61561a4fb4..42961acca6 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -140,7 +140,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void basicPutTest() throws Throwable { + public void basicPutFileTest() throws Throwable { final AtomicReference throwable = new AtomicReference(); final AtomicReference hSent = new AtomicReference(); final AtomicReference hRead = new AtomicReference(); @@ -204,7 +204,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void basicPutBodyTest() throws Throwable { + public void basicPutFileBodyGeneratorTest() throws Throwable { AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicReference throwable = new AtomicReference(); From b19345681ab67bd8032dda6907e062c56463582a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 16:14:30 +0200 Subject: [PATCH 0530/2844] Enabling Netty4 module, as all tests are green!!! --- providers/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/providers/pom.xml b/providers/pom.xml index 0fb9d7957e..9a7178b576 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -46,9 +46,7 @@ grizzly netty - From 04c951469cef00ad957932871b1d51738e1ccc8c Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 18:10:13 +0200 Subject: [PATCH 0531/2844] Let one pass an external EventLoop --- .../AsyncHttpClientConfig.java | 2 - .../netty4/AdditionalChannelInitializer.java | 8 --- .../providers/netty4/Channels.java | 52 ++++++++----------- .../netty4/NettyAsyncHttpProviderConfig.java | 20 ++----- .../NettyAsyncProviderPipelineTest.java | 1 + 5 files changed, 29 insertions(+), 54 deletions(-) delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/AdditionalChannelInitializer.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 35f7f1881d..104137ea0b 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -26,7 +26,6 @@ import javax.net.ssl.SSLEngine; import java.io.IOException; import java.io.InputStream; -import java.security.GeneralSecurityException; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -35,7 +34,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicInteger; /** * Configuration class to use with a {@link AsyncHttpClient}. System property can be also used to configure this diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/AdditionalChannelInitializer.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/AdditionalChannelInitializer.java deleted file mode 100644 index 94fff93730..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/AdditionalChannelInitializer.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.asynchttpclient.providers.netty4; - -import io.netty.channel.Channel; - -public interface AdditionalChannelInitializer { - - void initChannel(Channel ch) throws Exception; -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java index a6805581af..c82980d7df 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java @@ -68,8 +68,7 @@ public class Channels { private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; private EventLoopGroup eventLoopGroup; - private final Class socketChannelFactory; - private final boolean allowReleaseSocketChannelFactory; + private final boolean allowReleaseEventLoopGroup; private final Bootstrap plainBootstrap; private final Bootstrap secureBootstrap; @@ -97,39 +96,34 @@ public Channels(final AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig this.config = config; this.asyncHttpProviderConfig = asyncHttpProviderConfig; + Class socketChannelClass = null; if (asyncHttpProviderConfig.isUseBlockingIO()) { - socketChannelFactory = OioSocketChannel.class; - this.allowReleaseSocketChannelFactory = true; + socketChannelClass = OioSocketChannel.class; + eventLoopGroup = new OioEventLoopGroup(); + allowReleaseEventLoopGroup = true; + } else { - // check if external NioClientSocketChannelFactory is defined - Class scf = asyncHttpProviderConfig.getSocketChannel(); - if (scf != null) { - this.socketChannelFactory = scf; + // check if external EventLoopGroup is defined + eventLoopGroup = asyncHttpProviderConfig.getEventLoopGroup(); + if (eventLoopGroup instanceof OioEventLoopGroup) { + socketChannelClass = OioSocketChannel.class; + allowReleaseEventLoopGroup = false; + + } else if (eventLoopGroup instanceof NioEventLoopGroup) { + socketChannelClass = NioSocketChannel.class; + allowReleaseEventLoopGroup = false; - // cannot allow releasing shared channel factory - this.allowReleaseSocketChannelFactory = false; } else { - socketChannelFactory = NioSocketChannel.class; - eventLoopGroup = asyncHttpProviderConfig.getEventLoopGroup(); - if (eventLoopGroup == null) { - if (socketChannelFactory == OioSocketChannel.class) { - eventLoopGroup = new OioEventLoopGroup(); - } else if (socketChannelFactory == NioSocketChannel.class) { - eventLoopGroup = new NioEventLoopGroup(); - } else { - throw new IllegalArgumentException("No set event loop compatbile with socket channel " + scf); - } - } - int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); - LOGGER.debug("Number of application's worker threads is {}", numWorkers); - this.allowReleaseSocketChannelFactory = true; + socketChannelClass = NioSocketChannel.class; + eventLoopGroup = new NioEventLoopGroup(); + allowReleaseEventLoopGroup = true; } } - plainBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); - secureBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); - webSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); - secureWebSocketBootstrap = new Bootstrap().channel(socketChannelFactory).group(eventLoopGroup); + plainBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); + secureBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); + webSocketBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); + secureWebSocketBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); // This is dangerous as we can't catch a wrong typed ConnectionsPool ConnectionsPool cp = (ConnectionsPool) config.getConnectionsPool(); @@ -247,7 +241,7 @@ public void close() { } } openChannels.close(); - if (this.allowReleaseSocketChannelFactory) { + if (this.allowReleaseEventLoopGroup) { eventLoopGroup.shutdownGracefully(); } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java index d008d6b825..be8aa75d44 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java @@ -17,10 +17,8 @@ package org.asynchttpclient.providers.netty4; import io.netty.channel.Channel; -import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; -import io.netty.channel.socket.SocketChannel; import java.util.HashMap; import java.util.Map; @@ -46,11 +44,6 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig socketChannel; private AdditionalChannelInitializer httpAdditionalChannelInitializer; private AdditionalChannelInitializer wsAdditionalChannelInitializer; @@ -155,14 +148,6 @@ public void setUseBlockingIO(boolean useBlockingIO) { this.useBlockingIO = useBlockingIO; } - public Class getSocketChannel() { - return socketChannel; - } - - public void setSocketChannel(Class socketChannel) { - this.socketChannel = socketChannel; - } - public EventLoopGroup getEventLoopGroup() { return eventLoopGroup; } @@ -234,4 +219,9 @@ public AdditionalChannelInitializer getWssAdditionalChannelInitializer() { public void setWssAdditionalChannelInitializer(AdditionalChannelInitializer wssAdditionalChannelInitializer) { this.wssAdditionalChannelInitializer = wssAdditionalChannelInitializer; } + + public static interface AdditionalChannelInitializer { + + void initChannel(Channel ch) throws Exception; + } } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java index d4b2a959a1..64aba79512 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java @@ -28,6 +28,7 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; +import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig.AdditionalChannelInitializer; import org.testng.Assert; import org.testng.annotations.Test; From 7d52ef43b8ef72d57d8b98fecf53010819c880cc Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 18:42:20 +0200 Subject: [PATCH 0532/2844] Minor clean up --- .../asynchttpclient/HttpResponseBodyPart.java | 20 +++++++++---------- .../providers/netty4/Channels.java | 2 +- .../providers/netty4/NettyChannelHandler.java | 7 ++----- .../providers/netty4/ResponseBodyPart.java | 13 ++++++------ 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java index 2a8655e2d0..e7f350e439 100644 --- a/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java @@ -33,23 +33,23 @@ public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider) { /** * Return length of this part in bytes. * - * @since 1.8.0 + * @since 2.0.0 */ - abstract public int length(); + public abstract int length(); /** * Return the response body's part bytes received. * * @return the response body's part bytes received. */ - abstract public byte[] getBodyPartBytes(); + public abstract byte[] getBodyPartBytes(); /** * Method for accessing contents of this part via stream. * - * @since 1.8.0 + * @since 2.0.0 */ - abstract public InputStream readBodyPartBytes(); + public abstract InputStream readBodyPartBytes(); /** * Write the available bytes to the {@link java.io.OutputStream} @@ -58,7 +58,7 @@ public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider) { * @return The number of bytes written * @throws IOException */ - abstract public int writeTo(OutputStream outputStream) throws IOException; + public abstract int writeTo(OutputStream outputStream) throws IOException; /** * Return a {@link ByteBuffer} that wraps the actual bytes read from the response's chunk. The {@link ByteBuffer} @@ -66,27 +66,27 @@ public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider) { * * @return {@link ByteBuffer} */ - abstract public ByteBuffer getBodyByteBuffer(); + public abstract ByteBuffer getBodyByteBuffer(); /** * Return true if this is the last part. * * @return true if this is the last part. */ - abstract public boolean isLast(); + public abstract boolean isLast(); /** * Close the underlying connection once the processing has completed. Invoking that method means the * underlying TCP connection will be closed as soon as the processing of the response is completed. That * means the underlying connection will never get pooled. */ - abstract public void markUnderlyingConnectionAsClosed(); + public abstract void markUnderlyingConnectionAsClosed(); /** * Return true of the underlying connection will be closed once the response has been fully processed. * * @return true of the underlying connection will be closed once the response has been fully processed. */ - abstract public boolean closeUnderlyingConnection(); + public abstract boolean closeUnderlyingConnection(); } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java index c82980d7df..7f866c7924 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java @@ -241,7 +241,7 @@ public void close() { } } openChannels.close(); - if (this.allowReleaseEventLoopGroup) { + if (allowReleaseEventLoopGroup) { eventLoopGroup.shutdownGracefully(); } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index 8dc1ee1fd8..548edc867f 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -2,13 +2,11 @@ import static io.netty.handler.codec.http.HttpResponseStatus.*; import static org.asynchttpclient.providers.netty4.util.HttpUtil.*; -import io.netty.buffer.Unpooled; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.handler.codec.PrematureChannelClosureException; -import io.netty.handler.codec.http.DefaultHttpContent; import io.netty.handler.codec.http.HttpClientCodec; import io.netty.handler.codec.http.HttpContent; import io.netty.handler.codec.http.HttpHeaders; @@ -673,7 +671,7 @@ public void call() throws Exception { if (!interrupt && chunk.content().readableBytes() > 0) { // FIXME why - interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk)); + interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk.content(), last)); } if (interrupt || last) { @@ -801,8 +799,7 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object } if (frame.content() != null && frame.content().readableBytes() > 0) { - HttpContent webSocketChunk = new DefaultHttpContent(Unpooled.wrappedBuffer(frame.content())); - ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), webSocketChunk); + ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), frame.content(), frame.isFinalFragment()); h.onBodyPartReceived(rp); NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java index 7f0f8ca7a4..2206317f25 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java @@ -15,8 +15,7 @@ */ package org.asynchttpclient.providers.netty4; -import io.netty.handler.codec.http.HttpContent; -import io.netty.handler.codec.http.LastHttpContent; +import io.netty.buffer.ByteBuf; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -34,14 +33,14 @@ public class ResponseBodyPart extends HttpResponseBodyPart { private final byte[] bytes; - private final boolean isLast; + private final boolean last; private boolean closeConnection = false; // FIXME unused AsyncHttpProvider provider - public ResponseBodyPart(URI uri, HttpContent chunk) { + public ResponseBodyPart(URI uri, ByteBuf buf, boolean last) { super(uri, null); - bytes = ByteBufUtil.byteBuf2bytes(chunk.content()); - isLast = chunk instanceof LastHttpContent; + bytes = ByteBufUtil.byteBuf2bytes(buf); + this.last = last; } /** @@ -80,7 +79,7 @@ public ByteBuffer getBodyByteBuffer() { */ @Override public boolean isLast() { - return isLast; + return last; } /** From a2211ded60856461d47a54733a826ba136202fdb Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 4 Sep 2013 10:55:23 -0700 Subject: [PATCH 0533/2844] Two fixes: - Test bug: server-side handler assuming the PUT content would arrive in a single chunk and ignored the return result from the read() call. - Grizzly bug: TransferListeners were only notified of content when updated and not when completed. So the last delta was missing. --- .../async/TransferListenerTest.java | 11 +++-- .../grizzly/bodyhandler/FileBodyHandler.java | 41 ++++++++++++------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 42961acca6..91a3a534f1 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -70,8 +70,13 @@ public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequ } byte[] bytes = new byte[size]; if (bytes.length > 0) { - httpRequest.getInputStream().read(bytes); - httpResponse.getOutputStream().write(bytes); + int read = 0; + while (read != -1) { + read = httpRequest.getInputStream().read(bytes); + if (read > 0) { + httpResponse.getOutputStream().write(bytes, 0, read); + } + } } httpResponse.setStatus(200); @@ -129,7 +134,7 @@ public void onThrowable(Throwable t) { assertEquals(response.getStatusCode(), 200); assertNotNull(hRead.get()); assertNotNull(hSent.get()); - assertNotNull(bb.get()); + assertNull(bb.get()); assertNull(throwable.get()); } catch (IOException ex) { fail("Should have timed out"); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java index cb26e1ab0f..8029d7f80c 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java @@ -92,20 +92,12 @@ public boolean doHandle(final FilterChainContext ctx, @Override public void updated(WriteResult result) { - final AsyncHandler handler = context.getHandler(); - if (handler != null) { - if (handler instanceof TransferCompletionHandler) { - // WriteResult keeps a track of the total amount written, - // so we need to calculate the delta ourselves. - final long resultTotal = result.getWrittenSize(); - final long written = resultTotal - context.getTotalBodyWritten().get(); - final long total = context.getTotalBodyWritten().addAndGet(written); - ((TransferCompletionHandler) handler).onContentWriteProgress( - written, - total, - requestPacket.getContentLength()); - } - } + notifyHandlerIfNeeded(context, requestPacket, result); + } + + @Override + public void completed(WriteResult result) { + notifyHandlerIfNeeded(context, requestPacket, result); } }); } @@ -117,6 +109,27 @@ public void updated(WriteResult result) { // --------------------------------------------------------- Private Methods + private static void notifyHandlerIfNeeded(final HttpTransactionContext context, + final HttpRequestPacket requestPacket, + final WriteResult writeResult) { + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + if (handler instanceof TransferCompletionHandler) { + // WriteResult keeps a track of the total amount written, + // so we need to calculate the delta ourselves. + final long resultTotal = writeResult.getWrittenSize(); + final long written = + (resultTotal - context.getTotalBodyWritten().get()); + final long total = context.getTotalBodyWritten().addAndGet(written); + ((TransferCompletionHandler) handler).onContentWriteProgress( + written, + total, + requestPacket.getContentLength()); + } + } + } + + private static boolean configSendFileSupport() { return !((System.getProperty("os.name").equalsIgnoreCase("linux") && !linuxSendFileSupported()) From 87473b044071bda33e65c0d4ab8dea6ecb171ab2 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 4 Sep 2013 21:31:34 +0200 Subject: [PATCH 0534/2844] Use getHostName instead of getHostString for JDK6 compat --- api/src/main/java/org/asynchttpclient/util/ProxyUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/util/ProxyUtils.java b/api/src/main/java/org/asynchttpclient/util/ProxyUtils.java index 5331dfa7d1..ef0bfbc017 100644 --- a/api/src/main/java/org/asynchttpclient/util/ProxyUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/ProxyUtils.java @@ -208,7 +208,7 @@ public ProxyServer select(URI uri) { log.warn("Don't know how to connect to address " + proxy.address()); } else { InetSocketAddress address = (InetSocketAddress) proxy.address(); - return new ProxyServer(Protocol.HTTP, address.getHostString(), address.getPort()); + return new ProxyServer(Protocol.HTTP, address.getHostName(), address.getPort()); } case DIRECT: return null; From 586ed3e8bef7661babe2f121cf9cad0b52c87326 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 00:38:51 +0200 Subject: [PATCH 0535/2844] Status instances are not cached by the codec (message might change) --- .../providers/netty4/NettyChannelHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index 548edc867f..c78e3aef06 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -243,9 +243,8 @@ private boolean applyIoExceptionFiltersAndReplayRequest(ChannelHandlerContext ct private boolean redirect(Request request, NettyResponseFuture future, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { io.netty.handler.codec.http.HttpResponseStatus status = response.getStatus(); - // int statusCode = response.getStatus().code(); boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - boolean isRedirectStatus = status == MOVED_PERMANENTLY || status == FOUND || status == SEE_OTHER || status == TEMPORARY_REDIRECT; + boolean isRedirectStatus = status.equals(MOVED_PERMANENTLY) || status.equals(FOUND) || status.equals(SEE_OTHER) || status.equals(TEMPORARY_REDIRECT); if (redirectEnabled && isRedirectStatus) { if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { @@ -262,7 +261,7 @@ private boolean redirect(Request request, NettyResponseFuture future, HttpRes } // FIXME why not do that for 301 and 307 too? - if ((status == FOUND || status == SEE_OTHER) && !(status == FOUND && config.isStrict302Handling())) { + if ((status.equals(FOUND) || status.equals(SEE_OTHER)) && !(status.equals(FOUND) && config.isStrict302Handling())) { nBuilder.setMethod(HttpMethod.GET.name()); } @@ -757,7 +756,7 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object if (redirect(request, future, response, ctx)) return; - boolean validStatus = response.getStatus() == SWITCHING_PROTOCOLS; + boolean validStatus = response.getStatus().equals(SWITCHING_PROTOCOLS); boolean validUpgrade = response.headers().get(HttpHeaders.Names.UPGRADE) != null; String c = response.headers().get(HttpHeaders.Names.CONNECTION); if (c == null) { From c3288fcc8da92d357010d8f7f094884c8e11a75c Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 00:41:32 +0200 Subject: [PATCH 0536/2844] Raise memory leak message to error --- .../org/asynchttpclient/AsyncHttpClient.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java index bc5c170d7d..7097322940 100755 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -214,26 +214,25 @@ public AsyncHttpClient(AsyncHttpClientConfig config) { /** * Create a new HTTP Asynchronous Client using a {@link AsyncHttpClientConfig} configuration and - * and a {@link AsyncHttpProvider}. + * and a AsyncHttpProvider class' name. * - * @param config a {@link AsyncHttpClientConfig} - * @param httpProvider a {@link AsyncHttpProvider} + * @param config a {@link AsyncHttpClientConfig} + * @param providerClass a {@link AsyncHttpProvider} */ - public AsyncHttpClient(AsyncHttpProvider httpProvider, AsyncHttpClientConfig config) { - this.config = config; - this.httpProvider = httpProvider; + public AsyncHttpClient(String providerClass, AsyncHttpClientConfig config) { + this(loadProvider(providerClass, config), new AsyncHttpClientConfig.Builder().build()); } /** * Create a new HTTP Asynchronous Client using a {@link AsyncHttpClientConfig} configuration and - * and a AsyncHttpProvider class' name. + * and a {@link AsyncHttpProvider}. * - * @param config a {@link AsyncHttpClientConfig} - * @param providerClass a {@link AsyncHttpProvider} + * @param config a {@link AsyncHttpClientConfig} + * @param httpProvider a {@link AsyncHttpProvider} */ - public AsyncHttpClient(String providerClass, AsyncHttpClientConfig config) { - this.config = new AsyncHttpClientConfig.Builder().build(); - this.httpProvider = loadProvider(providerClass, config); + public AsyncHttpClient(AsyncHttpProvider httpProvider, AsyncHttpClientConfig config) { + this.config = config; + this.httpProvider = httpProvider; } public class BoundRequestBuilder extends RequestBuilderBase { @@ -405,7 +404,7 @@ public void run() { protected void finalize() throws Throwable { try { if (!isClosed.get()) { - logger.debug("AsyncHttpClient.close() hasn't been invoked, which may produce file descriptor leaks"); + logger.error("AsyncHttpClient.close() hasn't been invoked, which may produce file descriptor leaks"); } } finally { super.finalize(); From 8c3deddb81cb1671b5f513e3cdeabb76c03aaf5a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 00:52:33 +0200 Subject: [PATCH 0537/2844] Shouldn't be closing client twice --- .../java/org/asynchttpclient/async/AsyncProvidersBasicTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 8b412ba97d..f400e45cba 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1659,7 +1659,6 @@ public void bodyAsByteTest() throws Throwable { assertEquals(r.getStatusCode(), 200); assertEquals(r.getResponseBodyAsBytes(), new byte[] {}); - client.close(); } finally { client.close(); } From 3259e0c9213d1a7c91fd9716b6d0e9b48849f3a5 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 00:57:06 +0200 Subject: [PATCH 0538/2844] Minor clean up --- .../async/AsyncProvidersBasicTest.java | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index f400e45cba..11651cf430 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1542,14 +1542,7 @@ public void idleRequestTimeoutTest() throws Exception { long t1 = millisTime(); try { - c.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute(new AsyncHandlerAdapter() { - - /* @Override */ - public void onThrowable(Throwable t) { - // t.printStackTrace(); - } - - }).get(); + c.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(); Assert.fail(); } catch (Throwable ex) { final long elapsedTime = millisTime() - t1; @@ -1602,9 +1595,7 @@ public void onThrowable(Throwable t) { public void getShouldAllowBody() throws IllegalArgumentException, IOException { AsyncHttpClient c = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); - builder.setBody("Boo!"); - builder.execute(); + c.prepareGet(getTargetUrl()).setBody("Boo!").execute(); } finally { c.close(); } @@ -1614,9 +1605,7 @@ public void getShouldAllowBody() throws IllegalArgumentException, IOException { public void headShouldNotAllowBody() throws IllegalArgumentException, IOException { AsyncHttpClient c = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder builder = c.prepareHead(getTargetUrl()); - builder.setBody("Boo!"); - builder.execute(); + c.prepareHead(getTargetUrl()).setBody("Boo!").execute(); } finally { c.close(); } @@ -1630,8 +1619,7 @@ protected String getBrokenTargetUrl() { public void invalidUri() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getBrokenTargetUrl()); - Response r = c.executeRequest(builder.build()).get(); + Response r = c.executeRequest(c.prepareGet(getBrokenTargetUrl()).build()).get(); assertEquals(200, r.getStatusCode()); } finally { c.close(); @@ -1642,8 +1630,7 @@ public void invalidUri() throws Exception { public void asyncHttpClientConfigBeanTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfigBean().setUserAgent("test")); try { - AsyncHttpClient.BoundRequestBuilder builder = c.prepareGet(getTargetUrl()); - Response r = c.executeRequest(builder.build()).get(); + Response r = c.executeRequest(c.prepareGet(getTargetUrl()).build()).get(); assertEquals(200, r.getStatusCode()); } finally { c.close(); @@ -1655,10 +1642,8 @@ public void bodyAsByteTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response r = client.prepareGet(getTargetUrl()).execute().get(); - assertEquals(r.getStatusCode(), 200); assertEquals(r.getResponseBodyAsBytes(), new byte[] {}); - } finally { client.close(); } @@ -1669,7 +1654,6 @@ public void mirrorByteTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response r = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); - assertEquals(r.getStatusCode(), 200); assertEquals(new String(r.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); } finally { From 3a3c43bd64b678c0ca15d0030cc036826c3e22a8 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 01:12:55 +0200 Subject: [PATCH 0539/2844] Don't derive --- .../org/asynchttpclient/async/SimpleAsyncHttpClientTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index d5849b1dad..d8b8bedcdb 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -219,7 +219,7 @@ public void onBytesReceived(String url, long amount, long current, long total) { public void testNullUrl() throws Exception { SimpleAsyncHttpClient client = null; try { - client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).build().derive().build(); + client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).build(); assertTrue(true); } catch (NullPointerException ex) { fail(); From fb78a3f316ca0d0a11269afe4cc975bec49ef870 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 01:50:25 +0200 Subject: [PATCH 0540/2844] Upgrade Jetty --- pom.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8587006ded..f7601bc353 100644 --- a/pom.xml +++ b/pom.xml @@ -530,15 +530,14 @@ http://oss.sonatype.org/content/repositories/snapshots - true - + true 1.6 1.6 2.16 1.0.13 1.2.17 6.8.5 - 8.1.1.v20120215 + 8.1.12.v20130726 6.0.29 2.4 1.3 From 9f118927895f9c461e1a8071a630ae6021d42515 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 13:50:38 +0200 Subject: [PATCH 0541/2844] Properly initialize AsyncHttpClientConfigBean.ioThreadMultiplier --- .../java/org/asynchttpclient/AsyncHttpClientConfigBean.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java index 9a7d75bf47..46eb9fe311 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java @@ -54,7 +54,8 @@ void configureDefaults() { maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); compressionEnabled = Boolean.getBoolean(ASYNC_CLIENT + "compressionEnabled"); userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "AsyncHttpClient/" + AHC_VERSION); - + ioThreadMultiplier = Integer.getInteger(ASYNC_CLIENT + "ioThreadMultiplier", 8); + boolean useProxySelector = Boolean.getBoolean(ASYNC_CLIENT + "useProxySelector"); boolean useProxyProperties = Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties"); if (useProxySelector) { From b9f1ca733d05530f19d66c4afbb9ee0aeafd05d1 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 13:51:02 +0200 Subject: [PATCH 0542/2844] Don't make standalone tests target http://foo.com --- .../async/AsyncProvidersBasicTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 11651cf430..4d51edc0d9 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -68,9 +68,9 @@ public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { public void asyncProviderEncodingTest() throws Throwable { AsyncHttpClient p = getAsyncHttpClient(null); try { - Request request = new RequestBuilder("GET").setUrl("http://foo.com/foo.html?q=+%20x").build(); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl() + "?q=+%20x").build(); String requestUrl = request.getUrl(); - Assert.assertEquals(requestUrl, "http://foo.com/foo.html?q=%20%20x"); + Assert.assertEquals(requestUrl, getTargetUrl() + "?q=%20%20x"); Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { @Override public String onCompleted(Response response) throws Exception { @@ -85,7 +85,7 @@ public void onThrowable(Throwable t) { }); String url = responseFuture.get(); - Assert.assertEquals(url, "http://foo.com/foo.html?q=%20%20x"); + Assert.assertEquals(url, getTargetUrl() + "?q=%20%20x"); } finally { p.close(); } @@ -95,7 +95,7 @@ public void onThrowable(Throwable t) { public void asyncProviderEncodingTest2() throws Throwable { AsyncHttpClient p = getAsyncHttpClient(null); try { - Request request = new RequestBuilder("GET").setUrl("http://foo.com/foo.html").addQueryParameter("q", "a b").build(); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl() + "").addQueryParameter("q", "a b").build(); Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { @Override @@ -111,7 +111,7 @@ public void onThrowable(Throwable t) { }); String url = responseFuture.get(); - Assert.assertEquals(url, "http://foo.com/foo.html?q=a%20b"); + Assert.assertEquals(url, getTargetUrl() + "?q=a%20b"); } finally { p.close(); } @@ -121,7 +121,7 @@ public void onThrowable(Throwable t) { public void emptyRequestURI() throws Throwable { AsyncHttpClient p = getAsyncHttpClient(null); try { - Request request = new RequestBuilder("GET").setUrl("http://foo.com").build(); + Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { @Override @@ -137,7 +137,7 @@ public void onThrowable(Throwable t) { }); String url = responseFuture.get(); - Assert.assertEquals(url, "http://foo.com/"); + Assert.assertEquals(url, getTargetUrl()); } finally { p.close(); } From 8eb212be82587eaf2979b2e8e1a0787f5f60b86a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 15:12:11 +0200 Subject: [PATCH 0543/2844] Note to remove hack --- .../org/asynchttpclient/providers/netty4/ProgressListener.java | 1 + 1 file changed, 1 insertion(+) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java index 37f6c68bf0..10739dac52 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java @@ -28,6 +28,7 @@ public ProgressListener(AsyncHttpClientConfig config, boolean notifyHeaders, Asy @Override public void operationComplete(ChannelProgressiveFuture cf) { + // FIXME remove this with next 4.0.9: https://github.com/netty/netty/issues/1809 // The write operation failed. If the channel was cached, it means it got asynchronously closed. // Let's retry a second time. Throwable cause = cf.cause(); From 9cff47c432c55709a4d1cd644f88e0817e855304 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 17:06:49 +0200 Subject: [PATCH 0544/2844] Test clean up --- .../async/AbstractBasicHttpsTest.java | 61 +++++++ .../async/AbstractBasicTest.java | 146 ++++++++++------ .../async/AsyncProvidersBasicTest.java | 1 + .../async/AsyncStreamHandlerTest.java | 5 +- .../async/AuthTimeoutTest.java | 12 +- .../asynchttpclient/async/BasicAuthTest.java | 110 ++++++------ .../asynchttpclient/async/BasicHttpsTest.java | 155 +++++------------ .../asynchttpclient/async/BodyChunkTest.java | 3 +- .../asynchttpclient/async/ChunkingTest.java | 110 ++---------- .../async/ConnectionPoolTest.java | 1 - .../asynchttpclient/async/DigestAuthTest.java | 16 +- .../async/Expect100ContinueTest.java | 1 - .../async/FilePartLargeFileTest.java | 82 ++------- .../async/FollowingThreadTest.java | 5 +- .../async/HostnameVerifierTest.java | 162 ++++-------------- .../async/HttpToHttpsRedirectTest.java | 59 ++----- .../async/IdleStateHandlerTest.java | 30 ++-- .../async/MaxConnectionsInThreads.java | 1 + .../async/MultipartUploadTest.java | 116 ++++++------- .../async/MultipleHeaderTest.java | 84 ++++----- .../async/NonAsciiContentLengthTest.java | 7 +- .../async/PerRequestRelative302Test.java | 18 +- .../org/asynchttpclient/async/ProxyTest.java | 45 +++-- .../async/ProxyTunnellingTest.java | 2 +- .../async/PutLargeFileTest.java | 33 ---- .../async/QueryParametersTest.java | 1 - .../async/RedirectConnectionUsageTest.java | 65 +++---- .../async/SimpleAsyncHttpClientTest.java | 1 - .../async/TransferListenerTest.java | 38 +--- .../async/WebDavBasicTest.java | 14 +- .../ByteArrayBodyGeneratorTest.java | 1 - ...PropertiesBasedResumableProcesserTest.java | 1 - .../asynchttpclient/util/ProxyUtilsTest.java | 7 +- .../util/TestUTF8UrlCodec.java | 8 +- .../websocket/AbstractBasicTest.java | 86 ++++------ .../websocket/CloseCodeReasonMessageTest.java | 6 +- .../websocket/RedirectTest.java | 52 +++--- .../websocket/TextMessageTest.java | 3 +- .../grizzly/GrizzlyBasicHttpsTest.java | 5 - .../NettyRequestThrottleTimeoutTest.java | 23 ++- 40 files changed, 613 insertions(+), 963 deletions(-) create mode 100644 api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java diff --git a/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java new file mode 100644 index 0000000000..3210dc9916 --- /dev/null +++ b/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.async; + +import java.io.File; +import java.net.URL; + +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ssl.SslSocketConnector; +import org.eclipse.jetty.util.ssl.SslContextFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.BeforeClass; + +public abstract class AbstractBasicHttpsTest extends AbstractBasicTest { + protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractBasicHttpsTest.class); + protected Server server; + protected int port1; + protected int port2; + + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { + server = new Server(); + port1 = findFreePort(); + + ClassLoader cl = getClass().getClassLoader(); + + URL keystoreUrl = cl.getResource("ssltest-keystore.jks"); + String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath(); + LOGGER.info("SSL keystore path: {}", keyStoreFile); + SslContextFactory sslContextFactory = new SslContextFactory(keyStoreFile); + sslContextFactory.setKeyStorePassword("changeit"); + + String trustStoreFile = new File(cl.getResource("ssltest-cacerts.jks").toURI()).getAbsolutePath(); + LOGGER.info("SSL certs path: {}", trustStoreFile); + sslContextFactory.setTrustStore(trustStoreFile); + sslContextFactory.setTrustStorePassword("changeit"); + + SslSocketConnector connector = new SslSocketConnector(sslContextFactory); + connector.setHost("127.0.0.1"); + connector.setPort(port1); + server.addConnector(connector); + + server.setHandler(configureHandler()); + server.start(); + LOGGER.info("Local HTTP server started successfully"); + } +} diff --git a/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java index 3e6c368f73..73a1d4c6d6 100644 --- a/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java @@ -15,6 +15,20 @@ */ package org.asynchttpclient.async; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.ServerSocket; +import java.nio.charset.Charset; +import java.util.Enumeration; +import java.util.UUID; + +import javax.servlet.ServletException; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.FileUtils; import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClient; @@ -34,13 +48,6 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.net.ServerSocket; -import java.util.Enumeration; - public abstract class AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); protected Server server; @@ -48,14 +55,49 @@ public abstract class AbstractBasicTest { protected int port2; public final static int TIMEOUT = 30; + public static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); + public static final byte[] PATTERN_BYTES = "FooBarBazQixFooBarBazQixFooBarBazQixFooBarBazQixFooBarBazQixFooBarBazQix".getBytes(Charset.forName("UTF-16")); + public static final File LARGE_IMAGE_FILE; + public static byte[] LARGE_IMAGE_BYTES; + public static final File SIMPLE_TEXT_FILE; + + static { + try { + TMP.mkdirs(); + TMP.deleteOnExit(); + LARGE_IMAGE_FILE = new File(AbstractBasicTest.class.getClassLoader().getResource("300k.png").toURI()); + LARGE_IMAGE_BYTES = FileUtils.readFileToByteArray(LARGE_IMAGE_FILE); + SIMPLE_TEXT_FILE = new File(AbstractBasicTest.class.getClassLoader().getResource("SimpleTextFile.txt").toURI()); + } catch (Exception e) { + throw new ExceptionInInitializerError(e); + } + } + + public static File createTempFile(byte[] pattern, int repeat) throws IOException { + File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); + tmpFile.deleteOnExit(); + FileOutputStream out = null; + try { + out = new FileOutputStream(tmpFile); + for (int i = 0; i < repeat; i++) { + out.write(pattern); + } + + long expectedFileSize = PATTERN_BYTES.length * repeat; + Assert.assertEquals(expectedFileSize, tmpFile.length(), "Invalid file length"); + + return tmpFile; + } finally { + if (out != null) { + out.close(); + } + } + } public static class EchoHandler extends AbstractHandler { - /* @Override */ - public void handle(String pathInContext, - Request request, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + @Override + public void handle(String pathInContext, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { if (httpRequest.getHeader("X-HEAD") != null) { httpResponse.setContentLength(1); @@ -68,8 +110,9 @@ public void handle(String pathInContext, } if (request.getMethod().equalsIgnoreCase("OPTIONS")) { - httpResponse.addHeader("Allow","GET,HEAD,POST,OPTIONS,TRACE"); - }; + httpResponse.addHeader("Allow", "GET,HEAD,POST,OPTIONS,TRACE"); + } + ; Enumeration e = httpRequest.getHeaderNames(); String param; @@ -110,9 +153,9 @@ public void handle(String pathInContext, httpResponse.addHeader("X-KEEP-ALIVE", httpRequest.getRemoteAddr() + ":" + httpRequest.getRemotePort()); - javax.servlet.http.Cookie[] cs = httpRequest.getCookies(); + Cookie[] cs = httpRequest.getCookies(); if (cs != null) { - for (javax.servlet.http.Cookie c : cs) { + for (Cookie c : cs) { httpResponse.addCookie(c); } } @@ -142,9 +185,35 @@ public void handle(String pathInContext, } } + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { + server = new Server(); + + port1 = findFreePort(); + port2 = findFreePort(); + + Connector listener = new SelectChannelConnector(); + + listener.setHost("127.0.0.1"); + listener.setPort(port1); + + server.addConnector(listener); + + listener = new SelectChannelConnector(); + listener.setHost("127.0.0.1"); + listener.setPort(port2); + + server.addConnector(listener); + + server.setHandler(configureHandler()); + server.start(); + log.info("Local HTTP server started successfully"); + } + @AfterClass(alwaysRun = true) public void tearDownGlobal() throws Exception { - server.stop(); + if (server != null) + server.stop(); } protected int findFreePort() throws IOException { @@ -154,8 +223,7 @@ protected int findFreePort() throws IOException { socket = new ServerSocket(0); return socket.getLocalPort(); - } - finally { + } finally { if (socket != null) { socket.close(); } @@ -174,31 +242,6 @@ public AbstractHandler configureHandler() throws Exception { return new EchoHandler(); } - @BeforeClass(alwaysRun = true) - public void setUpGlobal() throws Exception { - server = new Server(); - - port1 = findFreePort(); - port2 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); - - listener = new SelectChannelConnector(); - listener.setHost("127.0.0.1"); - listener.setPort(port2); - - server.addConnector(listener); - - server.setHandler(configureHandler()); - server.start(); - log.info("Local HTTP server started successfully"); - } - public static class AsyncCompletionHandlerAdapter extends AsyncCompletionHandler { public Runnable runnable; @@ -207,7 +250,7 @@ public Response onCompleted(Response response) throws Exception { return response; } - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); Assert.fail("Unexpected exception: " + t.getMessage(), t); @@ -217,35 +260,32 @@ public void onThrowable(Throwable t) { public static class AsyncHandlerAdapter implements AsyncHandler { - - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); Assert.fail("Unexpected exception", t); } - /* @Override */ + @Override public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { return STATE.CONTINUE; } - /* @Override */ + @Override public STATE onStatusReceived(final HttpResponseStatus responseStatus) throws Exception { return STATE.CONTINUE; } - /* @Override */ + @Override public STATE onHeadersReceived(final HttpResponseHeaders headers) throws Exception { return STATE.CONTINUE; } - /* @Override */ + @Override public String onCompleted() throws Exception { return ""; } - } public abstract AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config); - } diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 4d51edc0d9..db340b74e4 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -62,6 +62,7 @@ import org.asynchttpclient.StringPart; public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { + private static final String UTF_8 = "text/html;charset=UTF-8"; @Test(groups = { "standalone", "default_provider", "async" }) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index 2277d5a7a7..9c6a4ddfed 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -38,8 +38,9 @@ import java.util.concurrent.atomic.AtomicBoolean; public abstract class AsyncStreamHandlerTest extends AbstractBasicTest { - private final static String RESPONSE = "param_1_"; - private final static String UTF8 = "text/html;charset=utf-8"; + + private static final String RESPONSE = "param_1_"; + private static final String UTF8 = "text/html;charset=utf-8"; @Test(groups = { "standalone", "default_provider" }) public void asyncStreamGETTest() throws Throwable { diff --git a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java index fb91595999..bd4491f7a6 100644 --- a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java @@ -51,9 +51,9 @@ public abstract class AuthTimeoutTest extends AbstractBasicTest { - private final static String user = "user"; + private static final String USER = "user"; - private final static String admin = "admin"; + private static final String ADMIN = "admin"; protected AsyncHttpClient client; @@ -76,7 +76,7 @@ public void setUpServer(String auth) throws Exception { Constraint constraint = new Constraint(); constraint.setName(auth); - constraint.setRoles(new String[] { user, admin }); + constraint.setRoles(new String[] { USER, ADMIN }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -84,8 +84,8 @@ public void setUpServer(String auth) throws Exception { mapping.setPathSpec("/*"); Set knownRoles = new HashSet(); - knownRoles.add(user); - knownRoles.add(admin); + knownRoles.add(USER); + knownRoles.add(ADMIN); ConstraintSecurityHandler security = new ConstraintSecurityHandler(); @@ -258,7 +258,7 @@ protected Future execute(boolean preemptive) throws IOException { } private Realm realm(boolean preemptive) { - return (new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setUsePreemptiveAuth(preemptive).build(); + return (new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setUsePreemptiveAuth(preemptive).build(); } @Override diff --git a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index 7638571cca..9e5f8b6bdc 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -42,6 +42,7 @@ import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.util.security.Constraint; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -68,12 +69,12 @@ public abstract class BasicAuthTest extends AbstractBasicTest { - protected final static String MY_MESSAGE = "my message"; - protected final static String user = "user"; - protected final static String admin = "admin"; + protected static final String MY_MESSAGE = "my message"; + protected static final String USER = "user"; + protected static final String ADMIN = "admin"; private Server server2; - + public abstract String getProviderClass(); @BeforeClass(alwaysRun = true) @@ -97,7 +98,7 @@ public void setUpGlobal() throws Exception { Constraint constraint = new Constraint(); constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[] { user, admin }); + constraint.setRoles(new String[] { USER, ADMIN }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -108,8 +109,8 @@ public void setUpGlobal() throws Exception { cm.add(mapping); Set knownRoles = new HashSet(); - knownRoles.add(user); - knownRoles.add(admin); + knownRoles.add(USER); + knownRoles.add(ADMIN); ConstraintSecurityHandler security = new ConstraintSecurityHandler(); security.setConstraintMappings(cm, knownRoles); @@ -121,33 +122,7 @@ public void setUpGlobal() throws Exception { server.setHandler(security); server.start(); log.info("Local HTTP server started successfully"); - } - - private String getFileContent(final File file) { - FileInputStream in = null; - try { - if (file.exists() && file.canRead()) { - final StringBuilder sb = new StringBuilder(128); - final byte[] b = new byte[512]; - int read; - in = new FileInputStream(file); - while ((read = in.read(b)) != -1) { - sb.append(new String(b, 0, read, "UTF-8")); - } - return sb.toString(); - } - throw new IllegalArgumentException("File does not exist or cannot be read: " + file.getCanonicalPath()); - } catch (IOException ioe) { - throw new IllegalStateException(ioe); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException ignored) { - } - } - } - + setUpSecondServer(); } private void setUpSecondServer() throws Exception { @@ -165,7 +140,7 @@ private void setUpSecondServer() throws Exception { Constraint constraint = new Constraint(); constraint.setName(Constraint.__DIGEST_AUTH); - constraint.setRoles(new String[] { user, admin }); + constraint.setRoles(new String[] { USER, ADMIN }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -173,8 +148,8 @@ private void setUpSecondServer() throws Exception { mapping.setPathSpec("/*"); Set knownRoles = new HashSet(); - knownRoles.add(user); - knownRoles.add(admin); + knownRoles.add(USER); + knownRoles.add(ADMIN); ConstraintSecurityHandler security = new ConstraintSecurityHandler() { @@ -200,10 +175,39 @@ public void handle(String arg0, Request arg1, HttpServletRequest arg2, HttpServl server2.start(); } - private void stopSecondServer() throws Exception { + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws Exception { + super.tearDownGlobal(); server2.stop(); } + private String getFileContent(final File file) { + FileInputStream in = null; + try { + if (file.exists() && file.canRead()) { + final StringBuilder sb = new StringBuilder(128); + final byte[] b = new byte[512]; + int read; + in = new FileInputStream(file); + while ((read = in.read(b)) != -1) { + sb.append(new String(b, 0, read, "UTF-8")); + } + return sb.toString(); + } + throw new IllegalArgumentException("File does not exist or cannot be read: " + file.getCanonicalPath()); + } catch (IOException ioe) { + throw new IllegalStateException(ioe); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException ignored) { + } + } + } + + } + private class RedirectHandler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { @@ -265,7 +269,7 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR public void basicAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); @@ -281,11 +285,10 @@ public void basicAuthTest() throws IOException, ExecutionException, TimeoutExcep public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = null; try { - setUpSecondServer(); client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).setMaximumNumberOfRedirects(10).build()); AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl2()) // .setHeader( "X-302", "/bla" ) - .setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); @@ -296,7 +299,6 @@ public void redirectAndBasicAuthTest() throws Exception, ExecutionException, Tim } finally { if (client != null) client.close(); - stopSecondServer(); } } @@ -313,7 +315,8 @@ protected String getTargetUrl2() { public void basic401Test() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setHeader("X-401", "401").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setHeader("X-401", "401") + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(new AsyncHandler() { @@ -356,7 +359,8 @@ public Integer onCompleted() throws Exception { public void basicAuthTestPreemtiveTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setUsePreemptiveAuth(true).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm( + (new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setUsePreemptiveAuth(true).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); @@ -372,7 +376,7 @@ public void basicAuthTestPreemtiveTest() throws IOException, ExecutionException, public void basicAuthNegativeTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); @@ -388,7 +392,8 @@ public void basicAuthInputStreamTest() throws IOException, ExecutionException, T AsyncHttpClient client = getAsyncHttpClient(null); try { ByteArrayInputStream is = new ByteArrayInputStream("test".getBytes()); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(is).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(is) + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(30, TimeUnit.SECONDS); @@ -411,7 +416,8 @@ public void basicAuthFileTest() throws Throwable { File file = new File(url.toURI()); final String fileContent = getFileContent(file); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file) + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); @@ -426,7 +432,7 @@ public void basicAuthFileTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void basicAuthAsyncConfigTest() throws Throwable { - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()).build()); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()).build()); try { ClassLoader cl = getClass().getClassLoader(); // override system properties @@ -457,7 +463,8 @@ public void basicAuthFileNoKeepAliveTest() throws Throwable { File file = new File(url.toURI()); final String fileContent = getFileContent(file); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file) + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); @@ -478,7 +485,8 @@ public AbstractHandler configureHandler() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void stringBuilderBodyConsumerTest() throws Throwable { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setRealmPrincipal(user).setRealmPassword(admin).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setRealmPrincipal(USER).setRealmPassword(ADMIN) + .setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { StringBuilder s = new StringBuilder(); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); @@ -498,7 +506,7 @@ public void stringBuilderBodyConsumerTest() throws Throwable { public void noneAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index 1aa8dc5581..c5f4ff36a4 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -15,34 +15,12 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig.Builder; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.ssl.SslSocketConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.annotations.AfterClass; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.testng.Assert.*; -import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLHandshakeException; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.ConnectException; -import java.net.ServerSocket; import java.net.URL; import java.security.KeyStore; import java.security.SecureRandom; @@ -50,21 +28,35 @@ import java.security.cert.X509Certificate; import java.util.Enumeration; import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig.Builder; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; -public abstract class BasicHttpsTest extends AbstractBasicTest { +public abstract class BasicHttpsTest extends AbstractBasicHttpsTest { - protected final Logger log = LoggerFactory.getLogger(BasicHttpsTest.class); + protected static final Logger LOGGER = LoggerFactory.getLogger(BasicHttpsTest.class); public static class EchoHandler extends AbstractHandler { - /* @Override */ + @Override public void handle(String pathInContext, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { httpResponse.setContentType("text/html; charset=utf-8"); @@ -133,75 +125,15 @@ public void handle(String pathInContext, Request r, HttpServletRequest httpReque httpResponse.setStatus(200); httpResponse.getOutputStream().flush(); httpResponse.getOutputStream().close(); - } } - @AfterClass(alwaysRun = true) - public void tearDownGlobal() throws Exception { - server.stop(); - } - - @AfterMethod(alwaysRun = true) - public void tearDownProps() throws Exception { - System.clearProperty("javax.net.ssl.keyStore"); - System.clearProperty("javax.net.ssl.trustStore"); - } - - protected String getTargetUrl() { - return String.format("https://127.0.0.1:%d/foo/test", port1); - } - public AbstractHandler configureHandler() throws Exception { return new EchoHandler(); } - protected int findFreePort() throws IOException { - ServerSocket socket = null; - - try { - socket = new ServerSocket(0); - - return socket.getLocalPort(); - } finally { - if (socket != null) { - socket.close(); - } - } - } - - @BeforeClass(alwaysRun = true) - public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); - SslSocketConnector connector = new SslSocketConnector(); - connector.setHost("127.0.0.1"); - connector.setPort(port1); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL cacertsUrl = cl.getResource("ssltest-cacerts.jks"); - String trustStoreFile = new File(cacertsUrl.toURI()).getAbsolutePath(); - connector.setTruststore(trustStoreFile); - connector.setTrustPassword("changeit"); - connector.setTruststoreType("JKS"); - - log.info("SSL certs path: {}", trustStoreFile); - - // override system properties - URL keystoreUrl = cl.getResource("ssltest-keystore.jks"); - String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath(); - connector.setKeystore(keyStoreFile); - connector.setKeyPassword("changeit"); - connector.setKeystoreType("JKS"); - - log.info("SSL keystore path: {}", keyStoreFile); - - server.addConnector(connector); - - server.setHandler(configureHandler()); - server.start(); - log.info("Local HTTP server started successfully"); + protected String getTargetUrl() { + return String.format("https://127.0.0.1:%d/foo/test", port1); } @Test(groups = { "standalone", "default_provider" }) @@ -209,13 +141,10 @@ public void zeroCopyPostTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); + URL url = getClass().getClassLoader().getResource("SimpleTextFile.txt"); File file = new File(url.toURI()); - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); - Response resp = f.get(); + Response resp = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), "This is a simple test file"); @@ -263,7 +192,7 @@ public void multipleSSLWithoutCacheTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void reconnectsAfterFailedCertificationPath() throws Throwable { - AtomicBoolean trusted = new AtomicBoolean(false); + AtomicBoolean trusted = new AtomicBoolean(false); final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(trusted)).build()); try { final String body = "hello there"; @@ -319,20 +248,20 @@ private static SSLContext createSSLContext(AtomicBoolean trusted) { } private static final TrustManager dummyTrustManager(final AtomicBoolean trusted) { - return new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - if (!trusted.get()) { - throw new CertificateException("Server certificate not trusted."); - } - } - }; - } + return new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + } + + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + if (!trusted.get()) { + throw new CertificateException("Server certificate not trusted."); + } + } + }; + } } diff --git a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java index 4498632771..46ee31059d 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java @@ -29,7 +29,7 @@ public abstract class BodyChunkTest extends AbstractBasicTest { - private final static String MY_MESSAGE = "my message"; + private static final String MY_MESSAGE = "my message"; @Test(groups = { "standalone", "default_provider" }) public void negativeContentTypeTest() throws Throwable { @@ -57,5 +57,4 @@ public void negativeContentTypeTest() throws Throwable { client.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index efffe05660..f5ebf6ac05 100644 --- a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -12,85 +12,52 @@ */ package org.asynchttpclient.async; +import static org.testng.Assert.assertNotNull; +import static org.testng.AssertJUnit.*; +import static org.testng.FileAssert.fail; + +import java.io.BufferedInputStream; +import java.io.FileInputStream; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.testng.annotations.Test; -import java.io.BufferedInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.net.URL; -import java.util.Random; - -import static org.testng.Assert.assertNotNull; -import static org.testng.AssertJUnit.assertEquals; -import static org.testng.AssertJUnit.assertTrue; -import static org.testng.FileAssert.fail; - /** * Test that the url fetcher is able to communicate via a proxy - * + * * @author dominict */ abstract public class ChunkingTest extends AbstractBasicTest { // So we can just test the returned data is the image, // and doesn't contain the chunked delimeters. - public static byte[] LARGE_IMAGE_BYTES; - - static { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - InputStream instream = null; - try { - ClassLoader cl = ChunkingTest.class.getClassLoader(); - // override system properties - URL url = cl.getResource("300k.png"); - File sourceFile = new File(url.toURI()); - instream = new FileInputStream(sourceFile); - byte[] buf = new byte[8092]; - int len = 0; - while ((len = instream.read(buf)) > 0) { - baos.write(buf, 0, len); - } - LARGE_IMAGE_BYTES = baos.toByteArray(); - } - catch (Throwable e) { - LARGE_IMAGE_BYTES = new byte[265495]; - Random x = new Random(); - x.nextBytes(LARGE_IMAGE_BYTES); - } - } /** - * Tests that the custom chunked stream result in success and - * content returned that is unchunked + * Tests that the custom chunked stream result in success and content returned that is unchunked */ @Test() public void testCustomChunking() throws Throwable { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); - + AsyncHttpClientConfig.Builder bc = new AsyncHttpClientConfig.Builder(); + bc.setAllowPoolingConnection(true); bc.setMaximumConnectionsPerHost(1); bc.setMaximumConnectionsTotal(1); bc.setConnectionTimeoutInMs(1000); bc.setRequestTimeoutInMs(1000); bc.setFollowRedirects(true); - - + AsyncHttpClient c = getAsyncHttpClient(bc.build()); try { RequestBuilder builder = new RequestBuilder("POST"); builder.setUrl(getTargetUrl()); // made buff in stream big enough to mark. - builder.setBody(new InputStreamBodyGenerator(new BufferedInputStream(new FileInputStream(getTestFile()), 400000))); + builder.setBody(new InputStreamBodyGenerator(new BufferedInputStream(new FileInputStream(LARGE_IMAGE_FILE), 400000))); Request r = builder.build(); Response res = null; @@ -109,57 +76,14 @@ public void testCustomChunking() throws Throwable { assertTrue("Should have failed due to chunking", res.getHeader("X-Exception").contains("invalid.chunk.length")); fail("HARD Failing the test due to provided InputStreamBodyGenerator, chunking incorrectly:" + res.getHeader("X-Exception")); } else { - assertEquals(LARGE_IMAGE_BYTES, readInputStreamToBytes(res.getResponseBodyAsStream())); + assertEquals(LARGE_IMAGE_BYTES, res.getResponseBodyAsBytes()); } - } - catch (Exception e) { + } catch (Exception e) { fail("Exception Thrown:" + e.getMessage()); } - } - finally { + } finally { c.close(); } } - - private byte[] readInputStreamToBytes(InputStream stream) { - byte[] data = new byte[0]; - ByteArrayOutputStream buffer = new ByteArrayOutputStream(); - try { - int nRead; - byte[] tmp = new byte[8192]; - - while ((nRead = stream.read(tmp, 0, tmp.length)) != -1) { - buffer.write(tmp, 0, nRead); - } - buffer.flush(); - data = buffer.toByteArray(); - } - catch (Exception e) { - - } - finally { - try { - stream.close(); - } catch (Exception e2) { - } - return data; - } - } - - private static File getTestFile() { - String testResource1 = "300k.png"; - - File testResource1File = null; - try { - ClassLoader cl = ChunkingTest.class.getClassLoader(); - URL url = cl.getResource(testResource1); - testResource1File = new File(url.toURI()); - } catch (Throwable e) { - // TODO Auto-generated catch block - fail("unable to find " + testResource1); - } - - return testResource1File; - } } diff --git a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java index ccc7d3901b..8523f82697 100644 --- a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java @@ -268,5 +268,4 @@ public Response onCompleted(Response response) throws Exception { client.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java b/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java index dbd83a4000..7d4427192b 100644 --- a/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java @@ -51,8 +51,8 @@ public abstract class DigestAuthTest extends AbstractBasicTest { - private final static String user = "user"; - private final static String admin = "admin"; + private static final String USER = "user"; + private static final String ADMIN = "admin"; @BeforeClass(alwaysRun = true) @Override @@ -75,7 +75,7 @@ public void setUpGlobal() throws Exception { Constraint constraint = new Constraint(); constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[] { user, admin }); + constraint.setRoles(new String[] { USER, ADMIN }); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); @@ -86,8 +86,8 @@ public void setUpGlobal() throws Exception { cm.add(mapping); Set knownRoles = new HashSet(); - knownRoles.add(user); - knownRoles.add(admin); + knownRoles.add(USER); + knownRoles.add(ADMIN); ConstraintSecurityHandler security = new ConstraintSecurityHandler(); security.setConstraintMappings(cm, knownRoles); @@ -115,7 +115,7 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR public void digestAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setRealmName("MyRealm").setScheme(Realm.AuthScheme.DIGEST).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setRealmName("MyRealm").setScheme(Realm.AuthScheme.DIGEST).build()); Future f = r.execute(); Response resp = f.get(60, TimeUnit.SECONDS); @@ -131,7 +131,7 @@ public void digestAuthTest() throws IOException, ExecutionException, TimeoutExce public void digestAuthTestWithoutScheme() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(user).setPassword(admin).setRealmName("MyRealm").build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setRealmName("MyRealm").build()); Future f = r.execute(); Response resp = f.get(60, TimeUnit.SECONDS); @@ -147,7 +147,7 @@ public void digestAuthTestWithoutScheme() throws IOException, ExecutionException public void digestAuthNegativeTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(admin).setScheme(Realm.AuthScheme.DIGEST).build()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(ADMIN).setScheme(Realm.AuthScheme.DIGEST).build()); Future f = r.execute(); Response resp = f.get(20, TimeUnit.SECONDS); diff --git a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java index d522ab05f5..a0d8a4c7ce 100644 --- a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java +++ b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java @@ -77,5 +77,4 @@ public void Expect100Continue() throws Throwable { public AbstractHandler configureHandler() throws Exception { return new ZeroCopyHandler(); } - } diff --git a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java index adbe310ab3..afca1d2a79 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java @@ -12,6 +12,14 @@ */ package org.asynchttpclient.async; +import java.io.File; +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; import org.asynchttpclient.AsyncHttpClientConfig; @@ -20,34 +28,18 @@ import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.Assert; -import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.ServletInputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.URL; -import java.util.UUID; - -import static org.testng.FileAssert.fail; - public abstract class FilePartLargeFileTest extends AbstractBasicTest { - private File largeFile; - @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutImageFile() throws Exception { - largeFile = getTestFile(); AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build(); AsyncHttpClient client = getAsyncHttpClient(config); try { BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - rb.addBodyPart(new FilePart("test", largeFile, "application/octet-stream", "UTF-8")); + rb.addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")); Response response = rb.execute().get(); Assert.assertEquals(200, response.getStatusCode()); @@ -58,9 +50,8 @@ public void testPutImageFile() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutLargeTextFile() throws Exception { - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 1024 / bytes.length) + 1; - largeFile = createTempFile(bytes, (int) repeats); + long repeats = (1024 * 1024 / PATTERN_BYTES.length) + 1; + File largeFile = createTempFile(PATTERN_BYTES, (int) repeats); AsyncHttpClient client = getAsyncHttpClient(null); try { @@ -75,27 +66,6 @@ public void testPutLargeTextFile() throws Exception { } } - private static File getTestFile() { - String testResource1 = "300k.png"; - - File testResource1File = null; - try { - ClassLoader cl = ChunkingTest.class.getClassLoader(); - URL url = cl.getResource(testResource1); - testResource1File = new File(url.toURI()); - } catch (Throwable e) { - // TODO Auto-generated catch block - fail("unable to find " + testResource1); - } - - return testResource1File; - } - - @AfterMethod - public void after() { - largeFile.delete(); - } - @Override public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { @@ -117,37 +87,7 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle resp.getOutputStream().close(); arg1.setHandled(true); - } }; } - - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); - - public static File createTempFile(byte[] pattern, int repeat) throws IOException { - TMP.mkdirs(); - TMP.deleteOnExit(); - File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); - tmpFile.deleteOnExit(); - write(pattern, repeat, tmpFile); - - return tmpFile; - } - - public static void write(byte[] pattern, int repeat, File file) throws IOException { - file.deleteOnExit(); - file.getParentFile().mkdirs(); - FileOutputStream out = null; - try { - out = new FileOutputStream(file); - for (int i = 0; i < repeat; i++) { - out.write(pattern); - } - } finally { - if (out != null) { - out.close(); - } - } - } - } diff --git a/api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java b/api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java index c86ad22ae4..5ccb8ff6c8 100644 --- a/api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FollowingThreadTest.java @@ -35,7 +35,7 @@ */ public abstract class FollowingThreadTest extends AbstractBasicTest { - private final static int COUNT = 10; + private static final int COUNT = 10; @Test(timeOut = 30 * 1000, groups = { "online", "default_provider", "scalability" }) public void testFollowRedirect() throws IOException, ExecutionException, TimeoutException, InterruptedException { @@ -94,5 +94,4 @@ public Integer onCompleted() throws Exception { pool.shutdown(); } } - -} \ No newline at end of file +} diff --git a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java index 1b5238bab3..989e78b280 100644 --- a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java @@ -12,30 +12,11 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig.Builder; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.ssl.SslSocketConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.annotations.AfterClass; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.testng.Assert.*; -import javax.net.ssl.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.ConnectException; -import java.net.ServerSocket; -import java.net.URL; import java.security.KeyStore; import java.security.SecureRandom; import java.security.cert.CertificateException; @@ -45,11 +26,27 @@ import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.fail; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig.Builder; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; -public abstract class HostnameVerifierTest extends AbstractBasicTest { +public abstract class HostnameVerifierTest extends AbstractBasicHttpsTest { protected final Logger log = LoggerFactory.getLogger(HostnameVerifierTest.class); @@ -128,17 +125,6 @@ public void handle(String pathInContext, Request r, HttpServletRequest httpReque } } - @AfterClass(alwaysRun = true) - public void tearDownGlobal() throws Exception { - server.stop(); - } - - @AfterMethod(alwaysRun = true) - public void tearDownProps() throws Exception { - System.clearProperty("javax.net.ssl.keyStore"); - System.clearProperty("javax.net.ssl.trustStore"); - } - protected String getTargetUrl() { return String.format("https://127.0.0.1:%d/foo/test", port1); } @@ -147,65 +133,12 @@ public AbstractHandler configureHandler() throws Exception { return new EchoHandler(); } - protected int findFreePort() throws IOException { - ServerSocket socket = null; - - try { - socket = new ServerSocket(0); - - return socket.getLocalPort(); - } finally { - if (socket != null) { - socket.close(); - } - } - } - - @BeforeClass(alwaysRun = true) - public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); - SslSocketConnector connector = new SslSocketConnector(); - connector.setHost("127.0.0.1"); - connector.setPort(port1); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL cacertsUrl = cl.getResource("ssltest-cacerts.jks"); - String trustStoreFile = new File(cacertsUrl.toURI()).getAbsolutePath(); - connector.setTruststore(trustStoreFile); - connector.setTrustPassword("changeit"); - connector.setTruststoreType("JKS"); - - log.info("SSL certs path: {}", trustStoreFile); - - // override system properties - URL keystoreUrl = cl.getResource("ssltest-keystore.jks"); - String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath(); - connector.setKeystore(keyStoreFile); - connector.setKeyPassword("changeit"); - connector.setKeystoreType("JKS"); - - log.info("SSL keystore path: {}", keyStoreFile); - - server.addConnector(connector); - - server.setHandler(configureHandler()); - server.start(); - log.info("Local HTTP server started successfully"); - } - @Test(groups = { "standalone", "default_provider" }) public void positiveHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new PositiveHostVerifier()).setSSLContext(createSSLContext()).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute(); + Future f = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute(); Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); @@ -220,13 +153,8 @@ public void negativeHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new NegativeHostVerifier()).setSSLContext(createSSLContext()).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - try { - client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -241,17 +169,10 @@ public void remoteIDHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("bouette")).setSSLContext(createSSLContext()).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - try { - client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); - fail("ConnectException expected"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); - } + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); } finally { client.close(); } @@ -262,17 +183,10 @@ public void remoteNegHostnameVerifierTest() throws Throwable { // request is made to 127.0.0.1, but cert presented for localhost - this should fail final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext()).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - try { - client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); - fail("ConnectException expected"); - } catch (ExecutionException ex) { - assertEquals(ex.getCause().getClass(), ConnectException.class); - } + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + fail("ConnectException expected"); + } catch (ExecutionException ex) { + assertEquals(ex.getCause().getClass(), ConnectException.class); } finally { client.close(); } @@ -283,12 +197,7 @@ public void remotePosHostnameVerifierTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext()).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Response resp = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), "This is a simple test file"); @@ -320,12 +229,7 @@ public CheckHost(String hostName) { } public boolean verify(String s, SSLSession sslSession) { - - if (s != null && s.equalsIgnoreCase(hostName)) { - return true; - } - - return false; + return s != null && s.equalsIgnoreCase(hostName); } } diff --git a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java index 90b81dbd43..a0aa1eac15 100644 --- a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java @@ -15,6 +15,18 @@ */ package org.asynchttpclient.async; +import static org.testng.Assert.*; + +import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.util.Enumeration; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; @@ -27,21 +39,9 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.util.Enumeration; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - public abstract class HttpToHttpsRedirectTest extends AbstractBasicTest { - private final AtomicBoolean isSet = new AtomicBoolean(false); + + private final AtomicBoolean redirectDone = new AtomicBoolean(false); private class Relative302Handler extends AbstractHandler { @@ -53,7 +53,7 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ while (e.hasMoreElements()) { param = e.nextElement().toString(); - if (param.startsWith("X-redirect") && !isSet.getAndSet(true)) { + if (param.startsWith("X-redirect") && !redirectDone.getAndSet(true)) { httpResponse.addHeader("Location", httpRequest.getHeader(param)); httpResponse.setStatus(302); httpResponse.getOutputStream().flush(); @@ -64,7 +64,7 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ if (r.getScheme().equalsIgnoreCase("https")) { httpResponse.addHeader("X-httpToHttps", "PASS"); - isSet.getAndSet(false); + redirectDone.getAndSet(false); } httpResponse.setStatus(200); @@ -116,23 +116,6 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - private String getBaseUrl(URI uri) { - String url = uri.toString(); - int port = uri.getPort(); - if (port == -1) { - port = getPort(uri); - url = url.substring(0, url.length() - 1) + ":" + port; - } - return url.substring(0, url.lastIndexOf(":") + String.valueOf(port).length() + 1); - } - - private static int getPort(URI uri) { - int port = uri.getPort(); - if (port == -1) - port = uri.getScheme().equals("http") ? 80 : 443; - return port; - } - @Test(groups = { "standalone", "default_provider" }) // FIXME find a way to make this threadsafe, other, set @Test(singleThreaded = true) public void httpToHttpsRunAllTestsSequentially() throws Exception { @@ -143,7 +126,7 @@ public void httpToHttpsRunAllTestsSequentially() throws Exception { // @Test(groups = { "standalone", "default_provider" }) public void httpToHttpsRedirect() throws Exception { - isSet.getAndSet(false); + redirectDone.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -157,13 +140,9 @@ public void httpToHttpsRedirect() throws Exception { } } - public String getTargetUrl2() { - return String.format("https://127.0.0.1:%d/foo/test", port2); - } - // @Test(groups = { "standalone", "default_provider" }) public void httpToHttpsProperConfig() throws Exception { - isSet.getAndSet(false); + redirectDone.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -185,7 +164,7 @@ public void httpToHttpsProperConfig() throws Exception { // @Test(groups = { "standalone", "default_provider" }) public void relativeLocationUrl() throws Exception { - isSet.getAndSet(false); + redirectDone.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); diff --git a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java index f42b234464..f5cc4d5b35 100644 --- a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java @@ -15,6 +15,15 @@ */ package org.asynchttpclient.async; +import static org.testng.Assert.fail; + +import java.io.IOException; +import java.util.concurrent.ExecutionException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.eclipse.jetty.server.Connector; @@ -25,29 +34,15 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.testng.Assert.fail; - public abstract class IdleStateHandlerTest extends AbstractBasicTest { - private final AtomicBoolean isSet = new AtomicBoolean(false); private class IdleStateHandler extends AbstractHandler { - public void handle(String s, - Request r, - HttpServletRequest httpRequest, - HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { try { Thread.sleep(20 * 1000); - } - catch (InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } httpResponse.setStatus(200); @@ -72,9 +67,8 @@ public void setUpGlobal() throws Exception { log.info("Local HTTP server started successfully"); } - @Test(groups = {"online", "default_provider"}) + @Test(groups = { "online", "default_provider" }) public void idleStateTest() throws Throwable { - isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(10 * 1000).build(); AsyncHttpClient c = getAsyncHttpClient(cg); diff --git a/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java b/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java index 5ac600592d..8bcdb499f0 100644 --- a/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java @@ -41,6 +41,7 @@ abstract public class MaxConnectionsInThreads extends AbstractBasicTest { + // FIXME weird private static URI servletEndpointUri; @Test(groups = { "online", "default_provider" }) diff --git a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java index 2b7cc355b6..891781fe19 100644 --- a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java @@ -12,35 +12,8 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ByteArrayPart; -import org.asynchttpclient.FilePart; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.StringPart; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.apache.commons.fileupload.FileItemIterator; -import org.apache.commons.fileupload.FileItemStream; -import org.apache.commons.fileupload.FileUploadException; -import org.apache.commons.fileupload.servlet.ServletFileUpload; -import org.apache.commons.fileupload.util.Streams; -import org.apache.commons.io.FileUtils; -import org.apache.commons.io.IOUtils; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; @@ -59,17 +32,41 @@ import java.util.UUID; import java.util.zip.GZIPInputStream; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItemIterator; +import org.apache.commons.fileupload.FileItemStream; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.fileupload.util.Streams; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.IOUtils; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ByteArrayPart; +import org.asynchttpclient.FilePart; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.StringPart; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; /** * @author dominict */ public abstract class MultipartUploadTest extends AbstractBasicTest { - private String servletEndpointRedirectUrl; - public static byte GZIPTEXT[] = new byte[] { 31, -117, 8, 8, 11, 43, 79, 75, 0, 3, 104, 101, 108, 108, 111, 46, 116, 120, 116, 0, -53, 72, -51, -55, -55, -25, 2, 0, 32, 48, 58, 54, 6, 0, 0, 0 }; + public static byte GZIPTEXT[] = new byte[] { 31, -117, 8, 8, 11, 43, 79, 75, 0, 3, 104, 101, 108, 108, 111, 46, 116, 120, 116, 0, -53, 72, -51, -55, -55, -25, 2, 0, 32, 48, + 58, 54, 6, 0, 0, 0 }; @BeforeClass public void setUp() throws Exception { @@ -89,23 +86,6 @@ public void setUp() throws Exception { server.setHandler(context); server.start(); - - servletEndpointRedirectUrl = "http://localhost" + ":" + port1; - } - - @AfterClass - public void stop() { - try { - - if (server != null) { - server.stop(); - } - - } catch (Exception e) { - System.err.print("Error stopping servlet tester"); - e.printStackTrace(); - } - } private File getClasspathFile(String file) throws FileNotFoundException { @@ -215,7 +195,7 @@ public void testSendingSmallFilesAndByteArray() { try { RequestBuilder builder = new RequestBuilder("POST"); - builder.setUrl(servletEndpointRedirectUrl + "/upload/bob"); + builder.setUrl("http://localhost" + ":" + port1 + "/upload/bob"); builder.addBodyPart(new FilePart("file1", testResource1File, "text/plain", "UTF-8")); builder.addBodyPart(new FilePart("file2", testResource2File, "application/x-gzip", null)); builder.addBodyPart(new StringPart("Name", "Dominic")); @@ -446,23 +426,27 @@ public void service(HttpServletRequest request, HttpServletResponse response) th } Writer w = response.getWriter(); - w.write(Integer.toString(getFilesProcessed())); - resetFilesProcessed(); - resetStringsProcessed(); - w.write("||"); - w.write(files.toString()); - w.close(); + try { + w.write(Integer.toString(getFilesProcessed())); + resetFilesProcessed(); + resetStringsProcessed(); + w.write("||"); + w.write(files.toString()); + } finally { + // FIXME + w.close(); + } } else { Writer w = response.getWriter(); - w.write(Integer.toString(getFilesProcessed())); - resetFilesProcessed(); - resetStringsProcessed(); - w.write("||"); - w.close(); + try { + w.write(Integer.toString(getFilesProcessed())); + resetFilesProcessed(); + resetStringsProcessed(); + w.write("||"); + } finally { + w.close(); + } } - } - } - } diff --git a/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java b/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java index 2ea4d395a2..ed6c6b413e 100644 --- a/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java @@ -48,6 +48,49 @@ public abstract class MultipleHeaderTest extends AbstractBasicTest { private ServerSocket serverSocket; private Future voidFuture; + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { + port1 = findFreePort(); + + serverSocket = new ServerSocket(port1); + executorService = Executors.newFixedThreadPool(1); + voidFuture = executorService.submit(new Callable() { + public Void call() throws Exception { + Socket socket; + while ((socket = serverSocket.accept()) != null) { + InputStream inputStream = socket.getInputStream(); + BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); + String req = reader.readLine().split(" ")[1]; + int i = inputStream.available(); + long l = inputStream.skip(i); + Assert.assertEquals(l, i); + socket.shutdownInput(); + if (req.endsWith("MultiEnt")) { + OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); + outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 2\n" + + "Content-Length: 1\n" + "\n0\n"); + outputStreamWriter.flush(); + socket.shutdownOutput(); + } else if (req.endsWith("MultiOther")) { + OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); + outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 1\n" + + "X-Forwarded-For: abc\n" + "X-Forwarded-For: def\n" + "\n0\n"); + outputStreamWriter.flush(); + socket.shutdownOutput(); + } + } + return null; + } + }); + } + + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws Exception { + voidFuture.cancel(true); + executorService.shutdownNow(); + serverSocket.close(); + } + @Test(groups = { "standalone", "default_provider" }) public void testMultipleOtherHeaders() throws IOException, ExecutionException, TimeoutException, InterruptedException { final String[] xffHeaders = new String[] { null, null }; @@ -156,45 +199,4 @@ public Void onCompleted() throws Exception { ahc.close(); } } - - @BeforeClass(alwaysRun = true) - public void setUpGlobal() throws Exception { - port1 = findFreePort(); - - serverSocket = new ServerSocket(port1); - executorService = Executors.newFixedThreadPool(1); - voidFuture = executorService.submit(new Callable() { - public Void call() throws Exception { - Socket socket; - while ((socket = serverSocket.accept()) != null) { - InputStream inputStream = socket.getInputStream(); - BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); - String req = reader.readLine().split(" ")[1]; - int i = inputStream.available(); - long l = inputStream.skip(i); - Assert.assertEquals(l, i); - socket.shutdownInput(); - if (req.endsWith("MultiEnt")) { - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); - outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 2\n" + "Content-Length: 1\n" + "\n0\n"); - outputStreamWriter.flush(); - socket.shutdownOutput(); - } else if (req.endsWith("MultiOther")) { - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); - outputStreamWriter.append("HTTP/1.0 200 OK\n" + "Connection: close\n" + "Content-Type: text/plain; charset=iso-8859-1\n" + "Content-Length: 1\n" + "X-Forwarded-For: abc\n" + "X-Forwarded-For: def\n" + "\n0\n"); - outputStreamWriter.flush(); - socket.shutdownOutput(); - } - } - return null; - } - }); - } - - @AfterClass(alwaysRun = true) - public void tearDownGlobal() throws Exception { - voidFuture.cancel(true); - executorService.shutdownNow(); - serverSocket.close(); - } } diff --git a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java index 924a9c90f8..156b177a26 100644 --- a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java @@ -20,6 +20,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import javax.servlet.ServletException; @@ -27,6 +28,7 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + import java.io.IOException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -35,7 +37,8 @@ public abstract class NonAsciiContentLengthTest extends AbstractBasicTest { - public void setUpServer() throws Exception { + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { server = new Server(); port1 = findFreePort(); Connector listener = new SelectChannelConnector(); @@ -75,7 +78,6 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques @Test(groups = { "standalone", "default_provider" }) public void testNonAsciiContentLength() throws Exception { - setUpServer(); execute("test"); execute("\u4E00"); // Unicode CJK ideograph for one } @@ -92,5 +94,4 @@ protected void execute(String body) throws IOException, InterruptedException, Ex client.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java index 6ca782abe6..b94d9a59a6 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java @@ -41,6 +41,7 @@ import static org.testng.Assert.assertTrue; public abstract class PerRequestRelative302Test extends AbstractBasicTest { + private final AtomicBoolean isSet = new AtomicBoolean(false); private class Relative302Handler extends AbstractHandler { @@ -86,7 +87,14 @@ public void setUpGlobal() throws Exception { } @Test(groups = { "online", "default_provider" }) - public void redirected302Test() throws Throwable { + public void runAllSequentiallyBecauseNotThreadSafe() throws Exception { + redirected302Test(); + notRedirected302Test(); + relativeLocationUrl(); + } + + // @Test(groups = { "online", "default_provider" }) + public void redirected302Test() throws Exception { isSet.getAndSet(false); AsyncHttpClient c = getAsyncHttpClient(null); try { @@ -104,8 +112,8 @@ public void redirected302Test() throws Throwable { } } - @Test(groups = { "online", "default_provider" }) - public void notRedirected302Test() throws Throwable { + // @Test(groups = { "online", "default_provider" }) + public void notRedirected302Test() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -153,8 +161,8 @@ public void redirected302InvalidTest() throws Throwable { } } - @Test(groups = { "standalone", "default_provider" }) - public void relativeLocationUrl() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void relativeLocationUrl() throws Exception { isSet.getAndSet(false); AsyncHttpClient c = getAsyncHttpClient(null); diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java index 2cbb8e3677..5436cb05d8 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java @@ -16,15 +16,14 @@ package org.asynchttpclient.async; import static org.testng.Assert.*; -import static org.testng.Assert.assertEquals; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Response; import java.io.IOException; -import java.net.*; +import java.net.ConnectException; +import java.net.InetSocketAddress; +import java.net.Proxy; +import java.net.ProxySelector; +import java.net.SocketAddress; +import java.net.URI; import java.util.Arrays; import java.util.List; import java.util.Properties; @@ -37,6 +36,10 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; @@ -52,7 +55,8 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR if ("GET".equalsIgnoreCase(request.getMethod())) { response.addHeader("target", r.getUri().getPath()); response.setStatus(HttpServletResponse.SC_OK); - } else { // this handler is to handle POST request + } else { + // this handler is to handle POST request response.sendError(HttpServletResponse.SC_FORBIDDEN); } r.setHandled(true); @@ -144,6 +148,15 @@ public void testNonProxyHostIssue202() throws IOException, ExecutionException, T } @Test(groups = { "standalone", "default_provider" }) + public void runSequentiallyBecauseNotThreadSafe() throws Exception { + testProxyProperties(); + testIgnoreProxyPropertiesByDefault(); + testProxyActivationProperty(); + testWildcardNonProxyHosts(); + testUseProxySelector(); + } + + // @Test(groups = { "standalone", "default_provider" }) public void testProxyProperties() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); try { @@ -183,14 +196,14 @@ public void testProxyProperties() throws IOException, ExecutionException, Timeou } } - @Test(groups = { "standalone", "default_provider" }) + // @Test(groups = { "standalone", "default_provider" }) public void testIgnoreProxyPropertiesByDefault() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); try { Properties props = new Properties(); props.putAll(originalProps); - // FIXME most likely non threadsafe! + // FIXME not threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -215,14 +228,14 @@ public void testIgnoreProxyPropertiesByDefault() throws IOException, ExecutionEx } } - @Test(groups = { "standalone", "default_provider" }) + // @Test(groups = { "standalone", "default_provider" }) public void testProxyActivationProperty() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); try { Properties props = new Properties(); props.putAll(originalProps); - // FIXME most likely non threadsafe! + // FIXME not threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -255,14 +268,14 @@ public void testProxyActivationProperty() throws IOException, ExecutionException } } - @Test(groups = { "standalone", "default_provider" }) + // @Test(groups = { "standalone", "default_provider" }) public void testWildcardNonProxyHosts() throws IOException, ExecutionException, TimeoutException, InterruptedException { Properties originalProps = System.getProperties(); try { Properties props = new Properties(); props.putAll(originalProps); - // FIXME most likely non threadsafe! + // FIXME not threadsafe! System.setProperties(props); System.setProperty("http.proxyHost", "127.0.0.1"); @@ -288,7 +301,7 @@ public void testWildcardNonProxyHosts() throws IOException, ExecutionException, } } - @Test(groups = { "standalone", "default_provider" }) + // @Test(groups = { "standalone", "default_provider" }) public void testUseProxySelector() throws IOException, ExecutionException, TimeoutException, InterruptedException { ProxySelector originalProxySelector = ProxySelector.getDefault(); try { @@ -327,7 +340,7 @@ public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { client.close(); } } finally { - // FIXME is this threadsafe??? + // FIXME not threadsafe ProxySelector.setDefault(originalProxySelector); } } diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index 22e5a9764c..81b37ad077 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -91,7 +91,7 @@ public void setUpGlobal() throws Exception { @AfterClass(alwaysRun = true) public void tearDownGlobal() throws Exception { - super.tearDownGlobal(); + server.stop(); server2.stop(); } diff --git a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index 2fafcdeff7..7dee570d97 100644 --- a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -13,10 +13,7 @@ package org.asynchttpclient.async; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; -import java.nio.charset.Charset; -import java.util.UUID; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -36,21 +33,11 @@ */ public abstract class PutLargeFileTest extends AbstractBasicTest { - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); - private static final byte[] PATTERN_BYTES = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes(Charset.forName("UTF-16")); - - static { - TMP.mkdirs(); - TMP.deleteOnExit(); - } - @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutLargeFile() throws Exception { long repeats = (1024 * 1024 * 100 / PATTERN_BYTES.length) + 1; File file = createTempFile(PATTERN_BYTES, (int) repeats); - long expectedFileSize = PATTERN_BYTES.length * repeats; - Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); int timeout = (int) (repeats / 1000); @@ -73,8 +60,6 @@ public void testPutSmallFile() throws Exception { long repeats = (1024 / PATTERN_BYTES.length) + 1; File file = createTempFile(PATTERN_BYTES, (int) repeats); - long expectedFileSize = PATTERN_BYTES.length * repeats; - Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); AsyncHttpClient client = getAsyncHttpClient(null); try { @@ -103,22 +88,4 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle } }; } - - public static File createTempFile(byte[] pattern, int repeat) throws IOException { - File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); - tmpFile.deleteOnExit(); - FileOutputStream out = null; - try { - out = new FileOutputStream(tmpFile); - for (int i = 0; i < repeat; i++) { - out.write(pattern); - } - } finally { - if (out != null) { - out.close(); - } - } - - return tmpFile; - } } diff --git a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java index 2b6437a888..a72ec9ebcc 100644 --- a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java +++ b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java @@ -125,5 +125,4 @@ public void urlWithColonTest_JDK() throws Throwable { c.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java index 2691ad3f38..4a2b749450 100644 --- a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java @@ -15,6 +15,18 @@ */ package org.asynchttpclient.async; +import static org.testng.Assert.*; +import static org.testng.FileAssert.fail; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.Date; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; @@ -27,31 +39,16 @@ import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; -import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.OutputStream; -import java.util.Date; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.FileAssert.fail; - /** - * Test for multithreaded url fetcher calls that use two separate - * sets of ssl certificates. This then tests that the certificate - * settings do not clash (override each other), resulting in the - * peer not authenticated exception - * + * Test for multithreaded url fetcher calls that use two separate sets of ssl certificates. This then tests that the certificate settings do not clash (override each other), + * resulting in the peer not authenticated exception + * * @author dominict */ -public abstract class RedirectConnectionUsageTest extends AbstractBasicTest{ +public abstract class RedirectConnectionUsageTest extends AbstractBasicTest { private String BASE_URL; private String servletEndpointRedirectUrl; @@ -68,7 +65,6 @@ public void setUp() throws Exception { server.addConnector(listener); - ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); @@ -81,39 +77,23 @@ public void setUp() throws Exception { BASE_URL = "http://localhost" + ":" + port1; servletEndpointRedirectUrl = BASE_URL + "/redirect"; - - } - - @AfterClass - public void tearDown() { - try { - if (server != null) { - server.stop(); - } - - } catch (Exception e) { - System.err.print("Error stopping servlet tester"); - e.printStackTrace(); - } } /** - * Tests that after a redirect the final url in the response - * reflect the redirect + * Tests that after a redirect the final url in the response reflect the redirect */ @Test public void testGetRedirectFinalUrl() { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); - + AsyncHttpClientConfig.Builder bc = new AsyncHttpClientConfig.Builder(); + bc.setAllowPoolingConnection(true); bc.setMaximumConnectionsPerHost(1); bc.setMaximumConnectionsTotal(1); bc.setConnectionTimeoutInMs(1000); bc.setRequestTimeoutInMs(1000); bc.setFollowRedirects(true); - + AsyncHttpClient c = getAsyncHttpClient(bc.build()); try { @@ -146,8 +126,7 @@ public void testGetRedirectFinalUrl() { @SuppressWarnings("serial") class MockRedirectHttpServlet extends HttpServlet { - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.sendRedirect("/overthere"); } } @@ -159,7 +138,7 @@ class MockFullResponseHttpServlet extends HttpServlet { private static final String xml = ""; public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String xmlToReturn = String.format(xml, new Object[]{new Date().toString()}); + String xmlToReturn = String.format(xml, new Object[] { new Date().toString() }); res.setStatus(200, "Complete, XML Being Returned"); res.addHeader("Content-Type", contentType); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index d8b8bedcdb..73bc1ff0c9 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -307,5 +307,4 @@ public void testMultiPartPost() throws Exception { client.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 91a3a534f1..cb67385dff 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -12,17 +12,11 @@ */ package org.asynchttpclient.async; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.fail; +import static org.testng.Assert.*; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; -import java.nio.charset.Charset; import java.util.Enumeration; -import java.util.UUID; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; @@ -45,14 +39,6 @@ public abstract class TransferListenerTest extends AbstractBasicTest { - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); - private static final byte[] PATTERN_BYTES = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes(Charset.forName("UTF-16")); - - static { - TMP.mkdirs(); - TMP.deleteOnExit(); - } - private class BasicHandler extends AbstractHandler { public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { @@ -269,26 +255,4 @@ public void onThrowable(Throwable t) { client.close(); } } - - public String getTargetUrl() { - return String.format("http://127.0.0.1:%d/foo/test", port1); - } - - public static File createTempFile(byte[] pattern, int repeat) throws IOException { - File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); - tmpFile.deleteOnExit(); - FileOutputStream out = null; - try { - out = new FileOutputStream(tmpFile); - for (int i = 0; i < repeat; i++) { - out.write(pattern); - } - } finally { - if (out != null) { - out.close(); - } - } - - return tmpFile; - } } diff --git a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index 4d5374d447..dd8a80d21f 100644 --- a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -40,7 +40,7 @@ public abstract class WebDavBasicTest extends AbstractBasicTest { - public Embedded embedded; + protected Embedded embedded; @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { @@ -76,11 +76,17 @@ public void setUpGlobal() throws Exception { embedded.start(); } + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws InterruptedException, Exception { + embedded.stop(); + } + protected String getTargetUrl() { return String.format("http://127.0.0.1:%s/folder1", port1); } @AfterMethod(alwaysRun = true) + // FIXME not sure that's threadsafe public void clean() throws InterruptedException, Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { @@ -91,11 +97,6 @@ public void clean() throws InterruptedException, Exception { } } - @AfterClass(alwaysRun = true) - public void tearDownGlobal() throws InterruptedException, Exception { - embedded.stop(); - } - @Test(groups = { "standalone", "default_provider" }) public void mkcolWebDavTest1() throws InterruptedException, IOException, ExecutionException { @@ -192,5 +193,4 @@ public WebDavResponse onCompleted(WebDavResponse response) throws Exception { c.close(); } } - } diff --git a/api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java b/api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java index efd53a3bf6..bec6bc7975 100644 --- a/api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java +++ b/api/src/test/java/org/asynchttpclient/generators/ByteArrayBodyGeneratorTest.java @@ -74,5 +74,4 @@ public void testMultipleReads() throws IOException { assertEquals(reads, 4, "reads to drain generator"); assertEquals(bytesRead, srcArraySize, "bytes read"); } - } diff --git a/api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java b/api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java index ab958e529f..39d4ce09c4 100644 --- a/api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java +++ b/api/src/test/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcesserTest.java @@ -36,5 +36,4 @@ public void testSaveLoad() throws Exception { assertEquals(m.get("http://localhost/test.url"), Long.valueOf(15L)); assertEquals(m.get("http://localhost/test2.url"), Long.valueOf(50L)); } - } diff --git a/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java b/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java index 24f1823d97..4fc002c578 100644 --- a/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java +++ b/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java @@ -22,16 +22,13 @@ public class ProxyUtilsTest { @Test(groups = "fast") public void testBasics() { - ProxyServer proxyServer; - Request req; - // should avoid, there is no proxy (is null) - req = new RequestBuilder("GET").setUrl("http://somewhere.com/foo").build(); + Request req = new RequestBuilder("GET").setUrl("http://somewhere.com/foo").build(); Assert.assertTrue(ProxyUtils.avoidProxy(null, req)); // should avoid, it's in non-proxy hosts req = new RequestBuilder("GET").setUrl("http://somewhere.com/foo").build(); - proxyServer = new ProxyServer("foo", 1234); + ProxyServer proxyServer = new ProxyServer("foo", 1234); proxyServer.addNonProxyHost("somewhere.com"); Assert.assertTrue(ProxyUtils.avoidProxy(proxyServer, req)); diff --git a/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java b/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java index 21af508699..dee5562997 100644 --- a/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java +++ b/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java @@ -19,11 +19,9 @@ import org.testng.Assert; import org.testng.annotations.Test; -public class TestUTF8UrlCodec -{ - @Test(groups="fast") - public void testBasics() - { +public class TestUTF8UrlCodec { + @Test(groups = "fast") + public void testBasics() { Assert.assertEquals(UTF8UrlEncoder.encode("foobar"), "foobar"); Assert.assertEquals(UTF8UrlEncoder.encode("a&b"), "a%26b"); Assert.assertEquals(UTF8UrlEncoder.encode("a+b"), "a%2Bb"); diff --git a/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java b/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java index bbff1213e9..c8e765c7d1 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java @@ -12,8 +12,12 @@ */ package org.asynchttpclient.websocket; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerWrapper; @@ -24,18 +28,36 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.net.ServerSocket; +public abstract class AbstractBasicTest extends org.asynchttpclient.async.AbstractBasicTest { -public abstract class AbstractBasicTest extends Server { + protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); + + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { + + server = new Server(); + port1 = findFreePort(); + + SelectChannelConnector connector = new SelectChannelConnector(); + connector.setPort(port1); + server.addConnector(connector); + WebSocketHandler _wsHandler = getWebSocketHandler(); + + server.setHandler(_wsHandler); + + server.start(); + log.info("Local HTTP server started successfully"); + } + + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws Exception { + server.stop(); + } public abstract class WebSocketHandler extends HandlerWrapper implements WebSocketFactory.Acceptor { private final WebSocketFactory _webSocketFactory = new WebSocketFactory(this, 32 * 1024); - public WebSocketHandler(){ + public WebSocketHandler() { _webSocketFactory.setMaxIdleTime(10000); } @@ -43,7 +65,6 @@ public WebSocketFactory getWebSocketFactory() { return _webSocketFactory; } - /* ------------------------------------------------------------ */ @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_webSocketFactory.acceptWebSocket(request, response) || response.isCommitted()) @@ -51,57 +72,14 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques super.handle(target, baseRequest, request, response); } - /* ------------------------------------------------------------ */ public boolean checkOrigin(HttpServletRequest request, String origin) { return true; } - - } - - protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); - protected int port1; - SelectChannelConnector _connector; - - @AfterClass(alwaysRun = true) - public void tearDownGlobal() throws Exception { - stop(); - } - - protected int findFreePort() throws IOException { - ServerSocket socket = null; - - try { - socket = new ServerSocket(0); - - return socket.getLocalPort(); - } finally { - if (socket != null) { - socket.close(); - } - } } protected String getTargetUrl() { return String.format("ws://127.0.0.1:%d/", port1); } - @BeforeClass(alwaysRun = true) - public void setUpGlobal() throws Exception { - port1 = findFreePort(); - _connector = new SelectChannelConnector(); - _connector.setPort(port1); - - addConnector(_connector); - WebSocketHandler _wsHandler = getWebSocketHandler(); - - setHandler(_wsHandler); - - start(); - log.info("Local HTTP server started successfully"); - } - - public abstract WebSocketHandler getWebSocketHandler() ; - - public abstract AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config); - + public abstract WebSocketHandler getWebSocketHandler(); } diff --git a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java index 271ade7912..17beea6214 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java @@ -78,11 +78,11 @@ public Listener(CountDownLatch latch, AtomicReference text) { this.text = text; } - // @Override + @Override public void onOpen(WebSocket websocket) { } - // @Override + @Override public void onClose(WebSocket websocket) { } @@ -91,7 +91,7 @@ public void onClose(WebSocket websocket, int code, String reason) { latch.countDown(); } - // @Override + @Override public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); diff --git a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java index dda8808237..33fa8c9b5d 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java @@ -13,48 +13,44 @@ package org.asynchttpclient.websocket; +import static org.testng.Assert.assertEquals; + +import java.io.IOException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.websocket.WebSocket; -import org.asynchttpclient.websocket.WebSocketListener; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.atomic.AtomicReference; - -import static org.testng.Assert.assertEquals; - public abstract class RedirectTest extends AbstractBasicTest { - protected int port2; - - // ------------------------------------------ Methods from AbstractBasicTest - @BeforeClass @Override public void setUpGlobal() throws Exception { port1 = findFreePort(); + port2 = findFreePort(); - _connector = new SelectChannelConnector(); - _connector.setPort(port1); + server = new Server(); - addConnector(_connector); + SelectChannelConnector connector = new SelectChannelConnector(); + connector.setPort(port1); + server.addConnector(connector); - port2 = findFreePort(); - final SelectChannelConnector connector2 = new SelectChannelConnector(); + SelectChannelConnector connector2 = new SelectChannelConnector(); connector2.setPort(port2); - addConnector(connector2); - WebSocketHandler _wsHandler = getWebSocketHandler(); + server.addConnector(connector2); + HandlerList list = new HandlerList(); list.addHandler(new AbstractHandler() { @Override @@ -64,10 +60,10 @@ public void handle(String s, Request request, HttpServletRequest httpServletRequ } } }); - list.addHandler(_wsHandler); - setHandler(list); + list.addHandler(getWebSocketHandler()); + server.setHandler(list); - start(); + server.start(); log.info("Local HTTP server started successfully"); } @@ -81,8 +77,6 @@ public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletReque }; } - // ------------------------------------------------------------ Test Methods - @Test(timeOut = 60000) public void testRedirectToWSResource() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); @@ -117,8 +111,6 @@ public void onError(Throwable t) { } } - // --------------------------------------------------------- Private Methods - private String getRedirectURL() { return String.format("ws://127.0.0.1:%d/", port2); } diff --git a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java index c64efe4cd7..4bce6f8860 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java @@ -76,7 +76,7 @@ public void onOpen() throws Throwable { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override public void onOpen(WebSocket websocket) { @@ -402,5 +402,4 @@ public void onError(Throwable t) { c.close(); } } - } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java index b8e2902466..c2cedc0eee 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicHttpsTest.java @@ -23,9 +23,4 @@ public class GrizzlyBasicHttpsTest extends BasicHttpsTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } - - @Override - public void zeroCopyPostTest() throws Throwable { - super.zeroCopyPostTest(); //To change body of overridden methods use File | Settings | File Templates. - } } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java index 314624c463..96b1288664 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java @@ -12,11 +12,11 @@ */ package org.asynchttpclient.providers.netty4; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import static org.testng.Assert.*; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; @@ -27,17 +27,16 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.eclipse.jetty.continuation.Continuation; -import org.eclipse.jetty.continuation.ContinuationSupport; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; - import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; +import org.eclipse.jetty.continuation.Continuation; +import org.eclipse.jetty.continuation.ContinuationSupport; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { private static final String MSG = "Enough is enough."; @@ -80,11 +79,12 @@ public void run() { public void testRequestTimeout() throws IOException { final Semaphore requestThrottle = new Semaphore(1); - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true) + .setMaximumConnectionsTotal(1).build()); try { final CountDownLatch latch = new CountDownLatch(2); + final List tooManyConnections = Collections.synchronizedList(new ArrayList(2)); - final List tooManyConnections = new ArrayList(2); for (int i = 0; i < 2; i++) { new Thread(new Runnable() { @@ -119,7 +119,6 @@ public void onThrowable(Throwable t) { } }).start(); - } try { @@ -128,7 +127,7 @@ public void onThrowable(Throwable t) { fail("failed to wait for requests to complete"); } - assertTrue(tooManyConnections.size() == 0, "Should not have any connection errors where too many connections have been attempted"); + assertTrue(tooManyConnections.isEmpty(), "Should not have any connection errors where too many connections have been attempted"); } finally { client.close(); } From abf97e9bfd7f53330d6aabcd1b6bd136e2231411 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 23:16:13 +0200 Subject: [PATCH 0545/2844] Minor clean up --- .../java/org/asynchttpclient/FilePart.java | 2 +- .../asynchttpclient/async/BasicHttpsTest.java | 20 +++++------ .../asynchttpclient/async/ChunkingTest.java | 34 +++++++------------ .../async/FilePartLargeFileTest.java | 18 +++------- 4 files changed, 25 insertions(+), 49 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/FilePart.java b/api/src/main/java/org/asynchttpclient/FilePart.java index c5cc15860e..155d22a267 100644 --- a/api/src/main/java/org/asynchttpclient/FilePart.java +++ b/api/src/main/java/org/asynchttpclient/FilePart.java @@ -37,7 +37,7 @@ public FilePart(String name, File file, String mimeType, String charSet) { /** * {@inheritDoc} */ - /* @Override */ + @Override public String getName() { return name; } diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index c5f4ff36a4..88858870d9 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -17,11 +17,9 @@ import static org.testng.Assert.*; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.ConnectException; -import java.net.URL; import java.security.KeyStore; import java.security.SecureRandom; import java.security.cert.CertificateException; @@ -38,6 +36,7 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import javax.servlet.ServletException; +import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -95,9 +94,9 @@ public void handle(String pathInContext, Request r, HttpServletRequest httpReque httpResponse.addHeader("X-KEEP-ALIVE", httpRequest.getRemoteAddr() + ":" + httpRequest.getRemotePort()); - javax.servlet.http.Cookie[] cs = httpRequest.getCookies(); + Cookie[] cs = httpRequest.getCookies(); if (cs != null) { - for (javax.servlet.http.Cookie c : cs) { + for (Cookie c : cs) { httpResponse.addCookie(c); } } @@ -141,10 +140,7 @@ public void zeroCopyPostTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - URL url = getClass().getClassLoader().getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Response resp = client.preparePost(getTargetUrl()).setBody(file).setHeader("Content-Type", "text/html").execute().get(); + Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), "This is a simple test file"); @@ -175,7 +171,7 @@ public void multipleSSLRequestsTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void multipleSSLWithoutCacheTest() throws Throwable { - final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).setAllowSslConnectionPool(false).build()); + AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).setAllowSslConnectionPool(false).build()); try { String body = "hello there"; c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute(); @@ -193,9 +189,9 @@ public void multipleSSLWithoutCacheTest() throws Throwable { @Test(groups = { "standalone", "default_provider" }) public void reconnectsAfterFailedCertificationPath() throws Throwable { AtomicBoolean trusted = new AtomicBoolean(false); - final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(trusted)).build()); + AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(trusted)).build()); try { - final String body = "hello there"; + String body = "hello there"; // first request fails because server certificate is rejected try { @@ -213,7 +209,7 @@ public void reconnectsAfterFailedCertificationPath() throws Throwable { trusted.set(true); // second request should succeed - final Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(TIMEOUT, TimeUnit.SECONDS); assertEquals(response.getResponseBody(), body); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index f5ebf6ac05..52f8d00722 100644 --- a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -12,7 +12,6 @@ */ package org.asynchttpclient.async; -import static org.testng.Assert.assertNotNull; import static org.testng.AssertJUnit.*; import static org.testng.FileAssert.fail; @@ -21,7 +20,6 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.Request; import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; @@ -60,27 +58,19 @@ public void testCustomChunking() throws Throwable { builder.setBody(new InputStreamBodyGenerator(new BufferedInputStream(new FileInputStream(LARGE_IMAGE_FILE), 400000))); Request r = builder.build(); - Response res = null; - try { - ListenableFuture response = c.executeRequest(r); - res = response.get(); - assertNotNull(res.getResponseBodyAsStream()); - if (500 == res.getStatusCode()) { - System.out.println("=============="); - System.out.println("500 response from call"); - System.out.println("Headers:" + res.getHeaders()); - System.out.println("=============="); - System.out.flush(); - assertEquals("Should have 500 status code", 500, res.getStatusCode()); - assertTrue("Should have failed due to chunking", res.getHeader("X-Exception").contains("invalid.chunk.length")); - fail("HARD Failing the test due to provided InputStreamBodyGenerator, chunking incorrectly:" + res.getHeader("X-Exception")); - } else { - assertEquals(LARGE_IMAGE_BYTES, res.getResponseBodyAsBytes()); - } - } catch (Exception e) { - - fail("Exception Thrown:" + e.getMessage()); + Response response = c.executeRequest(r).get(); + if (500 == response.getStatusCode()) { + System.out.println("=============="); + System.out.println("500 response from call"); + System.out.println("Headers:" + response.getHeaders()); + System.out.println("=============="); + System.out.flush(); + assertEquals("Should have 500 status code", 500, response.getStatusCode()); + assertTrue("Should have failed due to chunking", response.getHeader("X-Exception").contains("invalid.chunk.length")); + fail("HARD Failing the test due to provided InputStreamBodyGenerator, chunking incorrectly:" + response.getHeader("X-Exception")); + } else { + assertEquals(LARGE_IMAGE_BYTES, response.getResponseBodyAsBytes()); } } finally { c.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java index afca1d2a79..dd87e925d5 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java @@ -21,7 +21,6 @@ import javax.servlet.http.HttpServletResponse; import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.FilePart; import org.asynchttpclient.Response; @@ -34,14 +33,9 @@ public abstract class FilePartLargeFileTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutImageFile() throws Exception { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build(); - AsyncHttpClient client = getAsyncHttpClient(config); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build()); try { - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - - rb.addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")); - - Response response = rb.execute().get(); + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(); Assert.assertEquals(200, response.getStatusCode()); } finally { client.close(); @@ -51,15 +45,11 @@ public void testPutImageFile() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutLargeTextFile() throws Exception { long repeats = (1024 * 1024 / PATTERN_BYTES.length) + 1; - File largeFile = createTempFile(PATTERN_BYTES, (int) repeats); + File file = createTempFile(PATTERN_BYTES, (int) repeats); AsyncHttpClient client = getAsyncHttpClient(null); try { - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - - rb.addBodyPart(new FilePart("test", largeFile, "application/octet-stream", "UTF-8")); - - Response response = rb.execute().get(); + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(); Assert.assertEquals(200, response.getStatusCode()); } finally { client.close(); From 3923fce3df0ad2b046d8546e300f6ec58c021872 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 5 Sep 2013 23:50:54 +0200 Subject: [PATCH 0546/2844] Minor clean up --- .../async/AsyncProvidersBasicTest.java | 342 +++++++++--------- .../async/BodyDeferringAsyncHandlerTest.java | 2 - .../async/PutLargeFileTest.java | 16 +- .../async/ZeroCopyFileTest.java | 90 ++--- 4 files changed, 202 insertions(+), 248 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index db340b74e4..09ea80bd7d 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -67,94 +67,92 @@ public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider", "async" }) public void asyncProviderEncodingTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { Request request = new RequestBuilder("GET").setUrl(getTargetUrl() + "?q=+%20x").build(); String requestUrl = request.getUrl(); Assert.assertEquals(requestUrl, getTargetUrl() + "?q=%20%20x"); - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + + String url = client.executeRequest(request, new AsyncCompletionHandler() { @Override public String onCompleted(Response response) throws Exception { return response.getUri().toString(); } - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); Assert.fail("Unexpected exception: " + t.getMessage(), t); } - }); - String url = responseFuture.get(); + }).get(); Assert.assertEquals(url, getTargetUrl() + "?q=%20%20x"); } finally { - p.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncProviderEncodingTest2() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { Request request = new RequestBuilder("GET").setUrl(getTargetUrl() + "").addQueryParameter("q", "a b").build(); - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + String url = client.executeRequest(request, new AsyncCompletionHandler() { @Override public String onCompleted(Response response) throws Exception { return response.getUri().toString(); } - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); Assert.fail("Unexpected exception: " + t.getMessage(), t); } - }); - String url = responseFuture.get(); + }).get(); Assert.assertEquals(url, getTargetUrl() + "?q=a%20b"); } finally { - p.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void emptyRequestURI() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - Future responseFuture = p.executeRequest(request, new AsyncCompletionHandler() { + String url = client.executeRequest(request, new AsyncCompletionHandler() { @Override public String onCompleted(Response response) throws Exception { return response.getUri().toString(); } - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); Assert.fail("Unexpected exception: " + t.getMessage(), t); } - }); - String url = responseFuture.get(); + }).get(); Assert.assertEquals(url, getTargetUrl()); } finally { - p.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncProviderContentLenghtGETTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); + final HttpURLConnection connection = (HttpURLConnection) new URL(getTargetUrl()).openConnection(); + connection.connect(); + final int ct = connection.getContentLength(); try { final CountDownLatch l = new CountDownLatch(1); - URL url = new URL(getTargetUrl()); - final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); - connection.connect(); Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -164,7 +162,6 @@ public Response onCompleted(Response response) throws Exception { if (response.getHeader("content-length") != null) { contentLenght = Integer.valueOf(response.getHeader("content-length")); } - int ct = connection.getContentLength(); assertEquals(contentLenght, ct); } finally { l.countDown(); @@ -187,17 +184,17 @@ public void onThrowable(Throwable t) { Assert.fail("Timeout out"); } } finally { - p.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncContentTypeGETTest() throws Throwable { - AsyncHttpClient p = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { + client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -214,17 +211,17 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - p.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncHeaderGETTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -242,13 +239,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - n.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncHeaderPOSTTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -259,7 +256,7 @@ public void asyncHeaderPOSTTest() throws Throwable { h.add("Test5", "Test5"); Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).setHeaders(h).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -280,13 +277,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - n.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncParamPOSTTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -297,14 +294,13 @@ public void asyncParamPOSTTest() throws Throwable { m.put("param_" + i, Arrays.asList("value_" + i)); } Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { try { assertEquals(response.getStatusCode(), 200); for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); assertEquals(response.getHeader("X-param_" + i), "value_" + i); } @@ -319,17 +315,17 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - n.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncStatusHEADTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); Request request = new RequestBuilder("HEAD").setUrl(getTargetUrl()).build(); - Response response = n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -353,19 +349,19 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - n.close(); + client.close(); } } // TODO: fix test @Test(groups = { "standalone", "default_provider", "async" }, enabled = false) public void asyncStatusHEADContentLenghtTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(120 * 1000).build()); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(120 * 1000).build()); try { final CountDownLatch l = new CountDownLatch(1); Request request = new RequestBuilder("HEAD").setUrl(getTargetUrl()).build(); - n.executeRequest(request, new AsyncCompletionHandlerAdapter() { + client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { Assert.fail(); @@ -388,31 +384,31 @@ public void onThrowable(Throwable t) { Assert.fail("Timeout out"); } } finally { - n.close(); + client.close(); } } @Test(groups = { "online", "default_provider", "async" }) public void asyncNullSchemeTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - c.prepareGet("www.sun.com").execute(); + client.prepareGet("www.sun.com").execute(); Assert.fail(); } catch (IllegalArgumentException ex) { Assert.assertTrue(true); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetTransferEncodingTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); - c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -430,13 +426,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetHeadersTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -445,7 +441,7 @@ public void asyncDoGetHeadersTest() throws Throwable { h.add("Test3", "Test3"); h.add("Test4", "Test4"); h.add("Test5", "Test5"); - c.prepareGet(getTargetUrl()).setHeaders(h).execute(new AsyncCompletionHandlerAdapter() { + client.prepareGet(getTargetUrl()).setHeaders(h).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -464,13 +460,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoGetCookieTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -481,7 +477,7 @@ public void asyncDoGetCookieTest() throws Throwable { h.add("Test5", "Test5"); final Cookie coo = new Cookie("/", "foo", "value", "/", -1, false); - c.prepareGet(getTargetUrl()).setHeaders(h).addCookie(coo).execute(new AsyncCompletionHandlerAdapter() { + client.prepareGet(getTargetUrl()).setHeaders(h).addCookie(coo).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -501,16 +497,16 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostDefaultContentType() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); - c.preparePost(getTargetUrl()).addParameter("foo", "bar").execute(new AsyncCompletionHandlerAdapter() { + client.preparePost(getTargetUrl()).addParameter("foo", "bar").execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -529,24 +525,24 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostBodyIsoTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = c.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); - assertEquals(r.getResponseBody().getBytes("ISO-8859-1"), "\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); + Response response = client.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); + assertEquals(response.getResponseBody().getBytes("ISO-8859-1"), "\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostBytesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -561,7 +557,7 @@ public void asyncDoPostBytesTest() throws Throwable { } sb.setLength(sb.length() - 1); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -583,13 +579,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostInputStreamTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -605,7 +601,7 @@ public void asyncDoPostInputStreamTest() throws Throwable { sb.setLength(sb.length() - 1); ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { + client.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -626,13 +622,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPutInputStreamTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -648,7 +644,7 @@ public void asyncDoPutInputStreamTest() throws Throwable { sb.setLength(sb.length() - 1); ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); - c.preparePut(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { + client.preparePut(getTargetUrl()).setHeaders(h).setBody(is).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -669,19 +665,19 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostMultiPartTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); Part p = new StringPart("foo", "bar"); - c.preparePost(getTargetUrl()).addBodyPart(p).execute(new AsyncCompletionHandlerAdapter() { + client.preparePost(getTargetUrl()).addBodyPart(p).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -701,14 +697,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostBasicGZIPTest() throws Throwable { - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build(); - AsyncHttpClient c = getAsyncHttpClient(cf); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build()); try { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -723,7 +718,7 @@ public void asyncDoPostBasicGZIPTest() throws Throwable { } sb.setLength(sb.length() - 1); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { @@ -740,14 +735,13 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Timeout out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostProxyTest() throws Throwable { - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port2)).build(); - AsyncHttpClient c = getAsyncHttpClient(cf); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port2)).build()); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -761,7 +755,7 @@ public void asyncDoPostProxyTest() throws Throwable { } sb.setLength(sb.length() - 1); - Response response = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandler() { + Response response = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandler() { @Override public Response onCompleted(Response response) throws Exception { return response; @@ -775,13 +769,13 @@ public void onThrowable(Throwable t) { assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-Proxy-Connection"), "keep-alive"); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncRequestVirtualServerPOSTTest() throws Throwable { - AsyncHttpClient n = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -792,7 +786,7 @@ public void asyncRequestVirtualServerPOSTTest() throws Throwable { } Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).setVirtualHost("localhost:" + port1).build(); - Response response = n.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(); + Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(); assertEquals(response.getStatusCode(), 200); if (response.getHeader("X-Host").startsWith("localhost")) { @@ -801,13 +795,13 @@ public void asyncRequestVirtualServerPOSTTest() throws Throwable { assertEquals(response.getHeader("X-Host"), "127.0.0.1:" + port1); } } finally { - n.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPutTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -821,11 +815,11 @@ public void asyncDoPutTest() throws Throwable { } sb.setLength(sb.length() - 1); - Response response = c.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); + Response response = client.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); assertEquals(response.getStatusCode(), 200); } finally { - c.close(); + client.close(); } } @@ -874,7 +868,7 @@ public Response onCompleted(Response response) throws Exception { @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostDelayCancelTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -882,7 +876,7 @@ public void asyncDoPostDelayCancelTest() throws Throwable { StringBuilder sb = new StringBuilder(); sb.append("LockThread=true"); - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { } @@ -891,13 +885,13 @@ public void onThrowable(Throwable t) { Response response = future.get(TIMEOUT, TimeUnit.SECONDS); Assert.assertNull(response); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostDelayBytesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -906,7 +900,7 @@ public void asyncDoPostDelayBytesTest() throws Throwable { sb.append("LockThread=true"); try { - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { t.printStackTrace(); @@ -924,14 +918,14 @@ public void onThrowable(Throwable t) { Assert.assertTrue(false); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostNullBytesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -945,19 +939,19 @@ public void asyncDoPostNullBytesTest() throws Throwable { } sb.setLength(sb.length() - 1); - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); + Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); Response response = future.get(); Assert.assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostListenerBytesTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -973,7 +967,7 @@ public void asyncDoPostListenerBytesTest() throws Throwable { final CountDownLatch l = new CountDownLatch(1); - c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { try { @@ -989,20 +983,20 @@ public Response onCompleted(Response response) throws Exception { Assert.fail("Latch time out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidFuture() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { int dummyPort = findFreePort(); final AtomicInteger count = new AtomicInteger(); for (int i = 0; i < 20; i++) { try { - Response response = c.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ + Response response = client.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { + @Override public void onThrowable(Throwable t) { count.incrementAndGet(); } @@ -1017,18 +1011,18 @@ public void onThrowable(Throwable t) { } assertEquals(count.get(), 20); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidPortFuture() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { int dummyPort = findFreePort(); try { - Response response = c.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ + Response response = client.preparePost(String.format("http://127.0.0.1:%d/", dummyPort)).execute(new AsyncCompletionHandlerAdapter() { + @Override public void onThrowable(Throwable t) { t.printStackTrace(); } @@ -1041,20 +1035,20 @@ public void onThrowable(Throwable t) { } } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidPort() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { // pick a random unused local port int port = findFreePort(); try { - Response response = c.preparePost(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ + Response response = client.preparePost(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { + @Override public void onThrowable(Throwable t) { t.printStackTrace(); } @@ -1064,19 +1058,19 @@ public void onThrowable(Throwable t) { assertEquals(ex.getCause().getClass(), ConnectException.class); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidHandlerPort() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); int port = findFreePort(); - c.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ + client.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { + @Override public void onThrowable(Throwable t) { try { assertEquals(t.getClass(), ConnectException.class); @@ -1090,18 +1084,18 @@ public void onThrowable(Throwable t) { Assert.fail("Timed out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "online", "default_provider", "async" }) public void asyncConnectInvalidHandlerHost() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); - c.prepareGet("http://null.apache.org:9999/").execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ + client.prepareGet("http://null.apache.org:9999/").execute(new AsyncCompletionHandlerAdapter() { + @Override public void onThrowable(Throwable t) { if (t != null) { if (t.getClass().equals(ConnectException.class)) { @@ -1117,13 +1111,13 @@ public void onThrowable(Throwable t) { Assert.fail("Timed out"); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncConnectInvalidFuturePort() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicBoolean called = new AtomicBoolean(false); final AtomicBoolean rightCause = new AtomicBoolean(false); @@ -1131,7 +1125,7 @@ public void asyncConnectInvalidFuturePort() throws Throwable { int port = findFreePort(); try { - Response response = c.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { + Response response = client.prepareGet(String.format("http://127.0.0.1:%d/", port)).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { called.set(true); @@ -1147,15 +1141,15 @@ public void onThrowable(Throwable t) { assertTrue(called.get(), "onThrowable should get called."); assertTrue(rightCause.get(), "onThrowable should get called with ConnectionException"); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncContentLenghtGETTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + Response response = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { @@ -1166,15 +1160,15 @@ public void onThrowable(Throwable t) { Assert.assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncResponseBodyTooLarge() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = c.preparePost(getTargetUrl()).setBody("0123456789").execute(new AsyncCompletionHandlerAdapter() { + Response response = client.preparePost(getTargetUrl()).setBody("0123456789").execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { @@ -1184,15 +1178,15 @@ public void onThrowable(Throwable t) { Assert.assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncResponseEmptyBody() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = c.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { + Response response = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { @@ -1202,7 +1196,7 @@ public void onThrowable(Throwable t) { assertEquals(response.getResponseBody(), ""); } finally { - c.close(); + client.close(); } } @@ -1467,10 +1461,8 @@ public void onThrowable(Throwable t) { public void asyncDoGetStreamAndBodyTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.prepareGet("http://www.google.com/").execute().get(); - - r.getResponseBody(); - r.getResponseBodyAsStream(); + Response response = client.prepareGet("http://www.google.com/").execute().get(); + assertEquals(response.getStatusCode(), 200); } finally { client.close(); } @@ -1480,10 +1472,8 @@ public void asyncDoGetStreamAndBodyTest() throws Throwable { public void asyncUrlWithoutPathTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.prepareGet("http://www.google.com").execute().get(); - - r.getResponseBody(); - r.getResponseBodyAsStream(); + Response response = client.prepareGet("http://www.google.com").execute().get(); + assertEquals(response.getStatusCode(), 200); } finally { client.close(); } @@ -1493,10 +1483,10 @@ public void asyncUrlWithoutPathTest() throws Throwable { public void optionsTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.prepareOptions(getTargetUrl()).execute().get(); + Response response = client.prepareOptions(getTargetUrl()).execute().get(); - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getHeader("Allow"), "GET,HEAD,POST,OPTIONS,TRACE"); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getHeader("Allow"), "GET,HEAD,POST,OPTIONS,TRACE"); } finally { client.close(); } @@ -1504,38 +1494,38 @@ public void optionsTest() throws Throwable { @Test(groups = { "online", "default_provider" }) public void testAwsS3() throws Exception { - final AsyncHttpClient c = getAsyncHttpClient(null); + final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = c.prepareGet("http://test.s3.amazonaws.com/").execute().get(); + Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(); if (response.getResponseBody() == null || response.getResponseBody().equals("")) { fail("No response Body"); } else { assertEquals(response.getStatusCode(), 403); } } finally { - c.close(); + client.close(); } } @Test(groups = { "online", "default_provider" }) public void testAsyncHttpProviderConfig() throws Exception { - final AsyncHttpClient c = getAsyncHttpClient(new Builder().setAsyncHttpClientProviderConfig(getProviderConfig()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setAsyncHttpClientProviderConfig(getProviderConfig()).build()); try { - Response response = c.prepareGet("http://test.s3.amazonaws.com/").execute().get(); + Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(); if (response.getResponseBody() == null || response.getResponseBody().equals("")) { fail("No response Body"); } else { assertEquals(response.getStatusCode(), 403); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider" }) public void idleRequestTimeoutTest() throws Exception { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(5000).setRequestTimeoutInMs(10000).build()); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(5000).setRequestTimeoutInMs(10000).build()); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -1543,7 +1533,7 @@ public void idleRequestTimeoutTest() throws Exception { long t1 = millisTime(); try { - c.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(); + client.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(); Assert.fail(); } catch (Throwable ex) { final long elapsedTime = millisTime() - t1; @@ -1552,14 +1542,14 @@ public void idleRequestTimeoutTest() throws Exception { Assert.assertTrue(elapsedTime >= 10000 && elapsedTime <= 25000); } } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) public void asyncDoPostCancelTest() throws Throwable { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -1570,7 +1560,7 @@ public void asyncDoPostCancelTest() throws Throwable { final AtomicReference ex = new AtomicReference(); ex.set(null); try { - Future future = c.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { + Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { @@ -1588,27 +1578,27 @@ public void onThrowable(Throwable t) { } Assert.assertNotNull(ex.get()); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider" }) public void getShouldAllowBody() throws IllegalArgumentException, IOException { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - c.prepareGet(getTargetUrl()).setBody("Boo!").execute(); + client.prepareGet(getTargetUrl()).setBody("Boo!").execute(); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider" }, expectedExceptions = IllegalArgumentException.class) public void headShouldNotAllowBody() throws IllegalArgumentException, IOException { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - c.prepareHead(getTargetUrl()).setBody("Boo!").execute(); + client.prepareHead(getTargetUrl()).setBody("Boo!").execute(); } finally { - c.close(); + client.close(); } } @@ -1618,23 +1608,23 @@ protected String getBrokenTargetUrl() { @Test(groups = { "standalone", "default_provider" }) public void invalidUri() throws Exception { - AsyncHttpClient c = getAsyncHttpClient(null); + AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = c.executeRequest(c.prepareGet(getBrokenTargetUrl()).build()).get(); - assertEquals(200, r.getStatusCode()); + Response response = client.executeRequest(client.prepareGet(getBrokenTargetUrl()).build()).get(); + assertEquals(200, response.getStatusCode()); } finally { - c.close(); + client.close(); } } @Test(groups = { "standalone", "default_provider" }) public void asyncHttpClientConfigBeanTest() throws Exception { - AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfigBean().setUserAgent("test")); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfigBean().setUserAgent("test")); try { - Response r = c.executeRequest(c.prepareGet(getTargetUrl()).build()).get(); - assertEquals(200, r.getStatusCode()); + Response response = client.executeRequest(client.prepareGet(getTargetUrl()).build()).get(); + assertEquals(200, response.getStatusCode()); } finally { - c.close(); + client.close(); } } @@ -1642,9 +1632,9 @@ public void asyncHttpClientConfigBeanTest() throws Exception { public void bodyAsByteTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.prepareGet(getTargetUrl()).execute().get(); - assertEquals(r.getStatusCode(), 200); - assertEquals(r.getResponseBodyAsBytes(), new byte[] {}); + Response response = client.prepareGet(getTargetUrl()).execute().get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(response.getResponseBodyAsBytes(), new byte[] {}); } finally { client.close(); } @@ -1654,9 +1644,9 @@ public void bodyAsByteTest() throws Throwable { public void mirrorByteTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); - assertEquals(r.getStatusCode(), 200); - assertEquals(new String(r.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); + Response response = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); + assertEquals(response.getStatusCode(), 200); + assertEquals(new String(response.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); } finally { client.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java index cf8a8c9934..64dda4e63f 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java @@ -46,8 +46,6 @@ public static class SlowAndBigHandler extends AbstractHandler { public void handle(String pathInContext, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { - // 512MB large download - // 512 * 1024 * 1024 = 536870912 httpResponse.setStatus(200); httpResponse.setContentLength(HALF_GIG); httpResponse.setContentType("application/octet-stream"); diff --git a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index 7dee570d97..88af885b2d 100644 --- a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -20,7 +20,6 @@ import javax.servlet.http.HttpServletResponse; import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; @@ -41,14 +40,9 @@ public void testPutLargeFile() throws Exception { int timeout = (int) (repeats / 1000); - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build(); - AsyncHttpClient client = getAsyncHttpClient(config); + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build()); try { - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - - rb.setBody(file); - - Response response = rb.execute().get(); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); Assert.assertEquals(200, response.getStatusCode()); } finally { client.close(); @@ -63,11 +57,7 @@ public void testPutSmallFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - BoundRequestBuilder rb = client.preparePut(getTargetUrl()); - - rb.setBody(file); - - Response response = rb.execute().get(); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); Assert.assertEquals(200, response.getStatusCode()); } finally { client.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java index c11a3ea5dc..1394542177 100644 --- a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java @@ -12,34 +12,31 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncCompletionHandler; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.URISyntaxException; -import java.net.URL; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertTrue; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; /** * Zero copy test which use FileChannel.transfer under the hood . The same SSL test is also covered in {@link BasicHttpsTest} @@ -68,14 +65,10 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ public void zeroCopyPostTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); final AtomicBoolean headerSent = new AtomicBoolean(false); final AtomicBoolean operationCompleted = new AtomicBoolean(false); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncCompletionHandler() { + Response resp = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(SIMPLE_TEXT_FILE).execute(new AsyncCompletionHandler() { public STATE onHeaderWriteCompleted() { headerSent.set(true); @@ -91,8 +84,7 @@ public STATE onContentWriteCompleted() { public Response onCompleted(Response response) throws Exception { return response; } - }); - Response resp = f.get(); + }).get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), "This is a simple test file"); @@ -107,12 +99,7 @@ public Response onCompleted(Response response) throws Exception { public void zeroCopyPutTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setBody(file).execute(); + Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setBody(SIMPLE_TEXT_FILE).execute(); Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); @@ -130,16 +117,11 @@ public AbstractHandler configureHandler() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void zeroCopyFileTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); + File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); + tmp.deleteOnExit(); + final FileOutputStream stream = new FileOutputStream(tmp); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); - tmp.deleteOnExit(); - final FileOutputStream stream = new FileOutputStream(tmp); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncHandler() { + Response resp = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(SIMPLE_TEXT_FILE).execute(new AsyncHandler() { public void onThrowable(Throwable t) { } @@ -159,12 +141,11 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { public Response onCompleted() throws Exception { return null; } - }); - Response resp = f.get(); - stream.close(); + }).get(); assertNull(resp); - assertEquals(file.length(), tmp.length()); + assertEquals(SIMPLE_TEXT_FILE.length(), tmp.length()); } finally { + stream.close(); client.close(); } } @@ -172,16 +153,12 @@ public Response onCompleted() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void zeroCopyFileWithBodyManipulationTest() throws IOException, ExecutionException, TimeoutException, InterruptedException, URISyntaxException { AsyncHttpClient client = getAsyncHttpClient(null); + File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); + tmp.deleteOnExit(); + final FileOutputStream stream = new FileOutputStream(tmp); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - File tmp = new File(System.getProperty("java.io.tmpdir") + File.separator + "zeroCopy.txt"); - tmp.deleteOnExit(); - final FileOutputStream stream = new FileOutputStream(tmp); - Future f = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(file).execute(new AsyncHandler() { + + Response resp = client.preparePost("http://127.0.0.1:" + port1 + "/").setBody(SIMPLE_TEXT_FILE).execute(new AsyncHandler() { public void onThrowable(Throwable t) { } @@ -206,12 +183,11 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { public Response onCompleted() throws Exception { return null; } - }); - Response resp = f.get(); - stream.close(); + }).get(); assertNull(resp); - assertEquals(file.length(), tmp.length()); + assertEquals(SIMPLE_TEXT_FILE.length(), tmp.length()); } finally { + stream.close(); client.close(); } } From c822f15a9162e873c119ad5ebd23a187bc52923b Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 10:22:52 +0200 Subject: [PATCH 0547/2844] Properly handle response once we've receive LastHttpContent --- .../async/AsyncProvidersBasicTest.java | 6 +- .../providers/netty4/NettyChannelHandler.java | 310 +++++++++--------- .../providers/netty4/NettyResponseFuture.java | 19 +- 3 files changed, 166 insertions(+), 169 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 09ea80bd7d..67c3dfab58 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1602,15 +1602,11 @@ public void headShouldNotAllowBody() throws IllegalArgumentException, IOExceptio } } - protected String getBrokenTargetUrl() { - return String.format("http:127.0.0.1:%d/foo/test", port1); - } - @Test(groups = { "standalone", "default_provider" }) public void invalidUri() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.executeRequest(client.prepareGet(getBrokenTargetUrl()).build()).get(); + Response response = client.executeRequest(client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build()).get(); assertEquals(200, response.getStatusCode()); } finally { client.close(); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index c78e3aef06..1e59dc2aab 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHandler.STATE; @@ -91,9 +92,7 @@ public void channelRead(final ChannelHandlerContext ctx, Object e) throws Except Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); NettyResponseFuture future = (NettyResponseFuture) attribute; - if (!(future.isIgnoreNextContents() && e instanceof HttpContent)) { - p.handle(ctx, future, e); - } + p.handle(ctx, future, e); } else if (attribute != DiscardEvent.INSTANCE) { try { @@ -490,12 +489,140 @@ private boolean applyResponseFiltersAndReplayRequest(ChannelHandlerContext ctx, // The request has changed if (fc.replayRequest()) { requestSender.replayRequest(future, fc, ctx); - future.setIgnoreNextContents(true); replayed = true; } return replayed; } + private boolean handleResponseAndExit(final ChannelHandlerContext ctx, final NettyResponseFuture future, AsyncHandler handler, HttpRequest nettyRequest, + ProxyServer proxyServer, HttpResponse response) throws Exception { + Request request = future.getRequest(); + int statusCode = response.getStatus().code(); + HttpResponseStatus status = new ResponseStatus(future.getURI(), response); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); + final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); + final RequestBuilder builder = new RequestBuilder(future.getRequest()); + Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); + + // store the original headers so we can re-send all them to + // the handler in case of trailing headers + future.setHttpResponse(response); + + future.setKeepAlive(!HttpHeaders.Values.CLOSE.equalsIgnoreCase(response.headers().get(HttpHeaders.Names.CONNECTION))); + + if (!config.getResponseFilters().isEmpty() && applyResponseFiltersAndReplayRequest(ctx, future, status, responseHeaders)) { + return true; + } + + // FIXME handle without returns + if (statusCode == UNAUTHORIZED.code() && realm != null) { + List wwwAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.WWW_AUTHENTICATE); + if (!wwwAuth.isEmpty() && !future.getAndSetAuth(true)) { + future.setState(NettyResponseFuture.STATE.NEW); + Realm newRealm = null; + // NTLM + boolean negociate = wwwAuth.contains("Negotiate"); + if (!wwwAuth.contains("Kerberos") && (isNTLM(wwwAuth) || negociate)) { + newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (negociate) { + newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) { + return true; + } + } else { + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(request.getURI().getPath()).setMethodName(request.getMethod()) + .setUsePreemptiveAuth(true).parseWWWAuthenticateHeader(wwwAuth.get(0)).build(); + } + + final Realm nr = new Realm.RealmBuilder().clone(newRealm).setUri(URI.create(request.getUrl()).getPath()).build(); + + LOGGER.debug("Sending authentication to {}", request.getUrl()); + Callback callback = new Callback(future) { + public void call() throws Exception { + channels.drainChannel(ctx, future); + requestSender.execute(builder.setHeaders(headers).setRealm(nr).build(), future); + } + }; + + if (future.isKeepAlive() && HttpHeaders.isTransferEncodingChunked(response)) { + // We must make sure there is no bytes left + // before executing the next request. + Channels.setDefaultAttribute(ctx, callback); + } else { + callback.call(); + } + + return true; + } + + } else if (statusCode == CONTINUE.code()) { + future.getAndSetWriteHeaders(false); + future.getAndSetWriteBody(true); + // FIXME is this necessary + requestSender.writeRequest(ctx.channel(), config, future); + return true; + + } else if (statusCode == PROXY_AUTHENTICATION_REQUIRED.code()) { + List proxyAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.PROXY_AUTHENTICATE); + if (realm != null && !proxyAuth.isEmpty() && !future.getAndSetAuth(true)) { + LOGGER.debug("Sending proxy authentication to {}", request.getUrl()); + + future.setState(NettyResponseFuture.STATE.NEW); + Realm newRealm = null; + + boolean negociate = proxyAuth.contains("Negotiate"); + if (!proxyAuth.contains("Kerberos") && (isNTLM(proxyAuth) || negociate)) { + newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (negociate) { + newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) { + return true; + } + } else { + newRealm = future.getRequest().getRealm(); + } + + future.setReuseChannel(true); + future.setConnectAllowed(true); + requestSender.execute(builder.setHeaders(headers).setRealm(newRealm).build(), future); + return true; + } + + } else if (statusCode == OK.code() && nettyRequest.getMethod() == HttpMethod.CONNECT) { + + LOGGER.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); + + if (future.isKeepAlive()) { + future.attachChannel(ctx.channel(), true); + } + + try { + LOGGER.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); + channels.upgradeProtocol(ctx.channel().pipeline(), request.getURI().getScheme()); + } catch (Throwable ex) { + channels.abort(future, ex); + } + future.setReuseChannel(true); + future.setConnectAllowed(false); + requestSender.execute(builder.build(), future); + return true; + + } + + if (redirect(request, future, response, ctx)) { + return true; + } + + if (!future.getAndSetStatusReceived(true) && (handler.onStatusReceived(status) != STATE.CONTINUE || handler.onHeadersReceived(responseHeaders) != STATE.CONTINUE)) { + finishUpdate(future, ctx, HttpHeaders.isTransferEncodingChunked(response)); + return true; + } + + return false; + } + @Override public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture future, final Object e) throws Exception { future.touch(); @@ -513,169 +640,46 @@ public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture fu try { if (e instanceof HttpResponse) { HttpResponse response = (HttpResponse) e; - LOGGER.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); + future.getPendingResponse().set(response); + return; + } - int statusCode = response.getStatus().code(); - HttpResponseStatus status = new ResponseStatus(future.getURI(), response); - HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); - final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); - final RequestBuilder builder = new RequestBuilder(future.getRequest()); - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - - // store the original headers so we can re-send all them to - // the handler in case of trailing headers - future.setHttpResponse(response); - future.setIgnoreNextContents(false); - - future.setKeepAlive(!HttpHeaders.Values.CLOSE.equalsIgnoreCase(response.headers().get(HttpHeaders.Names.CONNECTION))); - - if (!config.getResponseFilters().isEmpty() && applyResponseFiltersAndReplayRequest(ctx, future, status, responseHeaders)) { - return; - } - - // FIXME handle without returns - if (statusCode == UNAUTHORIZED.code() && realm != null) { - List wwwAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.WWW_AUTHENTICATE); - if (!wwwAuth.isEmpty() && !future.getAndSetAuth(true)) { - future.setState(NettyResponseFuture.STATE.NEW); - Realm newRealm = null; - // NTLM - boolean negociate = wwwAuth.contains("Negotiate"); - if (!wwwAuth.contains("Kerberos") && (isNTLM(wwwAuth) || negociate)) { - newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (negociate) { - newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) { - future.setIgnoreNextContents(true); - return; - } - } else { - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(request.getURI().getPath()) - .setMethodName(request.getMethod()).setUsePreemptiveAuth(true).parseWWWAuthenticateHeader(wwwAuth.get(0)).build(); - } - - final Realm nr = new Realm.RealmBuilder().clone(newRealm).setUri(URI.create(request.getUrl()).getPath()).build(); - - LOGGER.debug("Sending authentication to {}", request.getUrl()); - Callback callback = new Callback(future) { - public void call() throws Exception { - channels.drainChannel(ctx, future); - requestSender.execute(builder.setHeaders(headers).setRealm(nr).build(), future); - } - }; - - if (future.isKeepAlive() && HttpHeaders.isTransferEncodingChunked(response)) { - // We must make sure there is no bytes left - // before executing the next request. - Channels.setDefaultAttribute(ctx, callback); - } else { - callback.call(); - } - - future.setIgnoreNextContents(true); - return; - } - - } else if (statusCode == CONTINUE.code()) { - future.getAndSetWriteHeaders(false); - future.getAndSetWriteBody(true); - // FIXME is this necessary - future.setIgnoreNextContents(true); - requestSender.writeRequest(ctx.channel(), config, future); - return; - - } else if (statusCode == PROXY_AUTHENTICATION_REQUIRED.code()) { - List proxyAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.PROXY_AUTHENTICATE); - if (realm != null && !proxyAuth.isEmpty() && !future.getAndSetAuth(true)) { - LOGGER.debug("Sending proxy authentication to {}", request.getUrl()); - - future.setState(NettyResponseFuture.STATE.NEW); - Realm newRealm = null; - - boolean negociate = proxyAuth.contains("Negotiate"); - if (!proxyAuth.contains("Kerberos") && (isNTLM(proxyAuth) || negociate)) { - newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (negociate) { - newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) { - future.setIgnoreNextContents(true); - return; - } - } else { - newRealm = future.getRequest().getRealm(); - } + if (e instanceof HttpContent) { - future.setReuseChannel(true); - future.setConnectAllowed(true); - future.setIgnoreNextContents(true); - requestSender.execute(builder.setHeaders(headers).setRealm(newRealm).build(), future); + AtomicReference responseRef = future.getPendingResponse(); + HttpResponse response = responseRef.getAndSet(null); + if (handler != null) { + if (response != null && handleResponseAndExit(ctx, future, handler, nettyRequest, proxyServer, response)) { return; } - } else if (statusCode == OK.code() && nettyRequest.getMethod() == HttpMethod.CONNECT) { + HttpContent chunk = (HttpContent) e; - LOGGER.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); + boolean interrupt = false; + boolean last = chunk instanceof LastHttpContent; - if (future.isKeepAlive()) { - future.attachChannel(ctx.channel(), true); + // FIXME + // Netty 3 provider is broken: in case of trailing headers, + // onHeadersReceived should be called before + // updateBodyAndInterrupt + if (last) { + LastHttpContent lastChunk = (LastHttpContent) chunk; + HttpHeaders trailingHeaders = lastChunk.trailingHeaders(); + if (!trailingHeaders.isEmpty()) { + interrupt = handler.onHeadersReceived(new ResponseHeaders(future.getURI(), future.getHttpResponse().headers(), trailingHeaders)) != STATE.CONTINUE; + } } - try { - LOGGER.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - channels.upgradeProtocol(ctx.channel().pipeline(), request.getURI().getScheme()); - } catch (Throwable ex) { - channels.abort(future, ex); + if (!interrupt && chunk.content().readableBytes() > 0) { + // FIXME why + interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk.content(), last)); } - future.setReuseChannel(true); - future.setConnectAllowed(false); - future.setIgnoreNextContents(true); - requestSender.execute(builder.build(), future); - return; - - } - - if (redirect(request, future, response, ctx)) { - future.setIgnoreNextContents(true); - return; - } - - if (!future.getAndSetStatusReceived(true) - && (handler.onStatusReceived(status) != STATE.CONTINUE || handler.onHeadersReceived(responseHeaders) != STATE.CONTINUE)) { - finishUpdate(future, ctx, HttpHeaders.isTransferEncodingChunked(response)); - return; - } - } - - if (handler != null && e instanceof HttpContent) { - HttpContent chunk = (HttpContent) e; - - boolean interrupt = false; - boolean last = chunk instanceof LastHttpContent; - - // FIXME - // Netty 3 provider is broken: in case of trailing headers, - // onHeadersReceived should be called before - // updateBodyAndInterrupt - if (last) { - LastHttpContent lastChunk = (LastHttpContent) chunk; - HttpHeaders trailingHeaders = lastChunk.trailingHeaders(); - if (!trailingHeaders.isEmpty()) { - interrupt = handler.onHeadersReceived(new ResponseHeaders(future.getURI(), future.getHttpResponse().headers(), trailingHeaders)) != STATE.CONTINUE; + if (interrupt || last) { + finishUpdate(future, ctx, !last); } } - - if (!interrupt && chunk.content().readableBytes() > 0) { - // FIXME why - interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk.content(), last)); - } - - if (interrupt || last) { - finishUpdate(future, ctx, !last); - } } } catch (Exception t) { if (t instanceof IOException && !config.getIOExceptionFilters().isEmpty() && applyIoExceptionFiltersAndReplayRequest(ctx, future, IOException.class.cast(t))) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java index ba49de0338..f428295a3c 100755 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java @@ -54,7 +54,7 @@ public final class NettyResponseFuture extends AbstractListenableFuture { public enum STATE { NEW, POOLED, RECONNECTED, CLOSED, } - + private final CountDownLatch latch = new CountDownLatch(1); private final AtomicBoolean isDone = new AtomicBoolean(false); private final AtomicBoolean isCancelled = new AtomicBoolean(false); @@ -86,7 +86,7 @@ public enum STATE { private boolean allowConnect = false; private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; private final ProxyServer proxyServer; - private final AtomicBoolean ignoreNextContents = new AtomicBoolean(false); + private final AtomicReference pendingResponse = new AtomicReference(); private final AtomicBoolean streamWasAlreadyConsumed = new AtomicBoolean(false); public NettyResponseFuture(URI uri,// @@ -288,8 +288,8 @@ public final void done() { } catch (ExecutionException t) { return; } catch (RuntimeException t) { - Throwable exception = t.getCause() != null ? t.getCause() : t; - exEx.compareAndSet(null, new ExecutionException(exception)); + Throwable exception = t.getCause() != null ? t.getCause() : t; + exEx.compareAndSet(null, new ExecutionException(exception)); } finally { latch.countDown(); @@ -383,14 +383,10 @@ public boolean getAndSetStatusReceived(boolean sr) { return statusReceived.getAndSet(sr); } - public void setIgnoreNextContents(boolean b) { - ignoreNextContents.set(b); + public AtomicReference getPendingResponse() { + return pendingResponse; } - public boolean isIgnoreNextContents() { - return ignoreNextContents.get(); - } - public boolean getAndSetStreamWasAlreadyConsumed() { return streamWasAlreadyConsumed.getAndSet(true); } @@ -455,7 +451,8 @@ public void setRequest(Request request) { } /** - * Return true if the {@link Future} can be recovered. There is some scenario where a connection can be closed by an unexpected IOException, and in some situation we can recover from that exception. + * Return true if the {@link Future} can be recovered. There is some scenario where a connection can be closed by an unexpected IOException, and in some situation we can + * recover from that exception. * * @return true if that {@link Future} cannot be recovered. */ From 91f3bfc8513fb75a4002a920d8f06995a5ebe086 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 10:34:01 +0200 Subject: [PATCH 0548/2844] As a French, I get redirected to google.fr, hence a 302 causing test to fail. French FTW! --- .../asynchttpclient/async/AsyncProvidersBasicTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 67c3dfab58..e450adf7f5 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1405,7 +1405,7 @@ public void onThrowable(Throwable t) { } }; - client.prepareGet("http://google.com/").execute(handler); + client.prepareGet("http://www.lemonde.fr").execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { Assert.fail("Timed out"); @@ -1433,7 +1433,7 @@ public Response onCompleted(Response response) throws Exception { try { if (nestedCount.getAndIncrement() < MAX_NESTED) { System.out.println("Executing a nested request: " + nestedCount); - client.prepareGet("http://google.com/").execute(this); + client.prepareGet("http://www.lemonde.fr").execute(this); } } finally { l.countDown(); @@ -1447,7 +1447,7 @@ public void onThrowable(Throwable t) { } }; - client.prepareGet("http://www.google.com/").execute(handler); + client.prepareGet("http://www.lemonde.fr").execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { Assert.fail("Timed out"); @@ -1461,7 +1461,7 @@ public void onThrowable(Throwable t) { public void asyncDoGetStreamAndBodyTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.google.com/").execute().get(); + Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -1472,7 +1472,7 @@ public void asyncDoGetStreamAndBodyTest() throws Throwable { public void asyncUrlWithoutPathTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.google.com").execute().get(); + Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); From 79b80282137c9374c487b7769a3704c6d0881438 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 10:47:54 +0200 Subject: [PATCH 0549/2844] Upgrade Netty 3.7.0 --- providers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 0fcfd6850e..1e1cf573c8 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -17,7 +17,7 @@ io.netty netty - 3.6.6.Final + 3.7.0.Final From 25d59dcae58fa78e0c5a17881278e1ac470a85fd Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 11:59:19 +0200 Subject: [PATCH 0550/2844] Clean tests --- .../async/AbstractBasicTest.java | 2 +- .../asynchttpclient/async/BasicHttpsTest.java | 4 +- .../netty/RetryNonBlockingIssue.java | 242 +++++++---------- .../netty4/RetryNonBlockingIssue.java | 243 +++++++----------- 4 files changed, 193 insertions(+), 298 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java index 73a1d4c6d6..5ed7497bd8 100644 --- a/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AbstractBasicTest.java @@ -216,7 +216,7 @@ public void tearDownGlobal() throws Exception { server.stop(); } - protected int findFreePort() throws IOException { + protected synchronized int findFreePort() throws IOException { ServerSocket socket = null; try { diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index 88858870d9..cd7cdcb447 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -200,9 +200,9 @@ public void reconnectsAfterFailedCertificationPath() throws Throwable { Throwable cause = e.getCause(); if (cause instanceof ConnectException) { assertNotNull(cause.getCause()); - assertTrue(cause.getCause() instanceof SSLHandshakeException); + assertTrue(cause.getCause() instanceof SSLHandshakeException, "Expected an SSLHandshakeException, got a " + cause.getCause()); } else { - assertTrue(cause instanceof SSLHandshakeException); + assertTrue(cause.getCause() instanceof SSLHandshakeException, "Expected an SSLHandshakeException, got a " + cause); } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java index f99aeade68..2cf3b30b15 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java @@ -12,29 +12,9 @@ */ package org.asynchttpclient.providers.netty; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; -import org.asynchttpclient.Request; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; +import static org.testng.Assert.assertTrue; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.net.ServerSocket; -import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -42,117 +22,98 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; -import static org.testng.Assert.assertTrue; - - -public class RetryNonBlockingIssue { - - private URI servletEndpointUri; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; - private Server server; +import junit.framework.Assert; - private int port1; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; - public static int findFreePort() throws IOException { - ServerSocket socket = null; +// FIXME there's no retry actually +public class RetryNonBlockingIssue extends AbstractBasicTest { - try { - // 0 is open a socket on any free port - socket = new ServerSocket(0); - return socket.getLocalPort(); - } finally { - if (socket != null) { - socket.close(); - } - } + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); } - - @BeforeMethod - public void setUp() throws Exception { + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { server = new Server(); port1 = findFreePort(); Connector listener = new SelectChannelConnector(); - listener.setHost("127.0.0.1"); + listener.setHost("localhost"); listener.setPort(port1); server.addConnector(listener); - - ServletContextHandler context = new - ServletContextHandler(ServletContextHandler.SESSIONS); - + ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); - server.setHandler(context); - context.addServlet(new ServletHolder(new - MockExceptionServlet()), "/*"); + context.addServlet(new ServletHolder(new MockExceptionServlet()), "/*"); + server.setHandler(context); server.start(); - - servletEndpointUri = new URI("http://127.0.0.1:" + port1 + "/"); } - @AfterMethod - public void stop() { - - try { - if (server != null) server.stop(); - } catch (Exception e) { - } - - + protected String getTargetUrl() { + return String.format("http://127.0.0.1:%d/", port1); } - private ListenableFuture testMethodRequest(AsyncHttpClient - fetcher, int requests, String action, String id) throws IOException { - RequestBuilder builder = new RequestBuilder("GET"); - builder.addQueryParameter(action, "1"); - - builder.addQueryParameter("maxRequests", "" + requests); - builder.addQueryParameter("id", id); - builder.setUrl(servletEndpointUri.toString()); - Request r = builder.build(); - return fetcher.executeRequest(r); - + private ListenableFuture testMethodRequest(AsyncHttpClient client, int requests, String action, String id) throws IOException { + Request r = new RequestBuilder("GET")/**/ + .setUrl(getTargetUrl())/**/ + .addQueryParameter(action, "1")/**/ + .addQueryParameter("maxRequests", "" + requests)/**/ + .addQueryParameter("id", id)/**/ + .build(); + return client.executeRequest(r); } /** * Tests that a head request can be made - * + * * @throws IOException * @throws ExecutionException * @throws InterruptedException */ @Test - public void testRetryNonBlocking() throws IOException, InterruptedException, - ExecutionException { - AsyncHttpClient c = null; - List> res = new - ArrayList>(); - try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); - - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsTotal(100); - bc.setConnectionTimeoutInMs(60000); - bc.setRequestTimeoutInMs(30000); - - NettyAsyncHttpProviderConfig config = new - NettyAsyncHttpProviderConfig(); + public void testRetryNonBlocking() throws IOException, InterruptedException, ExecutionException { - bc.setAsyncHttpClientProviderConfig(config); - c = new AsyncHttpClient(bc.build()); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ + .setAllowPoolingConnection(true)/**/ + .setMaximumConnectionsTotal(100)/**/ + .setConnectionTimeoutInMs(60000)/**/ + .setRequestTimeoutInMs(30000)/**/ + .build(); + AsyncHttpClient client = getAsyncHttpClient(config); + try { + List> res = new ArrayList>(); for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); } StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); + Assert.assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -163,37 +124,34 @@ public void testRetryNonBlocking() throws IOException, InterruptedException, System.out.println(b.toString()); System.out.flush(); - } - finally { - if (c != null) c.close(); + } finally { + client.close(); } } @Test - public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, - ExecutionException { - AsyncHttpClient c = null; - List> res = new - ArrayList>(); - try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); + public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, ExecutionException { - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsTotal(100); - bc.setConnectionTimeoutInMs(60000); - bc.setRequestTimeoutInMs(30000); - bc.setAsyncConnectMode(true); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ + .setAllowPoolingConnection(true)/**/ + .setMaximumConnectionsTotal(100)/**/ + .setConnectionTimeoutInMs(60000)/**/ + .setRequestTimeoutInMs(30000)/**/ + .setAsyncConnectMode(true) /**/ + .build(); - c = new AsyncHttpClient(bc.build()); + AsyncHttpClient client = getAsyncHttpClient(config); + try { + List> res = new ArrayList>(); for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); } StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); + Assert.assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -204,41 +162,37 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx System.out.println(b.toString()); System.out.flush(); - } - finally { - if (c != null) c.close(); + } finally { + client.close(); } } @Test - public void testRetryBlocking() throws IOException, InterruptedException, - ExecutionException { - AsyncHttpClient c = null; - List> res = new - ArrayList>(); - try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); + public void testRetryBlocking() throws IOException, InterruptedException, ExecutionException { - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsTotal(100); - bc.setConnectionTimeoutInMs(30000); - bc.setRequestTimeoutInMs(30000); + NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); + nettyConfig.setUseBlockingIO(true); - NettyAsyncHttpProviderConfig config = new - NettyAsyncHttpProviderConfig(); - config.setUseBlockingIO(true); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ + .setAllowPoolingConnection(true)/**/ + .setMaximumConnectionsTotal(100)/**/ + .setConnectionTimeoutInMs(60000)/**/ + .setRequestTimeoutInMs(30000)/**/ + .setAsyncHttpClientProviderConfig(nettyConfig)/**/ + .build(); - bc.setAsyncHttpClientProviderConfig(config); - c = new AsyncHttpClient(bc.build()); + AsyncHttpClient client = getAsyncHttpClient(config); + try { + List> res = new ArrayList>(); for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); } StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); + Assert.assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -250,17 +204,15 @@ public void testRetryBlocking() throws IOException, InterruptedException, System.out.println(b.toString()); System.out.flush(); - } - finally { - if (c != null) c.close(); + } finally { + client.close(); } } @SuppressWarnings("serial") public class MockExceptionServlet extends HttpServlet { - private Map requests = new - ConcurrentHashMap(); + private Map requests = new ConcurrentHashMap(); private synchronized int increment(String id) { int val = 0; @@ -276,14 +228,12 @@ private synchronized int increment(String id) { return val; } - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String maxRequests = req.getParameter("maxRequests"); int max = 0; try { max = Integer.parseInt(maxRequests); - } - catch (NumberFormatException e) { + } catch (NumberFormatException e) { max = 3; } String id = req.getParameter("id"); @@ -292,7 +242,6 @@ public void service(HttpServletRequest req, HttpServletResponse res) String io = req.getParameter("io"); String error = req.getParameter("500"); - if (requestNo >= max) { res.setHeader("Success-On-Attempt", "" + requestNo); res.setHeader("id", id); @@ -304,26 +253,25 @@ public void service(HttpServletRequest req, HttpServletResponse res) res.setHeader("type", "io"); res.setStatus(200); res.setContentLength(0); + res.flushBuffer(); return; } - res.setStatus(200); res.setContentLength(100); res.setContentType("application/octet-stream"); - res.flushBuffer(); + // error after flushing the status if (servlet != null && servlet.trim().length() > 0) throw new ServletException("Servlet Exception"); if (io != null && io.trim().length() > 0) throw new IOException("IO Exception"); - if (error != null && error.trim().length() > 0) + if (error != null && error.trim().length() > 0) { res.sendError(500, "servlet process was 500"); + } } - } } - diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java index 8b1aad25de..b964da6f38 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java @@ -12,30 +12,9 @@ */ package org.asynchttpclient.providers.netty4; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig; -import org.asynchttpclient.Request; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import static org.testng.Assert.assertTrue; import java.io.IOException; -import java.net.ServerSocket; -import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -43,117 +22,98 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; -import static org.testng.Assert.assertTrue; - - -public class RetryNonBlockingIssue { - - private URI servletEndpointUri; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; - private Server server; +import junit.framework.Assert; - private int port1; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; - public static int findFreePort() throws IOException { - ServerSocket socket = null; +//FIXME there's no retry actually +public class RetryNonBlockingIssue extends AbstractBasicTest { - try { - // 0 is open a socket on any free port - socket = new ServerSocket(0); - return socket.getLocalPort(); - } finally { - if (socket != null) { - socket.close(); - } - } + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); } - - @BeforeMethod - public void setUp() throws Exception { + @BeforeClass(alwaysRun = true) + public void setUpGlobal() throws Exception { server = new Server(); port1 = findFreePort(); Connector listener = new SelectChannelConnector(); - listener.setHost("127.0.0.1"); + listener.setHost("localhost"); listener.setPort(port1); server.addConnector(listener); - - ServletContextHandler context = new - ServletContextHandler(ServletContextHandler.SESSIONS); - + ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); - server.setHandler(context); - context.addServlet(new ServletHolder(new - MockExceptionServlet()), "/*"); + context.addServlet(new ServletHolder(new MockExceptionServlet()), "/*"); + server.setHandler(context); server.start(); - - servletEndpointUri = new URI("http://127.0.0.1:" + port1 + "/"); } - @AfterMethod - public void stop() { - - try { - if (server != null) server.stop(); - } catch (Exception e) { - } - - + protected String getTargetUrl() { + return String.format("http://127.0.0.1:%d/", port1); } - private ListenableFuture testMethodRequest(AsyncHttpClient - fetcher, int requests, String action, String id) throws IOException { - RequestBuilder builder = new RequestBuilder("GET"); - builder.addQueryParameter(action, "1"); - - builder.addQueryParameter("maxRequests", "" + requests); - builder.addQueryParameter("id", id); - builder.setUrl(servletEndpointUri.toString()); - Request r = builder.build(); - return fetcher.executeRequest(r); - + private ListenableFuture testMethodRequest(AsyncHttpClient client, int requests, String action, String id) throws IOException { + Request r = new RequestBuilder("GET")/**/ + .setUrl(getTargetUrl())/**/ + .addQueryParameter(action, "1")/**/ + .addQueryParameter("maxRequests", "" + requests)/**/ + .addQueryParameter("id", id)/**/ + .build(); + return client.executeRequest(r); } /** * Tests that a head request can be made - * + * * @throws IOException * @throws ExecutionException * @throws InterruptedException */ @Test - public void testRetryNonBlocking() throws IOException, InterruptedException, - ExecutionException { - AsyncHttpClient c = null; - List> res = new - ArrayList>(); - try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); - - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsTotal(100); - bc.setConnectionTimeoutInMs(60000); - bc.setRequestTimeoutInMs(30000); + public void testRetryNonBlocking() throws IOException, InterruptedException, ExecutionException { - NettyAsyncHttpProviderConfig config = new - NettyAsyncHttpProviderConfig(); - - bc.setAsyncHttpClientProviderConfig(config); - c = new AsyncHttpClient(bc.build()); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ + .setAllowPoolingConnection(true)/**/ + .setMaximumConnectionsTotal(100)/**/ + .setConnectionTimeoutInMs(60000)/**/ + .setRequestTimeoutInMs(30000)/**/ + .build(); + AsyncHttpClient client = getAsyncHttpClient(config); + try { + List> res = new ArrayList>(); for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); } StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); + Assert.assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -164,37 +124,34 @@ public void testRetryNonBlocking() throws IOException, InterruptedException, System.out.println(b.toString()); System.out.flush(); - } - finally { - if (c != null) c.close(); + } finally { + client.close(); } } @Test - public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, - ExecutionException { - AsyncHttpClient c = null; - List> res = new - ArrayList>(); - try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); + public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, ExecutionException { - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsTotal(100); - bc.setConnectionTimeoutInMs(60000); - bc.setRequestTimeoutInMs(30000); - bc.setAsyncConnectMode(true); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ + .setAllowPoolingConnection(true)/**/ + .setMaximumConnectionsTotal(100)/**/ + .setConnectionTimeoutInMs(60000)/**/ + .setRequestTimeoutInMs(30000)/**/ + .setAsyncConnectMode(true) /**/ + .build(); - c = new AsyncHttpClient(bc.build()); + AsyncHttpClient client = getAsyncHttpClient(config); + try { + List> res = new ArrayList>(); for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); } StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); + Assert.assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -205,41 +162,37 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx System.out.println(b.toString()); System.out.flush(); - } - finally { - if (c != null) c.close(); + } finally { + client.close(); } } @Test - public void testRetryBlocking() throws IOException, InterruptedException, - ExecutionException { - AsyncHttpClient c = null; - List> res = new - ArrayList>(); - try { - AsyncHttpClientConfig.Builder bc = - new AsyncHttpClientConfig.Builder(); + public void testRetryBlocking() throws IOException, InterruptedException, ExecutionException { - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsTotal(100); - bc.setConnectionTimeoutInMs(30000); - bc.setRequestTimeoutInMs(30000); + NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); + nettyConfig.setUseBlockingIO(true); - NettyAsyncHttpProviderConfig config = new - NettyAsyncHttpProviderConfig(); - config.setUseBlockingIO(true); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ + .setAllowPoolingConnection(true)/**/ + .setMaximumConnectionsTotal(100)/**/ + .setConnectionTimeoutInMs(60000)/**/ + .setRequestTimeoutInMs(30000)/**/ + .setAsyncHttpClientProviderConfig(nettyConfig)/**/ + .build(); - bc.setAsyncHttpClientProviderConfig(config); - c = new AsyncHttpClient(bc.build()); + AsyncHttpClient client = getAsyncHttpClient(config); + try { + List> res = new ArrayList>(); for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(c, 3, "servlet", UUID.randomUUID().toString())); + res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); } StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); + Assert.assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -251,17 +204,15 @@ public void testRetryBlocking() throws IOException, InterruptedException, System.out.println(b.toString()); System.out.flush(); - } - finally { - if (c != null) c.close(); + } finally { + client.close(); } } @SuppressWarnings("serial") public class MockExceptionServlet extends HttpServlet { - private Map requests = new - ConcurrentHashMap(); + private Map requests = new ConcurrentHashMap(); private synchronized int increment(String id) { int val = 0; @@ -277,14 +228,12 @@ private synchronized int increment(String id) { return val; } - public void service(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { + public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String maxRequests = req.getParameter("maxRequests"); int max = 0; try { max = Integer.parseInt(maxRequests); - } - catch (NumberFormatException e) { + } catch (NumberFormatException e) { max = 3; } String id = req.getParameter("id"); @@ -293,7 +242,6 @@ public void service(HttpServletRequest req, HttpServletResponse res) String io = req.getParameter("io"); String error = req.getParameter("500"); - if (requestNo >= max) { res.setHeader("Success-On-Attempt", "" + requestNo); res.setHeader("id", id); @@ -305,26 +253,25 @@ public void service(HttpServletRequest req, HttpServletResponse res) res.setHeader("type", "io"); res.setStatus(200); res.setContentLength(0); + res.flushBuffer(); return; } - res.setStatus(200); res.setContentLength(100); res.setContentType("application/octet-stream"); - res.flushBuffer(); + // error after flushing the status if (servlet != null && servlet.trim().length() > 0) throw new ServletException("Servlet Exception"); if (io != null && io.trim().length() > 0) throw new IOException("IO Exception"); - if (error != null && error.trim().length() > 0) + if (error != null && error.trim().length() > 0) { res.sendError(500, "servlet process was 500"); + } } - } } - From 0faeb285906702178caf52d67f018d639b8e36ae Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 12:04:50 +0200 Subject: [PATCH 0551/2844] Disable modules that don't pass tests --- providers/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/pom.xml b/providers/pom.xml index 9a7178b576..6892660321 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -44,9 +44,9 @@ - grizzly + netty - netty4 + From 0fba1a8bddc4e4b04b0094fb97f7fecba59814d0 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 12:47:29 +0200 Subject: [PATCH 0552/2844] Fix test --- .../org/asynchttpclient/async/AsyncProvidersBasicTest.java | 3 ++- providers/pom.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index e450adf7f5..029eeba72e 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1405,7 +1405,7 @@ public void onThrowable(Throwable t) { } }; - client.prepareGet("http://www.lemonde.fr").execute(handler); + client.prepareGet("http://www.google.com").execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { Assert.fail("Timed out"); @@ -1419,6 +1419,7 @@ public void onThrowable(Throwable t) { public void asyncDoGetNestedTest() throws Throwable { final AsyncHttpClient client = getAsyncHttpClient(null); try { + // FIXME find a proper website that redirects the same number of times whatever the language // Use a l in case the assert fail final CountDownLatch l = new CountDownLatch(2); diff --git a/providers/pom.xml b/providers/pom.xml index 6892660321..1d46aa0a76 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -44,7 +44,7 @@ - + grizzly netty From fd5f02c2bb64d0d83b32464276562cb7e50d2fc6 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 13:11:48 +0200 Subject: [PATCH 0553/2844] Upgrade Netty 4.0.9 --- providers/netty4/pom.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/providers/netty4/pom.xml b/providers/netty4/pom.xml index 551ae89a35..90a29ea432 100644 --- a/providers/netty4/pom.xml +++ b/providers/netty4/pom.xml @@ -13,6 +13,16 @@ + + sonatype-releases + https://oss.sonatype.org/content/repositories/releases + + true + + + false + + sonatype-snapshots https://oss.sonatype.org/content/repositories/snapshots @@ -29,7 +39,7 @@ io.netty netty-all - 4.0.9.Final-SNAPSHOT + 4.0.9.Final org.javassist From 48b67af016a4aa1395d5eb3a147bdc7cefb61e8d Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 18:14:29 +0200 Subject: [PATCH 0554/2844] Minor comment --- .../java/org/asynchttpclient/providers/netty4/Channels.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java index 7f866c7924..b3f5cf2d86 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java @@ -257,6 +257,7 @@ protected void initChannel(Channel ch) throws Exception { try { pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); } catch (Throwable ex) { + LOGGER.error("Channel {} could not add SslHandler {}", ch, ex); abort(future, ex); } @@ -283,6 +284,7 @@ protected void initChannel(Channel ch) throws Exception { try { pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); } catch (Throwable ex) { + LOGGER.error("Channel {} could not add SslHandler {}", ch, ex); abort(future, ex); } @@ -305,6 +307,7 @@ private SSLEngine createSSLEngine() throws IOException, GeneralSecurityException return sslEngine; } + // FIXME what for? public Channel verifyChannelPipeline(Channel channel, String scheme) throws IOException, GeneralSecurityException { if (channel.pipeline().get(SSL_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { From 8c2caa21db843ec7e1515714be885b89fa6e043e Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 18:17:48 +0200 Subject: [PATCH 0555/2844] Remove check about being in an IO thread --- .../org/asynchttpclient/providers/netty4/Constants.java | 3 --- .../providers/netty4/NettyChannelHandler.java | 2 -- .../providers/netty4/NettyRequestSender.java | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java index 9fae1fbd2b..1565673ff1 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java @@ -4,9 +4,6 @@ public class Constants { - // FIXME move into a state class along with closed - public static final ThreadLocal IN_IO_THREAD = new ThreadLocalBoolean(); - // FIXME what to do with this??? public final static int MAX_BUFFERED_BYTES = 8192; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index 1e59dc2aab..95a3b5a834 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -77,8 +77,6 @@ public NettyChannelHandler(AsyncHttpClientConfig config, NettyRequestSender requ @Override public void channelRead(final ChannelHandlerContext ctx, Object e) throws Exception { - Constants.IN_IO_THREAD.set(Boolean.TRUE); - Object attribute = Channels.getDefaultAttribute(ctx); if (attribute instanceof Callback) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java index cb0810143b..2f0ce718c1 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java @@ -218,13 +218,8 @@ public ListenableFuture doConnect(final Request request, final AsyncHandl return cl.future(); } - // FIXME when can we have a direct invokation??? - // boolean directInvokation = !(IN_IO_THREAD.get() && - // DefaultChannelFuture.isUseDeadLockChecker()); - boolean directInvokation = !Constants.IN_IO_THREAD.get(); - // FIXME what does it have to do with the presence of a file? - if (directInvokation && !asyncConnect && request.getFile() == null) { + if (!asyncConnect && request.getFile() == null) { int timeOut = config.getConnectionTimeoutInMs() > 0 ? config.getConnectionTimeoutInMs() : Integer.MAX_VALUE; if (!channelFuture.awaitUninterruptibly(timeOut, TimeUnit.MILLISECONDS)) { if (acquiredConnection) { From 898c4a4a52911624dbcc02f438770d3c77e19a27 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 20:52:47 +0200 Subject: [PATCH 0556/2844] Handshake is done automatically --- .../netty4/NettyConnectListener.java | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java index 57c54cdeef..052cf816a3 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java @@ -16,29 +16,26 @@ */ package org.asynchttpclient.providers.netty4; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.ssl.SslHandler; + import java.io.IOException; import java.net.ConnectException; import java.net.URI; import java.nio.channels.ClosedChannelException; -import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.HostnameVerifier; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelFutureListener; -import io.netty.handler.codec.http.HttpRequest; -import io.netty.handler.ssl.SslHandler; -import io.netty.util.concurrent.Future; -import io.netty.util.concurrent.GenericFutureListener; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Request; import org.asynchttpclient.util.ProxyUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Non Blocking connect. @@ -50,7 +47,6 @@ final class NettyConnectListener implements ChannelFutureListener { private final AsyncHttpClientConfig config; private final NettyRequestSender requestSender; private final NettyResponseFuture future; - private final AtomicBoolean handshakeDone = new AtomicBoolean(false); private NettyConnectListener(AsyncHttpClientConfig config, NettyRequestSender requestSender, NettyResponseFuture future) { this.requestSender = requestSender; @@ -67,19 +63,7 @@ private void onFutureSuccess(final Channel channel) throws Exception { SslHandler sslHandler = Channels.getSslHandler(channel); if (sslHandler != null) { - if (!handshakeDone.getAndSet(true)) { - sslHandler.handshakeFuture().addListener(new GenericFutureListener>() { - public void operationComplete(Future f) throws Exception { - if (f.isSuccess()) { - onFutureSuccess(channel); - } else { - onFutureFailure(channel, f.cause()); - } - } - }); - return; - } - + // FIXME done on connect or on every request? HostnameVerifier v = config.getHostnameVerifier(); if (!v.verify(future.getURI().getHost(), sslHandler.engine().getSession())) { ConnectException exception = new ConnectException("HostnameVerifier exception."); From c86c289f5f23fc1f8eec07c296650126631e85ac Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 6 Sep 2013 22:16:24 +0200 Subject: [PATCH 0557/2844] Minor clean up --- .../java/org/asynchttpclient/async/AbstractBasicHttpsTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java index 3210dc9916..469f83f8c3 100644 --- a/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AbstractBasicHttpsTest.java @@ -27,9 +27,6 @@ public abstract class AbstractBasicHttpsTest extends AbstractBasicTest { protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractBasicHttpsTest.class); - protected Server server; - protected int port1; - protected int port2; @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { From 311aafafee4746afb770ffc54a6b318adcae2739 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Sat, 7 Sep 2013 23:08:59 +0200 Subject: [PATCH 0558/2844] Close stream --- .../test/java/org/asynchttpclient/async/BasicHttpsTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index cd7cdcb447..18b35ae05d 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -40,6 +40,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.io.IOUtils; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig.Builder; import org.asynchttpclient.Response; @@ -218,8 +219,8 @@ public void reconnectsAfterFailedCertificationPath() throws Throwable { } private static SSLContext createSSLContext(AtomicBoolean trusted) { + InputStream keyStoreStream = BasicHttpsTest.class.getResourceAsStream("ssltest-cacerts.jks"); try { - InputStream keyStoreStream = BasicHttpsTest.class.getResourceAsStream("ssltest-cacerts.jks"); char[] keyStorePassword = "changeit".toCharArray(); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(keyStoreStream, keyStorePassword); @@ -240,6 +241,8 @@ private static SSLContext createSSLContext(AtomicBoolean trusted) { return sslContext; } catch (Exception e) { throw new Error("Failed to initialize the server-side SSLContext", e); + } finally { + IOUtils.closeQuietly(keyStoreStream); } } From 6c6ba66a3fb4f6af4fd536f2faa6d295ed013b36 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 16 Sep 2013 13:31:45 -0700 Subject: [PATCH 0559/2844] Ensure ordered logging of requests. --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index c91c1af7a6..6d9d684821 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -527,12 +527,18 @@ public boolean sendRequest(final FilterChainContext ctx, handler = new ExpectHandler(handler); } context.setBodyHandler(handler); + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("REQUEST: {}", requestPacket); + } isWriteComplete = handler.doHandle(ctx, request, requestPacket); } else { HttpContent content = HttpContent.builder(requestPacket).last(true).build(); + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("REQUEST: {}", requestPacket); + } ctx.write(content, ctx.getTransportContext().getCompletionHandler()); } - LOGGER.debug("REQUEST: {}", requestPacket); + return isWriteComplete; } From 6a7dec84477ac2714e0b75a2dfeba4e6bfce6606 Mon Sep 17 00:00:00 2001 From: oleksiys Date: Tue, 17 Sep 2013 16:47:30 -0700 Subject: [PATCH 0560/2844] + don't forget to shutdown the idlechecker thread --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 6d9d684821..c14e2309c4 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -192,6 +192,10 @@ public void close() { } if (timeoutExecutor != null) { timeoutExecutor.stop(); + final ExecutorService threadPool = timeoutExecutor.getThreadPool(); + if (threadPool != null) { + threadPool.shutdownNow(); + } } } catch (IOException ignored) { } From 3af32faec00daba80b325553ace77998ee10c458 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Sun, 15 Sep 2013 02:29:58 +0200 Subject: [PATCH 0561/2844] Upgrade Jetty 9 and clean tests --- .../util/AsyncHttpProviderUtils.java | 2 + .../java/org/asynchttpclient/RealmTest.java | 128 +++---- .../async/AbstractBasicHttpsTest.java | 32 +- .../async/AbstractBasicTest.java | 195 +---------- .../async/AsyncProvidersBasicTest.java | 315 ++++++++---------- .../async/AsyncStreamHandlerTest.java | 159 +++++---- .../async/AsyncStreamLifecycleTest.java | 44 ++- .../async/AuthTimeoutTest.java | 161 ++++----- .../asynchttpclient/async/BasicAuthTest.java | 305 +++++------------ .../asynchttpclient/async/BasicHttpsTest.java | 159 +-------- .../asynchttpclient/async/BodyChunkTest.java | 2 +- .../async/BodyDeferringAsyncHandlerTest.java | 94 +++--- .../async/ByteBufferCapacityTest.java | 57 +--- .../asynchttpclient/async/ChunkingTest.java | 22 +- .../async/ComplexClientTest.java | 12 +- .../async/ConnectionPoolTest.java | 36 +- .../asynchttpclient/async/DigestAuthTest.java | 117 ++----- .../asynchttpclient/async/EmptyBodyTest.java | 6 +- .../async/ErrorResponseTest.java | 3 +- .../async/Expect100ContinueTest.java | 43 ++- .../async/FilePartLargeFileTest.java | 53 +-- .../org/asynchttpclient/async/FilterTest.java | 24 +- .../FluentCaseInsensitiveStringsMapTest.java | 3 +- .../async/FluentStringsMapTest.java | 3 +- .../asynchttpclient/async/Head302Test.java | 41 +-- .../async/HostnameVerifierTest.java | 79 +---- .../async/HttpToHttpsRedirectTest.java | 48 +-- .../async/IdleStateHandlerTest.java | 17 +- .../async/InputStreamTest.java | 12 +- .../async/ListenableFutureTest.java | 2 +- .../async/MaxConnectionsInThreads.java | 67 ++-- .../async/MaxTotalConnectionTest.java | 16 +- .../async/MultipartUploadTest.java | 91 ++--- .../async/MultipleHeaderTest.java | 54 +-- .../async/NoNullResponseTest.java | 8 +- .../async/NonAsciiContentLengthTest.java | 35 +- .../async/PerRequestRelative302Test.java | 48 ++- .../async/PerRequestTimeoutTest.java | 10 +- .../async/PostRedirectGetTest.java | 26 +- .../async/ProxyTunnellingTest.java | 85 ++--- .../async/PutLargeFileTest.java | 16 +- .../async/QueryParametersTest.java | 4 +- .../org/asynchttpclient/async/RC10KTest.java | 41 +-- .../async/RedirectConnectionUsageTest.java | 73 ++-- .../async/Relative302Test.java | 103 +++--- .../asynchttpclient/async/RemoteSiteTest.java | 67 ++-- .../async/RetryRequestTest.java | 2 +- .../SimpleAsyncClientErrorBehaviourTest.java | 4 +- .../async/SimpleAsyncHttpClientTest.java | 30 +- .../async/TransferListenerTest.java | 28 +- .../async/WebDavBasicTest.java | 27 +- .../async/ZeroCopyFileTest.java | 5 +- .../async/util/EchoHandler.java | 103 ++++++ .../asynchttpclient/async/util/TestUtils.java | 253 ++++++++++++++ .../oauth/TestSignatureCalculator.java | 19 +- .../handler/codec/http/CookieDecoderTest.java | 28 +- .../util/AsyncHttpProviderUtilsTest.java | 10 +- .../asynchttpclient/util/ProxyUtilsTest.java | 12 +- .../util/TestUTF8UrlCodec.java | 10 +- .../websocket/AbstractBasicTest.java | 51 +-- .../websocket/ByteMessageTest.java | 67 +--- .../websocket/CloseCodeReasonMessageTest.java | 38 ++- .../asynchttpclient/websocket/EchoSocket.java | 52 +++ .../websocket/RedirectTest.java | 23 +- .../websocket/TextMessageTest.java | 69 +--- .../asynchttpclient/extra/AsyncHttpTest.java | 170 +++++----- pom.xml | 70 ++-- .../GrizzlyAsyncProviderBasicTest.java | 13 +- .../grizzly/GrizzlyBasicAuthTest.java | 15 +- .../GrizzlyByteBufferCapacityTest.java | 2 +- .../grizzly/GrizzlyConnectionPoolTest.java | 2 +- .../grizzly/GrizzlyPerRequestTimeoutTest.java | 2 +- .../GrizzlyRedirectConnectionUsageTest.java | 23 -- .../GrizzlyUnexpectingTimeoutTest.java | 30 +- .../websocket/GrizzlyByteMessageTest.java | 1 - .../GrizzlyCloseCodeReasonMsgTest.java | 7 - .../websocket/GrizzlyTextMessageTest.java | 9 - .../netty/NettyAsyncHttpProvider.java | 1 + .../providers/netty/NettyWebSocket.java | 6 + .../netty/NettyAsyncHttpProviderTest.java | 12 +- .../netty/NettyAsyncProviderPipelineTest.java | 21 +- .../providers/netty/NettyBasicAuthTest.java | 5 + .../netty/NettyMultipartUploadTest.java | 2 + .../NettyRedirectConnectionUsageTest.java | 11 - .../NettyRequestThrottleTimeoutTest.java | 4 +- .../netty/RetryNonBlockingIssue.java | 80 ++--- .../NettyCloseCodeReasonMsgTest.java | 1 - .../netty/websocket/NettyTextMessageTest.java | 2 + .../providers/netty4/Channels.java | 16 +- .../providers/netty4/NettyChannelHandler.java | 51 ++- .../providers/netty4/NettyWebSocket.java | 8 +- .../netty4/NettyAsyncHttpProviderTest.java | 19 -- .../NettyAsyncProviderPipelineTest.java | 7 +- .../netty4/NettyAuthTimeoutTest.java | 3 +- .../NettyRedirectConnectionUsageTest.java | 10 - .../NettyRequestThrottleTimeoutTest.java | 4 +- .../netty4/RetryNonBlockingIssue.java | 75 ++--- .../NettyCloseCodeReasonMsgTest.java | 1 - .../netty4/websocket/NettyRedirectTest.java | 1 - providers/pom.xml | 2 +- 100 files changed, 1864 insertions(+), 2571 deletions(-) create mode 100644 api/src/test/java/org/asynchttpclient/async/util/EchoHandler.java create mode 100644 api/src/test/java/org/asynchttpclient/async/util/TestUtils.java create mode 100644 api/src/test/java/org/asynchttpclient/websocket/EchoSocket.java diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index 06a29c0bce..a98cd8a33b 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -379,6 +379,8 @@ public final static MultipartRequestEntity createMultipartRequestEntity(List e = httpRequest.getHeaderNames(); - String param; - while (e.hasMoreElements()) { - param = e.nextElement().toString(); - - if (param.startsWith("LockThread")) { - try { - Thread.sleep(40 * 1000); - } catch (InterruptedException ex) { - } - } - - if (param.startsWith("X-redirect")) { - httpResponse.sendRedirect(httpRequest.getHeader("X-redirect")); - return; - } - httpResponse.addHeader("X-" + param, httpRequest.getHeader(param)); - } - - Enumeration i = httpRequest.getParameterNames(); - - StringBuilder requestBody = new StringBuilder(); - while (i.hasMoreElements()) { - param = i.nextElement().toString(); - httpResponse.addHeader("X-" + param, httpRequest.getParameter(param)); - requestBody.append(param); - requestBody.append("_"); - } - String pathInfo = httpRequest.getPathInfo(); - if (pathInfo != null) - httpResponse.addHeader("X-pathInfo", pathInfo); + protected final static int TIMEOUT = 30; - String queryString = httpRequest.getQueryString(); - if (queryString != null) - httpResponse.addHeader("X-queryString", queryString); + protected final Logger logger = LoggerFactory.getLogger(getClass()); - httpResponse.addHeader("X-KEEP-ALIVE", httpRequest.getRemoteAddr() + ":" + httpRequest.getRemotePort()); - - Cookie[] cs = httpRequest.getCookies(); - if (cs != null) { - for (Cookie c : cs) { - httpResponse.addCookie(c); - } - } - - if (requestBody.length() > 0) { - httpResponse.getOutputStream().write(requestBody.toString().getBytes()); - } - - int size = 16384; - if (httpRequest.getContentLength() > 0) { - size = httpRequest.getContentLength(); - } - byte[] bytes = new byte[size]; - if (bytes.length > 0) { - int read = 0; - while (read > -1) { - read = httpRequest.getInputStream().read(bytes); - if (read > 0) { - httpResponse.getOutputStream().write(bytes, 0, read); - } - } - } - - httpResponse.setStatus(200); - httpResponse.getOutputStream().flush(); - httpResponse.getOutputStream().close(); - } - } + protected Server server; + protected int port1; + protected int port2; @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); port1 = findFreePort(); port2 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); - - listener = new SelectChannelConnector(); - listener.setHost("127.0.0.1"); - listener.setPort(port2); - - server.addConnector(listener); - + server = newJettyHttpServer(port1); server.setHandler(configureHandler()); + addHttpConnector(server, port2); server.start(); - log.info("Local HTTP server started successfully"); + + logger.info("Local HTTP server started successfully"); } @AfterClass(alwaysRun = true) @@ -216,20 +64,6 @@ public void tearDownGlobal() throws Exception { server.stop(); } - protected synchronized int findFreePort() throws IOException { - ServerSocket socket = null; - - try { - socket = new ServerSocket(0); - - return socket.getLocalPort(); - } finally { - if (socket != null) { - socket.close(); - } - } - } - protected String getTargetUrl() { return String.format("http://127.0.0.1:%d/foo/test", port1); } @@ -253,9 +87,8 @@ public Response onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); + fail("Unexpected exception: " + t.getMessage(), t); } - } public static class AsyncHandlerAdapter implements AsyncHandler { @@ -263,7 +96,7 @@ public static class AsyncHandlerAdapter implements AsyncHandler { @Override public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception", t); + fail("Unexpected exception", t); } @Override diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 029eeba72e..9146be53aa 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -15,11 +15,9 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.asynchttpclient.util.DateUtil.millisTime; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import static org.testng.Assert.*; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -42,9 +40,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import org.testng.Assert; -import org.testng.annotations.Test; - import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -60,18 +55,16 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.StringPart; +import org.testng.annotations.Test; public abstract class AsyncProvidersBasicTest extends AbstractBasicTest { - private static final String UTF_8 = "text/html;charset=UTF-8"; - @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncProviderEncodingTest() throws Throwable { + public void asyncProviderEncodingTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Request request = new RequestBuilder("GET").setUrl(getTargetUrl() + "?q=+%20x").build(); - String requestUrl = request.getUrl(); - Assert.assertEquals(requestUrl, getTargetUrl() + "?q=%20%20x"); + assertEquals(request.getUrl(), getTargetUrl() + "?q=%20%20x"); String url = client.executeRequest(request, new AsyncCompletionHandler() { @Override @@ -82,18 +75,18 @@ public String onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); + fail("Unexpected exception: " + t.getMessage(), t); } }).get(); - Assert.assertEquals(url, getTargetUrl() + "?q=%20%20x"); + assertEquals(url, getTargetUrl() + "?q=%20%20x"); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncProviderEncodingTest2() throws Throwable { + public void asyncProviderEncodingTest2() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Request request = new RequestBuilder("GET").setUrl(getTargetUrl() + "").addQueryParameter("q", "a b").build(); @@ -107,18 +100,18 @@ public String onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); + fail("Unexpected exception: " + t.getMessage(), t); } }).get(); - Assert.assertEquals(url, getTargetUrl() + "?q=a%20b"); + assertEquals(url, getTargetUrl() + "?q=a%20b"); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) - public void emptyRequestURI() throws Throwable { + public void emptyRequestURI() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); @@ -132,22 +125,23 @@ public String onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); + fail("Unexpected exception: " + t.getMessage(), t); } }).get(); - Assert.assertEquals(url, getTargetUrl()); + assertEquals(url, getTargetUrl()); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncProviderContentLenghtGETTest() throws Throwable { + public void asyncProviderContentLenghtGETTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); final HttpURLConnection connection = (HttpURLConnection) new URL(getTargetUrl()).openConnection(); connection.connect(); final int ct = connection.getContentLength(); + connection.disconnect(); try { final CountDownLatch l = new CountDownLatch(1); @@ -172,7 +166,7 @@ public Response onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { try { - Assert.fail("Unexpected exception", t); + fail("Unexpected exception", t); } finally { l.countDown(); } @@ -181,7 +175,7 @@ public void onThrowable(Throwable t) { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -189,7 +183,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncContentTypeGETTest() throws Throwable { + public void asyncContentTypeGETTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -200,7 +194,7 @@ public void asyncContentTypeGETTest() throws Throwable { public Response onCompleted(Response response) throws Exception { try { assertEquals(response.getStatusCode(), 200); - assertEquals(response.getContentType(), UTF_8); + assertEquals(response.getContentType(), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); } finally { l.countDown(); } @@ -208,7 +202,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -216,7 +210,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncHeaderGETTest() throws Throwable { + public void asyncHeaderGETTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -227,7 +221,7 @@ public void asyncHeaderGETTest() throws Throwable { public Response onCompleted(Response response) throws Exception { try { assertEquals(response.getStatusCode(), 200); - assertEquals(response.getContentType(), UTF_8); + assertEquals(response.getContentType(), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); } finally { l.countDown(); } @@ -236,7 +230,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -244,7 +238,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncHeaderPOSTTest() throws Throwable { + public void asyncHeaderPOSTTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -261,7 +255,6 @@ public void asyncHeaderPOSTTest() throws Throwable { @Override public Response onCompleted(Response response) throws Exception { try { - System.out.println(">>>>> " + response.getStatusText()); assertEquals(response.getStatusCode(), 200); for (int i = 1; i < 5; i++) { assertEquals(response.getHeader("X-Test" + i), "Test" + i); @@ -274,7 +267,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -282,7 +275,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncParamPOSTTest() throws Throwable { + public void asyncParamPOSTTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -303,7 +296,6 @@ public Response onCompleted(Response response) throws Exception { for (int i = 1; i < 5; i++) { assertEquals(response.getHeader("X-param_" + i), "value_" + i); } - } finally { l.countDown(); } @@ -312,7 +304,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -320,7 +312,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncStatusHEADTest() throws Throwable { + public void asyncStatusHEADTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -340,13 +332,13 @@ public Response onCompleted(Response response) throws Exception { try { String s = response.getResponseBody(); - Assert.assertEquals("", s); + assertEquals("", s); } catch (IllegalStateException ex) { fail(); } if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -355,7 +347,7 @@ public Response onCompleted(Response response) throws Exception { // TODO: fix test @Test(groups = { "standalone", "default_provider", "async" }, enabled = false) - public void asyncStatusHEADContentLenghtTest() throws Throwable { + public void asyncStatusHEADContentLenghtTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(120 * 1000).build()); try { final CountDownLatch l = new CountDownLatch(1); @@ -364,7 +356,7 @@ public void asyncStatusHEADContentLenghtTest() throws Throwable { client.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { - Assert.fail(); + fail(); return response; } @@ -381,7 +373,7 @@ public void onThrowable(Throwable t) { }).get(); if (!l.await(10 * 5 * 1000, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -389,21 +381,21 @@ public void onThrowable(Throwable t) { } @Test(groups = { "online", "default_provider", "async" }) - public void asyncNullSchemeTest() throws Throwable { + public void asyncNullSchemeTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { client.prepareGet("www.sun.com").execute(); - Assert.fail(); + fail(); } catch (IllegalArgumentException ex) { - Assert.assertTrue(true); + assertTrue(true); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoGetTransferEncodingTest() throws Throwable { + public void asyncDoGetTransferEncodingTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -423,7 +415,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -431,7 +423,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoGetHeadersTest() throws Throwable { + public void asyncDoGetHeadersTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -457,7 +449,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -465,7 +457,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoGetCookieTest() throws Throwable { + public void asyncDoGetCookieTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -494,7 +486,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -502,7 +494,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostDefaultContentType() throws Throwable { + public void asyncDoPostDefaultContentType() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -522,7 +514,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -530,7 +522,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostBodyIsoTest() throws Throwable { + public void asyncDoPostBodyIsoTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); @@ -541,7 +533,7 @@ public void asyncDoPostBodyIsoTest() throws Throwable { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostBytesTest() throws Throwable { + public void asyncDoPostBytesTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -549,11 +541,7 @@ public void asyncDoPostBytesTest() throws Throwable { h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); @@ -576,7 +564,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -584,7 +572,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostInputStreamTest() throws Throwable { + public void asyncDoPostInputStreamTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -592,11 +580,7 @@ public void asyncDoPostInputStreamTest() throws Throwable { h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); @@ -619,7 +603,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -627,7 +611,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPutInputStreamTest() throws Throwable { + public void asyncDoPutInputStreamTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -635,11 +619,7 @@ public void asyncDoPutInputStreamTest() throws Throwable { h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); ByteArrayInputStream is = new ByteArrayInputStream(sb.toString().getBytes()); @@ -651,9 +631,7 @@ public Response onCompleted(Response response) throws Exception { try { assertEquals(response.getStatusCode(), 200); for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); assertEquals(response.getHeader("X-param_" + i), "value_" + i); - } } finally { l.countDown(); @@ -662,7 +640,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -670,7 +648,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostMultiPartTest() throws Throwable { + public void asyncDoPostMultiPartTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -694,7 +672,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -702,7 +680,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostBasicGZIPTest() throws Throwable { + public void asyncDoPostBasicGZIPTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build()); try { final CountDownLatch l = new CountDownLatch(1); @@ -710,11 +688,7 @@ public void asyncDoPostBasicGZIPTest() throws Throwable { h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); @@ -732,7 +706,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); @@ -740,18 +714,14 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostProxyTest() throws Throwable { + public void asyncDoPostProxyTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setProxyServer(new ProxyServer("127.0.0.1", port2)).build()); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); @@ -774,7 +744,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncRequestVirtualServerPOSTTest() throws Throwable { + public void asyncRequestVirtualServerPOSTTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -800,18 +770,14 @@ public void asyncRequestVirtualServerPOSTTest() throws Throwable { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPutTest() throws Throwable { + public void asyncDoPutTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); @@ -824,7 +790,7 @@ public void asyncDoPutTest() throws Throwable { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostLatchBytesTest() throws Throwable { + public void asyncDoPostLatchBytesTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -832,11 +798,7 @@ public void asyncDoPostLatchBytesTest() throws Throwable { h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); @@ -847,9 +809,7 @@ public Response onCompleted(Response response) throws Exception { try { assertEquals(response.getStatusCode(), 200); for (int i = 1; i < 5; i++) { - System.out.println(">>>>> " + response.getHeader("X-param_" + i)); assertEquals(response.getHeader("X-param_" + i), "value_" + i); - } return response; } finally { @@ -859,7 +819,7 @@ public Response onCompleted(Response response) throws Exception { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -867,7 +827,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostDelayCancelTest() throws Throwable { + public void asyncDoPostDelayCancelTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -883,14 +843,14 @@ public void onThrowable(Throwable t) { }); future.cancel(true); Response response = future.get(TIMEOUT, TimeUnit.SECONDS); - Assert.assertNull(response); + assertNull(response); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostDelayBytesTest() throws Throwable { + public void asyncDoPostDelayBytesTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -910,12 +870,12 @@ public void onThrowable(Throwable t) { future.get(10, TimeUnit.SECONDS); } catch (ExecutionException ex) { if (ex.getCause() instanceof TimeoutException) { - Assert.assertTrue(true); + assertTrue(true); } } catch (TimeoutException te) { - Assert.assertTrue(true); + assertTrue(true); } catch (IllegalStateException ex) { - Assert.assertTrue(false); + assertTrue(false); } } finally { client.close(); @@ -923,7 +883,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostNullBytesTest() throws Throwable { + public void asyncDoPostNullBytesTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { @@ -931,18 +891,14 @@ public void asyncDoPostNullBytesTest() throws Throwable { h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); Response response = future.get(); - Assert.assertNotNull(response); + assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -950,18 +906,14 @@ public void asyncDoPostNullBytesTest() throws Throwable { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostListenerBytesTest() throws Throwable { + public void asyncDoPostListenerBytesTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 5; i++) { - sb.append("param_"); - sb.append(i); - sb.append("=value_"); - sb.append(i); - sb.append("&"); + sb.append("param_").append(i).append("=value_").append(i).append("&"); } sb.setLength(sb.length() - 1); @@ -980,7 +932,7 @@ public Response onCompleted(Response response) throws Exception { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Latch time out"); + fail("Latch time out"); } } finally { client.close(); @@ -988,7 +940,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncConnectInvalidFuture() throws Throwable { + public void asyncConnectInvalidFuture() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { int dummyPort = findFreePort(); @@ -1016,7 +968,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncConnectInvalidPortFuture() throws Throwable { + public void asyncConnectInvalidPortFuture() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { int dummyPort = findFreePort(); @@ -1040,7 +992,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncConnectInvalidPort() throws Throwable { + public void asyncConnectInvalidPort() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { // pick a random unused local port @@ -1063,7 +1015,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncConnectInvalidHandlerPort() throws Throwable { + public void asyncConnectInvalidHandlerPort() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -1081,7 +1033,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1089,7 +1041,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "online", "default_provider", "async" }) - public void asyncConnectInvalidHandlerHost() throws Throwable { + public void asyncConnectInvalidHandlerHost() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final CountDownLatch l = new CountDownLatch(1); @@ -1108,7 +1060,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1116,7 +1068,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncConnectInvalidFuturePort() throws Throwable { + public void asyncConnectInvalidFuturePort() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicBoolean called = new AtomicBoolean(false); @@ -1146,18 +1098,18 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncContentLenghtGETTest() throws Throwable { + public void asyncContentLenghtGETTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { - Assert.fail("Unexpected exception", t); + fail("Unexpected exception", t); } }).get(); - Assert.assertNotNull(response); + assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -1165,32 +1117,32 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncResponseBodyTooLarge() throws Throwable { + public void asyncResponseBodyTooLarge() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.preparePost(getTargetUrl()).setBody("0123456789").execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { - Assert.fail("Unexpected exception", t); + fail("Unexpected exception", t); } }).get(); - Assert.assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); + assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncResponseEmptyBody() throws Throwable { + public void asyncResponseEmptyBody() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerAdapter() { @Override public void onThrowable(Throwable t) { - Assert.fail("Unexpected exception", t); + fail("Unexpected exception", t); } }).get(); @@ -1201,7 +1153,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "asyncAPI" }) - public void asyncAPIContentLenghtGETTest() throws Throwable { + public void asyncAPIContentLenghtGETTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { // Use a l in case the assert fail @@ -1225,7 +1177,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1233,7 +1185,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "asyncAPI" }) - public void asyncAPIHandlerExceptionTest() throws Throwable { + public void asyncAPIHandlerExceptionTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { // Use a l in case the assert fail @@ -1258,7 +1210,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1266,7 +1218,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoGetDelayHandlerTest() throws Throwable { + public void asyncDoGetDelayHandlerTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(5 * 1000).build()); try { FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); @@ -1280,7 +1232,7 @@ public void asyncDoGetDelayHandlerTest() throws Throwable { @Override public Response onCompleted(Response response) throws Exception { try { - Assert.fail("Must not receive a response"); + fail("Must not receive a response"); } finally { l.countDown(); } @@ -1291,9 +1243,9 @@ public Response onCompleted(Response response) throws Exception { public void onThrowable(Throwable t) { try { if (t instanceof TimeoutException) { - Assert.assertTrue(true); + assertTrue(true); } else { - Assert.fail("Unexpected exception", t); + fail("Unexpected exception", t); } } finally { l.countDown(); @@ -1302,7 +1254,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1310,7 +1262,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoGetQueryStringTest() throws Throwable { + public void asyncDoGetQueryStringTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { // Use a l in case the assert fail @@ -1321,8 +1273,8 @@ public void asyncDoGetQueryStringTest() throws Throwable { @Override public Response onCompleted(Response response) throws Exception { try { - Assert.assertTrue(response.getHeader("X-pathInfo") != null); - Assert.assertTrue(response.getHeader("X-queryString") != null); + assertTrue(response.getHeader("X-pathInfo") != null); + assertTrue(response.getHeader("X-queryString") != null); } finally { l.countDown(); } @@ -1335,7 +1287,7 @@ public Response onCompleted(Response response) throws Exception { client.executeRequest(req, handler).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1343,7 +1295,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoGetKeepAliveHandlerTest() throws Throwable { + public void asyncDoGetKeepAliveHandlerTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { // Use a l in case the assert fail @@ -1355,15 +1307,16 @@ public void asyncDoGetKeepAliveHandlerTest() throws Throwable { @Override public Response onCompleted(Response response) throws Exception { - assertEquals(response.getStatusCode(), 200); - if (remoteAddr == null) { - remoteAddr = response.getHeader("X-KEEP-ALIVE"); - l.countDown(); - } else { - assertEquals(response.getHeader("X-KEEP-ALIVE"), remoteAddr); + try { + assertEquals(response.getStatusCode(), 200); + if (remoteAddr == null) { + remoteAddr = response.getHeader("X-KEEP-ALIVE"); + } else { + assertEquals(response.getHeader("X-KEEP-ALIVE"), remoteAddr); + } + } finally { l.countDown(); } - return response; } }; @@ -1372,7 +1325,7 @@ public Response onCompleted(Response response) throws Exception { client.prepareGet(getTargetUrl()).execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1380,7 +1333,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "online", "default_provider", "async" }) - public void asyncDoGetMaxRedirectTest() throws Throwable { + public void asyncDoGetMaxRedirectTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new Builder().setMaximumNumberOfRedirects(0).setFollowRedirects(true).build()); try { // Use a l in case the assert fail @@ -1390,7 +1343,7 @@ public void asyncDoGetMaxRedirectTest() throws Throwable { @Override public Response onCompleted(Response response) throws Exception { - Assert.fail("Should not be here"); + fail("Should not be here"); return response; } @@ -1408,7 +1361,7 @@ public void onThrowable(Throwable t) { client.prepareGet("http://www.google.com").execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1416,7 +1369,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "online", "default_provider", "async" }) - public void asyncDoGetNestedTest() throws Throwable { + public void asyncDoGetNestedTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { // FIXME find a proper website that redirects the same number of times whatever the language @@ -1451,7 +1404,7 @@ public void onThrowable(Throwable t) { client.prepareGet("http://www.lemonde.fr").execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { client.close(); @@ -1459,7 +1412,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "online", "default_provider", "async" }) - public void asyncDoGetStreamAndBodyTest() throws Throwable { + public void asyncDoGetStreamAndBodyTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); @@ -1470,7 +1423,7 @@ public void asyncDoGetStreamAndBodyTest() throws Throwable { } @Test(groups = { "online", "default_provider", "async" }) - public void asyncUrlWithoutPathTest() throws Throwable { + public void asyncUrlWithoutPathTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); @@ -1481,7 +1434,7 @@ public void asyncUrlWithoutPathTest() throws Throwable { } @Test(groups = { "default_provider", "async" }) - public void optionsTest() throws Throwable { + public void optionsTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareOptions(getTargetUrl()).execute().get(); @@ -1535,12 +1488,12 @@ public void idleRequestTimeoutTest() throws Exception { long t1 = millisTime(); try { client.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(); - Assert.fail(); + fail(); } catch (Throwable ex) { final long elapsedTime = millisTime() - t1; System.out.println("EXPIRED: " + (elapsedTime)); - Assert.assertNotNull(ex.getCause()); - Assert.assertTrue(elapsedTime >= 10000 && elapsedTime <= 25000); + assertNotNull(ex.getCause()); + assertTrue(elapsedTime >= 10000 && elapsedTime <= 25000); } } finally { client.close(); @@ -1548,7 +1501,7 @@ public void idleRequestTimeoutTest() throws Exception { } @Test(groups = { "standalone", "default_provider", "async" }) - public void asyncDoPostCancelTest() throws Throwable { + public void asyncDoPostCancelTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { @@ -1577,7 +1530,7 @@ public void onThrowable(Throwable t) { } catch (IllegalStateException ise) { fail(); } - Assert.assertNotNull(ex.get()); + assertNotNull(ex.get()); } finally { client.close(); } @@ -1626,7 +1579,7 @@ public void asyncHttpClientConfigBeanTest() throws Exception { } @Test(groups = { "default_provider", "async" }) - public void bodyAsByteTest() throws Throwable { + public void bodyAsByteTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareGet(getTargetUrl()).execute().get(); @@ -1638,7 +1591,7 @@ public void bodyAsByteTest() throws Throwable { } @Test(groups = { "default_provider", "async" }) - public void mirrorByteTest() throws Throwable { + public void mirrorByteTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); @@ -1649,5 +1602,5 @@ public void mirrorByteTest() throws Throwable { } } - protected abstract AsyncHttpProviderConfig getProviderConfig(); + protected abstract AsyncHttpProviderConfig getProviderConfig(); } diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index 9c6a4ddfed..1d31d21ac7 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -15,16 +15,8 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.Response; -import org.testng.Assert; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET; +import static org.testng.Assert.*; import java.util.Arrays; import java.util.Collection; @@ -37,13 +29,22 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; +import org.testng.annotations.Test; + public abstract class AsyncStreamHandlerTest extends AbstractBasicTest { - + private static final String RESPONSE = "param_1_"; - private static final String UTF8 = "text/html;charset=utf-8"; @Test(groups = { "standalone", "default_provider" }) - public void asyncStreamGETTest() throws Throwable { + public void asyncStreamGETTest() throws Exception { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); try { @@ -53,8 +54,8 @@ public void asyncStreamGETTest() throws Throwable { public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { try { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), UTF8); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", "), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); return STATE.ABORT; } finally { l.countDown(); @@ -64,7 +65,7 @@ public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { @Override public void onThrowable(Throwable t) { try { - Assert.fail("", t); + fail("", t); } finally { l.countDown(); } @@ -72,7 +73,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(5, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -80,7 +81,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void asyncStreamPOSTTest() throws Throwable { + public void asyncStreamPOSTTest() throws Exception { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -95,8 +96,8 @@ public void asyncStreamPOSTTest() throws Throwable { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), UTF8); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", "), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); return STATE.CONTINUE; } @@ -110,7 +111,7 @@ public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { public String onCompleted() throws Exception { try { String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); + assertEquals(r, RESPONSE); return r; } finally { l.countDown(); @@ -119,7 +120,7 @@ public String onCompleted() throws Exception { }); if (!l.await(10, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -127,7 +128,7 @@ public String onCompleted() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void asyncStreamInterruptTest() throws Throwable { + public void asyncStreamInterruptTest() throws Exception { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -143,22 +144,22 @@ public void asyncStreamInterruptTest() throws Throwable { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), UTF8); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); return STATE.ABORT; } @Override public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { a.set(false); - Assert.fail("Interrupted not working"); + fail("Interrupted not working"); return STATE.ABORT; } @Override public void onThrowable(Throwable t) { try { - Assert.fail("", t); + fail("", t); } finally { l.countDown(); } @@ -166,14 +167,14 @@ public void onThrowable(Throwable t) { }); l.await(5, TimeUnit.SECONDS); - Assert.assertTrue(a.get()); + assertTrue(a.get()); } finally { c.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void asyncStreamFutureTest() throws Throwable { + public void asyncStreamFutureTest() throws Exception { Map> m = new HashMap>(); m.put("param_1", Arrays.asList("value_1")); AsyncHttpClient c = getAsyncHttpClient(null); @@ -184,8 +185,8 @@ public void asyncStreamFutureTest() throws Throwable { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), UTF8); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", "), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); return STATE.CONTINUE; } @@ -198,22 +199,22 @@ public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { @Override public String onCompleted() throws Exception { String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); + assertEquals(r, RESPONSE); return r; } @Override public void onThrowable(Throwable t) { - Assert.fail("", t); + fail("", t); } }); try { String r = f.get(5, TimeUnit.SECONDS); - Assert.assertNotNull(r); - Assert.assertEquals(r.trim(), RESPONSE); + assertNotNull(r); + assertEquals(r.trim(), RESPONSE); } catch (TimeoutException ex) { - Assert.fail(); + fail(); } } finally { c.close(); @@ -221,7 +222,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void asyncStreamThrowableRefusedTest() throws Throwable { + public void asyncStreamThrowableRefusedTest() throws Exception { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); @@ -237,7 +238,7 @@ public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { public void onThrowable(Throwable t) { try { if (t.getMessage() != null) { - Assert.assertEquals(t.getMessage(), "FOO"); + assertEquals(t.getMessage(), "FOO"); } } finally { l.countDown(); @@ -246,7 +247,7 @@ public void onThrowable(Throwable t) { }); if (!l.await(10, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } } finally { c.close(); @@ -254,7 +255,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void asyncStreamReusePOSTTest() throws Throwable { + public void asyncStreamReusePOSTTest() throws Exception { final CountDownLatch l = new CountDownLatch(1); FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); h.add("Content-Type", "application/x-www-form-urlencoded"); @@ -269,8 +270,8 @@ public void asyncStreamReusePOSTTest() throws Throwable { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), UTF8); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", "), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); return STATE.CONTINUE; } @@ -284,7 +285,7 @@ public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { public String onCompleted() throws Exception { try { String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); + assertEquals(r, RESPONSE); return r; } finally { l.countDown(); @@ -294,7 +295,7 @@ public String onCompleted() throws Exception { }); if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } // Let do the same again @@ -304,8 +305,8 @@ public String onCompleted() throws Exception { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), UTF8); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", "), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); return STATE.CONTINUE; } @@ -319,7 +320,7 @@ public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { public String onCompleted() throws Exception { try { String r = builder.toString().trim(); - Assert.assertEquals(r, RESPONSE); + assertEquals(r, RESPONSE); return r; } finally { l.countDown(); @@ -328,7 +329,7 @@ public String onCompleted() throws Exception { }); if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -336,22 +337,22 @@ public String onCompleted() throws Exception { } @Test(groups = { "online", "default_provider" }) - public void asyncStream301WithBody() throws Throwable { + public void asyncStream301WithBody() throws Exception { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); try { c.prepareGet("http://google.com/").execute(new AsyncHandlerAdapter() { public STATE onStatusReceived(HttpResponseStatus status) throws Exception { - Assert.assertEquals(301, status.getStatusCode()); - return STATE.CONTINUE; + assertEquals(301, status.getStatusCode()); + return STATE.CONTINUE; } @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), "text/html; charset=utf-8"); + assertNotNull(h); + assertEquals(h.getJoinedValue("content-type", ", ").toLowerCase(Locale.ENGLISH), TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET.toLowerCase(Locale.ENGLISH)); return STATE.CONTINUE; } @@ -368,7 +369,7 @@ public String onCompleted() throws Exception { }); if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -376,22 +377,22 @@ public String onCompleted() throws Exception { } @Test(groups = { "online", "default_provider" }) - public void asyncStream301RedirectWithBody() throws Throwable { + public void asyncStream301RedirectWithBody() throws Exception { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); try { c.prepareGet("http://google.com/").execute(new AsyncHandlerAdapter() { public STATE onStatusReceived(HttpResponseStatus status) throws Exception { - Assert.assertTrue(status.getStatusCode() != 301); - return STATE.CONTINUE; + assertTrue(status.getStatusCode() != 301); + return STATE.CONTINUE; } @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); - Assert.assertEquals(h.getFirstValue("server"), "gws"); + assertNotNull(h); + assertEquals(h.getFirstValue("server"), "gws"); // This assertion below is not an invariant, since implicitly contains locale-dependant settings // and fails when run in country having own localized Google site and it's locale relies on something // other than ISO-8859-1. @@ -399,7 +400,7 @@ public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { // Google site, that uses ISO-8892-2 encoding (default for HU). Similar is true for other // non-ISO-8859-1 using countries that have "localized" google, like google.hr, google.rs, google.cz, google.sk etc. // - // Assert.assertEquals(h.getJoinedValue("content-type", ", "), "text/html; charset=ISO-8859-1"); + // assertEquals(h.getJoinedValue("content-type", ", "), "text/html; charset=ISO-8859-1"); return STATE.CONTINUE; } @@ -411,7 +412,7 @@ public String onCompleted() throws Exception { }); if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -419,7 +420,7 @@ public String onCompleted() throws Exception { } @Test(groups = { "standalone", "default_provider" }, timeOut = 3000, description = "Test behavior of 'read only status line' scenario.") - public void asyncStreamJustStatusLine() throws Throwable { + public void asyncStreamJustStatusLine() throws Exception { final int STATUS = 0; final int COMPLETED = 1; final int OTHER = 2; @@ -446,7 +447,6 @@ public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception /* @Override */ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { whatCalled[STATUS] = true; - System.out.println(responseStatus); status = responseStatus.getStatusCode(); latch.countDown(); return STATE.ABORT; @@ -468,20 +468,20 @@ public Integer onCompleted() throws Exception { }); if (!latch.await(2, TimeUnit.SECONDS)) { - Assert.fail("Timeout"); + fail("Timeout"); return; } Integer status = statusCode.get(TIMEOUT, TimeUnit.SECONDS); - Assert.assertEquals((int) status, 200, "Expected status code failed."); + assertEquals((int) status, 200, "Expected status code failed."); if (!whatCalled[STATUS]) { - Assert.fail("onStatusReceived not called."); + fail("onStatusReceived not called."); } if (!whatCalled[COMPLETED]) { - Assert.fail("onCompleted not called."); + fail("onCompleted not called."); } if (whatCalled[OTHER]) { - Assert.fail("Other method of AsyncHandler got called."); + fail("Other method of AsyncHandler got called."); } } finally { client.close(); @@ -489,7 +489,7 @@ public Integer onCompleted() throws Exception { } @Test(groups = { "online", "default_provider" }) - public void asyncOptionsTest() throws Throwable { + public void asyncOptionsTest() throws Exception { final CountDownLatch l = new CountDownLatch(1); AsyncHttpClient c = getAsyncHttpClient(null); try { @@ -499,20 +499,15 @@ public void asyncOptionsTest() throws Throwable { @Override public STATE onHeadersReceived(HttpResponseHeaders content) throws Exception { FluentCaseInsensitiveStringsMap h = content.getHeaders(); - Assert.assertNotNull(h); + assertNotNull(h); String[] values = h.get("Allow").get(0).split(",|, "); - Assert.assertNotNull(values); - Assert.assertEquals(values.length, expected.length); + assertNotNull(values); + assertEquals(values.length, expected.length); Arrays.sort(values); - Assert.assertEquals(values, expected); + assertEquals(values, expected); return STATE.ABORT; } - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { - return STATE.CONTINUE; - } - @Override public String onCompleted() throws Exception { try { @@ -524,7 +519,7 @@ public String onCompleted() throws Exception { }); if (!l.await(20, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { c.close(); @@ -532,7 +527,7 @@ public String onCompleted() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void closeConnectionTest() throws Throwable { + public void closeConnectionTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { Response r = c.prepareGet(getTargetUrl()).execute(new AsyncHandler() { @@ -567,8 +562,8 @@ public Response onCompleted() throws Exception { } }).get(); - Assert.assertNotNull(r); - Assert.assertEquals(r.getStatusCode(), 200); + assertNotNull(r); + assertEquals(r.getStatusCode(), 200); } finally { c.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java index 1666fc77d4..0c49fca3b8 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamLifecycleTest.java @@ -15,21 +15,8 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.eclipse.jetty.continuation.Continuation; -import org.eclipse.jetty.continuation.ContinuationSupport; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.AfterClass; -import org.testng.annotations.Test; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.util.concurrent.CountDownLatch; @@ -40,10 +27,21 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.eclipse.jetty.continuation.Continuation; +import org.eclipse.jetty.continuation.ContinuationSupport; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.AfterClass; +import org.testng.annotations.Test; /** * Tests default asynchronous life cycle. @@ -74,9 +72,9 @@ public void run() { try { Thread.sleep(100); } catch (InterruptedException e) { - log.error("Failed to sleep for 100 ms.", e); + logger.error("Failed to sleep for 100 ms.", e); } - log.info("Delivering part1."); + logger.info("Delivering part1."); writer.write("part1"); writer.flush(); } @@ -86,9 +84,9 @@ public void run() { try { Thread.sleep(200); } catch (InterruptedException e) { - log.error("Failed to sleep for 200 ms.", e); + logger.error("Failed to sleep for 200 ms.", e); } - log.info("Delivering part2."); + logger.info("Delivering part2."); writer.write("part2"); writer.flush(); continuation.complete(); @@ -118,7 +116,7 @@ public void onThrowable(Throwable t) { public STATE onBodyPartReceived(HttpResponseBodyPart e) throws Exception { String s = new String(e.getBodyPartBytes()); - log.info("got part: {}", s); + logger.info("got part: {}", s); queue.put(s); return STATE.CONTINUE; } diff --git a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java index bd4491f7a6..962e996cd2 100644 --- a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java @@ -12,100 +12,59 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Realm; import org.asynchttpclient.Response; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.eclipse.jetty.security.ConstraintMapping; -import org.eclipse.jetty.security.ConstraintSecurityHandler; -import org.eclipse.jetty.security.HashLoginService; -import org.eclipse.jetty.security.LoginService; -import org.eclipse.jetty.security.authentication.BasicAuthenticator; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.util.security.Constraint; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.fail; - public abstract class AuthTimeoutTest extends AbstractBasicTest { - private static final String USER = "user"; - - private static final String ADMIN = "admin"; - - protected AsyncHttpClient client; - - public void setUpServer(String auth) throws Exception { - server = new Server(); - Logger root = Logger.getRootLogger(); - root.setLevel(Level.DEBUG); - root.addAppender(new ConsoleAppender(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); + private Server server2; + @BeforeClass(alwaysRun = true) + @Override + public void setUpGlobal() throws Exception { port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); - - LoginService loginService = new HashLoginService("MyRealm", "src/test/resources/realm.properties"); - server.addBean(loginService); - - Constraint constraint = new Constraint(); - constraint.setName(auth); - constraint.setRoles(new String[] { USER, ADMIN }); - constraint.setAuthenticate(true); - - ConstraintMapping mapping = new ConstraintMapping(); - mapping.setConstraint(constraint); - mapping.setPathSpec("/*"); + port2 = findFreePort(); - Set knownRoles = new HashSet(); - knownRoles.add(USER); - knownRoles.add(ADMIN); - - ConstraintSecurityHandler security = new ConstraintSecurityHandler(); + server = newJettyHttpServer(port1); + addBasicAuthHandler(server, false, configureHandler()); + server.start(); - List cm = new ArrayList(); - cm.add(mapping); + server2 = newJettyHttpServer(port2); + addDigestAuthHandler(server2, true, configureHandler()); + server2.start(); - security.setConstraintMappings(cm, knownRoles); - security.setAuthenticator(new BasicAuthenticator()); - security.setLoginService(loginService); - security.setStrict(false); - security.setHandler(configureHandler()); + logger.info("Local HTTP server started successfully"); + } - server.setHandler(security); - server.start(); - log.info("Local HTTP server started successfully"); + @AfterClass(alwaysRun = true) + public void tearDownGlobal() throws Exception { + super.tearDownGlobal(); + server2.stop(); } - private class SimpleHandler extends AbstractHandler { - public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + private class IncompleteResponseHandler extends AbstractHandler { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // NOTE: handler sends less bytes than are given in Content-Length, which should lead to timeout OutputStream out = response.getOutputStream(); @@ -113,12 +72,9 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR String content = request.getHeader("X-Content"); response.setHeader("Content-Length", String.valueOf(content.getBytes("UTF-8").length)); out.write(content.substring(1).getBytes("UTF-8")); - out.flush(); - out.close(); - return; + } else { + response.setStatus(200); } - - response.setStatus(200); out.flush(); out.close(); } @@ -126,9 +82,9 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR @Test(groups = { "standalone", "default_provider" }, enabled = false) public void basicAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__BASIC_AUTH); + AsyncHttpClient client = newClient(); try { - Future f = execute(false); + Future f = execute(client, server, false); f.get(); fail("expected timeout"); } catch (Exception e) { @@ -140,9 +96,9 @@ public void basicAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void basicPreemptiveAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__BASIC_AUTH); + AsyncHttpClient client = newClient(); try { - Future f = execute(true); + Future f = execute(client, server, true); f.get(); fail("expected timeout"); } catch (Exception e) { @@ -154,10 +110,9 @@ public void basicPreemptiveAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void digestAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__DIGEST_AUTH); - + AsyncHttpClient client = newClient(); try { - Future f = execute(false); + Future f = execute(client, server2, false); f.get(); fail("expected timeout"); } catch (Exception e) { @@ -169,10 +124,9 @@ public void digestAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void digestPreemptiveAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__DIGEST_AUTH); - + AsyncHttpClient client = newClient(); try { - Future f = execute(true); + Future f = execute(client, server2, true); f.get(); fail("expected timeout"); } catch (Exception e) { @@ -184,10 +138,9 @@ public void digestPreemptiveAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void basicFutureAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__BASIC_AUTH); - + AsyncHttpClient client = newClient(); try { - Future f = execute(false); + Future f = execute(client, server, false); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { @@ -199,10 +152,9 @@ public void basicFutureAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void basicFuturePreemptiveAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__BASIC_AUTH); - + AsyncHttpClient client = newClient(); try { - Future f = execute(true); + Future f = execute(client, server, true); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { @@ -214,10 +166,9 @@ public void basicFuturePreemptiveAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void digestFutureAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__DIGEST_AUTH); - + AsyncHttpClient client = newClient(); try { - Future f = execute(false); + Future f = execute(client, server2, false); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { @@ -229,10 +180,9 @@ public void digestFutureAuthTimeoutTest() throws Exception { @Test(groups = { "standalone", "default_provider" }, enabled = false) public void digestFuturePreemptiveAuthTimeoutTest() throws Exception { - setUpServer(Constraint.__DIGEST_AUTH); - + AsyncHttpClient client = newClient(); try { - Future f = execute(true); + Future f = execute(client, server2, true); f.get(1, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { @@ -250,8 +200,11 @@ protected void inspectException(Throwable t) { } } - protected Future execute(boolean preemptive) throws IOException { - client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).setConnectionTimeoutInMs(20000).setRequestTimeoutInMs(2000).build()); + private AsyncHttpClient newClient() { + return getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).setConnectionTimeoutInMs(20000).setRequestTimeoutInMs(2000).build()); + } + + protected Future execute(AsyncHttpClient client, Server server, boolean preemptive) throws IOException { AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm(realm(preemptive)).setHeader("X-Content", "Test"); Future f = r.execute(); return f; @@ -268,6 +221,6 @@ protected String getTargetUrl() { @Override public AbstractHandler configureHandler() throws Exception { - return new SimpleHandler(); + return new IncompleteResponseHandler(); } } diff --git a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index 9e5f8b6bdc..0fecd118d7 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -15,6 +15,20 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -26,52 +40,18 @@ import org.asynchttpclient.SimpleAsyncHttpClient; import org.asynchttpclient.consumers.AppendableBodyConsumer; import org.asynchttpclient.generators.InputStreamBodyGenerator; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.eclipse.jetty.security.ConstraintMapping; -import org.eclipse.jetty.security.ConstraintSecurityHandler; -import org.eclipse.jetty.security.HashLoginService; -import org.eclipse.jetty.security.LoginService; -import org.eclipse.jetty.security.authentication.BasicAuthenticator; -import org.eclipse.jetty.security.authentication.DigestAuthenticator; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.util.security.Constraint; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - public abstract class BasicAuthTest extends AbstractBasicTest { protected static final String MY_MESSAGE = "my message"; - protected static final String USER = "user"; - protected static final String ADMIN = "admin"; private Server server2; @@ -80,99 +60,18 @@ public abstract class BasicAuthTest extends AbstractBasicTest { @BeforeClass(alwaysRun = true) @Override public void setUpGlobal() throws Exception { - server = new Server(); - Logger root = Logger.getRootLogger(); - root.setLevel(Level.DEBUG); - root.addAppender(new ConsoleAppender(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); - port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); - - LoginService loginService = new HashLoginService("MyRealm", "src/test/resources/realm.properties"); - server.addBean(loginService); - - Constraint constraint = new Constraint(); - constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[] { USER, ADMIN }); - constraint.setAuthenticate(true); - - ConstraintMapping mapping = new ConstraintMapping(); - mapping.setConstraint(constraint); - mapping.setPathSpec("/*"); - - List cm = new ArrayList(); - cm.add(mapping); - - Set knownRoles = new HashSet(); - knownRoles.add(USER); - knownRoles.add(ADMIN); - - ConstraintSecurityHandler security = new ConstraintSecurityHandler(); - security.setConstraintMappings(cm, knownRoles); - security.setAuthenticator(new BasicAuthenticator()); - security.setLoginService(loginService); - security.setStrict(false); - security.setHandler(configureHandler()); - - server.setHandler(security); - server.start(); - log.info("Local HTTP server started successfully"); - setUpSecondServer(); - } - - private void setUpSecondServer() throws Exception { - server2 = new Server(); port2 = findFreePort(); - SelectChannelConnector connector = new SelectChannelConnector(); - connector.setHost("127.0.0.1"); - connector.setPort(port2); - - server2.addConnector(connector); - - LoginService loginService = new HashLoginService("MyRealm", "src/test/resources/realm.properties"); - server2.addBean(loginService); - - Constraint constraint = new Constraint(); - constraint.setName(Constraint.__DIGEST_AUTH); - constraint.setRoles(new String[] { USER, ADMIN }); - constraint.setAuthenticate(true); - - ConstraintMapping mapping = new ConstraintMapping(); - mapping.setConstraint(constraint); - mapping.setPathSpec("/*"); - - Set knownRoles = new HashSet(); - knownRoles.add(USER); - knownRoles.add(ADMIN); - - ConstraintSecurityHandler security = new ConstraintSecurityHandler() { - - @Override - public void handle(String arg0, Request arg1, HttpServletRequest arg2, HttpServletResponse arg3) throws IOException, ServletException { - System.err.println("request in security handler"); - System.err.println("Authorization: " + arg2.getHeader("Authorization")); - System.err.println("RequestUri: " + arg2.getRequestURI()); - super.handle(arg0, arg1, arg2, arg3); - } - }; - - List cm = new ArrayList(); - cm.add(mapping); - - security.setConstraintMappings(cm, knownRoles); - security.setAuthenticator(new DigestAuthenticator()); - security.setLoginService(loginService); - security.setStrict(true); - security.setHandler(new RedirectHandler()); + server = newJettyHttpServer(port1); + addBasicAuthHandler(server, false, configureHandler()); + server.start(); - server2.setHandler(security); + server2 = newJettyHttpServer(port2); + addDigestAuthHandler(server2, true, new RedirectHandler()); server2.start(); + + logger.info("Local HTTP server started successfully"); } @AfterClass(alwaysRun = true) @@ -181,41 +80,31 @@ public void tearDownGlobal() throws Exception { server2.stop(); } - private String getFileContent(final File file) { - FileInputStream in = null; - try { - if (file.exists() && file.canRead()) { - final StringBuilder sb = new StringBuilder(128); - final byte[] b = new byte[512]; - int read; - in = new FileInputStream(file); - while ((read = in.read(b)) != -1) { - sb.append(new String(b, 0, read, "UTF-8")); - } - return sb.toString(); - } - throw new IllegalArgumentException("File does not exist or cannot be read: " + file.getCanonicalPath()); - } catch (IOException ioe) { - throw new IllegalStateException(ioe); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException ignored) { - } - } - } + @Override + protected String getTargetUrl() { + return "http://127.0.0.1:" + port1 + "/"; + } + + @Override + protected String getTargetUrl2() { + return "http://127.0.0.1:" + port2 + "/uff"; + } + @Override + public AbstractHandler configureHandler() throws Exception { + return new SimpleHandler(); } - private class RedirectHandler extends AbstractHandler { + private static class RedirectHandler extends AbstractHandler { + + private static final Logger LOGGER = LoggerFactory.getLogger(RedirectHandler.class); + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - System.err.println("redirecthandler"); - System.err.println("request: " + request.getRequestURI()); + LOGGER.info("request: " + request.getRequestURI()); if ("/uff".equals(request.getRequestURI())) { - System.err.println("redirect to /bla"); + LOGGER.info("redirect to /bla"); response.setStatus(302); response.setHeader("Location", "/bla"); response.getOutputStream().flush(); @@ -224,7 +113,7 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR return; } else { - System.err.println("got redirected" + request.getRequestURI()); + LOGGER.info("got redirected" + request.getRequestURI()); response.addHeader("X-Auth", request.getHeader("Authorization")); response.addHeader("X-Content-Length", String.valueOf(request.getContentLength())); response.setStatus(200); @@ -235,7 +124,8 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR } } - private class SimpleHandler extends AbstractHandler { + private static class SimpleHandler extends AbstractHandler { + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (request.getHeader("X-401") != null) { @@ -269,9 +159,9 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR public void basicAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); - - Future f = r.execute(); + Future f = client.prepareGet(getTargetUrl())// + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build())// + .execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); @@ -283,39 +173,27 @@ public void basicAuthTest() throws IOException, ExecutionException, TimeoutExcep @Test(groups = { "standalone", "default_provider" }) public void redirectAndBasicAuthTest() throws Exception, ExecutionException, TimeoutException, InterruptedException { - AsyncHttpClient client = null; + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).setMaximumNumberOfRedirects(10).build()); try { - client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).setMaximumNumberOfRedirects(10).build()); - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl2()) - // .setHeader( "X-302", "/bla" ) - .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); - - Future f = r.execute(); + Future f = client.prepareGet(getTargetUrl2())// + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build())// + .execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); } finally { - if (client != null) - client.close(); + client.close(); } } - @Override - protected String getTargetUrl() { - return "http://127.0.0.1:" + port1 + "/"; - } - - protected String getTargetUrl2() { - return "http://127.0.0.1:" + port2 + "/uff"; - } - @Test(groups = { "standalone", "default_provider" }) public void basic401Test() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setHeader("X-401", "401") + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl())// + .setHeader("X-401", "401")// .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); Future f = r.execute(new AsyncHandler() { @@ -359,10 +237,10 @@ public Integer onCompleted() throws Exception { public void basicAuthTestPreemtiveTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm( - (new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setUsePreemptiveAuth(true).build()); + Future f = client.prepareGet(getTargetUrl())// + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setUsePreemptiveAuth(true).build())// + .execute(); - Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); @@ -376,9 +254,10 @@ public void basicAuthTestPreemtiveTest() throws IOException, ExecutionException, public void basicAuthNegativeTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(getTargetUrl()).setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(ADMIN).build()); + Future f = client.prepareGet(getTargetUrl())// + .setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(ADMIN).build())// + .execute(); - Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), 401); @@ -391,11 +270,11 @@ public void basicAuthNegativeTest() throws IOException, ExecutionException, Time public void basicAuthInputStreamTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - ByteArrayInputStream is = new ByteArrayInputStream("test".getBytes()); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(is) - .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); + Future f = client.preparePost(getTargetUrl())// + .setBody(new ByteArrayInputStream("test".getBytes()))// + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build())// + .execute(); - Future f = r.execute(); Response resp = f.get(30, TimeUnit.SECONDS); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); @@ -407,83 +286,64 @@ public void basicAuthInputStreamTest() throws IOException, ExecutionException, T } @Test(groups = { "standalone", "default_provider" }) - public void basicAuthFileTest() throws Throwable { + public void basicAuthFileTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final String fileContent = getFileContent(file); + Future f = client.preparePost(getTargetUrl())// + .setBody(SIMPLE_TEXT_FILE)// + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build())// + .execute(); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file) - .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); - - Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), fileContent); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void basicAuthAsyncConfigTest() throws Throwable { + public void basicAuthAsyncConfigTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final String fileContent = getFileContent(file); + Future f = client.preparePost(getTargetUrl())// + .setBody(SIMPLE_TEXT_FILE_STRING)// + .execute(); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file); - - Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), fileContent); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void basicAuthFileNoKeepAliveTest() throws Throwable { + public void basicAuthFileNoKeepAliveTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(false).build()); try { - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - final String fileContent = getFileContent(file); - AsyncHttpClient.BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(file) - .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build()); + Future f = client.preparePost(getTargetUrl())// + .setBody(SIMPLE_TEXT_FILE)// + .setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).build())// + .execute(); - Future f = r.execute(); Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertNotNull(resp.getHeader("X-Auth")); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), fileContent); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } } - @Override - public AbstractHandler configureHandler() throws Exception { - return new SimpleHandler(); - } - @Test(groups = { "standalone", "default_provider" }) - public void stringBuilderBodyConsumerTest() throws Throwable { + public void stringBuilderBodyConsumerTest() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setRealmPrincipal(USER).setRealmPassword(ADMIN) .setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); @@ -491,7 +351,6 @@ public void stringBuilderBodyConsumerTest() throws Throwable { StringBuilder s = new StringBuilder(); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); - System.out.println("waiting for response"); Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(s.toString(), MY_MESSAGE); diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index 18b35ae05d..1efde2f983 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -15,143 +15,44 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.*; -import java.io.IOException; -import java.io.InputStream; import java.net.ConnectException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.Enumeration; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; import javax.net.ssl.SSLHandshakeException; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import javax.servlet.ServletException; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.io.IOUtils; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig.Builder; import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.testng.annotations.Test; public abstract class BasicHttpsTest extends AbstractBasicHttpsTest { - protected static final Logger LOGGER = LoggerFactory.getLogger(BasicHttpsTest.class); - - public static class EchoHandler extends AbstractHandler { - - @Override - public void handle(String pathInContext, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { - - httpResponse.setContentType("text/html; charset=utf-8"); - Enumeration e = httpRequest.getHeaderNames(); - String param; - while (e.hasMoreElements()) { - param = e.nextElement().toString(); - - if (param.startsWith("LockThread")) { - try { - Thread.sleep(40 * 1000); - } catch (InterruptedException ex) { // nothing to do here - } - } - - httpResponse.addHeader("X-" + param, httpRequest.getHeader(param)); - } - - Enumeration i = httpRequest.getParameterNames(); - - StringBuilder requestBody = new StringBuilder(); - while (i.hasMoreElements()) { - param = i.nextElement().toString(); - httpResponse.addHeader("X-" + param, httpRequest.getParameter(param)); - requestBody.append(param); - requestBody.append("_"); - } - - String pathInfo = httpRequest.getPathInfo(); - if (pathInfo != null) - httpResponse.addHeader("X-pathInfo", pathInfo); - - String queryString = httpRequest.getQueryString(); - if (queryString != null) - httpResponse.addHeader("X-queryString", queryString); - - httpResponse.addHeader("X-KEEP-ALIVE", httpRequest.getRemoteAddr() + ":" + httpRequest.getRemotePort()); - - Cookie[] cs = httpRequest.getCookies(); - if (cs != null) { - for (Cookie c : cs) { - httpResponse.addCookie(c); - } - } - - if (requestBody.length() > 0) { - httpResponse.getOutputStream().write(requestBody.toString().getBytes()); - } - - int size = 10 * 1024; - if (httpRequest.getContentLength() > 0) { - size = httpRequest.getContentLength(); - } - byte[] bytes = new byte[size]; - int pos = 0; - if (bytes.length > 0) { - int read = 0; - while (read != -1) { - read = httpRequest.getInputStream().read(bytes, pos, bytes.length - pos); - pos += read; - } - - httpResponse.getOutputStream().write(bytes); - } - - httpResponse.setStatus(200); - httpResponse.getOutputStream().flush(); - httpResponse.getOutputStream().close(); - } - } - - public AbstractHandler configureHandler() throws Exception { - return new EchoHandler(); - } - protected String getTargetUrl() { return String.format("https://127.0.0.1:%d/foo/test", port1); } @Test(groups = { "standalone", "default_provider" }) - public void zeroCopyPostTest() throws Throwable { + public void zeroCopyPostTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void multipleSSLRequestsTest() throws Throwable { + public void multipleSSLRequestsTest() throws Exception { final AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { String body = "hello there"; @@ -171,7 +72,7 @@ public void multipleSSLRequestsTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void multipleSSLWithoutCacheTest() throws Throwable { + public void multipleSSLWithoutCacheTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).setAllowSslConnectionPool(false).build()); try { String body = "hello there"; @@ -188,7 +89,7 @@ public void multipleSSLWithoutCacheTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void reconnectsAfterFailedCertificationPath() throws Throwable { + public void reconnectsAfterFailedCertificationPath() throws Exception { AtomicBoolean trusted = new AtomicBoolean(false); AsyncHttpClient c = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(trusted)).build()); try { @@ -203,7 +104,7 @@ public void reconnectsAfterFailedCertificationPath() throws Throwable { assertNotNull(cause.getCause()); assertTrue(cause.getCause() instanceof SSLHandshakeException, "Expected an SSLHandshakeException, got a " + cause.getCause()); } else { - assertTrue(cause.getCause() instanceof SSLHandshakeException, "Expected an SSLHandshakeException, got a " + cause); + assertTrue(cause instanceof SSLHandshakeException, "Expected an SSLHandshakeException, got a " + cause); } } @@ -217,50 +118,4 @@ public void reconnectsAfterFailedCertificationPath() throws Throwable { c.close(); } } - - private static SSLContext createSSLContext(AtomicBoolean trusted) { - InputStream keyStoreStream = BasicHttpsTest.class.getResourceAsStream("ssltest-cacerts.jks"); - try { - char[] keyStorePassword = "changeit".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(keyStoreStream, keyStorePassword); - - // Set up key manager factory to use our key store - char[] certificatePassword = "changeit".toCharArray(); - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, certificatePassword); - - // Initialize the SSLContext to work with our key managers. - KeyManager[] keyManagers = kmf.getKeyManagers(); - TrustManager[] trustManagers = new TrustManager[] { dummyTrustManager(trusted) }; - SecureRandom secureRandom = new SecureRandom(); - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, secureRandom); - - return sslContext; - } catch (Exception e) { - throw new Error("Failed to initialize the server-side SSLContext", e); - } finally { - IOUtils.closeQuietly(keyStoreStream); - } - } - - private static final TrustManager dummyTrustManager(final AtomicBoolean trusted) { - return new X509TrustManager() { - - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - if (!trusted.get()) { - throw new CertificateException("Server certificate not trusted."); - } - } - }; - } } diff --git a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java index 46ee31059d..e6d19b6401 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java @@ -32,7 +32,7 @@ public abstract class BodyChunkTest extends AbstractBasicTest { private static final String MY_MESSAGE = "my message"; @Test(groups = { "standalone", "default_provider" }) - public void negativeContentTypeTest() throws Throwable { + public void negativeContentTypeTest() throws Exception { AsyncHttpClientConfig.Builder confbuilder = new AsyncHttpClientConfig.Builder(); confbuilder = confbuilder.setConnectionTimeoutInMs(100); diff --git a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java index 64dda4e63f..09e16e9763 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java @@ -12,21 +12,11 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.BodyDeferringAsyncHandler; -import org.asynchttpclient.BodyDeferringAsyncHandler.BodyDeferringInputStream; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; -import org.testng.annotations.Test; +import static org.apache.commons.io.IOUtils.copy; +import static org.asynchttpclient.async.util.TestUtils.findFreePort; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; import java.io.PipedInputStream; import java.io.PipedOutputStream; @@ -34,8 +24,18 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeoutException; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.BodyDeferringAsyncHandler; +import org.asynchttpclient.BodyDeferringAsyncHandler.BodyDeferringInputStream; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; public abstract class BodyDeferringAsyncHandlerTest extends AbstractBasicTest { @@ -98,18 +98,6 @@ public int getByteCount() { } } - // simple stream copy just to "consume". It closes streams. - public static void copy(InputStream in, OutputStream out) throws IOException { - byte[] buf = new byte[1024]; - int len; - while ((len = in.read(buf)) > 0) { - out.write(buf, 0, len); - } - out.flush(); - out.close(); - in.close(); - } - public AbstractHandler configureHandler() throws Exception { return new SlowAndBigHandler(); } @@ -131,16 +119,16 @@ public void deferredSimple() throws IOException, ExecutionException, TimeoutExce Response resp = bdah.getResponse(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + assertEquals(resp.getHeader("content-length"), String.valueOf(HALF_GIG)); // we got headers only, it's probably not all yet here (we have BIG file // downloading) - assertEquals(true, HALF_GIG >= cos.getByteCount()); + assertTrue(cos.getByteCount() <= HALF_GIG); // now be polite and wait for body arrival too (otherwise we would be // dropping the "line" on server) f.get(); // it all should be here now - assertEquals(true, HALF_GIG == cos.getByteCount()); + assertEquals(cos.getByteCount(), HALF_GIG); } finally { client.close(); } @@ -150,7 +138,8 @@ public void deferredSimple() throws IOException, ExecutionException, TimeoutExce public void deferredSimpleWithFailure() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredSimpleWithFailure").addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredSimpleWithFailure").addHeader("X-FAIL-TRANSFER", + Boolean.TRUE.toString()); CountingOutputStream cos = new CountingOutputStream(); BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(cos); @@ -158,21 +147,21 @@ public void deferredSimpleWithFailure() throws IOException, ExecutionException, Response resp = bdah.getResponse(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + assertEquals(resp.getHeader("content-length"), String.valueOf(HALF_GIG)); // we got headers only, it's probably not all yet here (we have BIG file // downloading) - assertEquals(true, HALF_GIG >= cos.getByteCount()); + assertTrue(cos.getByteCount() <= HALF_GIG); // now be polite and wait for body arrival too (otherwise we would be // dropping the "line" on server) try { f.get(); - Assert.fail("get() should fail with IOException!"); + fail("get() should fail with IOException!"); } catch (Exception e) { // good } // it's incomplete, there was an error - assertEquals(false, HALF_GIG == cos.getByteCount()); + assertNotEquals(cos.getByteCount(), HALF_GIG); } finally { client.close(); } @@ -195,15 +184,20 @@ public void deferredInputStreamTrick() throws IOException, ExecutionException, T Response resp = is.getAsapResponse(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + assertEquals(resp.getHeader("content-length"), String.valueOf(HALF_GIG)); // "consume" the body, but our code needs input stream CountingOutputStream cos = new CountingOutputStream(); - copy(is, cos); + try { + copy(is, cos); + } finally { + is.close(); + cos.close(); + } // now we don't need to be polite, since consuming and closing // BodyDeferringInputStream does all. // it all should be here now - assertEquals(true, HALF_GIG == cos.getByteCount()); + assertEquals(cos.getByteCount(), HALF_GIG); } finally { client.close(); } @@ -212,26 +206,32 @@ public void deferredInputStreamTrick() throws IOException, ExecutionException, T @Test(groups = { "standalone", "default_provider" }) public void deferredInputStreamTrickWithFailure() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig()); - + try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredInputStreamTrickWithFailure").addHeader("X-FAIL-TRANSFER", Boolean.TRUE.toString()); + AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/deferredInputStreamTrickWithFailure").addHeader("X-FAIL-TRANSFER", + Boolean.TRUE.toString()); PipedOutputStream pos = new PipedOutputStream(); PipedInputStream pis = new PipedInputStream(pos); BodyDeferringAsyncHandler bdah = new BodyDeferringAsyncHandler(pos); - + Future f = r.execute(bdah); - + BodyDeferringInputStream is = new BodyDeferringInputStream(f, bdah, pis); - + Response resp = is.getAsapResponse(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(true, resp.getHeader("content-length").equals(String.valueOf(HALF_GIG))); + assertEquals(resp.getHeader("content-length"), String.valueOf(HALF_GIG)); // "consume" the body, but our code needs input stream CountingOutputStream cos = new CountingOutputStream(); try { - copy(is, cos); - Assert.fail("InputStream consumption should fail with IOException!"); + try { + copy(is, cos); + } finally { + is.close(); + cos.close(); + } + fail("InputStream consumption should fail with IOException!"); } catch (IOException e) { // good! } @@ -252,7 +252,7 @@ public void testConnectionRefused() throws IOException, ExecutionException, Time r.execute(bdah); try { bdah.getResponse(); - Assert.fail("IOException should be thrown here!"); + fail("IOException should be thrown here!"); } catch (IOException e) { // good } diff --git a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java index 1a6763a43f..47c453e886 100644 --- a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java @@ -12,32 +12,32 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.createTempFile; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Enumeration; -import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; -import static org.testng.Assert.*; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; public abstract class ByteBufferCapacityTest extends AbstractBasicTest { - private static final File TMP = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); private class BasicHandler extends AbstractHandler { - public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { + public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { Enumeration e = httpRequest.getHeaderNames(); String param; @@ -72,12 +72,10 @@ public AbstractHandler configureHandler() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void basicByteBufferTest() throws Throwable { + public void basicByteBufferTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { - byte[] bytes = "RatherLargeFileRatherLargeFileRatherLargeFileRatherLargeFile".getBytes("UTF-16"); - long repeats = (1024 * 100 * 10 / bytes.length) + 1; - File largeFile = createTempFile(bytes, (int) repeats); + File largeFile = createTempFile(1024 * 100 * 10); final AtomicInteger byteReceived = new AtomicInteger(); try { @@ -106,29 +104,4 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep public String getTargetUrl() { return String.format("http://127.0.0.1:%d/foo/test", port1); } - - public static File createTempFile(byte[] pattern, int repeat) throws IOException { - TMP.mkdirs(); - TMP.deleteOnExit(); - File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); - write(pattern, repeat, tmpFile); - - return tmpFile; - } - - public static void write(byte[] pattern, int repeat, File file) throws IOException { - file.deleteOnExit(); - file.getParentFile().mkdirs(); - FileOutputStream out = null; - try { - out = new FileOutputStream(file); - for (int i = 0; i < repeat; i++) { - out.write(pattern); - } - } finally { - if (out != null) { - out.close(); - } - } - } } diff --git a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index 52f8d00722..66e9ef3692 100644 --- a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -12,7 +12,8 @@ */ package org.asynchttpclient.async; -import static org.testng.AssertJUnit.*; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; import static org.testng.FileAssert.fail; import java.io.BufferedInputStream; @@ -39,7 +40,7 @@ abstract public class ChunkingTest extends AbstractBasicTest { * Tests that the custom chunked stream result in success and content returned that is unchunked */ @Test() - public void testCustomChunking() throws Throwable { + public void testCustomChunking() throws Exception { AsyncHttpClientConfig.Builder bc = new AsyncHttpClientConfig.Builder(); bc.setAllowPoolingConnection(true); @@ -61,16 +62,17 @@ public void testCustomChunking() throws Throwable { Response response = c.executeRequest(r).get(); if (500 == response.getStatusCode()) { - System.out.println("=============="); - System.out.println("500 response from call"); - System.out.println("Headers:" + response.getHeaders()); - System.out.println("=============="); - System.out.flush(); - assertEquals("Should have 500 status code", 500, response.getStatusCode()); - assertTrue("Should have failed due to chunking", response.getHeader("X-Exception").contains("invalid.chunk.length")); + StringBuilder sb = new StringBuilder(); + sb.append("==============\n"); + sb.append("500 response from call\n"); + sb.append("Headers:" + response.getHeaders() + "\n"); + sb.append("==============\n"); + logger.debug(sb.toString()); + assertEquals(response.getStatusCode(), 500, "Should have 500 status code"); + assertTrue(response.getHeader("X-Exception").contains("invalid.chunk.length"), "Should have failed due to chunking"); fail("HARD Failing the test due to provided InputStreamBodyGenerator, chunking incorrectly:" + response.getHeader("X-Exception")); } else { - assertEquals(LARGE_IMAGE_BYTES, response.getResponseBodyAsBytes()); + assertEquals(response.getResponseBodyAsBytes(), LARGE_IMAGE_BYTES); } } finally { c.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java b/api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java index 8bf0bc6e6e..39194b33d6 100644 --- a/api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ComplexClientTest.java @@ -15,18 +15,18 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.Response; -import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; import java.util.concurrent.TimeUnit; -import static org.testng.Assert.assertEquals; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; +import org.testng.annotations.Test; public abstract class ComplexClientTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }) - public void multipleRequestsTest() throws Throwable { + public void multipleRequestsTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { String body = "hello there"; @@ -46,7 +46,7 @@ public void multipleRequestsTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void urlWithoutSlashTest() throws Throwable { + public void urlWithoutSlashTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { String body = "hello there"; diff --git a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java index 8523f82697..8bce85b03f 100644 --- a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java @@ -15,15 +15,7 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncCompletionHandler; -import org.asynchttpclient.AsyncCompletionHandlerBase; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Response; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.Assert; -import org.testng.annotations.Test; +import static org.testng.Assert.*; import java.io.IOException; import java.util.Map; @@ -33,10 +25,14 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.fail; +import org.asynchttpclient.AsyncCompletionHandler; +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; public abstract class ConnectionPoolTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); @@ -93,7 +89,7 @@ public void testMaxTotalConnectionsException() { } @Test(groups = { "standalone", "default_provider", "async" }, enabled = true, invocationCount = 10, alwaysRun = true) - public void asyncDoGetKeepAliveHandlerTest_channelClosedDoesNotFail() throws Throwable { + public void asyncDoGetKeepAliveHandlerTest_channelClosedDoesNotFail() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { // Use a l in case the assert fail @@ -122,7 +118,7 @@ public Response onCompleted(Response response) throws Exception { client.prepareGet(getTargetUrl()).execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timed out"); + fail("Timed out"); } assertEquals(remoteAddresses.size(), 2); @@ -138,7 +134,7 @@ public Response onCompleted(Response response) throws Exception { public abstract void testValidConnectionsPool(); @Test(groups = { "standalone", "default_provider" }) - public void multipleMaxConnectionOpenTest() throws Throwable { + public void multipleMaxConnectionOpenTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { @@ -166,7 +162,7 @@ public void multipleMaxConnectionOpenTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void multipleMaxConnectionOpenTestWithQuery() throws Throwable { + public void multipleMaxConnectionOpenTestWithQuery() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { @@ -196,11 +192,11 @@ public void multipleMaxConnectionOpenTestWithQuery() throws Throwable { /** * This test just make sure the hack used to catch disconnected channel under win7 doesn't throw any exception. The onComplete method must be only called once. * - * @throws Throwable + * @throws Exception * if something wrong happens. */ @Test(groups = { "standalone", "default_provider" }) - public void win7DisconnectTest() throws Throwable { + public void win7DisconnectTest() throws Exception { final AtomicInteger count = new AtomicInteger(0); AsyncHttpClient client = getAsyncHttpClient(null); @@ -233,7 +229,7 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void asyncHandlerOnThrowableTest() throws Throwable { + public void asyncHandlerOnThrowableTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicInteger count = new AtomicInteger(); diff --git a/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java b/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java index 7d4427192b..52c3789e89 100644 --- a/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/DigestAuthTest.java @@ -12,96 +12,41 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.Realm; -import org.asynchttpclient.Response; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.eclipse.jetty.security.ConstraintMapping; -import org.eclipse.jetty.security.ConstraintSecurityHandler; -import org.eclipse.jetty.security.HashLoginService; -import org.eclipse.jetty.security.LoginService; -import org.eclipse.jetty.security.authentication.DigestAuthenticator; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.util.security.Constraint; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; public abstract class DigestAuthTest extends AbstractBasicTest { - private static final String USER = "user"; - private static final String ADMIN = "admin"; - @BeforeClass(alwaysRun = true) @Override public void setUpGlobal() throws Exception { - server = new Server(); - Logger root = Logger.getRootLogger(); - root.setLevel(Level.DEBUG); - root.addAppender(new ConsoleAppender(new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN))); - port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); - - LoginService loginService = new HashLoginService("MyRealm", "src/test/resources/realm.properties"); - server.addBean(loginService); - - Constraint constraint = new Constraint(); - constraint.setName(Constraint.__BASIC_AUTH); - constraint.setRoles(new String[] { USER, ADMIN }); - constraint.setAuthenticate(true); - - ConstraintMapping mapping = new ConstraintMapping(); - mapping.setConstraint(constraint); - mapping.setPathSpec("/*"); - List cm = new ArrayList(); - cm.add(mapping); - - Set knownRoles = new HashSet(); - knownRoles.add(USER); - knownRoles.add(ADMIN); - - ConstraintSecurityHandler security = new ConstraintSecurityHandler(); - security.setConstraintMappings(cm, knownRoles); - security.setAuthenticator(new DigestAuthenticator()); - security.setLoginService(loginService); - security.setStrict(false); - - security.setHandler(configureHandler()); - server.setHandler(security); + server = newJettyHttpServer(port1); + addDigestAuthHandler(server, false, configureHandler()); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } - private class SimpleHandler extends AbstractHandler { + private static class SimpleHandler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.addHeader("X-Auth", request.getHeader("Authorization")); @@ -111,13 +56,18 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR } } + @Override + public AbstractHandler configureHandler() throws Exception { + return new SimpleHandler(); + } + @Test(groups = { "standalone", "default_provider" }) public void digestAuthTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setRealmName("MyRealm").setScheme(Realm.AuthScheme.DIGEST).build()); - - Future f = r.execute(); + Future f = client.prepareGet("http://127.0.0.1:" + port1 + "/")// + .setRealm(new Realm.RealmBuilder().setPrincipal(USER).setPassword(ADMIN).setRealmName("MyRealm").setScheme(Realm.AuthScheme.DIGEST).build())// + .execute(); Response resp = f.get(60, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); @@ -131,9 +81,9 @@ public void digestAuthTest() throws IOException, ExecutionException, TimeoutExce public void digestAuthTestWithoutScheme() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal(USER).setPassword(ADMIN).setRealmName("MyRealm").build()); - - Future f = r.execute(); + Future f = client.prepareGet("http://127.0.0.1:" + port1 + "/")// + .setRealm(new Realm.RealmBuilder().setPrincipal(USER).setPassword(ADMIN).setRealmName("MyRealm").build())// + .execute(); Response resp = f.get(60, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); @@ -147,9 +97,9 @@ public void digestAuthTestWithoutScheme() throws IOException, ExecutionException public void digestAuthNegativeTest() throws IOException, ExecutionException, TimeoutException, InterruptedException { AsyncHttpClient client = getAsyncHttpClient(null); try { - AsyncHttpClient.BoundRequestBuilder r = client.prepareGet("http://127.0.0.1:" + port1 + "/").setRealm((new Realm.RealmBuilder()).setPrincipal("fake").setPassword(ADMIN).setScheme(Realm.AuthScheme.DIGEST).build()); - - Future f = r.execute(); + Future f = client.prepareGet("http://127.0.0.1:" + port1 + "/")// + .setRealm(new Realm.RealmBuilder().setPrincipal("fake").setPassword(ADMIN).setScheme(Realm.AuthScheme.DIGEST).build())// + .execute(); Response resp = f.get(20, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), 401); @@ -157,9 +107,4 @@ public void digestAuthNegativeTest() throws IOException, ExecutionException, Tim client.close(); } } - - @Override - public AbstractHandler configureHandler() throws Exception { - return new SimpleHandler(); - } } diff --git a/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java index aa5fdfbed5..044915333d 100644 --- a/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java @@ -83,10 +83,10 @@ public void onThrowable(Throwable t) { public STATE onBodyPartReceived(HttpResponseBodyPart e) throws Exception { String s = new String(e.getBodyPartBytes()); - log.info("got part: {}", s); + logger.info("got part: {}", s); if (s.equals("")) { // noinspection ThrowableInstanceNeverThrown - log.warn("Sampling stacktrace.", new Throwable("trace that, we should not get called for empty body.")); + logger.warn("Sampling stacktrace.", new Throwable("trace that, we should not get called for empty body.")); } queue.put(s); return STATE.CONTINUE; @@ -124,7 +124,7 @@ public Object onCompleted() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void testPutEmptyBody() throws Throwable { + public void testPutEmptyBody() throws Exception { AsyncHttpClient ahc = getAsyncHttpClient(null); try { Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(); diff --git a/api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java b/api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java index 97d038f59a..c8d3cd30d3 100644 --- a/api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ErrorResponseTest.java @@ -68,8 +68,7 @@ public void testQueryParameters() throws Exception { Response resp = f.get(3, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), 400); - String respStr = resp.getResponseBody(); - assertEquals(BAD_REQUEST_STR, respStr); + assertEquals(resp.getResponseBody(), BAD_REQUEST_STR); } finally { client.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java index a0d8a4c7ce..a1de248e24 100644 --- a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java +++ b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java @@ -15,29 +15,28 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; + +import java.io.IOException; +import java.util.concurrent.Future; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.concurrent.Future; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; /** * Test the Expect: 100-Continue. */ public abstract class Expect100ContinueTest extends AbstractBasicTest { - private class ZeroCopyHandler extends AbstractHandler { + private static class ZeroCopyHandler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { int size = 10 * 1024; @@ -55,26 +54,22 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ } } + @Override + public AbstractHandler configureHandler() throws Exception { + return new ZeroCopyHandler(); + } + @Test(groups = { "standalone", "default_provider" }) - public void Expect100Continue() throws Throwable { + public void Expect100Continue() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - ClassLoader cl = getClass().getClassLoader(); - URL url = cl.getResource("SimpleTextFile.txt"); - File file = new File(url.toURI()); - - Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setHeader("Expect", "100-continue").setBody(file).execute(); + Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setHeader("Expect", "100-continue").setBody(SIMPLE_TEXT_FILE).execute(); Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } } - - @Override - public AbstractHandler configureHandler() throws Exception { - return new ZeroCopyHandler(); - } } diff --git a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java index dd87e925d5..b6a14f2d39 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java @@ -12,6 +12,9 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.assertEquals; + import java.io.File; import java.io.IOException; @@ -26,36 +29,10 @@ import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; import org.testng.annotations.Test; public abstract class FilePartLargeFileTest extends AbstractBasicTest { - @Test(groups = { "standalone", "default_provider" }, enabled = true) - public void testPutImageFile() throws Exception { - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build()); - try { - Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(); - Assert.assertEquals(200, response.getStatusCode()); - } finally { - client.close(); - } - } - - @Test(groups = { "standalone", "default_provider" }, enabled = true) - public void testPutLargeTextFile() throws Exception { - long repeats = (1024 * 1024 / PATTERN_BYTES.length) + 1; - File file = createTempFile(PATTERN_BYTES, (int) repeats); - - AsyncHttpClient client = getAsyncHttpClient(null); - try { - Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(); - Assert.assertEquals(200, response.getStatusCode()); - } finally { - client.close(); - } - } - @Override public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { @@ -80,4 +57,28 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle } }; } + + @Test(groups = { "standalone", "default_provider" }, enabled = true) + public void testPutImageFile() throws Exception { + AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build()); + try { + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(); + assertEquals(response.getStatusCode(), 200); + } finally { + client.close(); + } + } + + @Test(groups = { "standalone", "default_provider" }, enabled = true) + public void testPutLargeTextFile() throws Exception { + File file = createTempFile(1024 * 1024); + + AsyncHttpClient client = getAsyncHttpClient(null); + try { + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(); + assertEquals(response.getStatusCode(), 200); + } finally { + client.close(); + } + } } diff --git a/api/src/test/java/org/asynchttpclient/async/FilterTest.java b/api/src/test/java/org/asynchttpclient/async/FilterTest.java index 6f843e5c44..8f4c90725e 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilterTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilterTest.java @@ -40,7 +40,7 @@ public abstract class FilterTest extends AbstractBasicTest { - private class BasicHandler extends AbstractHandler { + private static class BasicHandler extends AbstractHandler { public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { @@ -62,8 +62,12 @@ public AbstractHandler configureHandler() throws Exception { return new BasicHandler(); } + public String getTargetUrl() { + return String.format("http://127.0.0.1:%d/foo/test", port1); + } + @Test(groups = { "standalone", "default_provider" }) - public void basicTest() throws Throwable { + public void basicTest() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addRequestFilter(new ThrottleRequestFilter(100)); @@ -78,7 +82,7 @@ public void basicTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void loadThrottleTest() throws Throwable { + public void loadThrottleTest() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addRequestFilter(new ThrottleRequestFilter(10)); @@ -100,7 +104,7 @@ public void loadThrottleTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void maxConnectionsText() throws Throwable { + public void maxConnectionsText() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addRequestFilter(new ThrottleRequestFilter(0, 1000)); AsyncHttpClient c = getAsyncHttpClient(b.build()); @@ -116,12 +120,8 @@ public void maxConnectionsText() throws Throwable { } } - public String getTargetUrl() { - return String.format("http://127.0.0.1:%d/foo/test", port1); - } - @Test(groups = { "standalone", "default_provider" }) - public void basicResponseFilterTest() throws Throwable { + public void basicResponseFilterTest() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); b.addResponseFilter(new ResponseFilter() { @@ -146,7 +146,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException } @Test(groups = { "standalone", "default_provider" }) - public void replayResponseFilterTest() throws Throwable { + public void replayResponseFilterTest() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); final AtomicBoolean replay = new AtomicBoolean(true); @@ -178,7 +178,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException } @Test(groups = { "standalone", "default_provider" }) - public void replayStatusCodeResponseFilterTest() throws Throwable { + public void replayStatusCodeResponseFilterTest() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); final AtomicBoolean replay = new AtomicBoolean(true); @@ -210,7 +210,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException } @Test(groups = { "standalone", "default_provider" }) - public void replayHeaderResponseFilterTest() throws Throwable { + public void replayHeaderResponseFilterTest() throws Exception { AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); final AtomicBoolean replay = new AtomicBoolean(true); diff --git a/api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java b/api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java index d586318015..97797d1396 100644 --- a/api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FluentCaseInsensitiveStringsMapTest.java @@ -30,6 +30,7 @@ import static org.testng.Assert.assertTrue; public class FluentCaseInsensitiveStringsMapTest { + @Test public void emptyTest() { FluentCaseInsensitiveStringsMap map = new FluentCaseInsensitiveStringsMap(); @@ -315,7 +316,7 @@ public void deleteAllCollectionTest() { map.deleteAll(Arrays.asList("bAz", "fOO")); - assertEquals(map.keySet(), Collections.emptyList()); + assertEquals(map.keySet(), Collections. emptyList()); assertNull(map.getFirstValue("foo")); assertNull(map.getJoinedValue("foo", ", ")); assertNull(map.get("foo")); diff --git a/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java b/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java index ffbb651a7a..3a04b962d6 100644 --- a/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FluentStringsMapTest.java @@ -30,6 +30,7 @@ import static org.testng.Assert.assertTrue; public class FluentStringsMapTest { + @Test public void emptyTest() { FluentStringsMap map = new FluentStringsMap(); @@ -364,7 +365,7 @@ public void deleteAllCollectionTest() { map.deleteAll(Arrays.asList("baz", "foo")); - assertEquals(map.keySet(), Collections.emptyList()); + assertEquals(map.keySet(), Collections. emptyList()); assertNull(map.getFirstValue("foo")); assertNull(map.getJoinedValue("foo", ", ")); assertNull(map.get("foo")); diff --git a/api/src/test/java/org/asynchttpclient/async/Head302Test.java b/api/src/test/java/org/asynchttpclient/async/Head302Test.java index a01b47c910..e19936ec4b 100644 --- a/api/src/test/java/org/asynchttpclient/async/Head302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/Head302Test.java @@ -15,18 +15,8 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncCompletionHandlerBase; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; -import org.testng.annotations.Test; +import static org.testng.Assert.fail; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CountDownLatch; @@ -34,16 +24,29 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncCompletionHandlerBase; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; + /** * Tests HEAD request that gets 302 response. * * @author Hubert Iwaniuk */ public abstract class Head302Test extends AbstractBasicTest { + /** * Handler that does Found (302) in response to HEAD method. */ - private class Head302handler extends AbstractHandler { + private static class Head302handler extends AbstractHandler { public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("HEAD".equalsIgnoreCase(request.getMethod())) { if (request.getPathInfo().endsWith("_moved")) { @@ -52,12 +55,17 @@ public void handle(String s, org.eclipse.jetty.server.Request r, HttpServletRequ response.setStatus(HttpServletResponse.SC_FOUND); // 302 response.setHeader("Location", request.getPathInfo() + "_moved"); } - } else { // this handler is to handle HEAD reqeust + } else { // this handler is to handle HEAD request response.setStatus(HttpServletResponse.SC_FORBIDDEN); } } } + @Override + public AbstractHandler configureHandler() throws Exception { + return new Head302handler(); + } + @Test(groups = { "standalone", "default_provider" }) public void testHEAD302() throws IOException, BrokenBarrierException, InterruptedException, ExecutionException, TimeoutException { AsyncHttpClient client = getAsyncHttpClient(null); @@ -74,15 +82,10 @@ public Response onCompleted(Response response) throws Exception { }).get(3, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { client.close(); } } - - @Override - public AbstractHandler configureHandler() throws Exception { - return new Head302handler(); - } } diff --git a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java index 989e78b280..0e2fb055b9 100644 --- a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java @@ -12,27 +12,18 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.*; import java.io.IOException; -import java.io.InputStream; import java.net.ConnectException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; import java.util.Enumeration; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.KeyManager; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -55,7 +46,7 @@ public static class EchoHandler extends AbstractHandler { /* @Override */ public void handle(String pathInContext, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { - httpResponse.setContentType("text/html; charset=utf-8"); + httpResponse.setContentType(TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); Enumeration e = httpRequest.getHeaderNames(); String param; while (e.hasMoreElements()) { @@ -134,24 +125,24 @@ public AbstractHandler configureHandler() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void positiveHostnameVerifierTest() throws Throwable { + public void positiveHostnameVerifierTest() throws Exception { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new PositiveHostVerifier()).setSSLContext(createSSLContext()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new PositiveHostVerifier()).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { Future f = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute(); Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void negativeHostnameVerifierTest() throws Throwable { + public void negativeHostnameVerifierTest() throws Exception { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new NegativeHostVerifier()).setSSLContext(createSSLContext()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new NegativeHostVerifier()).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { try { client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); @@ -165,9 +156,9 @@ public void negativeHostnameVerifierTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void remoteIDHostnameVerifierTest() throws Throwable { + public void remoteIDHostnameVerifierTest() throws Exception { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("bouette")).setSSLContext(createSSLContext()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("bouette")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); fail("ConnectException expected"); @@ -179,9 +170,9 @@ public void remoteIDHostnameVerifierTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void remoteNegHostnameVerifierTest() throws Throwable { + public void remoteNegHostnameVerifierTest() throws Exception { // request is made to 127.0.0.1, but cert presented for localhost - this should fail - final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); fail("ConnectException expected"); @@ -193,14 +184,14 @@ public void remoteNegHostnameVerifierTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void remotePosHostnameVerifierTest() throws Throwable { + public void remotePosHostnameVerifierTest() throws Exception { - final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext()).build()); + final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } @@ -232,46 +223,4 @@ public boolean verify(String s, SSLSession sslSession) { return s != null && s.equalsIgnoreCase(hostName); } } - - private static SSLContext createSSLContext() { - try { - InputStream keyStoreStream = HostnameVerifierTest.class.getResourceAsStream("ssltest-cacerts.jks"); - char[] keyStorePassword = "changeit".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(keyStoreStream, keyStorePassword); - - // Set up key manager factory to use our key store - char[] certificatePassword = "changeit".toCharArray(); - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, certificatePassword); - - // Initialize the SSLContext to work with our key managers. - KeyManager[] keyManagers = kmf.getKeyManagers(); - TrustManager[] trustManagers = new TrustManager[] { DUMMY_TRUST_MANAGER }; - SecureRandom secureRandom = new SecureRandom(); - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, secureRandom); - - return sslContext; - } catch (Exception e) { - throw new Error("Failed to initialize the server-side SSLContext", e); - } - } - - private static final AtomicBoolean TRUST_SERVER_CERT = new AtomicBoolean(true); - private static final TrustManager DUMMY_TRUST_MANAGER = new X509TrustManager() { - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - if (!TRUST_SERVER_CERT.get()) { - throw new CertificateException("Server certificate not trusted."); - } - } - }; } diff --git a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java index a0aa1eac15..e9c6ae6c8d 100644 --- a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java @@ -15,11 +15,10 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.*; -import java.io.File; import java.io.IOException; -import java.net.URL; import java.util.Enumeration; import java.util.concurrent.atomic.AtomicBoolean; @@ -30,12 +29,8 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.server.ssl.SslSocketConnector; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -48,7 +43,7 @@ private class Relative302Handler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String param; - httpResponse.setContentType("text/html; charset=utf-8"); + httpResponse.setContentType(TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); Enumeration e = httpRequest.getHeaderNames(); while (e.hasMoreElements()) { param = e.nextElement().toString(); @@ -75,50 +70,19 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); port2 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - server.addConnector(listener); - - SslSocketConnector connector = new SslSocketConnector(); - connector.setHost("127.0.0.1"); - connector.setPort(port2); - - ClassLoader cl = getClass().getClassLoader(); - // override system properties - URL cacertsUrl = cl.getResource("ssltest-cacerts.jks"); - String trustStoreFile = new File(cacertsUrl.toURI()).getAbsolutePath(); - connector.setTruststore(trustStoreFile); - connector.setTrustPassword("changeit"); - connector.setTruststoreType("JKS"); - - log.info("SSL certs path: {}", trustStoreFile); - - // override system properties - URL keystoreUrl = cl.getResource("ssltest-keystore.jks"); - String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath(); - connector.setKeystore(keyStoreFile); - connector.setKeyPassword("changeit"); - connector.setKeystoreType("JKS"); - - log.info("SSL keystore path: {}", keyStoreFile); - - server.addConnector(connector); - + server = newJettyHttpServer(port1); + addHttpsConnector(server, port2); server.setHandler(new Relative302Handler()); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } @Test(groups = { "standalone", "default_provider" }) // FIXME find a way to make this threadsafe, other, set @Test(singleThreaded = true) - public void httpToHttpsRunAllTestsSequentially() throws Exception { + public void runAllSequentiallyBecauseNotThreadSafe() throws Exception { httpToHttpsRedirect(); httpToHttpsProperConfig(); relativeLocationUrl(); diff --git a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java index f5cc4d5b35..3837b799c8 100644 --- a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java @@ -15,6 +15,7 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.fail; import java.io.IOException; @@ -26,11 +27,8 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -53,22 +51,15 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - server.addConnector(listener); - + server = newJettyHttpServer(port1); server.setHandler(new IdleStateHandler()); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } @Test(groups = { "online", "default_provider" }) - public void idleStateTest() throws Throwable { + public void idleStateTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(10 * 1000).build(); AsyncHttpClient c = getAsyncHttpClient(cg); diff --git a/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java index 4cf034ada7..a519385473 100644 --- a/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java +++ b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java @@ -36,7 +36,7 @@ public abstract class InputStreamTest extends AbstractBasicTest { - private class InputStreamHandler extends AbstractHandler { + private static class InputStreamHandler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { byte[] bytes = new byte[3]; @@ -59,6 +59,11 @@ public void handle(String s, Request r, HttpServletRequest request, HttpServletR } } + @Override + public AbstractHandler configureHandler() throws Exception { + return new InputStreamHandler(); + } + @Test(groups = { "standalone", "default_provider" }) public void testInvalidInputStream() throws IOException, ExecutionException, TimeoutException, InterruptedException { @@ -99,9 +104,4 @@ public int read() throws IOException { c.close(); } } - - @Override - public AbstractHandler configureHandler() throws Exception { - return new InputStreamHandler(); - } } diff --git a/api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java b/api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java index 9f9f9ef5fd..3c026d8d57 100644 --- a/api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ListenableFutureTest.java @@ -28,7 +28,7 @@ public abstract class ListenableFutureTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }) - public void testListenableFuture() throws Throwable { + public void testListenableFuture() throws Exception { final AtomicInteger statusCode = new AtomicInteger(500); AsyncHttpClient ahc = getAsyncHttpClient(null); try { diff --git a/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java b/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java index 8bcdb499f0..94e76c64e9 100644 --- a/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxConnectionsInThreads.java @@ -16,20 +16,9 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; import java.net.URI; @@ -37,7 +26,19 @@ import java.util.ArrayList; import java.util.List; -import static org.testng.AssertJUnit.assertTrue; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; abstract public class MaxConnectionsInThreads extends AbstractBasicTest { @@ -49,7 +50,8 @@ public void testMaxConnectionsWithinThreads() { String[] urls = new String[] { servletEndpointUri.toString(), servletEndpointUri.toString() }; - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000) + .setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); try { final Boolean[] caughtError = new Boolean[] { Boolean.FALSE }; @@ -62,7 +64,7 @@ public void run() { client.prepareGet(url).execute(); } catch (IOException e) { // assert that 2nd request fails, because maxTotalConnections=1 - // System.out.println(i); + // logger.debug(i); caughtError[0] = true; System.err.println("============"); e.printStackTrace(); @@ -92,7 +94,7 @@ public void run() { e1.printStackTrace(); } - assertTrue("Max Connections should have been reached", caughtError[0]); + assertTrue(caughtError[0], "Max Connections should have been reached"); boolean errorInNotThread = false; for (int i = 0; i < urls.length; i++) { @@ -102,7 +104,7 @@ public void run() { // client.prepareGet(url).execute(); } catch (IOException e) { // assert that 2nd request fails, because maxTotalConnections=1 - // System.out.println(i); + // logger.debug(i); errorInNotThread = true; System.err.println("============"); e.printStackTrace(); @@ -116,7 +118,7 @@ public void run() { // TODO Auto-generated catch block e1.printStackTrace(); } - assertTrue("Max Connections should have been reached", errorInNotThread); + assertTrue(errorInNotThread, "Max Connections should have been reached"); } finally { client.close(); } @@ -126,28 +128,18 @@ public void run() { @BeforeClass public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); + server = newJettyHttpServer(port1); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); - context.setContextPath("/"); server.setHandler(context); - context.addServlet(new ServletHolder(new MockTimeoutHttpServlet()), "/timeout/*"); server.start(); String endpoint = "http://127.0.0.1:" + port1 + "/timeout/"; servletEndpointUri = new URI(endpoint); - } public String getTargetUrl() { @@ -162,6 +154,7 @@ public String getTargetUrl() { @SuppressWarnings("serial") public static class MockTimeoutHttpServlet extends HttpServlet { + private static final Logger LOGGER = LoggerFactory.getLogger(MockTimeoutHttpServlet.class); private static final String contentType = "text/plain"; public static long DEFAULT_TIMEOUT = 2000; @@ -177,15 +170,13 @@ public void service(HttpServletRequest req, HttpServletResponse res) throws Serv } try { - System.out.println("======================================="); - System.out.println("Servlet is sleeping for: " + sleepTime); - System.out.println("======================================="); - System.out.flush(); + LOGGER.debug("======================================="); + LOGGER.debug("Servlet is sleeping for: " + sleepTime); + LOGGER.debug("======================================="); Thread.sleep(sleepTime); - System.out.println("======================================="); - System.out.println("Servlet is awake for"); - System.out.println("======================================="); - System.out.flush(); + LOGGER.debug("======================================="); + LOGGER.debug("Servlet is awake for"); + LOGGER.debug("======================================="); } catch (Exception e) { } diff --git a/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java index 947d36c554..e2765f3a3e 100644 --- a/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java @@ -20,7 +20,7 @@ import org.asynchttpclient.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.testng.Assert; +import static org.testng.Assert.*; import org.testng.annotations.Test; import java.io.IOException; @@ -44,11 +44,11 @@ public void testMaxTotalConnectionsExceedingException() { client.prepareGet(urls[i]).execute(); } catch (IOException e) { // assert that 2nd request fails, because maxTotalConnections=1 - Assert.assertEquals(1, i); + assertEquals(i, 1); caughtError = true; } } - Assert.assertTrue(caughtError); + assertTrue(caughtError); } finally { client.close(); } @@ -64,7 +64,7 @@ public void testMaxTotalConnections() { try { client.prepareGet(url).execute(); } catch (IOException e) { - Assert.fail("Smth wrong with connections handling!"); + fail("Smth wrong with connections handling!"); } } } finally { @@ -91,11 +91,11 @@ public void testMaxTotalConnectionsCorrectExceptionHandling() { } } catch (IOException e) { // assert that 2nd request fails, because maxTotalConnections=1 - Assert.assertEquals(i, 1); + assertEquals(i, 1); caughtError = true; } } - Assert.assertTrue(caughtError); + assertTrue(caughtError); // get results of executed requests for (Future future : futures) { @@ -115,11 +115,11 @@ public void testMaxTotalConnectionsCorrectExceptionHandling() { client.prepareGet(urls[i]).execute(); } catch (IOException e) { // assert that 2nd request fails, because maxTotalConnections=1 - Assert.assertEquals(i, 1); + assertEquals(i, 1); caughtError = true; } } - Assert.assertTrue(caughtError); + assertTrue(caughtError); } finally { client.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java index 891781fe19..d9eb881827 100644 --- a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java @@ -12,6 +12,7 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.*; import java.io.ByteArrayOutputStream; @@ -23,9 +24,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.Writer; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -53,11 +51,10 @@ import org.asynchttpclient.Response; import org.asynchttpclient.StringPart; import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -70,46 +67,21 @@ public abstract class MultipartUploadTest extends AbstractBasicTest { @BeforeClass public void setUp() throws Exception { - server = new Server(); - port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); - listener.setHost("localhost"); - listener.setPort(port1); - - server.addConnector(listener); + server = newJettyHttpServer(port1); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); - context.setContextPath("/"); context.addServlet(new ServletHolder(new MockMultipartUploadServlet()), "/upload/*"); server.setHandler(context); server.start(); } - private File getClasspathFile(String file) throws FileNotFoundException { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (Throwable ex) { - } - if (cl == null) { - cl = MultipartUploadTest.class.getClassLoader(); - } - URL resourceUrl = cl.getResource(file); - - try { - return new File(new URI(resourceUrl.toString()).getSchemeSpecificPart()); - } catch (URISyntaxException e) { - throw new FileNotFoundException(file); - } - } - /** * Tests that the streaming of a file works. */ - @Test(enabled = true) + @Test public void testSendingSmallFilesAndByteArray() { String expectedContents = "filecontent: hello"; String expectedContents2 = "gzipcontent: hello"; @@ -211,7 +183,7 @@ public void testSendingSmallFilesAndByteArray() { Response res = c.executeRequest(r).get(); - assertEquals(200, res.getStatusCode()); + assertEquals(res.getStatusCode(), 200); testSentFile(expected, testFiles, res, gzipped); @@ -238,14 +210,14 @@ private void testSentFile(List expectedContents, List sourceFiles, try { content = r.getResponseBody(); assertNotNull("===>" + content); - System.out.println(content); + logger.debug(content); } catch (IOException e) { fail("Unable to obtain content"); } String[] contentArray = content.split("\\|\\|"); // TODO: this fail on win32 - assertEquals(2, contentArray.length); + assertEquals(contentArray.length, 2); String tmpFiles = contentArray[1]; assertNotNull(tmpFiles); @@ -254,10 +226,9 @@ private void testSentFile(List expectedContents, List sourceFiles, String[] responseFiles = tmpFiles.split(","); assertNotNull(responseFiles); - assertEquals(sourceFiles.size(), responseFiles.length); + assertEquals(responseFiles.length, sourceFiles.size()); - System.out.println(Arrays.toString(responseFiles)); - // assertTrue("File should exist: " + tmpFile.getAbsolutePath(),tmpFile.exists()); + logger.debug(Arrays.toString(responseFiles)); int i = 0; for (File sourceFile : sourceFiles) { @@ -275,10 +246,10 @@ private void testSentFile(List expectedContents, List sourceFiles, while ((len = instream.read(buf)) > 0) { baos.write(buf, 0, len); } - System.out.println("================"); - System.out.println("Length of file: " + baos.toByteArray().length); - System.out.println("Contents: " + Arrays.toString(baos.toByteArray())); - System.out.println("================"); + logger.debug("================"); + logger.debug("Length of file: " + baos.toByteArray().length); + logger.debug("Contents: " + Arrays.toString(baos.toByteArray())); + logger.debug("================"); System.out.flush(); sourceBytes = baos.toByteArray(); } finally { @@ -286,9 +257,9 @@ private void testSentFile(List expectedContents, List sourceFiles, } tmp = new File(responseFiles[i].trim()); - System.out.println("=============================="); - System.out.println(tmp.getAbsolutePath()); - System.out.println("=============================="); + logger.debug("=============================="); + logger.debug(tmp.getAbsolutePath()); + logger.debug("=============================="); System.out.flush(); assertTrue(tmp.exists()); @@ -301,21 +272,25 @@ private void testSentFile(List expectedContents, List sourceFiles, } IOUtils.closeQuietly(instream); - assertEquals(sourceBytes, baos2.toByteArray()); + assertEquals(baos2.toByteArray(), sourceBytes); if (!deflate.get(i)) { String helloString = new String(baos2.toByteArray()); - assertEquals(expectedContents.get(i), helloString); + assertEquals(helloString, expectedContents.get(i)); } else { instream = new FileInputStream(tmp); - GZIPInputStream deflater = new GZIPInputStream(instream); ByteArrayOutputStream baos3 = new ByteArrayOutputStream(); - byte[] buf3 = new byte[8092]; - int len3 = 0; - while ((len3 = deflater.read(buf3)) > 0) { - baos3.write(buf3, 0, len3); + GZIPInputStream deflater = new GZIPInputStream(instream); + try { + byte[] buf3 = new byte[8092]; + int len3 = 0; + while ((len3 = deflater.read(buf3)) > 0) { + baos3.write(buf3, 0, len3); + } + } finally { + deflater.close(); } String helloString = new String(baos3.toByteArray()); @@ -341,9 +316,9 @@ private void testSentFile(List expectedContents, List sourceFiles, * @author dominict */ public static class MockMultipartUploadServlet extends HttpServlet { - /** - * - */ + + private static final Logger LOGGER = LoggerFactory.getLogger(MockMultipartUploadServlet.class); + private static final long serialVersionUID = 1L; private int filesProcessed = 0; private int stringsProcessed = 0; @@ -397,10 +372,10 @@ public void service(HttpServletRequest request, HttpServletResponse response) th stream = item.openStream(); if (item.isFormField()) { - System.out.println("Form field " + name + " with value " + Streams.asString(stream) + " detected."); + LOGGER.debug("Form field " + name + " with value " + Streams.asString(stream) + " detected."); incrementStringsProcessed(); } else { - System.out.println("File field " + name + " with file name " + item.getName() + " detected."); + LOGGER.debug("File field " + name + " with file name " + item.getName() + " detected."); // Process the input stream OutputStream os = null; try { diff --git a/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java b/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java index ed6c6b413e..f2855e8c7d 100644 --- a/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipleHeaderTest.java @@ -12,17 +12,8 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.testng.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.findFreePort; +import static org.testng.Assert.*; import java.io.BufferedReader; import java.io.IOException; @@ -40,6 +31,17 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + /** * @author Hubert Iwaniuk */ @@ -63,7 +65,7 @@ public Void call() throws Exception { String req = reader.readLine().split(" ")[1]; int i = inputStream.available(); long l = inputStream.skip(i); - Assert.assertEquals(l, i); + assertEquals(l, i); socket.shutdownInput(); if (req.endsWith("MultiEnt")) { OutputStreamWriter outputStreamWriter = new OutputStreamWriter(socket.getOutputStream()); @@ -127,16 +129,16 @@ public Void onCompleted() throws Exception { }).get(3, TimeUnit.SECONDS); if (!latch.await(2, TimeUnit.SECONDS)) { - Assert.fail("Time out"); + fail("Time out"); } - Assert.assertNotNull(xffHeaders[0]); - Assert.assertNotNull(xffHeaders[1]); + assertNotNull(xffHeaders[0]); + assertNotNull(xffHeaders[1]); try { - Assert.assertEquals(xffHeaders[0], "abc"); - Assert.assertEquals(xffHeaders[1], "def"); + assertEquals(xffHeaders[0], "abc"); + assertEquals(xffHeaders[1], "def"); } catch (AssertionError ex) { - Assert.assertEquals(xffHeaders[1], "abc"); - Assert.assertEquals(xffHeaders[0], "def"); + assertEquals(xffHeaders[1], "abc"); + assertEquals(xffHeaders[0], "def"); } } finally { ahc.close(); @@ -182,18 +184,18 @@ public Void onCompleted() throws Exception { }).get(3, TimeUnit.SECONDS); if (!latch.await(2, TimeUnit.SECONDS)) { - Assert.fail("Time out"); + fail("Time out"); } - Assert.assertNotNull(clHeaders[0]); - Assert.assertNotNull(clHeaders[1]); + assertNotNull(clHeaders[0]); + assertNotNull(clHeaders[1]); // We can predict the order try { - Assert.assertEquals(clHeaders[0], "2"); - Assert.assertEquals(clHeaders[1], "1"); + assertEquals(clHeaders[0], "2"); + assertEquals(clHeaders[1], "1"); } catch (Throwable ex) { - Assert.assertEquals(clHeaders[0], "1"); - Assert.assertEquals(clHeaders[1], "2"); + assertEquals(clHeaders[0], "1"); + assertEquals(clHeaders[1], "2"); } } finally { ahc.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java index 2e85846920..8d4359b4ea 100644 --- a/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java @@ -20,7 +20,7 @@ import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; -import org.testng.Assert; +import static org.testng.Assert.*; import org.testng.annotations.Test; import javax.net.ssl.SSLContext; @@ -34,7 +34,7 @@ public abstract class NoNullResponseTest extends AbstractBasicTest { private static final String GOOGLE_HTTPS_URL = "https://www.google.com"; @Test(invocationCount = 4, groups = { "online", "default_provider" }) - public void multipleSslRequestsWithDelayAndKeepAlive() throws Throwable { + public void multipleSslRequestsWithDelayAndKeepAlive() throws Exception { final AsyncHttpClient client = create(); try { final BoundRequestBuilder builder = client.prepareGet(GOOGLE_HTTPS_URL); @@ -46,8 +46,8 @@ public void multipleSslRequestsWithDelayAndKeepAlive() throws Throwable { } else { System.out.println("Failed (2nd response was null)."); } - Assert.assertNotNull(response1); - Assert.assertNotNull(response2); + assertNotNull(response1); + assertNotNull(response2); } finally { client.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java index 156b177a26..cbfdf6546c 100644 --- a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java @@ -12,16 +12,12 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.assertEquals; + +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; @@ -29,23 +25,20 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; - -import static org.testng.Assert.assertEquals; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClient.BoundRequestBuilder; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; public abstract class NonAsciiContentLengthTest extends AbstractBasicTest { @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); port1 = findFreePort(); - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - server.addConnector(listener); + server = newJettyHttpServer(port1); server.setHandler(new AbstractHandler() { public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java index b94d9a59a6..edc1856ce5 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java @@ -15,20 +15,9 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.ConnectException; import java.net.URI; @@ -36,9 +25,17 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; public abstract class PerRequestRelative302Test extends AbstractBasicTest { @@ -49,7 +46,7 @@ private class Relative302Handler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String param; - httpResponse.setContentType("text/html; charset=utf-8"); + httpResponse.setContentType(TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); Enumeration e = httpRequest.getHeaderNames(); while (e.hasMoreElements()) { param = e.nextElement().toString(); @@ -70,27 +67,22 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); port2 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - server.addConnector(listener); + server = newJettyHttpServer(port1); server.setHandler(new Relative302Handler()); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } @Test(groups = { "online", "default_provider" }) + // FIXME threadsafe public void runAllSequentiallyBecauseNotThreadSafe() throws Exception { redirected302Test(); notRedirected302Test(); relativeLocationUrl(); + redirected302InvalidTest(); } // @Test(groups = { "online", "default_provider" }) @@ -144,8 +136,8 @@ private static int getPort(URI uri) { return port; } - @Test(groups = { "standalone", "default_provider" }) - public void redirected302InvalidTest() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void redirected302InvalidTest() throws Exception { isSet.getAndSet(false); AsyncHttpClient c = getAsyncHttpClient(null); try { diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java index c98749bb46..d1a139f324 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java @@ -69,9 +69,9 @@ public void run() { response.getOutputStream().print(MSG); response.getOutputStream().flush(); } catch (InterruptedException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } catch (IOException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } } }).start(); @@ -83,9 +83,9 @@ public void run() { response.getOutputStream().flush(); continuation.complete(); } catch (InterruptedException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } catch (IOException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } } }).start(); @@ -178,7 +178,7 @@ public void onThrowable(Throwable t) { } catch (InterruptedException e) { fail("Interrupted.", e); } catch (ExecutionException e) { - log.info(String.format("\n@%dms Last body part received\n@%dms Connection killed\n %dms difference.", times[0], times[1], (times[1] - times[0]))); + logger.info(String.format("\n@%dms Last body part received\n@%dms Connection killed\n %dms difference.", times[0], times[1], (times[1] - times[0]))); fail("Timeouted on idle.", e); } finally { client.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java index e741a6240b..e6a338cfc0 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java @@ -13,6 +13,16 @@ package org.asynchttpclient.async; +import static org.testng.Assert.*; + +import java.io.IOException; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicInteger; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -23,16 +33,8 @@ import org.asynchttpclient.filter.FilterException; import org.asynchttpclient.filter.ResponseFilter; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.concurrent.Future; -import java.util.concurrent.atomic.AtomicInteger; - public abstract class PostRedirectGetTest extends AbstractBasicTest { // ------------------------------------------------------ Test Configuration @@ -95,12 +97,12 @@ public Integer onCompleted(Response response) throws Exception { /* @Override */ public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); + fail("Unexpected exception: " + t.getMessage(), t); } }); int statusCode = responseFuture.get(); - Assert.assertEquals(statusCode, 200); + assertEquals(statusCode, 200); } finally { p.close(); } @@ -130,12 +132,12 @@ public Integer onCompleted(Response response) throws Exception { /* @Override */ public void onThrowable(Throwable t) { t.printStackTrace(); - Assert.fail("Unexpected exception: " + t.getMessage(), t); + fail("Unexpected exception: " + t.getMessage(), t); } }); int statusCode = responseFuture.get(); - Assert.assertEquals(statusCode, 200); + assertEquals(statusCode, 200); } finally { p.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index 81b37ad077..e9cba6194c 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -12,6 +12,14 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.assertEquals; + +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeoutException; + import org.asynchttpclient.AsyncCompletionHandlerBase; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -19,29 +27,17 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.SimpleAsyncHttpClient; -import org.eclipse.jetty.server.Connector; +import org.asynchttpclient.async.util.EchoHandler; +import org.eclipse.jetty.proxy.ConnectHandler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.handler.ProxyHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.server.ssl.SslSocketConnector; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeoutException; - -import static org.testng.Assert.assertEquals; - /** * Proxy usage tests. */ -@SuppressWarnings("deprecation") public abstract class ProxyTunnellingTest extends AbstractBasicTest { private Server server2; @@ -49,46 +45,25 @@ public abstract class ProxyTunnellingTest extends AbstractBasicTest { public abstract String getProviderClass(); public AbstractHandler configureHandler() throws Exception { - ProxyHandler proxy = new ProxyHandler(); - return proxy; + return new ConnectHandler(); } @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - server2 = new Server(); - port1 = findFreePort(); - port2 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - - server.addConnector(listener); - - SslSocketConnector connector = new SslSocketConnector(); - connector.setHost("127.0.0.1"); - connector.setPort(port2); - - ClassLoader cl = getClass().getClassLoader(); - URL keystoreUrl = cl.getResource("ssltest-keystore.jks"); - String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath(); - connector.setKeystore(keyStoreFile); - connector.setKeyPassword("changeit"); - connector.setKeystoreType("JKS"); - - server2.addConnector(connector); - + server = newJettyHttpServer(port1); server.setHandler(configureHandler()); server.start(); + port2 = findFreePort(); + + server2 = newJettyHttpsServer(port2); server2.setHandler(new EchoHandler()); server2.start(); - log.info("Local HTTP server started successfully"); + + logger.info("Local HTTP server started successfully"); } - + @AfterClass(alwaysRun = true) public void tearDownGlobal() throws Exception { server.stop(); @@ -110,7 +85,7 @@ public void testRequestProxy() throws IOException, InterruptedException, Executi public void onThrowable(Throwable t) { t.printStackTrace(); - log.debug(t.getMessage(), t); + logger.debug(t.getMessage(), t); } @Override @@ -128,21 +103,17 @@ public Response onCompleted(Response response) throws Exception { @Test(groups = { "online", "default_provider" }) public void testConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - AsyncHttpClientConfig.Builder b = new AsyncHttpClientConfig.Builder(); - b.setFollowRedirects(true); - - ProxyServer ps = new ProxyServer(ProxyServer.Protocol.HTTPS, "127.0.0.1", port1); - b.setProxyServer(ps); - - AsyncHttpClientConfig config = b.build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setFollowRedirects(true)// + .setProxyServer(new ProxyServer(ProxyServer.Protocol.HTTPS, "127.0.0.1", port1))// + .build(); AsyncHttpClient asyncHttpClient = getAsyncHttpClient(config); try { - RequestBuilder rb = new RequestBuilder("GET").setUrl(getTargetUrl2()); - Future responseFuture = asyncHttpClient.executeRequest(rb.build(), new AsyncCompletionHandlerBase() { + Future responseFuture = asyncHttpClient.executeRequest(new RequestBuilder("GET").setUrl(getTargetUrl2()).build(), new AsyncCompletionHandlerBase() { public void onThrowable(Throwable t) { t.printStackTrace(); - log.debug(t.getMessage(), t); + logger.debug(t.getMessage(), t); } @Override @@ -161,7 +132,11 @@ public Response onCompleted(Response response) throws Exception { @Test(groups = { "online", "default_provider" }) public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, ExecutionException, TimeoutException { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setProxyProtocol(ProxyServer.Protocol.HTTPS).setProxyHost("127.0.0.1").setProxyPort(port1).setFollowRedirects(true).setUrl(getTargetUrl2()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder()// + .setProviderClass(getProviderClass())// + .setProxyProtocol(ProxyServer.Protocol.HTTPS).setProxyHost("127.0.0.1").setProxyPort(port1).setFollowRedirects(true).setUrl(getTargetUrl2())// + .setHeader("Content-Type", "text/html")// + .build(); try { Response r = client.get().get(); diff --git a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index 88af885b2d..e4f1a68c75 100644 --- a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -12,6 +12,9 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.createTempFile; +import static org.testng.Assert.assertEquals; + import java.io.File; import java.io.IOException; @@ -24,7 +27,6 @@ import org.asynchttpclient.Response; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; import org.testng.annotations.Test; /** @@ -35,15 +37,14 @@ public abstract class PutLargeFileTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutLargeFile() throws Exception { - long repeats = (1024 * 1024 * 100 / PATTERN_BYTES.length) + 1; - File file = createTempFile(PATTERN_BYTES, (int) repeats); + File file = createTempFile(1024 * 1024); - int timeout = (int) (repeats / 1000); + int timeout = (int) file.length() / 1000; AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build()); try { Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); - Assert.assertEquals(200, response.getStatusCode()); + assertEquals(response.getStatusCode(), 200); } finally { client.close(); } @@ -52,13 +53,12 @@ public void testPutLargeFile() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void testPutSmallFile() throws Exception { - long repeats = (1024 / PATTERN_BYTES.length) + 1; - File file = createTempFile(PATTERN_BYTES, (int) repeats); + File file = createTempFile(1024); AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); - Assert.assertEquals(200, response.getStatusCode()); + assertEquals(response.getStatusCode(), 200); } finally { client.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java index a72ec9ebcc..1bc842399a 100644 --- a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java +++ b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java @@ -101,7 +101,7 @@ public void testUrlRequestParametersEncoding() throws IOException, ExecutionExce } @Test(groups = { "standalone", "default_provider" }) - public void urlWithColonTest_Netty() throws Throwable { + public void urlWithColonTest_Netty() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { String query = "test:colon:"; @@ -114,7 +114,7 @@ public void urlWithColonTest_Netty() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void urlWithColonTest_JDK() throws Throwable { + public void urlWithColonTest_JDK() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { String query = "test:colon:"; diff --git a/api/src/test/java/org/asynchttpclient/async/RC10KTest.java b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java index 9b07accd80..7cecf24d13 100644 --- a/api/src/test/java/org/asynchttpclient/async/RC10KTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java @@ -15,35 +15,34 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - /** * Reverse C10K Problem test. * @@ -62,7 +61,7 @@ public void setUpGlobal() throws Exception { for (int i = 0; i < SRV_COUNT; i++) { ports[i] = createServer(); } - log.info("Local HTTP servers started successfully"); + logger.info("Local HTTP servers started successfully"); } @AfterClass(alwaysRun = true) @@ -73,12 +72,8 @@ public void tearDownGlobal() throws Exception { } private int createServer() throws Exception { - Server srv = new Server(); - Connector listener = new SelectChannelConnector(); - listener.setHost("127.0.0.1"); int port = findFreePort(); - listener.setPort(port); - srv.addConnector(listener); + Server srv = newJettyHttpServer(port); srv.setHandler(configureHandler()); srv.start(); servers.add(srv); @@ -129,7 +124,7 @@ public MyAsyncHandler(int i) { } public void onThrowable(Throwable t) { - log.warn("onThrowable called.", t); + logger.warn("onThrowable called.", t); } public STATE onBodyPartReceived(HttpResponseBodyPart event) throws Exception { diff --git a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java index 4a2b749450..a27873d108 100644 --- a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java @@ -15,8 +15,8 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.*; -import static org.testng.FileAssert.fail; import java.io.IOException; import java.io.OutputStream; @@ -29,14 +29,10 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.Request; import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.testng.annotations.BeforeClass; @@ -55,23 +51,13 @@ public abstract class RedirectConnectionUsageTest extends AbstractBasicTest { @BeforeClass public void setUp() throws Exception { - server = new Server(); - port1 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - listener.setHost("localhost"); - listener.setPort(port1); - - server.addConnector(listener); + server = newJettyHttpServer(port1); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); - - context.setContextPath("/"); - server.setHandler(context); - context.addServlet(new ServletHolder(new MockRedirectHttpServlet()), "/redirect/*"); context.addServlet(new ServletHolder(new MockFullResponseHttpServlet()), "/*"); + server.setHandler(context); server.start(); @@ -83,47 +69,32 @@ public void setUp() throws Exception { * Tests that after a redirect the final url in the response reflect the redirect */ @Test - public void testGetRedirectFinalUrl() { - - AsyncHttpClientConfig.Builder bc = new AsyncHttpClientConfig.Builder(); - - bc.setAllowPoolingConnection(true); - bc.setMaximumConnectionsPerHost(1); - bc.setMaximumConnectionsTotal(1); - bc.setConnectionTimeoutInMs(1000); - bc.setRequestTimeoutInMs(1000); - bc.setFollowRedirects(true); - - AsyncHttpClient c = getAsyncHttpClient(bc.build()); + public void testGetRedirectFinalUrl() throws Exception { + + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsPerHost(1)// + .setMaximumConnectionsTotal(1)// + .setConnectionTimeoutInMs(1000)// + .setRequestTimeoutInMs(1000)// + .setFollowRedirects(true)// + .build(); + + AsyncHttpClient c = getAsyncHttpClient(config); try { + Request r = new RequestBuilder("GET").setUrl(servletEndpointRedirectUrl).build(); - RequestBuilder builder = new RequestBuilder("GET"); - builder.setUrl(servletEndpointRedirectUrl); - - Request r = builder.build(); - - try { - ListenableFuture response = c.executeRequest(r); - Response res = null; - res = response.get(); - assertNotNull(res.getResponseBody()); - assertEquals(BASE_URL + "/overthere", BASE_URL + "/overthere", res.getUri().toString()); - - } catch (Exception e) { - System.err.print("============"); - e.printStackTrace(); - System.err.print("============"); - System.err.flush(); - fail("Should not get here, The request threw an exception"); - } + ListenableFuture response = c.executeRequest(r); + Response res = null; + res = response.get(); + assertNotNull(res.getResponseBody()); + assertEquals(res.getUri().toString(), BASE_URL + "/overthere"); } finally { c.close(); } } - protected abstract AsyncHttpProviderConfig getProviderConfig(); - @SuppressWarnings("serial") class MockRedirectHttpServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { @@ -140,7 +111,7 @@ class MockFullResponseHttpServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String xmlToReturn = String.format(xml, new Object[] { new Date().toString() }); - res.setStatus(200, "Complete, XML Being Returned"); + res.setStatus(200); res.addHeader("Content-Type", contentType); res.addHeader("X-Method", req.getMethod()); res.addHeader("MultiValue", "1"); diff --git a/api/src/test/java/org/asynchttpclient/async/Relative302Test.java b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java index e2b65dbf29..86c21eaac5 100644 --- a/api/src/test/java/org/asynchttpclient/async/Relative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java @@ -15,20 +15,9 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Response; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.ConnectException; import java.net.URI; @@ -36,9 +25,17 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; public abstract class Relative302Test extends AbstractBasicTest { private final AtomicBoolean isSet = new AtomicBoolean(false); @@ -48,7 +45,7 @@ private class Relative302Handler extends AbstractHandler { public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { String param; - httpResponse.setContentType("text/html; charset=utf-8"); + httpResponse.setContentType(TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); Enumeration e = httpRequest.getHeaderNames(); while (e.hasMoreElements()) { param = e.nextElement().toString(); @@ -69,24 +66,24 @@ public void handle(String s, Request r, HttpServletRequest httpRequest, HttpServ @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); port2 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - - listener.setHost("127.0.0.1"); - listener.setPort(port1); - server.addConnector(listener); - + server = newJettyHttpServer(port1); server.setHandler(new Relative302Handler()); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } @Test(groups = { "online", "default_provider" }) - public void redirected302Test() throws Throwable { + public void testAllSequentiallyBecauseNotThreadSafe() throws Exception { + redirected302Test(); + redirected302InvalidTest(); + absolutePathRedirectTest(); + relativePathRedirectTest(); + } + + // @Test(groups = { "online", "default_provider" }) + public void redirected302Test() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -105,25 +102,8 @@ public void redirected302Test() throws Throwable { } } - private String getBaseUrl(URI uri) { - String url = uri.toString(); - int port = uri.getPort(); - if (port == -1) { - port = getPort(uri); - url = url.substring(0, url.length() - 1) + ":" + port; - } - return url.substring(0, url.lastIndexOf(":") + String.valueOf(port).length() + 1); - } - - private static int getPort(URI uri) { - int port = uri.getPort(); - if (port == -1) - port = uri.getScheme().equals("http") ? 80 : 443; - return port; - } - - @Test(groups = { "standalone", "default_provider" }) - public void redirected302InvalidTest() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void redirected302InvalidTest() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -141,8 +121,8 @@ public void redirected302InvalidTest() throws Throwable { } } - @Test(groups = { "standalone", "default_provider" }) - public void absolutePathRedirectTest() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void absolutePathRedirectTest() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); @@ -156,14 +136,14 @@ public void absolutePathRedirectTest() throws Throwable { assertEquals(response.getStatusCode(), 200); assertEquals(response.getUri().toString(), destinationUrl); - log.debug("{} was redirected to {}", redirectTarget, destinationUrl); + logger.debug("{} was redirected to {}", redirectTarget, destinationUrl); } finally { c.close(); } } - @Test(groups = { "standalone", "default_provider" }) - public void relativePathRedirectTest() throws Throwable { + // @Test(groups = { "standalone", "default_provider" }) + public void relativePathRedirectTest() throws Exception { isSet.getAndSet(false); AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); @@ -177,9 +157,26 @@ public void relativePathRedirectTest() throws Throwable { assertEquals(response.getStatusCode(), 200); assertEquals(response.getUri().toString(), destinationUrl); - log.debug("{} was redirected to {}", redirectTarget, destinationUrl); + logger.debug("{} was redirected to {}", redirectTarget, destinationUrl); } finally { c.close(); } } + + private String getBaseUrl(URI uri) { + String url = uri.toString(); + int port = uri.getPort(); + if (port == -1) { + port = getPort(uri); + url = url.substring(0, url.length() - 1) + ":" + port; + } + return url.substring(0, url.lastIndexOf(":") + String.valueOf(port).length() + 1); + } + + private static int getPort(URI uri) { + int port = uri.getPort(); + if (port == -1) + port = uri.getScheme().equals("http") ? 80 : 443; + return port; + } } diff --git a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java index f94ff385a3..a5025ffb17 100644 --- a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java @@ -15,9 +15,7 @@ */ package org.asynchttpclient.async; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.AssertJUnit.assertTrue; +import static org.testng.Assert.*; import java.io.InputStream; import java.net.URLEncoder; @@ -25,13 +23,10 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.asynchttpclient.Cookie; -import org.testng.Assert; -import org.testng.annotations.Test; - import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Cookie; import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; @@ -39,6 +34,7 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.testng.annotations.Test; /** * Unit tests for remote site. @@ -53,7 +49,7 @@ public abstract class RemoteSiteTest extends AbstractBasicTest { public static final String REQUEST_PARAM = "github github \n" + "github"; @Test(groups = { "online", "default_provider" }) - public void testGoogleCom() throws Throwable { + public void testGoogleCom() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); try { Response response = c.prepareGet("http://www.google.com/").execute().get(10, TimeUnit.SECONDS); @@ -64,7 +60,7 @@ public void testGoogleCom() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void testMailGoogleCom() throws Throwable { + public void testMailGoogleCom() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); try { Response response = c.prepareGet("http://mail.google.com/").execute().get(10, TimeUnit.SECONDS); @@ -76,7 +72,7 @@ public void testMailGoogleCom() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void testMicrosoftCom() throws Throwable { + public void testMicrosoftCom() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); try { Response response = c.prepareGet("http://microsoft.com/").execute().get(10, TimeUnit.SECONDS); @@ -88,7 +84,7 @@ public void testMicrosoftCom() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void testWwwMicrosoftCom() throws Throwable { + public void testWwwMicrosoftCom() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); try { Response response = c.prepareGet("http://www.microsoft.com/").execute().get(10, TimeUnit.SECONDS); @@ -100,7 +96,7 @@ public void testWwwMicrosoftCom() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void testUpdateMicrosoftCom() throws Throwable { + public void testUpdateMicrosoftCom() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); try { Response response = c.prepareGet("http://update.microsoft.com/").execute().get(10, TimeUnit.SECONDS); @@ -112,7 +108,7 @@ public void testUpdateMicrosoftCom() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void testGoogleComWithTimeout() throws Throwable { + public void testGoogleComWithTimeout() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).build()); try { Response response = c.prepareGet("http://google.com/").execute().get(10, TimeUnit.SECONDS); @@ -124,7 +120,7 @@ public void testGoogleComWithTimeout() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void asyncStatusHEADContentLenghtTest() throws Throwable { + public void asyncStatusHEADContentLenghtTest() throws Exception { AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); try { final CountDownLatch l = new CountDownLatch(1); @@ -133,14 +129,17 @@ public void asyncStatusHEADContentLenghtTest() throws Throwable { p.executeRequest(request, new AsyncCompletionHandlerAdapter() { @Override public Response onCompleted(Response response) throws Exception { - Assert.assertEquals(response.getStatusCode(), 200); - l.countDown(); - return response; + try { + assertEquals(response.getStatusCode(), 200); + return response; + } finally { + l.countDown(); + } } }).get(); if (!l.await(5, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { p.close(); @@ -148,8 +147,9 @@ public Response onCompleted(Response response) throws Exception { } @Test(groups = { "online", "default_provider" }, enabled = false) - public void invalidStreamTest2() throws Throwable { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).setFollowRedirects(true).setAllowPoolingConnection(false).setMaximumNumberOfRedirects(6).build(); + public void invalidStreamTest2() throws Exception { + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(10000).setFollowRedirects(true).setAllowPoolingConnection(false) + .setMaximumNumberOfRedirects(6).build(); AsyncHttpClient c = getAsyncHttpClient(config); try { @@ -167,31 +167,32 @@ public void invalidStreamTest2() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void asyncFullBodyProperlyRead() throws Throwable { + public void asyncFullBodyProperlyRead() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); InputStream stream = r.getResponseBodyAsStream(); + // FIXME available is an ESTIMATE!!! int available = stream.available(); int[] lengthWrapper = new int[1]; - /* byte[] bytes = */AsyncHttpProviderUtils.readFully(stream, lengthWrapper); + AsyncHttpProviderUtils.readFully(stream, lengthWrapper); int byteToRead = lengthWrapper[0]; - Assert.assertEquals(available, byteToRead); + assertEquals(available, byteToRead); } finally { client.close(); } } @Test(groups = { "online", "default_provider" }) - public void testUrlRequestParametersEncoding() throws Throwable { + public void testUrlRequestParametersEncoding() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); - log.info(String.format("Executing request [%s] ...", requestUrl2)); + logger.info(String.format("Executing request [%s] ...", requestUrl2)); Response response = client.prepareGet(requestUrl2).execute().get(); - Assert.assertEquals(response.getStatusCode(), 301); + assertEquals(response.getStatusCode(), 301); } finally { client.close(); } @@ -200,21 +201,21 @@ public void testUrlRequestParametersEncoding() throws Throwable { /** * See https://issues.sonatype.org/browse/AHC-61 * - * @throws Throwable + * @throws Exception */ @Test(groups = { "online", "default_provider" }) - public void testAHC60() throws Throwable { + public void testAHC60() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(); - Assert.assertEquals(response.getStatusCode(), 200); + assertEquals(response.getStatusCode(), 200); } finally { client.close(); } } @Test(groups = { "online", "default_provider" }) - public void stripQueryStringTest() throws Throwable { + public void stripQueryStringTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -229,7 +230,7 @@ public void stripQueryStringTest() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void stripQueryStringNegativeTest() throws Throwable { + public void stripQueryStringNegativeTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setRemoveQueryParamsOnRedirect(false).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); @@ -244,7 +245,7 @@ public void stripQueryStringNegativeTest() throws Throwable { } @Test(groups = { "online", "default_provider" }) - public void evilCoookieTest() throws Throwable { + public void evilCoookieTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { RequestBuilder builder2 = new RequestBuilder("GET"); @@ -263,7 +264,7 @@ public void evilCoookieTest() throws Throwable { } @Test(groups = { "online", "default_provider" }, enabled = false) - public void testAHC62Com() throws Throwable { + public void testAHC62Com() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); try { Response response = c.prepareGet("http://api.crunchbase.com/v/1/financial-organization/kinsey-hills-group.js").execute(new AsyncHandler() { diff --git a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java index d9dc0970d2..6c27502c6e 100644 --- a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java @@ -68,7 +68,7 @@ public AbstractHandler configureHandler() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void testMaxRetry() throws Throwable { + public void testMaxRetry() throws Exception { AsyncHttpClient ahc = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setMaxRequestRetry(0).build()); try { ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build()).get(); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java index 3baf664f2f..76dac21427 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java @@ -39,7 +39,7 @@ public class SimpleAsyncClientErrorBehaviourTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }) - public void testAccumulateErrorBody() throws Throwable { + public void testAccumulateErrorBody() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.ACCUMULATE).build(); try { ByteArrayOutputStream o = new ByteArrayOutputStream(10); @@ -56,7 +56,7 @@ public void testAccumulateErrorBody() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void testOmitErrorBody() throws Throwable { + public void testOmitErrorBody() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.OMIT).build(); try { ByteArrayOutputStream o = new ByteArrayOutputStream(10); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index 73bc1ff0c9..ef0dfacf51 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -12,6 +12,14 @@ */ package org.asynchttpclient.async; +import static org.testng.Assert.*; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.concurrent.Future; + import org.asynchttpclient.ByteArrayPart; import org.asynchttpclient.Response; import org.asynchttpclient.SimpleAsyncHttpClient; @@ -23,18 +31,6 @@ import org.asynchttpclient.simple.SimpleAHCTransferListener; import org.testng.annotations.Test; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.util.concurrent.Future; - -import static junit.framework.Assert.assertTrue; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; -import static org.testng.AssertJUnit.assertNotNull; -import static org.testng.AssertJUnit.assertNotSame; - public abstract class SimpleAsyncHttpClientTest extends AbstractBasicTest { private final static String MY_MESSAGE = "my message"; @@ -42,7 +38,7 @@ public abstract class SimpleAsyncHttpClientTest extends AbstractBasicTest { public abstract String getProviderClass(); @Test(groups = { "standalone", "default_provider" }) - public void inpuStreamBodyConsumerTest() throws Throwable { + public void inpuStreamBodyConsumerTest() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { @@ -58,7 +54,7 @@ public void inpuStreamBodyConsumerTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void stringBuilderBodyConsumerTest() throws Throwable { + public void stringBuilderBodyConsumerTest() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { @@ -75,7 +71,7 @@ public void stringBuilderBodyConsumerTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void byteArrayOutputStreamBodyConsumerTest() throws Throwable { + public void byteArrayOutputStreamBodyConsumerTest() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { @@ -92,7 +88,7 @@ public void byteArrayOutputStreamBodyConsumerTest() throws Throwable { } @Test(groups = { "standalone", "default_provider" }) - public void requestByteArrayOutputStreamBodyConsumerTest() throws Throwable { + public void requestByteArrayOutputStreamBodyConsumerTest() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl()).build(); try { @@ -112,7 +108,7 @@ public void requestByteArrayOutputStreamBodyConsumerTest() throws Throwable { * See https://issues.sonatype.org/browse/AHC-5 */ @Test(groups = { "standalone", "default_provider" }, enabled = true) - public void testPutZeroBytesFileTest() throws Throwable { + public void testPutZeroBytesFileTest() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 1000).setUrl(getTargetUrl() + "/testPutZeroBytesFileTest.txt").setHeader("Content-Type", "text/plain") .build(); try { diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index cb67385dff..38e0e402b9 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -12,6 +12,7 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.createTempFile; import static org.testng.Assert.*; import java.io.File; @@ -34,7 +35,6 @@ import org.asynchttpclient.listener.TransferCompletionHandler; import org.asynchttpclient.listener.TransferListener; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.Assert; import org.testng.annotations.Test; public abstract class TransferListenerTest extends AbstractBasicTest { @@ -77,7 +77,7 @@ public AbstractHandler configureHandler() throws Exception { } @Test(groups = { "standalone", "default_provider" }) - public void basicGetTest() throws Throwable { + public void basicGetTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final AtomicReference throwable = new AtomicReference(); @@ -131,7 +131,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void basicPutFileTest() throws Throwable { + public void basicPutFileTest() throws Exception { final AtomicReference throwable = new AtomicReference(); final AtomicReference hSent = new AtomicReference(); final AtomicReference hRead = new AtomicReference(); @@ -140,12 +140,9 @@ public void basicPutFileTest() throws Throwable { final AtomicBoolean completed = new AtomicBoolean(false); - long repeats = (1024 * 100 * 10 / PATTERN_BYTES.length) + 1; - File file = createTempFile(PATTERN_BYTES, (int) repeats); - long expectedFileSize = PATTERN_BYTES.length * repeats; - Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); + File file = createTempFile(1024 * 100 * 10); - int timeout = (int) (repeats / 1000); + int timeout = (int) (file.length() / 1000); AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build()); try { @@ -184,8 +181,8 @@ public void onThrowable(Throwable t) { assertEquals(response.getStatusCode(), 200); assertNotNull(hRead.get()); assertNotNull(hSent.get()); - assertEquals(bbReceivedLenght.get(), expectedFileSize, "Number of received bytes incorrect"); - assertEquals(bbSentLenght.get(), expectedFileSize, "Number of sent bytes incorrect"); + assertEquals(bbReceivedLenght.get(), file.length(), "Number of received bytes incorrect"); + assertEquals(bbSentLenght.get(), file.length(), "Number of sent bytes incorrect"); } catch (IOException ex) { fail("Should have timed out"); } @@ -195,7 +192,7 @@ public void onThrowable(Throwable t) { } @Test(groups = { "standalone", "default_provider" }) - public void basicPutFileBodyGeneratorTest() throws Throwable { + public void basicPutFileBodyGeneratorTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { final AtomicReference throwable = new AtomicReference(); @@ -206,10 +203,7 @@ public void basicPutFileBodyGeneratorTest() throws Throwable { final AtomicBoolean completed = new AtomicBoolean(false); - long repeats = (1024 * 100 * 10 / PATTERN_BYTES.length) + 1; - File file = createTempFile(PATTERN_BYTES, (int) repeats); - long expectedFileSize = PATTERN_BYTES.length * repeats; - Assert.assertEquals(expectedFileSize, file.length(), "Invalid file length"); + File file = createTempFile(1024 * 100 * 10); TransferCompletionHandler tl = new TransferCompletionHandler(); tl.addTransferListener(new TransferListener() { @@ -246,8 +240,8 @@ public void onThrowable(Throwable t) { assertEquals(response.getStatusCode(), 200); assertNotNull(hRead.get()); assertNotNull(hSent.get()); - assertEquals(bbReceivedLenght.get(), expectedFileSize, "Number of received bytes incorrect"); - assertEquals(bbSentLenght.get(), expectedFileSize, "Number of sent bytes incorrect"); + assertEquals(bbReceivedLenght.get(), file.length(), "Number of received bytes incorrect"); + assertEquals(bbSentLenght.get(), file.length(), "Number of sent bytes incorrect"); } catch (IOException ex) { fail("Should have timed out"); } diff --git a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index dd8a80d21f..8959d7a8bc 100644 --- a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -12,12 +12,13 @@ */ package org.asynchttpclient.async; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.webdav.WebDavCompletionHandlerBase; -import org.asynchttpclient.webdav.WebDavResponse; +import static org.asynchttpclient.async.util.TestUtils.findFreePort; +import static org.testng.Assert.*; + +import java.io.File; +import java.io.IOException; +import java.util.concurrent.ExecutionException; + import org.apache.catalina.Context; import org.apache.catalina.Engine; import org.apache.catalina.Host; @@ -25,19 +26,17 @@ import org.apache.catalina.connector.Connector; import org.apache.catalina.startup.Embedded; import org.apache.coyote.http11.Http11NioProtocol; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.webdav.WebDavCompletionHandlerBase; +import org.asynchttpclient.webdav.WebDavResponse; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import java.io.File; -import java.io.IOException; -import java.util.concurrent.ExecutionException; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - public abstract class WebDavBasicTest extends AbstractBasicTest { protected Embedded embedded; diff --git a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java index 1394542177..490931ce8c 100644 --- a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java @@ -12,6 +12,7 @@ */ package org.asynchttpclient.async; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.*; import java.io.File; @@ -87,7 +88,7 @@ public Response onCompleted(Response response) throws Exception { }).get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); assertTrue(operationCompleted.get()); assertTrue(headerSent.get()); } finally { @@ -103,7 +104,7 @@ public void zeroCopyPutTest() throws IOException, ExecutionException, TimeoutExc Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); - assertEquals(resp.getResponseBody(), "This is a simple test file"); + assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); } finally { client.close(); } diff --git a/api/src/test/java/org/asynchttpclient/async/util/EchoHandler.java b/api/src/test/java/org/asynchttpclient/async/util/EchoHandler.java new file mode 100644 index 0000000000..5d10eabe12 --- /dev/null +++ b/api/src/test/java/org/asynchttpclient/async/util/EchoHandler.java @@ -0,0 +1,103 @@ +package org.asynchttpclient.async.util; + +import java.io.IOException; +import java.util.Enumeration; + +import javax.servlet.ServletException; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; + +public class EchoHandler extends AbstractHandler { + + @Override + public void handle(String pathInContext, Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { + + if (httpRequest.getHeader("X-HEAD") != null) { + httpResponse.setContentLength(1); + } + + if (httpRequest.getHeader("X-ISO") != null) { + httpResponse.setContentType(TestUtils.TEXT_HTML_CONTENT_TYPE_WITH_ISO_8859_1_CHARSET); + } else { + httpResponse.setContentType(TestUtils.TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); + } + + if (request.getMethod().equalsIgnoreCase("OPTIONS")) { + httpResponse.addHeader("Allow", "GET,HEAD,POST,OPTIONS,TRACE"); + } + ; + + Enumeration e = httpRequest.getHeaderNames(); + String param; + while (e.hasMoreElements()) { + param = e.nextElement().toString(); + + if (param.startsWith("LockThread")) { + try { + Thread.sleep(40 * 1000); + } catch (InterruptedException ex) { + } + } + + if (param.startsWith("X-redirect")) { + httpResponse.sendRedirect(httpRequest.getHeader("X-redirect")); + return; + } + httpResponse.addHeader("X-" + param, httpRequest.getHeader(param)); + } + + Enumeration i = httpRequest.getParameterNames(); + + StringBuilder requestBody = new StringBuilder(); + while (i.hasMoreElements()) { + param = i.nextElement().toString(); + httpResponse.addHeader("X-" + param, httpRequest.getParameter(param)); + requestBody.append(param); + requestBody.append("_"); + } + + String pathInfo = httpRequest.getPathInfo(); + if (pathInfo != null) + httpResponse.addHeader("X-pathInfo", pathInfo); + + String queryString = httpRequest.getQueryString(); + if (queryString != null) + httpResponse.addHeader("X-queryString", queryString); + + httpResponse.addHeader("X-KEEP-ALIVE", httpRequest.getRemoteAddr() + ":" + httpRequest.getRemotePort()); + + Cookie[] cs = httpRequest.getCookies(); + if (cs != null) { + for (Cookie c : cs) { + httpResponse.addCookie(c); + } + } + + if (requestBody.length() > 0) { + httpResponse.getOutputStream().write(requestBody.toString().getBytes()); + } + + int size = 16384; + if (httpRequest.getContentLength() > 0) { + size = httpRequest.getContentLength(); + } + byte[] bytes = new byte[size]; + if (bytes.length > 0) { + int read = 0; + while (read > -1) { + read = httpRequest.getInputStream().read(bytes); + if (read > 0) { + httpResponse.getOutputStream().write(bytes, 0, read); + } + } + } + + httpResponse.setStatus(200); + httpResponse.getOutputStream().flush(); + httpResponse.getOutputStream().close(); + } +} \ No newline at end of file diff --git a/api/src/test/java/org/asynchttpclient/async/util/TestUtils.java b/api/src/test/java/org/asynchttpclient/async/util/TestUtils.java new file mode 100644 index 0000000000..e4adbd01fa --- /dev/null +++ b/api/src/test/java/org/asynchttpclient/async/util/TestUtils.java @@ -0,0 +1,253 @@ +package org.asynchttpclient.async.util; + +import static org.testng.Assert.assertEquals; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.ServerSocket; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.charset.Charset; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.X509TrustManager; + +import org.apache.commons.io.FileUtils; +import org.asynchttpclient.async.HostnameVerifierTest; +import org.eclipse.jetty.security.ConstraintMapping; +import org.eclipse.jetty.security.ConstraintSecurityHandler; +import org.eclipse.jetty.security.HashLoginService; +import org.eclipse.jetty.security.LoginService; +import org.eclipse.jetty.security.authentication.BasicAuthenticator; +import org.eclipse.jetty.security.authentication.DigestAuthenticator; +import org.eclipse.jetty.security.authentication.LoginAuthenticator; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.HttpConfiguration; +import org.eclipse.jetty.server.HttpConnectionFactory; +import org.eclipse.jetty.server.SecureRequestCustomizer; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.server.SslConnectionFactory; +import org.eclipse.jetty.util.security.Constraint; +import org.eclipse.jetty.util.ssl.SslContextFactory; + +public class TestUtils { + + public static final String USER = "user"; + public static final String ADMIN = "admin"; + public static final String TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET = "text/html; charset=UTF-8"; + public static final String TEXT_HTML_CONTENT_TYPE_WITH_ISO_8859_1_CHARSET = "text/html; charset=ISO-8859-1"; + private static final File TMP_DIR = new File(System.getProperty("java.io.tmpdir"), "ahc-tests-" + UUID.randomUUID().toString().substring(0, 8)); + public static final byte[] PATTERN_BYTES = "FooBarBazQixFooBarBazQixFooBarBazQixFooBarBazQixFooBarBazQixFooBarBazQix".getBytes(Charset.forName("UTF-16")); + public static final File LARGE_IMAGE_FILE; + public static byte[] LARGE_IMAGE_BYTES; + public static final File SIMPLE_TEXT_FILE; + public static final String SIMPLE_TEXT_FILE_STRING; + private static final LoginService LOGIN_SERVICE = new HashLoginService("MyRealm", "src/test/resources/realm.properties"); + + static { + try { + TMP_DIR.mkdirs(); + TMP_DIR.deleteOnExit(); + LARGE_IMAGE_FILE = new File(TestUtils.class.getClassLoader().getResource("300k.png").toURI()); + LARGE_IMAGE_BYTES = FileUtils.readFileToByteArray(LARGE_IMAGE_FILE); + SIMPLE_TEXT_FILE = new File(TestUtils.class.getClassLoader().getResource("SimpleTextFile.txt").toURI()); + SIMPLE_TEXT_FILE_STRING = FileUtils.readFileToString(SIMPLE_TEXT_FILE, "UTF-8"); + } catch (Exception e) { + throw new ExceptionInInitializerError(e); + } + } + + public static synchronized int findFreePort() throws IOException { + ServerSocket socket = null; + + try { + socket = new ServerSocket(0); + + return socket.getLocalPort(); + } finally { + if (socket != null) + socket.close(); + } + } + + public static File createTempFile(int approxSize) throws IOException { + long repeats = approxSize / TestUtils.PATTERN_BYTES.length + 1; + File tmpFile = File.createTempFile("tmpfile-", ".data", TMP_DIR); + tmpFile.deleteOnExit(); + FileOutputStream out = null; + try { + out = new FileOutputStream(tmpFile); + for (int i = 0; i < repeats; i++) { + out.write(PATTERN_BYTES); + } + + long expectedFileSize = PATTERN_BYTES.length * repeats; + assertEquals(tmpFile.length(), expectedFileSize, "Invalid file length"); + + return tmpFile; + } finally { + if (out != null) { + out.close(); + } + } + } + + public static Server newJettyHttpServer(int port) { + Server server = new Server(); + addHttpConnector(server, port); + return server; + } + + public static void addHttpConnector(Server server, int port) { + ServerConnector connector = new ServerConnector(server); + connector.setPort(port); + + server.addConnector(connector); + } + + public static Server newJettyHttpsServer(int port) throws URISyntaxException { + Server server = new Server(); + addHttpsConnector(server, port); + return server; + } + + public static void addHttpsConnector(Server server, int port) throws URISyntaxException { + ClassLoader cl = TestUtils.class.getClassLoader(); + + URL keystoreUrl = cl.getResource("ssltest-keystore.jks"); + String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath(); + SslContextFactory sslContextFactory = new SslContextFactory(keyStoreFile); + sslContextFactory.setKeyStorePassword("changeit"); + + String trustStoreFile = new File(cl.getResource("ssltest-cacerts.jks").toURI()).getAbsolutePath(); + sslContextFactory.setTrustStorePath(trustStoreFile); + sslContextFactory.setTrustStorePassword("changeit"); + + HttpConfiguration httpsConfig = new HttpConfiguration(); + httpsConfig.setSecureScheme("https"); + httpsConfig.setSecurePort(port); + httpsConfig.addCustomizer(new SecureRequestCustomizer()); + + ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, "http/1.1"), new HttpConnectionFactory(httpsConfig)); + connector.setPort(port); + server.addConnector(connector); + + server.addConnector(connector); + } + + public static void addBasicAuthHandler(Server server, boolean strict, Handler handler) { + addAuthHandler(server, Constraint.__BASIC_AUTH, new BasicAuthenticator(), strict, handler); + } + + public static void addDigestAuthHandler(Server server, boolean strict, Handler handler) { + addAuthHandler(server, Constraint.__DIGEST_AUTH, new DigestAuthenticator(), strict, handler); + } + + private static void addAuthHandler(Server server, String auth, LoginAuthenticator authenticator, boolean strict, Handler handler) { + + server.addBean(LOGIN_SERVICE); + + Constraint constraint = new Constraint(); + constraint.setName(auth); + constraint.setRoles(new String[] { USER, ADMIN }); + constraint.setAuthenticate(true); + + ConstraintMapping mapping = new ConstraintMapping(); + mapping.setConstraint(constraint); + mapping.setPathSpec("/*"); + + Set knownRoles = new HashSet(); + knownRoles.add(USER); + knownRoles.add(ADMIN); + + List cm = new ArrayList(); + cm.add(mapping); + + ConstraintSecurityHandler security = new ConstraintSecurityHandler(); + security.setConstraintMappings(cm, knownRoles); + security.setAuthenticator(authenticator); + security.setLoginService(LOGIN_SERVICE); + security.setStrict(strict); + security.setHandler(handler); + server.setHandler(security); + } + + public static SSLContext createSSLContext(AtomicBoolean trust) { + try { + InputStream keyStoreStream = HostnameVerifierTest.class.getResourceAsStream("ssltest-cacerts.jks"); + char[] keyStorePassword = "changeit".toCharArray(); + KeyStore ks = KeyStore.getInstance("JKS"); + ks.load(keyStoreStream, keyStorePassword); + + // Set up key manager factory to use our key store + char[] certificatePassword = "changeit".toCharArray(); + KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + kmf.init(ks, certificatePassword); + + // Initialize the SSLContext to work with our key managers. + KeyManager[] keyManagers = kmf.getKeyManagers(); + TrustManager[] trustManagers = new TrustManager[] { dummyTrustManager(trust) }; + SecureRandom secureRandom = new SecureRandom(); + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, secureRandom); + + return sslContext; + } catch (Exception e) { + throw new Error("Failed to initialize the server-side SSLContext", e); + } + } + + private static final TrustManager dummyTrustManager(final AtomicBoolean trust) { + return new X509TrustManager() { + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + } + + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + if (!trust.get()) { + throw new CertificateException("Server certificate not trusted."); + } + } + }; + } + + public static File getClasspathFile(String file) throws FileNotFoundException { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (Throwable ex) { + } + if (cl == null) { + cl = TestUtils.class.getClassLoader(); + } + URL resourceUrl = cl.getResource(file); + + try { + return new File(new URI(resourceUrl.toString()).getSchemeSpecificPart()); + } catch (URISyntaxException e) { + throw new FileNotFoundException(file); + } + } +} diff --git a/api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java b/api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java index f2256fad08..69b36f1e1d 100644 --- a/api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java +++ b/api/src/test/java/org/asynchttpclient/oauth/TestSignatureCalculator.java @@ -15,16 +15,12 @@ */ package org.asynchttpclient.oauth; -import org.asynchttpclient.oauth.ConsumerKey; -import org.asynchttpclient.oauth.OAuthSignatureCalculator; -import org.asynchttpclient.oauth.RequestToken; -import org.testng.Assert; -import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; import org.asynchttpclient.FluentStringsMap; +import org.testng.annotations.Test; -public class TestSignatureCalculator -{ +public class TestSignatureCalculator { private static final String CONSUMER_KEY = "dpf43f3p2l4k3l03"; private static final String CONSUMER_SECRET = "kd94hf93k423kf44"; @@ -36,12 +32,11 @@ public class TestSignatureCalculator public static final String NONCE = "kllo9940pd9333jh"; final static long TIMESTAMP = 1191242096; - + // based on the reference test case from // http://oauth.pbwiki.com/TestCases - @Test(groups="fast") - public void test() - { + @Test(groups = "fast") + public void test() { ConsumerKey consumer = new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET); RequestToken user = new RequestToken(TOKEN_KEY, TOKEN_SECRET); OAuthSignatureCalculator calc = new OAuthSignatureCalculator(consumer, user); @@ -51,6 +46,6 @@ public void test() String url = "http://photos.example.net/photos"; String sig = calc.calculateSignature("GET", url, TIMESTAMP, NONCE, null, queryParams); - Assert.assertEquals("tR3+Ty81lMeYAr/Fid0kMTYa/WM=", sig); + assertEquals(sig, "tR3+Ty81lMeYAr/Fid0kMTYa/WM="); } } diff --git a/api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java b/api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java index 2c4e3853f6..1086d14a14 100644 --- a/api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java +++ b/api/src/test/java/org/asynchttpclient/org/jboss/netty/handler/codec/http/CookieDecoderTest.java @@ -12,43 +12,41 @@ */ package org.asynchttpclient.org.jboss.netty.handler.codec.http; -import java.util.Set; +import static org.testng.Assert.assertEquals; -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; -import org.testng.Assert; -import org.testng.annotations.Test; +import java.util.Set; import org.asynchttpclient.Cookie; +import org.testng.annotations.Test; public class CookieDecoderTest { - + @Test(groups = "fast") public void testDecodeUnquoted() { - Set cookies = CookieDecoder.decode( - "foo=value; domain=/; path=/"); - Assert.assertEquals(cookies.size(), 1); + Set cookies = CookieDecoder.decode("foo=value; domain=/; path=/"); + assertEquals(cookies.size(), 1); Cookie first = cookies.iterator().next(); - Assert.assertEquals(first.getValue(), "value"); - Assert.assertEquals(first.getDomain(), "/"); - Assert.assertEquals(first.getPath(), "/"); + assertEquals(first.getValue(), "value"); + assertEquals(first.getDomain(), "/"); + assertEquals(first.getPath(), "/"); } @Test(groups = "fast") public void testDecodeQuoted() { Set cookies = CookieDecoder.decode("ALPHA=\"VALUE1\"; Domain=docs.foo.com; Path=/accounts; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly"); - Assert.assertEquals(cookies.size(), 1); + assertEquals(cookies.size(), 1); Cookie first = cookies.iterator().next(); - Assert.assertEquals(first.getValue(), "VALUE1"); + assertEquals(first.getValue(), "VALUE1"); } @Test(groups = "fast") public void testDecodeQuotedContainingEscapedQuote() { Set cookies = CookieDecoder.decode("ALPHA=\"VALUE1\\\"\"; Domain=docs.foo.com; Path=/accounts; Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; HttpOnly"); - Assert.assertEquals(cookies.size(), 1); + assertEquals(cookies.size(), 1); Cookie first = cookies.iterator().next(); - Assert.assertEquals(first.getValue(), "VALUE1\""); + assertEquals(first.getValue(), "VALUE1\""); } } \ No newline at end of file diff --git a/api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java b/api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java index d1300614ed..be33e4e90e 100644 --- a/api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java +++ b/api/src/test/java/org/asynchttpclient/util/AsyncHttpProviderUtilsTest.java @@ -12,10 +12,10 @@ */ package org.asynchttpclient.util; +import static org.testng.Assert.assertEquals; + import java.net.URI; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.testng.Assert; import org.testng.annotations.Test; public class AsyncHttpProviderUtilsTest { @@ -26,7 +26,7 @@ public void getRedirectUriShouldHandleProperlyEncodedLocation() { String url = "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505"; URI uri = AsyncHttpProviderUtils.getRedirectUri( URI.create("http://www.ebay.de"), url); - Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); + assertEquals( uri.toString(), "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505"); } @Test(groups = "fast") @@ -34,7 +34,7 @@ public void getRedirectUriShouldHandleRawQueryParamsLocation() { String url = "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC Lifebook E8310 Core2Duo T8100 2 1GHz 4GB DVD RW&_itemId=150731406505"; URI uri = AsyncHttpProviderUtils.getRedirectUri(URI.create("http://www.ebay.de"), url); - Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); + assertEquals(uri.toString(), "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505"); } @Test(groups = "fast") @@ -42,6 +42,6 @@ public void getRedirectUriShouldHandleRelativeLocation() { String url = "/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC Lifebook E8310 Core2Duo T8100 2 1GHz 4GB DVD RW&_itemId=150731406505"; URI uri = AsyncHttpProviderUtils.getRedirectUri(URI.create("http://www.ebay.de"), url); - Assert.assertEquals("http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505", uri.toString()); + assertEquals(uri.toString(), "http://www.ebay.de/sch/sis.html;jsessionid=92D73F80262E3EBED7E115ED01035DDA?_nkw=FSC%20Lifebook%20E8310%20Core2Duo%20T8100%202%201GHz%204GB%20DVD%20RW&_itemId=150731406505"); } } diff --git a/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java b/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java index 4fc002c578..cd24e9ca08 100644 --- a/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java +++ b/api/src/test/java/org/asynchttpclient/util/ProxyUtilsTest.java @@ -12,11 +12,11 @@ */ package org.asynchttpclient.util; +import static org.testng.Assert.*; + import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Request; import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.util.ProxyUtils; -import org.testng.Assert; import org.testng.annotations.Test; public class ProxyUtilsTest { @@ -24,24 +24,24 @@ public class ProxyUtilsTest { public void testBasics() { // should avoid, there is no proxy (is null) Request req = new RequestBuilder("GET").setUrl("http://somewhere.com/foo").build(); - Assert.assertTrue(ProxyUtils.avoidProxy(null, req)); + assertTrue(ProxyUtils.avoidProxy(null, req)); // should avoid, it's in non-proxy hosts req = new RequestBuilder("GET").setUrl("http://somewhere.com/foo").build(); ProxyServer proxyServer = new ProxyServer("foo", 1234); proxyServer.addNonProxyHost("somewhere.com"); - Assert.assertTrue(ProxyUtils.avoidProxy(proxyServer, req)); + assertTrue(ProxyUtils.avoidProxy(proxyServer, req)); // should avoid, it's in non-proxy hosts (with "*") req = new RequestBuilder("GET").setUrl("http://sub.somewhere.com/foo").build(); proxyServer = new ProxyServer("foo", 1234); proxyServer.addNonProxyHost("*.somewhere.com"); - Assert.assertTrue(ProxyUtils.avoidProxy(proxyServer, req)); + assertTrue(ProxyUtils.avoidProxy(proxyServer, req)); // should use it req = new RequestBuilder("GET").setUrl("http://sub.somewhere.com/foo").build(); proxyServer = new ProxyServer("foo", 1234); proxyServer.addNonProxyHost("*.somewhere.org"); - Assert.assertFalse(ProxyUtils.avoidProxy(proxyServer, req)); + assertFalse(ProxyUtils.avoidProxy(proxyServer, req)); } } diff --git a/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java b/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java index dee5562997..3b1dcdfba3 100644 --- a/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java +++ b/api/src/test/java/org/asynchttpclient/util/TestUTF8UrlCodec.java @@ -15,15 +15,15 @@ */ package org.asynchttpclient.util; -import org.asynchttpclient.util.UTF8UrlEncoder; -import org.testng.Assert; +import static org.testng.Assert.assertEquals; + import org.testng.annotations.Test; public class TestUTF8UrlCodec { @Test(groups = "fast") public void testBasics() { - Assert.assertEquals(UTF8UrlEncoder.encode("foobar"), "foobar"); - Assert.assertEquals(UTF8UrlEncoder.encode("a&b"), "a%26b"); - Assert.assertEquals(UTF8UrlEncoder.encode("a+b"), "a%2Bb"); + assertEquals(UTF8UrlEncoder.encode("foobar"), "foobar"); + assertEquals(UTF8UrlEncoder.encode("a&b"), "a%26b"); + assertEquals(UTF8UrlEncoder.encode("a+b"), "a%2Bb"); } } diff --git a/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java b/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java index c8e765c7d1..efabb307ad 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/AbstractBasicTest.java @@ -12,41 +12,23 @@ */ package org.asynchttpclient.websocket; -import java.io.IOException; +import static org.asynchttpclient.async.util.TestUtils.*; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.HandlerWrapper; -import org.eclipse.jetty.server.nio.SelectChannelConnector; -import org.eclipse.jetty.websocket.WebSocketFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.eclipse.jetty.websocket.server.WebSocketHandler; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; public abstract class AbstractBasicTest extends org.asynchttpclient.async.AbstractBasicTest { - protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); - @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); port1 = findFreePort(); - - SelectChannelConnector connector = new SelectChannelConnector(); - connector.setPort(port1); - server.addConnector(connector); - WebSocketHandler _wsHandler = getWebSocketHandler(); - - server.setHandler(_wsHandler); + server = newJettyHttpServer(port1); + server.setHandler(getWebSocketHandler()); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } @AfterClass(alwaysRun = true) @@ -54,29 +36,6 @@ public void tearDownGlobal() throws Exception { server.stop(); } - public abstract class WebSocketHandler extends HandlerWrapper implements WebSocketFactory.Acceptor { - private final WebSocketFactory _webSocketFactory = new WebSocketFactory(this, 32 * 1024); - - public WebSocketHandler() { - _webSocketFactory.setMaxIdleTime(10000); - } - - public WebSocketFactory getWebSocketFactory() { - return _webSocketFactory; - } - - @Override - public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - if (_webSocketFactory.acceptWebSocket(request, response) || response.isCommitted()) - return; - super.handle(target, baseRequest, request, response); - } - - public boolean checkOrigin(HttpServletRequest request, String origin) { - return true; - } - } - protected String getTargetUrl() { return String.format("ws://127.0.0.1:%d/", port1); } diff --git a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java index 8676d63628..5a362fd53a 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java @@ -12,69 +12,36 @@ */ package org.asynchttpclient.websocket; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.websocket.WebSocket; -import org.asynchttpclient.websocket.WebSocketByteListener; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; -import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import static org.testng.Assert.assertEquals; +import org.asynchttpclient.AsyncHttpClient; +import org.eclipse.jetty.websocket.server.WebSocketHandler; +import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; +import org.testng.annotations.Test; public abstract class ByteMessageTest extends AbstractBasicTest { - private final class EchoByteWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnBinaryMessage { - - private Connection connection; - - @Override - public void onOpen(Connection connection) { - this.connection = connection; - connection.setMaxBinaryMessageSize(1000); - } - - @Override - public void onClose(int i, String s) { - connection.close(); - } - - @Override - public void onMessage(byte[] bytes, int i, int i1) { - try { - connection.sendMessage(bytes, i, i1); - } catch (IOException e) { - try { - connection.sendMessage("FAIL"); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - } - } - @Override public WebSocketHandler getWebSocketHandler() { return new WebSocketHandler() { @Override - public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { - return new EchoByteWebSocket(); + public void configure(WebSocketServletFactory factory) { + factory.register(EchoSocket.class); } }; } @Test - public void echoByte() throws Throwable { + public void echoByte() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(new byte[0]); - WebSocket - websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { @Override public void onOpen(WebSocket websocket) { @@ -112,7 +79,7 @@ public void onFragment(byte[] fragment, boolean last) { } @Test - public void echoTwoMessagesTest() throws Throwable { + public void echoTwoMessagesTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); @@ -163,7 +130,7 @@ public void onFragment(byte[] fragment, boolean last) { } @Test - public void echoOnOpenMessagesTest() throws Throwable { + public void echoOnOpenMessagesTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); @@ -217,24 +184,24 @@ public void echoFragments() throws Exception { try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(null); - + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketByteListener() { - + @Override public void onOpen(WebSocket websocket) { } - + @Override public void onClose(WebSocket websocket) { latch.countDown(); } - + @Override public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - + @Override public void onMessage(byte[] message) { if (text.get() == null) { @@ -247,7 +214,7 @@ public void onMessage(byte[] message) { } latch.countDown(); } - + @Override public void onFragment(byte[] fragment, boolean last) { } diff --git a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java index 17beea6214..12fa531e6f 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java @@ -12,23 +12,30 @@ */ package org.asynchttpclient.websocket; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.websocket.WebSocket; -import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; -import org.asynchttpclient.websocket.WebSocketListener; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; -import org.testng.annotations.Test; +import static org.testng.Assert.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; +import org.asynchttpclient.AsyncHttpClient; +import org.eclipse.jetty.websocket.server.WebSocketHandler; +import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; +import org.testng.annotations.Test; -public abstract class CloseCodeReasonMessageTest extends TextMessageTest { +public abstract class CloseCodeReasonMessageTest extends AbstractBasicTest { + @Override + public WebSocketHandler getWebSocketHandler() { + return new WebSocketHandler() { + @Override + public void configure(WebSocketServletFactory factory) { + factory.register(EchoSocket.class); + } + }; + } + @Test(timeOut = 60000) - public void onCloseWithCode() throws Throwable { + public void onCloseWithCode() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); @@ -46,7 +53,7 @@ public void onCloseWithCode() throws Throwable { } @Test(timeOut = 60000) - public void onCloseWithCodeServerClose() throws Throwable { + public void onCloseWithCodeServerClose() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); @@ -55,13 +62,7 @@ public void onCloseWithCodeServerClose() throws Throwable { c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); latch.await(); - final String[] parts = text.get().split(" "); - assertEquals(parts.length, 5); - assertEquals(parts[0], "1000-Idle"); - assertEquals(parts[1], "for"); - assertTrue(Integer.parseInt(parts[2].substring(0, parts[2].indexOf('m'))) > 10000); - assertEquals(parts[3], ">"); - assertEquals(parts[4], "10000ms"); + assertEquals(text.get(), "1001-Idle Timeout"); } finally { c.close(); } @@ -84,6 +85,7 @@ public void onOpen(WebSocket websocket) { @Override public void onClose(WebSocket websocket) { + latch.countDown(); } public void onClose(WebSocket websocket, int code, String reason) { diff --git a/api/src/test/java/org/asynchttpclient/websocket/EchoSocket.java b/api/src/test/java/org/asynchttpclient/websocket/EchoSocket.java new file mode 100644 index 0000000000..b2fe413812 --- /dev/null +++ b/api/src/test/java/org/asynchttpclient/websocket/EchoSocket.java @@ -0,0 +1,52 @@ +package org.asynchttpclient.websocket; + +import java.io.IOException; +import java.nio.ByteBuffer; + +import org.eclipse.jetty.websocket.api.Session; +import org.eclipse.jetty.websocket.api.WebSocketAdapter; + +public class EchoSocket extends WebSocketAdapter { + + @Override + public void onWebSocketConnect(Session sess) { + super.onWebSocketConnect(sess); + sess.setIdleTimeout(10000); + sess.setMaximumMessageSize(1000); + } + + @Override + public void onWebSocketClose(int statusCode, String reason) { + try { + getSession().close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + super.onWebSocketClose(statusCode, reason); + } + + @Override + public void onWebSocketBinary(byte[] payload, int offset, int len) { + if (isNotConnected()) { + return; + } + try { + getRemote().sendBytes(ByteBuffer.wrap(payload, offset, len)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void onWebSocketText(String message) { + if (isNotConnected()) { + return; + } + try { + getRemote().sendString(message); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java index 33fa8c9b5d..92e08e10a2 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java @@ -13,6 +13,7 @@ package org.asynchttpclient.websocket; +import static org.asynchttpclient.async.util.TestUtils.*; import static org.testng.Assert.assertEquals; import java.io.IOException; @@ -26,10 +27,10 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.handler.HandlerList; -import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.websocket.server.WebSocketHandler; +import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -41,15 +42,8 @@ public void setUpGlobal() throws Exception { port1 = findFreePort(); port2 = findFreePort(); - server = new Server(); - - SelectChannelConnector connector = new SelectChannelConnector(); - connector.setPort(port1); - server.addConnector(connector); - - SelectChannelConnector connector2 = new SelectChannelConnector(); - connector2.setPort(port2); - server.addConnector(connector2); + server = newJettyHttpServer(port1); + addHttpConnector(server, port2); HandlerList list = new HandlerList(); list.addHandler(new AbstractHandler() { @@ -64,19 +58,20 @@ public void handle(String s, Request request, HttpServletRequest httpServletRequ server.setHandler(list); server.start(); - log.info("Local HTTP server started successfully"); + logger.info("Local HTTP server started successfully"); } @Override public WebSocketHandler getWebSocketHandler() { return new WebSocketHandler() { @Override - public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { - return new TextMessageTest.EchoTextWebSocket(); + public void configure(WebSocketServletFactory factory) { + factory.register(EchoSocket.class); } }; } + @Test(timeOut = 60000) public void testRedirectToWSResource() throws Exception { AsyncHttpClient c = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build()); diff --git a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java index 4bce6f8860..a63c0a15eb 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java @@ -12,65 +12,30 @@ */ package org.asynchttpclient.websocket; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.websocket.WebSocket; -import org.asynchttpclient.websocket.WebSocketListener; -import org.asynchttpclient.websocket.WebSocketTextListener; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; -import org.testng.annotations.Test; +import static org.testng.Assert.*; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import org.asynchttpclient.AsyncHttpClient; +import org.eclipse.jetty.websocket.server.WebSocketHandler; +import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; +import org.testng.annotations.Test; public abstract class TextMessageTest extends AbstractBasicTest { - public static final class EchoTextWebSocket implements org.eclipse.jetty.websocket.WebSocket, org.eclipse.jetty.websocket.WebSocket.OnTextMessage { - - private Connection connection; - - @Override - public void onOpen(Connection connection) { - this.connection = connection; - connection.setMaxTextMessageSize(1000); - } - - @Override - public void onClose(int i, String s) { - connection.close(); - } - - @Override - public void onMessage(String s) { - try { - connection.sendMessage(s); - } catch (IOException e) { - try { - connection.sendMessage("FAIL"); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - } - } - @Override public WebSocketHandler getWebSocketHandler() { return new WebSocketHandler() { @Override - public org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(HttpServletRequest httpServletRequest, String s) { - return new EchoTextWebSocket(); + public void configure(WebSocketServletFactory factory) { + factory.register(EchoSocket.class); } }; } @Test(timeOut = 60000) - public void onOpen() throws Throwable { + public void onOpen() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); @@ -103,7 +68,7 @@ public void onError(Throwable t) { } @Test(timeOut = 60000) - public void onEmptyListenerTest() throws Throwable { + public void onEmptyListenerTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { WebSocket websocket = null; @@ -119,7 +84,7 @@ public void onEmptyListenerTest() throws Throwable { } @Test(timeOut = 60000) - public void onFailureTest() throws Throwable { + public void onFailureTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { Throwable t = null; @@ -135,13 +100,13 @@ public void onFailureTest() throws Throwable { } @Test(timeOut = 60000) - public void onTimeoutCloseTest() throws Throwable { + public void onTimeoutCloseTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - /* WebSocket websocket = */c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { @Override public void onOpen(WebSocket websocket) { @@ -168,7 +133,7 @@ public void onError(Throwable t) { } @Test(timeOut = 60000) - public void onClose() throws Throwable { + public void onClose() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); @@ -203,7 +168,7 @@ public void onError(Throwable t) { } @Test(timeOut = 60000) - public void echoText() throws Throwable { + public void echoText() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); @@ -247,7 +212,7 @@ public void onError(Throwable t) { } @Test(timeOut = 60000) - public void echoDoubleListenerText() throws Throwable { + public void echoDoubleListenerText() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); @@ -317,7 +282,7 @@ public void onError(Throwable t) { } @Test - public void echoTwoMessagesTest() throws Throwable { + public void echoTwoMessagesTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(2); @@ -359,7 +324,7 @@ public void onError(Throwable t) { } } - public void echoFragments() throws Throwable { + public void echoFragments() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { final CountDownLatch latch = new CountDownLatch(1); diff --git a/extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java b/extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java index b3c2a900b6..3ee7428450 100644 --- a/extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java +++ b/extras/jdeferred/src/test/java/org/asynchttpclient/extra/AsyncHttpTest.java @@ -15,108 +15,90 @@ */ package org.asynchttpclient.extra; +import static org.testng.Assert.*; + import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.asynchttpclient.extra.AsyncHttpDeferredObject; -import org.asynchttpclient.extra.HttpProgress; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; import org.jdeferred.DoneCallback; import org.jdeferred.ProgressCallback; import org.jdeferred.Promise; import org.jdeferred.impl.DefaultDeferredManager; import org.jdeferred.multiple.MultipleResults; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.Response; - -public class AsyncHttpTest extends TestCase { - protected DefaultDeferredManager deferredManager; - - protected void setUp() throws Exception { - super.setUp(); - deferredManager = new DefaultDeferredManager(); - } - - protected void tearDown() throws Exception { - super.tearDown(); - } - - public void testPromiseAdapter() throws IOException { - final CountDownLatch latch = new CountDownLatch(1); - final AtomicInteger successCount = new AtomicInteger(); - final AtomicInteger progressCount = new AtomicInteger(); - - AsyncHttpClient client = new AsyncHttpClient(); - - Promise p1 = AsyncHttpDeferredObject - .promise(client.prepareGet("http://www.ning.com")); - p1.done(new DoneCallback() { - @Override - public void onDone(Response response) { - try { - Assert.assertEquals(200, response.getStatusCode()); - successCount.incrementAndGet(); - } finally { - latch.countDown(); - } - } - }).progress(new ProgressCallback() { - - @Override - public void onProgress(HttpProgress progress) { - progressCount.incrementAndGet(); - } - }); - - try { - latch.await(); - Assert.assertTrue(progressCount.get() > 0); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - } - - public void testMultiplePromiseAdapter() throws IOException { - final CountDownLatch latch = new CountDownLatch(1); - final AtomicInteger successCount = new AtomicInteger(); - - AsyncHttpClient client = new AsyncHttpClient(); - - Promise p1 = AsyncHttpDeferredObject - .promise(client.prepareGet("http://www.ning.com")); - Promise p2 = AsyncHttpDeferredObject - .promise(client.prepareGet("http://www.google.com")); - AsyncHttpDeferredObject deferredRequest = new AsyncHttpDeferredObject( - client.prepareGet("http://jdeferred.org")); - - deferredManager.when(p1, p2, deferredRequest).then( - new DoneCallback() { - @Override - public void onDone(MultipleResults result) { - try { - Assert.assertEquals(3, result.size()); - Assert.assertEquals(200, ((Response) result.get(0) - .getResult()).getStatusCode()); - Assert.assertEquals(200, ((Response) result.get(1) - .getResult()).getStatusCode()); - Assert.assertEquals(200, ((Response) result.get(2) - .getResult()).getStatusCode()); - successCount.incrementAndGet(); - } finally { - latch.countDown(); - } - } - }); - - try { - latch.await(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - } - +public class AsyncHttpTest { + protected DefaultDeferredManager deferredManager = new DefaultDeferredManager(); + + public void testPromiseAdapter() throws IOException { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicInteger successCount = new AtomicInteger(); + final AtomicInteger progressCount = new AtomicInteger(); + + AsyncHttpClient client = new AsyncHttpClient(); + + try { + Promise p1 = AsyncHttpDeferredObject.promise(client.prepareGet("http://www.ning.com")); + p1.done(new DoneCallback() { + @Override + public void onDone(Response response) { + try { + assertEquals(response.getStatusCode(), 200); + successCount.incrementAndGet(); + } finally { + latch.countDown(); + } + } + }).progress(new ProgressCallback() { + + @Override + public void onProgress(HttpProgress progress) { + progressCount.incrementAndGet(); + } + }); + + latch.await(); + assertTrue(progressCount.get() > 0); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } finally { + client.close(); + } + } + + public void testMultiplePromiseAdapter() throws IOException { + final CountDownLatch latch = new CountDownLatch(1); + final AtomicInteger successCount = new AtomicInteger(); + + AsyncHttpClient client = new AsyncHttpClient(); + + try { + Promise p1 = AsyncHttpDeferredObject.promise(client.prepareGet("http://www.ning.com")); + Promise p2 = AsyncHttpDeferredObject.promise(client.prepareGet("http://www.google.com")); + AsyncHttpDeferredObject deferredRequest = new AsyncHttpDeferredObject(client.prepareGet("http://jdeferred.org")); + + deferredManager.when(p1, p2, deferredRequest).then(new DoneCallback() { + @Override + public void onDone(MultipleResults result) { + try { + assertEquals(result.size(), 3); + assertEquals(Response.class.cast(result.get(0).getResult()).getStatusCode(), 200); + assertEquals(Response.class.cast(result.get(1).getResult()).getStatusCode(), 200); + assertEquals(Response.class.cast(result.get(2).getResult()).getStatusCode(), 200); + successCount.incrementAndGet(); + } finally { + latch.countDown(); + } + } + }); + latch.await(); + + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } finally { + client.close(); + } + } } diff --git a/pom.xml b/pom.xml index f7601bc353..fe94209066 100644 --- a/pom.xml +++ b/pom.xml @@ -214,7 +214,6 @@ - org.apache.maven.plugins maven-resources-plugin 2.4.3 @@ -222,12 +221,9 @@ - org.apache.maven.plugins maven-release-plugin - 2.1 - org.apache.maven.plugins maven-jar-plugin 2.3.1 @@ -239,7 +235,6 @@ - org.apache.maven.plugins maven-source-plugin 2.1.2 @@ -253,12 +248,10 @@ - org.apache.maven.plugins maven-site-plugin 3.0 - org.apache.maven.plugins maven-javadoc-plugin 2.8.1 @@ -280,34 +273,11 @@ - - - org.apache.maven.plugins maven-javadoc-plugin 2.8.1 @@ -344,7 +314,6 @@ - org.apache.maven.plugins maven-surefire-report-plugin ${surefire.version} @@ -362,7 +331,6 @@ - org.apache.maven.plugins maven-gpg-plugin @@ -382,7 +350,6 @@ - org.apache.maven.plugins maven-surefire-plugin standalone @@ -399,7 +366,6 @@ - org.apache.maven.plugins maven-surefire-plugin standalone, online @@ -466,34 +432,54 @@ testng ${testng.version} test + + + junit + junit + + + org.beanshell + bsh + + + org.yaml + snakeyaml + + org.eclipse.jetty - jetty-server + jetty-servlet ${jetty.version} test org.eclipse.jetty - jetty-servlet + jetty-servlets ${jetty.version} test org.eclipse.jetty - jetty-websocket + jetty-security ${jetty.version} test org.eclipse.jetty - jetty-servlets + jetty-proxy ${jetty.version} test - org.eclipse.jetty - jetty-security + org.eclipse.jetty.websocket + websocket-server + ${jetty.version} + test + + + org.eclipse.jetty.websocket + websocket-servlet ${jetty.version} test @@ -536,8 +522,8 @@ 2.16 1.0.13 1.2.17 - 6.8.5 - 8.1.12.v20130726 + 6.8.7 + 9.0.5.v20130815 6.0.29 2.4 1.3 diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java index e393235e03..a20c34b49f 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -28,20 +28,13 @@ public class GrizzlyAsyncProviderBasicTest extends AsyncProvidersBasicTest { - @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } @Override - @Test - public void asyncHeaderPOSTTest() throws Throwable { - super.asyncHeaderPOSTTest(); //To change body of overridden methods use File | Settings | File Templates. - } - - @Override - protected AsyncHttpProviderConfig getProviderConfig() { + protected AsyncHttpProviderConfig getProviderConfig() { final GrizzlyAsyncHttpProviderConfig config = new GrizzlyAsyncHttpProviderConfig(); config.addProperty(TRANSPORT_CUSTOMIZER, new TransportCustomizer() { @Override @@ -53,7 +46,7 @@ public void customize(TCPNIOTransport transport, FilterChainBuilder builder) { return config; } - @Test(groups = {"standalone", "default_provider", "async"}, enabled = false) - public void asyncDoPostBasicGZIPTest() throws Throwable { + @Test(groups = { "standalone", "default_provider", "async" }, enabled = false) + public void asyncDoPostBasicGZIPTest() throws Exception { } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java index f7551168fd..c7d077308f 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java @@ -16,6 +16,7 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.BasicAuthTest; +import org.testng.annotations.Test; public class GrizzlyBasicAuthTest extends BasicAuthTest { @@ -26,6 +27,18 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { @Override public String getProviderClass() { - return GrizzlyAsyncHttpProvider.class.getName(); + return GrizzlyAsyncHttpProvider.class.getName(); + } + + @Test(groups = { "standalone", "default_provider" }, enabled = false) + @Override + public void basicAuthFileTest() throws Exception { + // FIXME + } + + @Test(groups = { "standalone", "default_provider" }, enabled = false) + @Override + public void basicAuthFileNoKeepAliveTest() throws Exception { + // FIXME } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java index 3d43f261bc..a5eecc63da 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyByteBufferCapacityTest.java @@ -26,6 +26,6 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } @Test(groups = {"standalone", "default_provider"}, enabled=false) - public void basicByteBufferTest() throws Throwable { + public void basicByteBufferTest() throws Exception { } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java index 5ed9e95bb2..18e781c0c8 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyConnectionPoolTest.java @@ -144,7 +144,7 @@ public void destroy() { @Override @Test - public void multipleMaxConnectionOpenTest() throws Throwable { + public void multipleMaxConnectionOpenTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setAllowPoolingConnection(true).setConnectionTimeoutInMs(5000).setMaximumConnectionsTotal(1).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java index 34f049e4e0..d56f5f3cc9 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyPerRequestTimeoutTest.java @@ -23,7 +23,7 @@ public class GrizzlyPerRequestTimeoutTest extends PerRequestTimeoutTest { @Override protected void checkTimeoutMessage(String message) { - assertEquals("Timeout exceeded", message); + assertEquals(message, "Timeout exceeded"); } @Override diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java index c68810799f..b9fbc218a7 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyRedirectConnectionUsageTest.java @@ -15,15 +15,7 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.RedirectConnectionUsageTest; -import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig; -import org.asynchttpclient.providers.grizzly.TransportCustomizer; -import org.glassfish.grizzly.filterchain.FilterChainBuilder; -import org.glassfish.grizzly.nio.transport.TCPNIOTransport; -import org.glassfish.grizzly.strategies.SameThreadIOStrategy; - -import static org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProviderConfig.Property.TRANSPORT_CUSTOMIZER; public class GrizzlyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @@ -31,19 +23,4 @@ public class GrizzlyRedirectConnectionUsageTest extends RedirectConnectionUsageT public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } - - @Override - protected AsyncHttpProviderConfig getProviderConfig() { - final GrizzlyAsyncHttpProviderConfig config = new GrizzlyAsyncHttpProviderConfig(); - config.addProperty(TRANSPORT_CUSTOMIZER, new TransportCustomizer() { - @Override - public void customize(TCPNIOTransport transport, FilterChainBuilder builder) { - if (System.getProperty("blockingio") != null) { - transport.configureBlocking(true); - } - transport.setIOStrategy(SameThreadIOStrategy.getInstance()); - } - }); - return config; - } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java index 3698d8e187..e5dcdd07ab 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyUnexpectingTimeoutTest.java @@ -13,6 +13,18 @@ package org.asynchttpclient.providers.grizzly; +import static org.testng.Assert.*; + +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -24,20 +36,6 @@ import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertNull; -import static org.testng.Assert.fail; - public class GrizzlyUnexpectingTimeoutTest extends AbstractBasicTest { private static final String MSG = "Unauthorized without WWW-Authenticate header"; @@ -67,7 +65,7 @@ public void run() { response.getOutputStream().print(MSG); response.getOutputStream().flush(); } catch (IOException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } } }).start(); @@ -113,7 +111,7 @@ public void onThrowable(Throwable t) { fail("Interrupted.", e); } // the result should be either onCompleted or onThrowable. - assertEquals(1, counts.get(), "result should be one"); + assertEquals(counts.get(), 1, "result should be one"); } finally { client.close(); } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java index 516e499287..7a809b1d71 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyByteMessageTest.java @@ -15,7 +15,6 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; -import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.ByteMessageTest; import org.testng.annotations.Test; diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java index 9844fb439f..7ff2884f72 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyCloseCodeReasonMsgTest.java @@ -17,7 +17,6 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; -import org.testng.annotations.Test; public class GrizzlyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { @@ -25,10 +24,4 @@ public class GrizzlyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } - - @Override - @Test - public void onCloseWithCode() throws Throwable { - super.onCloseWithCode(); //To change body of overridden methods use File | Settings | File Templates. - } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java index cf7db9228f..c89bb0b0fb 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/websocket/GrizzlyTextMessageTest.java @@ -14,21 +14,12 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; -import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.providers.grizzly.GrizzlyProviderUtil; import org.asynchttpclient.websocket.ByteMessageTest; -import org.testng.annotations.Test; public class GrizzlyTextMessageTest extends ByteMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return GrizzlyProviderUtil.grizzlyProvider(config); } - - @Test(timeOut = 60000) - @Override - public void echoFragments() throws Exception { - super.echoFragments(); //To change body of overridden methods use File | Settings | File Templates. - } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index f5b6879d10..e6f97d738d 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -769,6 +769,7 @@ else if (uri.getRawQuery() != null) nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes)); } else if (request.getStreamData() != null) { int[] lengthWrapper = new int[1]; + // FIXME should be streaming instead! byte[] bytes = AsyncHttpProviderUtils.readFully(request.getStreamData(), lengthWrapper); int length = lengthWrapper[0]; nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java index 860764a4c6..38c08df1a3 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java @@ -128,6 +128,12 @@ public void close() { public void close(int statusCode, String reason) { onClose(statusCode, reason); listeners.clear(); + try { + channel.write(new CloseWebSocketFrame(statusCode, reason)); + channel.getCloseFuture().awaitUninterruptibly(); + } finally { + channel.close(); + } } protected void onBinaryFragment(byte[] message, boolean last) { diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java index 54262deaad..c55b13996c 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java @@ -26,8 +26,13 @@ public class NettyAsyncHttpProviderTest extends AbstractBasicTest { + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + @Test - public void bossThreadPoolExecutor() throws Throwable { + public void bossThreadPoolExecutor() throws Exception { NettyAsyncHttpProviderConfig conf = new NettyAsyncHttpProviderConfig(); conf.setBossExecutorService(Executors.newSingleThreadExecutor()); @@ -40,9 +45,4 @@ public void bossThreadPoolExecutor() throws Throwable { c.close(); } } - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java index a8902eb655..87c313345d 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java @@ -13,28 +13,25 @@ package org.asynchttpclient.providers.netty; -import static org.testng.Assert.assertEquals; +import static org.testng.Assert.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.asynchttpclient.providers.netty.NettyAsyncHttpProvider; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.async.AbstractBasicTest; import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelPipelineFactory; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelHandler; import org.jboss.netty.handler.codec.http.HttpMessage; -import org.testng.Assert; import org.testng.annotations.Test; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.async.AbstractBasicTest; - public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { @Override @@ -43,7 +40,7 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } @Test(groups = { "standalone", "netty_provider" }) - public void asyncPipelineTest() throws Throwable { + public void asyncPipelineTest() throws Exception { AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build()); try { final CountDownLatch l = new CountDownLatch(1); @@ -61,7 +58,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { p.close(); diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java index d824606453..2e0a4091fc 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java @@ -29,4 +29,9 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { public String getProviderClass() { return NettyAsyncHttpProvider.class.getName(); } + + @Test(enabled = false) + public void stringBuilderBodyConsumerTest() throws Exception { + // FIXME + } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java index fdbfb52d13..4989481508 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java @@ -15,10 +15,12 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.MultipartUploadTest; +import org.testng.annotations.Test; /** * @author dominict */ +@Test public class NettyMultipartUploadTest extends MultipartUploadTest { @Override diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java index e376f9a414..cd62bb347e 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRedirectConnectionUsageTest.java @@ -14,22 +14,11 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.RedirectConnectionUsageTest; -import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - - @Override - protected AsyncHttpProviderConfig getProviderConfig() { - final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); - if (System.getProperty("blockingio") != null) { - config.setUseBlockingIO(true); - } - return config; - } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java index f0685b4561..6ca05960ab 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -66,9 +66,9 @@ public void run() { response.getOutputStream().flush(); continuation.complete(); } catch (InterruptedException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } catch (IOException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } } }).start(); diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java index 2cf3b30b15..6169dc0fe3 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java @@ -12,7 +12,8 @@ */ package org.asynchttpclient.providers.netty; -import static org.testng.Assert.assertTrue; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; import java.io.IOException; import java.util.ArrayList; @@ -27,8 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import junit.framework.Assert; - import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ListenableFuture; @@ -36,9 +35,6 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.testng.annotations.BeforeClass; @@ -54,20 +50,11 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - listener.setHost("localhost"); - listener.setPort(port1); - - server.addConnector(listener); - + server = newJettyHttpServer(port1); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); context.addServlet(new ServletHolder(new MockExceptionServlet()), "/*"); - server.setHandler(context); server.start(); } @@ -77,12 +64,12 @@ protected String getTargetUrl() { } private ListenableFuture testMethodRequest(AsyncHttpClient client, int requests, String action, String id) throws IOException { - Request r = new RequestBuilder("GET")/**/ - .setUrl(getTargetUrl())/**/ - .addQueryParameter(action, "1")/**/ - .addQueryParameter("maxRequests", "" + requests)/**/ - .addQueryParameter("id", id)/**/ - .build(); + Request r = new RequestBuilder("GET")// + .setUrl(getTargetUrl())// + .addQueryParameter(action, "1")// + .addQueryParameter("maxRequests", "" + requests)// + .addQueryParameter("id", id)// + .build(); return client.executeRequest(r); } @@ -96,12 +83,12 @@ private ListenableFuture testMethodRequest(AsyncHttpClient client, int @Test public void testRetryNonBlocking() throws IOException, InterruptedException, ExecutionException { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ - .setAllowPoolingConnection(true)/**/ - .setMaximumConnectionsTotal(100)/**/ - .setConnectionTimeoutInMs(60000)/**/ - .setRequestTimeoutInMs(30000)/**/ - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsTotal(100)// + .setConnectionTimeoutInMs(60000)// + .setRequestTimeoutInMs(30000)// + .build(); AsyncHttpClient client = getAsyncHttpClient(config); try { @@ -113,7 +100,7 @@ public void testRetryNonBlocking() throws IOException, InterruptedException, Exe StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - Assert.assertEquals(200, theres.getStatusCode()); + assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -132,13 +119,13 @@ public void testRetryNonBlocking() throws IOException, InterruptedException, Exe @Test public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, ExecutionException { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ - .setAllowPoolingConnection(true)/**/ - .setMaximumConnectionsTotal(100)/**/ - .setConnectionTimeoutInMs(60000)/**/ - .setRequestTimeoutInMs(30000)/**/ - .setAsyncConnectMode(true) /**/ - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsTotal(100)// + .setConnectionTimeoutInMs(60000)// + .setRequestTimeoutInMs(30000)// + .setAsyncConnectMode(true) // + .build(); AsyncHttpClient client = getAsyncHttpClient(config); @@ -151,7 +138,7 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - Assert.assertEquals(200, theres.getStatusCode()); + assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -173,13 +160,13 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); nettyConfig.setUseBlockingIO(true); - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ - .setAllowPoolingConnection(true)/**/ - .setMaximumConnectionsTotal(100)/**/ - .setConnectionTimeoutInMs(60000)/**/ - .setRequestTimeoutInMs(30000)/**/ - .setAsyncHttpClientProviderConfig(nettyConfig)/**/ - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsTotal(100)// + .setConnectionTimeoutInMs(60000)// + .setRequestTimeoutInMs(30000)// + .setAsyncHttpClientProviderConfig(nettyConfig)// + .build(); AsyncHttpClient client = getAsyncHttpClient(config); @@ -192,7 +179,7 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - Assert.assertEquals(200, theres.getStatusCode()); + assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -201,8 +188,7 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut assertTrue(heads.size() > 0); } - System.out.println(b.toString()); - System.out.flush(); + logger.debug(b.toString()); } finally { client.close(); diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index 2dc624466b..deec16902c 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -24,5 +24,4 @@ public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java index c1286255ad..cb35f53be2 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java @@ -16,7 +16,9 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.TextMessageTest; +import org.testng.annotations.Test; +@Test public class NettyTextMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java index b3f5cf2d86..b6ee69b065 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java @@ -188,7 +188,7 @@ public void configure(final NettyChannelHandler httpProcessor) { @Override protected void initChannel(Channel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline()/**/ + ChannelPipeline pipeline = ch.pipeline()// .addLast(HTTP_HANDLER, newHttpClientCodec()); if (config.getRequestCompressionLevel() > 0) { @@ -198,7 +198,7 @@ protected void initChannel(Channel ch) throws Exception { if (config.isCompressionEnabled()) { pipeline.addLast(INFLATER_HANDLER, new HttpContentDecompressor()); } - pipeline.addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler())/**/ + pipeline.addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler())// .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getHttpAdditionalChannelInitializer() != null) { @@ -210,9 +210,9 @@ protected void initChannel(Channel ch) throws Exception { ChannelInitializer webSocketChannelInitializer = new ChannelInitializer() { @Override protected void initChannel(Channel ch) throws Exception { - ch.pipeline()/**/ - .addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())/**/ - .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())/**/ + ch.pipeline()// + .addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())// + .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())// .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getWsAdditionalChannelInitializer() != null) { @@ -266,7 +266,7 @@ protected void initChannel(Channel ch) throws Exception { if (config.isCompressionEnabled()) { pipeline.addLast(INFLATER_HANDLER, new HttpContentDecompressor()); } - pipeline.addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler())/**/ + pipeline.addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler())// .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getHttpsAdditionalChannelInitializer() != null) { @@ -288,8 +288,8 @@ protected void initChannel(Channel ch) throws Exception { abort(future, ex); } - pipeline.addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())/**/ - .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())/**/ + pipeline.addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())// + .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())// .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getWssAdditionalChannelInitializer() != null) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java index 95a3b5a834..484a8b694b 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java @@ -789,42 +789,35 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object } else if (e instanceof WebSocketFrame) { - invokeOnSucces(ctx, h); - final WebSocketFrame frame = (WebSocketFrame) e; + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + invokeOnSucces(ctx, h); - if (frame instanceof TextWebSocketFrame) { - pendingOpcode = OPCODE_TEXT; - } else if (frame instanceof BinaryWebSocketFrame) { - pendingOpcode = OPCODE_BINARY; - } - - if (frame.content() != null && frame.content().readableBytes() > 0) { - ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), frame.content(), frame.isFinalFragment()); - h.onBodyPartReceived(rp); - - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - - if (webSocket != null) { - if (pendingOpcode == OPCODE_BINARY) { - webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); - } else { - webSocket.onTextFragment(frame.content().toString(Constants.UTF8), frame.isFinalFragment()); + if (webSocket != null) { + if (frame instanceof CloseWebSocketFrame) { + Channels.setDefaultAttribute(ctx, DiscardEvent.INSTANCE); + CloseWebSocketFrame closeFrame = CloseWebSocketFrame.class.cast(frame); + webSocket.onClose(closeFrame.statusCode(), closeFrame.reasonText()); + } else { + if (frame instanceof TextWebSocketFrame) { + pendingOpcode = OPCODE_TEXT; + } else if (frame instanceof BinaryWebSocketFrame) { + pendingOpcode = OPCODE_BINARY; } - if (frame instanceof CloseWebSocketFrame) { - try { - Channels.setDefaultAttribute(ctx, DiscardEvent.INSTANCE); - webSocket.onClose(CloseWebSocketFrame.class.cast(frame).statusCode(), CloseWebSocketFrame.class.cast(frame).reasonText()); - } catch (Throwable t) { - // Swallow any exception that may comes from a - // Netty version released before 3.4.0 - LOGGER.trace("", t); + if (frame.content() != null && frame.content().readableBytes() > 0) { + ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), frame.content(), frame.isFinalFragment()); + h.onBodyPartReceived(rp); + + if (pendingOpcode == OPCODE_BINARY) { + webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); + } else { + webSocket.onTextFragment(frame.content().toString(Constants.UTF8), frame.isFinalFragment()); } } - } else { - LOGGER.debug("UpgradeHandler returned a null NettyWebSocket "); } + } else { + LOGGER.debug("UpgradeHandler returned a null NettyWebSocket "); } } else if (e instanceof LastHttpContent) { // FIXME what to do with this kind of messages? diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java index c935ee0e8d..f4a4a8dd76 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java @@ -117,7 +117,7 @@ public void close() { onClose(); listeners.clear(); try { - channel.write(new CloseWebSocketFrame()); + channel.writeAndFlush(new CloseWebSocketFrame()); channel.closeFuture().awaitUninterruptibly(); } finally { channel.close(); @@ -128,6 +128,12 @@ public void close() { public void close(int statusCode, String reason) { onClose(statusCode, reason); listeners.clear(); + try { + channel.writeAndFlush(new CloseWebSocketFrame()); + channel.closeFuture().awaitUninterruptibly(); + } finally { + channel.close(); + } } protected void onBinaryFragment(byte[] message, boolean last) { diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java index 7e4fa7d82b..177e28611a 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java @@ -12,31 +12,12 @@ */ package org.asynchttpclient.providers.netty4; -import static org.testng.Assert.assertEquals; - -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig; -import org.testng.annotations.Test; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; public class NettyAsyncHttpProviderTest extends AbstractBasicTest { - @Test - public void bossThreadPoolExecutor() throws Throwable { - NettyAsyncHttpProviderConfig conf = new NettyAsyncHttpProviderConfig(); - - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setAsyncHttpClientProviderConfig(conf).build(); - AsyncHttpClient c = getAsyncHttpClient(cf); - try { - Response r = c.prepareGet(getTargetUrl()).execute().get(); - assertEquals(r.getStatusCode(), 200); - } finally { - c.close(); - } - } - @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java index 64aba79512..c670f5dfa6 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java @@ -13,7 +13,7 @@ package org.asynchttpclient.providers.netty4; -import static org.testng.Assert.assertEquals; +import static org.testng.Assert.*; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; @@ -29,7 +29,6 @@ import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig.AdditionalChannelInitializer; -import org.testng.Assert; import org.testng.annotations.Test; public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { @@ -40,7 +39,7 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } @Test(groups = { "standalone", "netty_provider" }) - public void asyncPipelineTest() throws Throwable { + public void asyncPipelineTest() throws Exception { NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); nettyConfig.setHttpAdditionalChannelInitializer(new AdditionalChannelInitializer() { @@ -67,7 +66,7 @@ public Response onCompleted(Response response) throws Exception { } }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - Assert.fail("Timeout out"); + fail("Timeout out"); } } finally { p.close(); diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java index 7bf3ce2737..d49325760f 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java @@ -15,12 +15,13 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.AuthTimeoutTest; +import org.testng.annotations.Test; +@Test public class NettyAuthTimeoutTest extends AuthTimeoutTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java index e0e99cff6a..91d782bd20 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java @@ -14,7 +14,6 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.RedirectConnectionUsageTest; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @@ -22,13 +21,4 @@ public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTes public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - - @Override - protected AsyncHttpProviderConfig getProviderConfig() { - final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); - if (System.getProperty("blockingio") != null) { - config.setUseBlockingIO(true); - } - return config; - } } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java index 96b1288664..766a8f1d97 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java @@ -65,9 +65,9 @@ public void run() { response.getOutputStream().flush(); continuation.complete(); } catch (InterruptedException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } catch (IOException e) { - log.error(e.getMessage(), e); + logger.error(e.getMessage(), e); } } }).start(); diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java index b964da6f38..d1b2dc45ed 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java @@ -12,7 +12,8 @@ */ package org.asynchttpclient.providers.netty4; -import static org.testng.Assert.assertTrue; +import static org.asynchttpclient.async.util.TestUtils.*; +import static org.testng.Assert.*; import java.io.IOException; import java.util.ArrayList; @@ -27,8 +28,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import junit.framework.Assert; - import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ListenableFuture; @@ -36,9 +35,6 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.testng.annotations.BeforeClass; @@ -54,15 +50,8 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { @BeforeClass(alwaysRun = true) public void setUpGlobal() throws Exception { - server = new Server(); - port1 = findFreePort(); - - Connector listener = new SelectChannelConnector(); - listener.setHost("localhost"); - listener.setPort(port1); - - server.addConnector(listener); + server = newJettyHttpServer(port1); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); @@ -77,12 +66,12 @@ protected String getTargetUrl() { } private ListenableFuture testMethodRequest(AsyncHttpClient client, int requests, String action, String id) throws IOException { - Request r = new RequestBuilder("GET")/**/ - .setUrl(getTargetUrl())/**/ - .addQueryParameter(action, "1")/**/ - .addQueryParameter("maxRequests", "" + requests)/**/ - .addQueryParameter("id", id)/**/ - .build(); + Request r = new RequestBuilder("GET")// + .setUrl(getTargetUrl())// + .addQueryParameter(action, "1")// + .addQueryParameter("maxRequests", "" + requests)// + .addQueryParameter("id", id)// + .build(); return client.executeRequest(r); } @@ -96,12 +85,12 @@ private ListenableFuture testMethodRequest(AsyncHttpClient client, int @Test public void testRetryNonBlocking() throws IOException, InterruptedException, ExecutionException { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ - .setAllowPoolingConnection(true)/**/ - .setMaximumConnectionsTotal(100)/**/ - .setConnectionTimeoutInMs(60000)/**/ - .setRequestTimeoutInMs(30000)/**/ - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsTotal(100)// + .setConnectionTimeoutInMs(60000)// + .setRequestTimeoutInMs(30000)// + .build(); AsyncHttpClient client = getAsyncHttpClient(config); try { @@ -113,7 +102,7 @@ public void testRetryNonBlocking() throws IOException, InterruptedException, Exe StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - Assert.assertEquals(200, theres.getStatusCode()); + assertEquals(200, theres.getStatusCode()); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -132,13 +121,13 @@ public void testRetryNonBlocking() throws IOException, InterruptedException, Exe @Test public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, ExecutionException { - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ - .setAllowPoolingConnection(true)/**/ - .setMaximumConnectionsTotal(100)/**/ - .setConnectionTimeoutInMs(60000)/**/ - .setRequestTimeoutInMs(30000)/**/ - .setAsyncConnectMode(true) /**/ - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsTotal(100)// + .setConnectionTimeoutInMs(60000)// + .setRequestTimeoutInMs(30000)// + .setAsyncConnectMode(true) // + .build(); AsyncHttpClient client = getAsyncHttpClient(config); @@ -151,7 +140,7 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - Assert.assertEquals(200, theres.getStatusCode()); + assertEquals(theres.getStatusCode(), 200); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -173,13 +162,13 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); nettyConfig.setUseBlockingIO(true); - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()/**/ - .setAllowPoolingConnection(true)/**/ - .setMaximumConnectionsTotal(100)/**/ - .setConnectionTimeoutInMs(60000)/**/ - .setRequestTimeoutInMs(30000)/**/ - .setAsyncHttpClientProviderConfig(nettyConfig)/**/ - .build(); + AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// + .setAllowPoolingConnection(true)// + .setMaximumConnectionsTotal(100)// + .setConnectionTimeoutInMs(60000)// + .setRequestTimeoutInMs(30000)// + .setAsyncHttpClientProviderConfig(nettyConfig)// + .build(); AsyncHttpClient client = getAsyncHttpClient(config); @@ -192,7 +181,7 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - Assert.assertEquals(200, theres.getStatusCode()); + assertEquals(theres.getStatusCode(), 200); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java index 169b3189d6..f44962885b 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java @@ -24,5 +24,4 @@ public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java index 216083bf83..a5e9d8cec7 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java +++ b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java @@ -23,5 +23,4 @@ public class NettyRedirectTest extends RedirectTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/pom.xml b/providers/pom.xml index 1d46aa0a76..9a7178b576 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -46,7 +46,7 @@ grizzly netty - + netty4 From 6cfd1b5653dd7af751fa37e6f9039f7edd856968 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 18 Sep 2013 14:45:31 +0200 Subject: [PATCH 0562/2844] In case catch Throwable didn't catch everything? --- .../providers/netty/NettyResponseFuture.java | 17 ++++++++--------- .../providers/netty4/NettyResponseFuture.java | 10 ++++------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java index dab12365f2..a5e75f4c32 100755 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java @@ -245,10 +245,9 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, asyncHandler.onThrowable(te); } catch (Throwable t) { logger.debug("asyncHandler.onThrowable", t); - } finally { - cancelReaper(); - throw new ExecutionException(te); } + cancelReaper(); + throw new ExecutionException(te); } } isDone.set(true); @@ -279,10 +278,9 @@ V getContent() throws ExecutionException { asyncHandler.onThrowable(ex); } catch (Throwable t) { logger.debug("asyncHandler.onThrowable", t); - } finally { - cancelReaper(); - throw new RuntimeException(ex); } + cancelReaper(); + throw new RuntimeException(ex); } } content.compareAndSet(null, update); @@ -303,8 +301,8 @@ public final void done() { } catch (ExecutionException t) { return; } catch (RuntimeException t) { - Throwable exception = t.getCause() != null ? t.getCause() : t; - exEx.compareAndSet(null, new ExecutionException(exception)); + Throwable exception = t.getCause() != null ? t.getCause() : t; + exEx.compareAndSet(null, new ExecutionException(exception)); } finally { latch.countDown(); @@ -471,7 +469,8 @@ public void setRequest(Request request) { } /** - * Return true if the {@link Future} cannot be recovered. There is some scenario where a connection can be closed by an unexpected IOException, and in some situation we can recover from that exception. + * Return true if the {@link Future} cannot be recovered. There is some scenario where a connection can be closed by an unexpected IOException, and in some situation we can + * recover from that exception. * * @return true if that {@link Future} cannot be recovered. */ diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java index f428295a3c..65fa6c714d 100755 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java +++ b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java @@ -230,10 +230,9 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, asyncHandler.onThrowable(te); } catch (Throwable t) { logger.debug("asyncHandler.onThrowable", t); - } finally { - cancelReaper(); - throw new ExecutionException(te); } + cancelReaper(); + throw new ExecutionException(te); } } isDone.set(true); @@ -264,10 +263,9 @@ public V getContent() throws ExecutionException { asyncHandler.onThrowable(ex); } catch (Throwable t) { logger.debug("asyncHandler.onThrowable", t); - } finally { - cancelReaper(); - throw new RuntimeException(ex); } + cancelReaper(); + throw new RuntimeException(ex); } } content.compareAndSet(null, update); From 7aa3e31016bc5cec46e5cbf6fb28004151aa53e5 Mon Sep 17 00:00:00 2001 From: oleksiys Date: Thu, 19 Sep 2013 11:50:14 -0700 Subject: [PATCH 0563/2844] + recycle HttpRequestPacket/HttpResponsePacket in the AsyncHttpClientFilter, when we're sure nobody will try to touch them :) --- .../providers/grizzly/EventHandler.java | 55 +++++++------------ .../filters/AsyncHttpClientFilter.java | 30 +++++++++- 2 files changed, 49 insertions(+), 36 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index 173c34e6c7..6ead4bbe5b 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -375,49 +375,34 @@ public boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) final HttpResponsePacket response = (HttpResponsePacket) httpHeader; final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); - try { - if (context.isEstablishingTunnel() - && HttpStatus.OK_200.statusMatches(response.getStatus())) { - context.setEstablishingTunnel(false); - final Connection c = ctx.getConnection(); - context.tunnelEstablished(c); - context.getProvider().execute(c, - context.getRequest(), - context.getHandler(), - context.getFuture()); - } else { - cleanup(ctx); - final AsyncHandler handler = context.getHandler(); - if (handler != null) { - try { - context.result(handler.onCompleted()); - } catch (Exception e) { - context.abort(e); - } - } else { - context.done(); + if (context.isEstablishingTunnel() + && HttpStatus.OK_200.statusMatches(response.getStatus())) { + context.setEstablishingTunnel(false); + final Connection c = ctx.getConnection(); + context.tunnelEstablished(c); + context.getProvider().execute(c, + context.getRequest(), + context.getHandler(), + context.getFuture()); + } else { + cleanup(ctx); + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + try { + context.result(handler.onCompleted()); + } catch (Exception e) { + context.abort(e); } + } else { + context.done(); } - return false; - } finally { - recycleRequestResponsePackets(ctx.getConnection(), response); } - + return false; } // ----------------------------------------------------- Private Methods - private static void recycleRequestResponsePackets(final Connection c, - final HttpResponsePacket response) { - if (!Utils.isSpdyConnection(c)) { - HttpRequestPacket request = response.getRequest(); - request.setExpectContent(false); - response.recycle(); - request.recycle(); - } - } - private static void processKeepAlive(final Connection c, final HttpHeader header) { final ProcessingState state = header.getProcessingState(); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index ce9078d5ea..2a28405f85 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -63,6 +63,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpResponsePacket; import static org.asynchttpclient.providers.grizzly.filters.SwitchingSSLFilter.getHandshakeError; import static org.asynchttpclient.util.AsyncHttpProviderUtils.getAuthority; @@ -101,6 +104,22 @@ public AsyncHttpClientFilter(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider, // --------------------------------------------- Methods from BaseFilter + @Override + public NextAction handleRead(final FilterChainContext ctx) + throws IOException { + final HttpContent httpContent = ctx.getMessage(); + if (httpContent.isLast()) { + // Perform the cleanup logic if it's the last chunk of the payload + final HttpResponsePacket response = + (HttpResponsePacket) httpContent.getHttpHeader(); + + recycleRequestResponsePackets(ctx.getConnection(), response); + return ctx.getStopAction(); + } + + return ctx.getInvokeAction(); + } + @Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { @@ -174,7 +193,16 @@ public Object onCompleted(Response response) throws Exception { // ----------------------------------------------------- Private Methods - + private static void recycleRequestResponsePackets(final Connection c, + final HttpResponsePacket response) { + if (!Utils.isSpdyConnection(c)) { + HttpRequestPacket request = response.getRequest(); + request.setExpectContent(false); + response.recycle(); + request.recycle(); + } + } + private boolean sendAsGrizzlyRequest(final Request request, final FilterChainContext ctx) throws IOException { From c74191eadad9a3fbe155bb41ce809091f93466f1 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 19 Sep 2013 14:17:16 -0700 Subject: [PATCH 0564/2844] Port Grizzly FeedableBodyGenerator changes from 1.7 to master. --- .../grizzly/FeedableBodyGenerator.java | 648 +++++++++++++++--- 1 file changed, 543 insertions(+), 105 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index 778aa8b8c9..b475ddaadc 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -14,24 +14,29 @@ import java.io.IOException; import java.nio.ByteBuffer; -import java.util.Queue; -import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ExecutionException; -import java.util.concurrent.atomic.AtomicInteger; import org.asynchttpclient.Body; import org.asynchttpclient.BodyGenerator; import org.glassfish.grizzly.Buffer; +import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.WriteHandler; +import org.glassfish.grizzly.WriteResult; +import org.glassfish.grizzly.filterchain.FilterChain; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.http.HttpRequestPacket; import org.glassfish.grizzly.impl.FutureImpl; +import org.glassfish.grizzly.nio.NIOConnection; +import org.glassfish.grizzly.nio.SelectorRunner; +import org.glassfish.grizzly.ssl.SSLBaseFilter; +import org.glassfish.grizzly.ssl.SSLFilter; import org.glassfish.grizzly.utils.Futures; import static java.lang.Boolean.TRUE; import static java.util.concurrent.TimeUnit.MILLISECONDS; +import static org.glassfish.grizzly.ssl.SSLUtils.getSSLEngine; import static org.glassfish.grizzly.utils.Exceptions.*; /** @@ -43,20 +48,37 @@ * @since 1.7.0 */ public class FeedableBodyGenerator implements BodyGenerator { - private final Queue queue = new ConcurrentLinkedQueue(); - private final AtomicInteger queueSize = new AtomicInteger(); - + /** + * There is no limit on bytes waiting to be written. This configuration + * value should be used with caution as it could lead to out-of-memory + * conditions. + */ + @SuppressWarnings("UnusedDeclaration") + public static final int UNBOUND = -1; + + /** + * Defer to whatever the connection has been configured for max pending bytes. + */ + public static final int DEFAULT = -2; + private volatile HttpRequestPacket requestPacket; private volatile FilterChainContext context; private volatile HttpContent.Builder contentBuilder; private final EmptyBody EMPTY_BODY = new EmptyBody(); + private Feeder feeder; + private int origMaxPendingBytes; + private int configuredMaxPendingBytes = DEFAULT; + private boolean asyncTransferInitiated; // ---------------------------------------------- Methods from BodyGenerator + /** + * {@inheritDoc} + */ @Override public Body createBody() throws IOException { return EMPTY_BODY; @@ -67,120 +89,150 @@ public Body createBody() throws IOException { /** - * Feeds the specified buffer. This buffer may be queued to be sent later - * or sent immediately. Note that this method may block if data is being - * fed faster than it is being consumed by the peer. - * - * The maximum duration that this method may block is dependent on - * the current value of {@link org.glassfish.grizzly.Transport#getWriteTimeout(java.util.concurrent.TimeUnit)}. - * This value can be customized by using a {@link TransportCustomizer} to - * fine-tune the transport used by the client instance. + * Configured the maximum number of bytes that may be pending to be written + * to the wire. If not explicitly configured, the connection's current + * configuration will be used instead. + *

+ * Once all data has been fed, the connection's max pending bytes configuration + * will be restored to its original value. * - * @param buffer the {@link Buffer} to feed. - * @param last flag indicating if this is the final buffer of the message. - * @throws IOException if an I/O error occurs. - * - * @see TransportCustomizer - * @see GrizzlyAsyncHttpProviderConfig#addProperty(GrizzlyAsyncHttpProviderConfig.Property, Object) - * @see GrizzlyAsyncHttpProviderConfig.Property#TRANSPORT_CUSTOMIZER + * @param maxPendingBytes maximum number of bytes that may be queued to + * be written to the wire. + * @throws IllegalStateException if called after {@link #initializeAsynchronousTransfer(FilterChainContext, HttpRequestPacket)} + * has been called by the {@link GrizzlyAsyncHttpProvider}. + * @throws IllegalArgumentException if maxPendingBytes is less than zero and is + * not {@link #UNBOUND} or {@link #DEFAULT}. */ @SuppressWarnings("UnusedDeclaration") - public void feed(final Buffer buffer, final boolean last) - throws IOException { - queue.offer(new BodyPart(buffer, last)); - queueSize.incrementAndGet(); - - if (context != null) { - flushQueue(true); + public synchronized void setMaxPendingBytes(final int maxPendingBytes) { + if (maxPendingBytes < DEFAULT) { + throw new IllegalArgumentException( + "Invalid maxPendingBytes value: " + maxPendingBytes); + } + if (asyncTransferInitiated) { + throw new IllegalStateException( + "Unable to set max pending bytes after async data transfer has been initiated."); } + configuredMaxPendingBytes = maxPendingBytes; } - public void initializeAsynchronousTransfer(final FilterChainContext context, - final HttpRequestPacket requestPacket) - throws IOException { - this.context = context; - this.requestPacket = requestPacket; - this.contentBuilder = HttpContent.builder(requestPacket); - // don't block here. If queue is full at the time of the next feed() - // call, it will block. - flushQueue(false); + + /** + * Add a {@link Feeder} implementation that will be invoked when writing + * without blocking is possible. This method must be set before dispatching + * the request this feeder is associated with. + * + * @param feeder the {@link Feeder} responsible for providing data. + * @throws IllegalStateException if called after {@link #initializeAsynchronousTransfer(FilterChainContext, HttpRequestPacket)} + * has been called by the {@link GrizzlyAsyncHttpProvider}. + * @throws IllegalArgumentException if feeder is null + */ + @SuppressWarnings("UnusedDeclaration") + public synchronized void setFeeder(final Feeder feeder) { + if (asyncTransferInitiated) { + throw new IllegalStateException( + "Unable to set Feeder after async data transfer has been initiated."); + } + if (feeder == null) { + throw new IllegalArgumentException( + "Feeder argument cannot be null."); + } + this.feeder = feeder; } - // --------------------------------------------------------- Private Methods + // ------------------------------------------------- Package Private Methods - @SuppressWarnings("unchecked") - private void flushQueue(final boolean allowBlocking) throws IOException { - if (queueSize.get() > 0) { - synchronized(this) { - final Connection c = context.getConnection(); - while(queueSize.get() > 0) { - if (allowBlocking) { - blockUntilQueueFree(c); + /** + * Even though this method is public, it's not intended to be called by + * Developers directly. Please avoid doing so. + */ + public synchronized void initializeAsynchronousTransfer(final FilterChainContext context, + final HttpRequestPacket requestPacket) + throws IOException { + + if (asyncTransferInitiated) { + throw new IllegalStateException( + "Async transfer has already been initiated."); + } + if (feeder == null) { + throw new IllegalStateException( + "No feeder available to perform the transfer."); + } + assert (context != null); + assert (requestPacket != null); + + this.requestPacket = requestPacket; + this.contentBuilder = HttpContent.builder(requestPacket); + final Connection c = context.getConnection(); + origMaxPendingBytes = c.getMaxAsyncWriteQueueSize(); + if (configuredMaxPendingBytes != DEFAULT) { + c.setMaxAsyncWriteQueueSize(configuredMaxPendingBytes); + } + this.context = context; + asyncTransferInitiated = true; + final Runnable r = new Runnable() { + @Override + public void run() { + try { + if (requestPacket.isSecure() && + (getSSLEngine(context.getConnection()) == null)) { + flushOnSSLHandshakeComplete(); + } else { + feeder.flush(); } - final BodyPart bodyPart = queue.poll(); - queueSize.decrementAndGet(); - final HttpContent content = - contentBuilder.content(bodyPart.buffer) - .last(bodyPart.isLast) - .build(); - context.write(content, - ((!requestPacket.isCommitted()) - ? context.getTransportContext() - .getCompletionHandler() - : null)); + } catch (IOException ioe) { + HttpTransactionContext ctx = HttpTransactionContext.get(c); + ctx.abort(ioe); } } + }; + + // If the current thread is a selector thread, we need to execute + // the remainder of the task on the worker thread to prevent + // it from being blocked. + if (isCurrentThreadSelectorRunner()) { + c.getTransport().getWorkerThreadPool().execute(r); + } else { + r.run(); } } - /** - * This method will block if the async write queue is currently larger - * than the configured maximum. The amount of time that this method - * will block is dependent on the write timeout of the transport - * associated with the specified connection. - */ - private void blockUntilQueueFree(final Connection c) { - if (!c.canWrite()) { - final FutureImpl future = - Futures.createSafeFuture(); - - // Connection may be obtained by calling FilterChainContext.getConnection(). - c.notifyCanWrite(new WriteHandler() { - @Override - public void onWritePossible() throws Exception { - future.result(TRUE); - } + // --------------------------------------------------------- Private Methods - @Override - public void onError(Throwable t) { - future.failure(makeIOException(t)); - } - }); - block(c, future); - } + private boolean isCurrentThreadSelectorRunner() { + final NIOConnection c = (NIOConnection) context.getConnection(); + final SelectorRunner runner = c.getSelectorRunner(); + return (Thread.currentThread() == runner.getRunnerThread()); } - private void block(final Connection c, - final FutureImpl future) { - try { - final long writeTimeout = - c.getTransport().getWriteTimeout(MILLISECONDS); - if (writeTimeout != -1) { - future.get(writeTimeout, MILLISECONDS); - } else { - future.get(); + + private void flushOnSSLHandshakeComplete() throws IOException { + final FilterChain filterChain = context.getFilterChain(); + final int idx = filterChain.indexOfType(SSLFilter.class); + assert (idx != -1); + final SSLFilter filter = (SSLFilter) filterChain.get(idx); + final Connection c = context.getConnection(); + filter.addHandshakeListener(new SSLBaseFilter.HandshakeListener() { + public void onStart(Connection connection) { } - } catch (ExecutionException e) { - HttpTransactionContext httpCtx = HttpTransactionContext.get(c); - httpCtx.abort(e.getCause()); - } catch (Exception e) { - HttpTransactionContext httpCtx = HttpTransactionContext.get(c); - httpCtx.abort(e); - } + + public void onComplete(Connection connection) { + if (c.equals(connection)) { + filter.removeHandshakeListener(this); + try { + feeder.flush(); + } catch (IOException ioe) { + HttpTransactionContext ctx = HttpTransactionContext.get(c); + ctx.abort(ioe); + } + } + } + }); + filter.handshake(context.getConnection(), null); } @@ -206,19 +258,405 @@ public void close() throws IOException { requestPacket = null; contentBuilder = null; } - } + + } // END EmptyBody // ---------------------------------------------------------- Nested Classes - private final static class BodyPart { - private final boolean isLast; - private final Buffer buffer; + /** + * Specifies the functionality all Feeders must implement. Typically, + * developers need not worry about implementing this interface directly. + * It should be sufficient, for most use-cases, to simply use the {@link NonBlockingFeeder} + * or {@link SimpleFeeder} implementations. + */ + public interface Feeder { + + /** + * This method will be invoked when it's possible to begin feeding + * data downstream. Implementations of this method must use {@link #feed(Buffer, boolean)} + * to perform the actual write. + * + * @throws IOException if an I/O error occurs. + */ + void flush() throws IOException; + + /** + * This method will write the specified {@link Buffer} to the connection. + * Be aware that this method may block depending if data is being fed + * faster than it can write. How much data may be queued is dictated + * by {@link #setMaxPendingBytes(int)}. Once this threshold is exceeded, + * the method will block until the write queue length drops below the + * aforementioned threshold. + * + * @param buffer the {@link Buffer} to write. + * @param last flag indicating if this is the last buffer to send. + * @throws IOException if an I/O error occurs. + * @throws java.lang.IllegalArgumentException if buffer + * is null. + * @throws java.lang.IllegalStateException if this method is invoked + * before asynchronous transferring has been initiated. + * @see #setMaxPendingBytes(int) + */ + @SuppressWarnings("UnusedDeclaration") + void feed(final Buffer buffer, final boolean last) throws IOException; + + } // END Feeder + + + /** + * Base class for {@link Feeder} implementations. This class provides + * an implementation for the contract defined by the {@link #feed} method. + */ + public static abstract class BaseFeeder implements Feeder { + + protected final FeedableBodyGenerator feedableBodyGenerator; + - public BodyPart(final Buffer buffer, final boolean isLast) { - this.buffer = buffer; - this.isLast = isLast; + // -------------------------------------------------------- Constructors + + + protected BaseFeeder(FeedableBodyGenerator feedableBodyGenerator) { + this.feedableBodyGenerator = feedableBodyGenerator; } - } + + + // --------------------------------------------- Package Private Methods + + + /** + * {@inheritDoc} + */ + @SuppressWarnings("UnusedDeclaration") + public final synchronized void feed(final Buffer buffer, final boolean last) + throws IOException { + if (buffer == null) { + throw new IllegalArgumentException( + "Buffer argument cannot be null."); + } + if (!feedableBodyGenerator.asyncTransferInitiated) { + throw new IllegalStateException( + "Asynchronous transfer has not been initiated."); + } + blockUntilQueueFree(feedableBodyGenerator.context.getConnection()); + final HttpContent content = + feedableBodyGenerator.contentBuilder + .content(buffer) + .last(last) + .build(); + final CompletionHandler handler = + ((last) ? new LastPacketCompletionHandler() : null); + feedableBodyGenerator.context.write(content, handler); + } + + /** + * This method will block if the async write queue is currently larger + * than the configured maximum. The amount of time that this method + * will block is dependent on the write timeout of the transport + * associated with the specified connection. + */ + private static void blockUntilQueueFree(final Connection c) { + if (!c.canWrite()) { + final FutureImpl future = + Futures.createSafeFuture(); + c.notifyCanWrite(new WriteHandler() { + + @Override + public void onWritePossible() throws Exception { + future.result(TRUE); + } + + @Override + public void onError(Throwable t) { + future.failure(makeIOException(t)); + } + }); + + block(c, future); + } + } + + private static void block(final Connection c, + final FutureImpl future) { + try { + final long writeTimeout = + c.getTransport().getWriteTimeout(MILLISECONDS); + if (writeTimeout != -1) { + future.get(writeTimeout, MILLISECONDS); + } else { + future.get(); + } + } catch (ExecutionException e) { + HttpTransactionContext ctx = HttpTransactionContext.get(c); + ctx.abort(e.getCause()); + } catch (Exception e) { + HttpTransactionContext ctx = HttpTransactionContext.get(c); + ctx.abort(e); + } + } + + + // ------------------------------------------------------- Inner Classes + + + private final class LastPacketCompletionHandler + implements CompletionHandler { + + private final CompletionHandler delegate; + private final Connection c; + private final int origMaxPendingBytes; + + // -------------------------------------------------------- Constructors + + + @SuppressWarnings("unchecked") + private LastPacketCompletionHandler() { + delegate = ((!feedableBodyGenerator.requestPacket.isCommitted()) + ? feedableBodyGenerator.context + .getTransportContext() + .getCompletionHandler() + : null); + c = feedableBodyGenerator.context.getConnection(); + origMaxPendingBytes = feedableBodyGenerator.origMaxPendingBytes; + } + + + // -------------------------------------- Methods from CompletionHandler + + + @Override + public void cancelled() { + c.setMaxAsyncWriteQueueSize(origMaxPendingBytes); + if (delegate != null) { + delegate.cancelled(); + } + } + + @Override + public void failed(Throwable throwable) { + c.setMaxAsyncWriteQueueSize(origMaxPendingBytes); + if (delegate != null) { + delegate.failed(throwable); + } + + } + + @Override + public void completed(WriteResult result) { + c.setMaxAsyncWriteQueueSize(origMaxPendingBytes); + if (delegate != null) { + delegate.completed(result); + } + + } + + @Override + public void updated(WriteResult result) { + if (delegate != null) { + delegate.updated(result); + } + } + + } // END LastPacketCompletionHandler + + } // END Feeder + + + /** + * Implementations of this class provide the framework to read data from + * some source and feed data to the {@link FeedableBodyGenerator} + * without blocking. + */ + @SuppressWarnings("UnusedDeclaration") + public static abstract class NonBlockingFeeder extends BaseFeeder { + + + // -------------------------------------------------------- Constructors + + + /** + * Constructs the NonBlockingFeeder with the associated + * {@link FeedableBodyGenerator}. + */ + public NonBlockingFeeder(final FeedableBodyGenerator feedableBodyGenerator) { + super(feedableBodyGenerator); + } + + + // ------------------------------------------------------ Public Methods + + + /** + * Notification that it's possible to send another block of data via + * {@link #feed(org.glassfish.grizzly.Buffer, boolean)}. + *

+ * It's important to only invoke {@link #feed(Buffer, boolean)} + * once per invocation of {@link #canFeed()}. + */ + public abstract void canFeed(); + + /** + * @return true if all data has been fed by this feeder, + * otherwise returns false. + */ + public abstract boolean isDone(); + + /** + * @return true if data is available to be fed, otherwise + * returns false. When this method returns false, + * the {@link FeedableBodyGenerator} will call {@link #notifyReadyToFeed(ReadyToFeedListener)} + * by which this {@link NonBlockingFeeder} implementation may signal data is once + * again available to be fed. + */ + public abstract boolean isReady(); + + /** + * Callback registration to signal the {@link FeedableBodyGenerator} that + * data is available once again to continue feeding. Once this listener + * has been invoked, the NonBlockingFeeder implementation should no longer maintain + * a reference to the listener. + */ + public abstract void notifyReadyToFeed(final ReadyToFeedListener listener); + + + // ------------------------------------------------- Methods from Feeder + + + /** + * {@inheritDoc} + */ + @Override + public synchronized void flush() { + final Connection c = feedableBodyGenerator.context.getConnection(); + if (isReady()) { + writeUntilFullOrDone(c); + if (!isDone()) { + if (!isReady()) { + notifyReadyToFeed(new ReadyToFeedListenerImpl()); + } + if (!c.canWrite()) { + // write queue is full, leverage WriteListener to let us know + // when it is safe to write again. + c.notifyCanWrite(new WriteHandlerImpl()); + } + } + } else { + notifyReadyToFeed(new ReadyToFeedListenerImpl()); + } + } + + + // ----------------------------------------------------- Private Methods + + + private void writeUntilFullOrDone(final Connection c) { + while (c.canWrite()) { + if (isReady()) { + canFeed(); + } + if (!isReady()) { + break; + } + } + } + + + // ------------------------------------------------------- Inner Classes + + + /** + * Listener to signal that data is available to be fed. + */ + public interface ReadyToFeedListener { + + /** + * Data is once again ready to be fed. + */ + @SuppressWarnings("UnusedDeclaration") + void ready(); + + } // END ReadyToFeedListener + + + private final class WriteHandlerImpl implements WriteHandler { + + + private final Connection c; + + + // -------------------------------------------------------- Constructors + + + private WriteHandlerImpl() { + this.c = feedableBodyGenerator.context.getConnection(); + } + + + // ------------------------------------------ Methods from WriteListener + + @Override + public void onWritePossible() throws Exception { + writeUntilFullOrDone(c); + if (!isDone()) { + if (!isReady()) { + notifyReadyToFeed(new ReadyToFeedListenerImpl()); + } + if (!c.canWrite()) { + // write queue is full, leverage WriteListener to let us know + // when it is safe to write again. + c.notifyCanWrite(this); + } + } + } + + @Override + public void onError(Throwable t) { + c.setMaxAsyncWriteQueueSize( + feedableBodyGenerator.origMaxPendingBytes); + HttpTransactionContext ctx = HttpTransactionContext.get(c); + ctx.abort(t); + } + + } // END WriteHandlerImpl + + + private final class ReadyToFeedListenerImpl + implements NonBlockingFeeder.ReadyToFeedListener { + + + // ------------------------------------ Methods from ReadyToFeedListener + + + @Override + public void ready() { + flush(); + } + + } // END ReadToFeedListenerImpl + + } // END NonBlockingFeeder + + + /** + * This simple {@link Feeder} implementation allows the implementation to + * feed data in whatever fashion is deemed appropriate. + */ + @SuppressWarnings("UnusedDeclaration") + public abstract static class SimpleFeeder extends BaseFeeder { + + + // -------------------------------------------------------- Constructors + + + /** + * Constructs the SimpleFeeder with the associated + * {@link FeedableBodyGenerator}. + */ + public SimpleFeeder(FeedableBodyGenerator feedableBodyGenerator) { + super(feedableBodyGenerator); + } + + + } // END SimpleFeeder } From 8c1779ae547089e776ee264d1ac239e163495906 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 19 Sep 2013 14:55:04 -0700 Subject: [PATCH 0565/2844] - Fix redirect test. - Update Grizzly provider to default back to the WorkerThreadIOStrategy. --- .../asynchttpclient/async/AsyncProvidersBasicTest.java | 2 +- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 5 +---- .../grizzly/GrizzlyAsyncProviderBasicTest.java | 10 ---------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 9146be53aa..0472ef6ba6 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1358,7 +1358,7 @@ public void onThrowable(Throwable t) { } }; - client.prepareGet("http://www.google.com").execute(handler); + client.prepareGet("http://google.com").execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timed out"); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index c14e2309c4..5be8420e10 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -65,7 +65,6 @@ import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder; import org.glassfish.grizzly.ssl.SSLEngineConfigurator; import org.glassfish.grizzly.ssl.SSLFilter; -import org.glassfish.grizzly.strategies.SameThreadIOStrategy; import org.glassfish.grizzly.strategies.WorkerThreadIOStrategy; import org.glassfish.grizzly.utils.DelayedExecutor; import org.glassfish.grizzly.utils.IdleTimeoutFilter; @@ -466,11 +465,9 @@ private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb, private void doDefaultTransportConfig() { final ExecutorService service = clientConfig.executorService(); + clientTransport.setIOStrategy(WorkerThreadIOStrategy.getInstance()); if (service != null) { - clientTransport.setIOStrategy(WorkerThreadIOStrategy.getInstance()); clientTransport.setWorkerThreadPool(service); - } else { - clientTransport.setIOStrategy(SameThreadIOStrategy.getInstance()); } } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java index a20c34b49f..5bc8d7f211 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncProviderBasicTest.java @@ -36,17 +36,7 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { @Override protected AsyncHttpProviderConfig getProviderConfig() { final GrizzlyAsyncHttpProviderConfig config = new GrizzlyAsyncHttpProviderConfig(); - config.addProperty(TRANSPORT_CUSTOMIZER, new TransportCustomizer() { - @Override - public void customize(TCPNIOTransport transport, FilterChainBuilder builder) { - transport.setTcpNoDelay(true); - transport.setIOStrategy(SameThreadIOStrategy.getInstance()); - } - }); return config; } - @Test(groups = { "standalone", "default_provider", "async" }, enabled = false) - public void asyncDoPostBasicGZIPTest() throws Exception { - } } From 173081e6fc58f7f4e2dfca0f86b45aec6b418a8b Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 19 Sep 2013 19:15:00 -0700 Subject: [PATCH 0566/2844] - Removed SSL handshake logic from Grizzly's FeedableBodyGenerator. It's not needed anymore since the handshake is forced when the connection is made. --- .../grizzly/FeedableBodyGenerator.java | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index b475ddaadc..584268ed6a 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -23,20 +23,16 @@ import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.WriteHandler; import org.glassfish.grizzly.WriteResult; -import org.glassfish.grizzly.filterchain.FilterChain; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.http.HttpRequestPacket; import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.nio.NIOConnection; import org.glassfish.grizzly.nio.SelectorRunner; -import org.glassfish.grizzly.ssl.SSLBaseFilter; -import org.glassfish.grizzly.ssl.SSLFilter; import org.glassfish.grizzly.utils.Futures; import static java.lang.Boolean.TRUE; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static org.glassfish.grizzly.ssl.SSLUtils.getSSLEngine; import static org.glassfish.grizzly.utils.Exceptions.*; /** @@ -176,12 +172,7 @@ public synchronized void initializeAsynchronousTransfer(final FilterChainContext @Override public void run() { try { - if (requestPacket.isSecure() && - (getSSLEngine(context.getConnection()) == null)) { - flushOnSSLHandshakeComplete(); - } else { - feeder.flush(); - } + feeder.flush(); } catch (IOException ioe) { HttpTransactionContext ctx = HttpTransactionContext.get(c); ctx.abort(ioe); @@ -210,32 +201,6 @@ private boolean isCurrentThreadSelectorRunner() { } - private void flushOnSSLHandshakeComplete() throws IOException { - final FilterChain filterChain = context.getFilterChain(); - final int idx = filterChain.indexOfType(SSLFilter.class); - assert (idx != -1); - final SSLFilter filter = (SSLFilter) filterChain.get(idx); - final Connection c = context.getConnection(); - filter.addHandshakeListener(new SSLBaseFilter.HandshakeListener() { - public void onStart(Connection connection) { - } - - public void onComplete(Connection connection) { - if (c.equals(connection)) { - filter.removeHandshakeListener(this); - try { - feeder.flush(); - } catch (IOException ioe) { - HttpTransactionContext ctx = HttpTransactionContext.get(c); - ctx.abort(ioe); - } - } - } - }); - filter.handshake(context.getConnection(), null); - } - - // ----------------------------------------------------------- Inner Classes From 0eb190110dcb5ff50e310464d38ae4806a47b35f Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 20 Sep 2013 10:27:07 -0700 Subject: [PATCH 0567/2844] Upgrade to Grizzly 2.3.6. --- providers/grizzly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index f7b481761c..775b199f1e 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -14,7 +14,7 @@ - 2.3.6-SNAPSHOT + 2.3.6 1.0 From c1eb6297a1f3467e2a9e19d2266ca2d03fd07cb7 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 20 Sep 2013 10:42:17 -0700 Subject: [PATCH 0568/2844] Set multiplier to two. --- .../java/org/asynchttpclient/AsyncHttpClientConfigBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java index 46eb9fe311..b5944629a5 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java @@ -54,7 +54,7 @@ void configureDefaults() { maxDefaultRedirects = Integer.getInteger(ASYNC_CLIENT + "defaultMaxRedirects", 5); compressionEnabled = Boolean.getBoolean(ASYNC_CLIENT + "compressionEnabled"); userAgent = System.getProperty(ASYNC_CLIENT + "userAgent", "AsyncHttpClient/" + AHC_VERSION); - ioThreadMultiplier = Integer.getInteger(ASYNC_CLIENT + "ioThreadMultiplier", 8); + ioThreadMultiplier = Integer.getInteger(ASYNC_CLIENT + "ioThreadMultiplier", 2); boolean useProxySelector = Boolean.getBoolean(ASYNC_CLIENT + "useProxySelector"); boolean useProxyProperties = Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties"); From e3af1bcaa83517ca469b775b124495d7041fe6c0 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 23 Sep 2013 16:15:14 -0700 Subject: [PATCH 0569/2844] Don't apply outbound encodings. --- .../providers/grizzly/filters/ClientEncodingFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java index 095d6c64b4..332c0fb8c9 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ClientEncodingFilter.java @@ -34,7 +34,7 @@ public final class ClientEncodingFilter implements EncodingFilter { public boolean applyEncoding(HttpHeader httpPacket) { httpPacket.addHeader(Header.AcceptEncoding, "gzip"); - return true; + return false; } From 75de57a18f16a427fac5d824f82cd069af608d2d Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 23 Sep 2013 16:18:25 -0700 Subject: [PATCH 0570/2844] Initial connection pool changes to support SPDY. --- .../providers/grizzly/ConnectionPool.java | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionPool.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionPool.java index dae88f302e..0aec5b6a19 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionPool.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionPool.java @@ -13,6 +13,10 @@ package org.asynchttpclient.providers.grizzly; +import org.glassfish.grizzly.CompletionHandler; +import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.EmptyCompletionHandler; +import org.glassfish.grizzly.GrizzlyFuture; import org.glassfish.grizzly.connectionpool.EndpointKey; import org.glassfish.grizzly.connectionpool.MultiEndpointPool; import org.glassfish.grizzly.connectionpool.SingleEndpointPool; @@ -29,6 +33,7 @@ */ public class ConnectionPool extends MultiEndpointPool{ + private final Object lock = new Object(); // ------------------------------------------------------------ Constructors @@ -69,6 +74,62 @@ protected SingleEndpointPool obtainSingleEndpointPool( return sePool; } + @Override + public GrizzlyFuture take(final EndpointKey endpointKey) { + synchronized (lock) { + final GrizzlyFuture f = super.take(endpointKey); + f.addCompletionHandler(new EmptyCompletionHandler() { + @Override + public void completed(Connection result) { + if (Utils.isSpdyConnection(result)) { + release(result); + } + super.completed(result); + } + }); + return f; + } + } + + @Override + public void take(final EndpointKey endpointKey, + final CompletionHandler completionHandler) { + synchronized (lock) { + if (completionHandler == null) { + throw new IllegalStateException("CompletionHandler argument cannot be null."); + } + + super.take(endpointKey, new CompletionHandler() { + @Override + public void cancelled() { + completionHandler.cancelled(); + } + + @Override + public void failed(Throwable throwable) { + completionHandler.failed(throwable); + } + + @Override + public void completed(Connection result) { + release(result); + completionHandler.completed(result); + } + + @Override + public void updated(Connection result) { + completionHandler.updated(result); + } + }); + } + } + + @Override + public boolean release(Connection connection) { + synchronized (lock) { + return super.release(connection); + } + } // ---------------------------------------------------------- Nested Classes From 2f6f0d045eb3ec784c145f8e68a4c858c7339d9e Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 25 Sep 2013 12:02:17 -0700 Subject: [PATCH 0571/2844] Remove tunnel establishment checks. They are no longer needed as tunnelling is established when the connection is established. --- .../providers/grizzly/EventHandler.java | 39 ++++++------------- .../grizzly/HttpTransactionContext.java | 20 ---------- .../filters/AsyncHttpClientFilter.java | 2 +- .../ProxyAuthorizationHandler.java | 1 - 4 files changed, 13 insertions(+), 49 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index 6ead4bbe5b..0b38e389b1 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -150,9 +150,6 @@ public void onInitialLineParsed(HttpHeader httpHeader, final HttpTransactionContext context = HttpTransactionContext.get(connection); final int status = ((HttpResponsePacket) httpHeader).getStatus(); - if (context.isEstablishingTunnel() && HttpStatus.OK_200.statusMatches(status)) { - return; - } if (HttpStatus.CONINTUE_100.statusMatches(status)) { ctx.notifyUpstream(new ContinueEvent(context)); return; @@ -239,9 +236,7 @@ public void onHttpHeadersParsed(HttpHeader httpHeader, processKeepAlive(ctx.getConnection(), httpHeader); final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); - if (httpHeader.isSkipRemainder() - || (context.isEstablishingTunnel() - && context.getStatusHandler() == null)) { + if (httpHeader.isSkipRemainder()) { return; } @@ -374,28 +369,18 @@ public boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) final HttpResponsePacket response = (HttpResponsePacket) httpHeader; - final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); - if (context.isEstablishingTunnel() - && HttpStatus.OK_200.statusMatches(response.getStatus())) { - context.setEstablishingTunnel(false); - final Connection c = ctx.getConnection(); - context.tunnelEstablished(c); - context.getProvider().execute(c, - context.getRequest(), - context.getHandler(), - context.getFuture()); - } else { - cleanup(ctx); - final AsyncHandler handler = context.getHandler(); - if (handler != null) { - try { - context.result(handler.onCompleted()); - } catch (Exception e) { - context.abort(e); - } - } else { - context.done(); + final HttpTransactionContext context = HttpTransactionContext.get( + ctx.getConnection()); + cleanup(ctx); + final AsyncHandler handler = context.getHandler(); + if (handler != null) { + try { + context.result(handler.onCompleted()); + } catch (Exception e) { + context.abort(e); } + } else { + context.done(); } return false; } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java index c9718e0613..c2f0573bfa 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java @@ -18,7 +18,6 @@ import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; import org.asynchttpclient.providers.grizzly.statushandler.StatusHandler; import org.asynchttpclient.websocket.WebSocket; -import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.attributes.Attribute; import org.glassfish.grizzly.attributes.AttributeStorage; @@ -58,7 +57,6 @@ public final class HttpTransactionContext { private HandShake handshake; private ProtocolHandler protocolHandler; private WebSocket webSocket; - private boolean establishingTunnel; // -------------------------------------------------------- Constructors @@ -255,15 +253,6 @@ public void setWebSocket(WebSocket webSocket) { this.webSocket = webSocket; } - public boolean isEstablishingTunnel() { - return establishingTunnel; - } - - public void setEstablishingTunnel(boolean establishingTunnel) { - this.establishingTunnel = establishingTunnel; - } - - // ------------------------------------------------- Package Private Methods @@ -297,13 +286,4 @@ void result(Object result) { } } - public boolean isTunnelEstablished(final Connection c) { - return c.getAttributes().getAttribute("tunnel-established") != null; - } - - - public void tunnelEstablished(final Connection c) { - c.getAttributes().setAttribute("tunnel-established", Boolean.TRUE); - } - } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index 2a28405f85..eca4040f98 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -254,7 +254,7 @@ private boolean sendAsGrizzlyRequest(final Request request, } } - if (httpCtx.isWSRequest() && !httpCtx.isEstablishingTunnel()) { + if (httpCtx.isWSRequest()) { try { final URI wsURI = new URI(httpCtx.getWsRequestURI()); httpCtx.setProtocolHandler(Version.RFC6455.createHandler(true)); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java index 260a77acaf..5903932971 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -173,7 +173,6 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, HttpTransactionContext.set(c, newContext); newContext.setInvocationStatus(tempInvocationStatus); - httpTransactionContext.setEstablishingTunnel(true); return executeRequest(httpTransactionContext, req, c); From 3e54dfee276035b085cea91f83de0aa31011a3f4 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 25 Sep 2013 12:18:26 -0700 Subject: [PATCH 0572/2844] HttpTransactionContext renamed to HttpTxContext. --- .../providers/grizzly/EventHandler.java | 47 +++++++++---------- .../grizzly/FeedableBodyGenerator.java | 8 ++-- .../grizzly/GrizzlyAsyncHttpProvider.java | 14 +++--- ...sactionContext.java => HttpTxContext.java} | 30 ++++++------ .../grizzly/bodyhandler/FileBodyHandler.java | 6 +-- .../filters/AsyncHttpClientFilter.java | 12 ++--- .../AsyncHttpClientTransportFilter.java | 8 ++-- .../grizzly/filters/ProxyFilter.java | 4 +- .../grizzly/filters/events/ContinueEvent.java | 8 ++-- .../statushandler/AuthorizationHandler.java | 10 ++-- .../ProxyAuthorizationHandler.java | 20 ++++---- .../statushandler/RedirectHandler.java | 10 ++-- .../grizzly/statushandler/StatusHandler.java | 4 +- 13 files changed, 90 insertions(+), 91 deletions(-) rename providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/{HttpTransactionContext.java => HttpTxContext.java} (89%) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index 0b38e389b1..d1b94d5bc3 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -34,7 +34,6 @@ import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.http.HttpHeader; -import org.glassfish.grizzly.http.HttpRequestPacket; import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.ProcessingState; import org.glassfish.grizzly.http.Protocol; @@ -92,7 +91,7 @@ public final class EventHandler { public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - HttpTransactionContext.get(ctx.getConnection()).abort(error); + HttpTxContext.get(ctx.getConnection()).abort(error); } @@ -100,8 +99,8 @@ public void exceptionOccurred(FilterChainContext ctx, Throwable error) { public void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { - final HttpTransactionContext context = - HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = + HttpTxContext.get(ctx.getConnection()); final AsyncHandler handler = context.getHandler(); if (handler != null && context.getCurrentState() != ABORT) { try { @@ -119,8 +118,8 @@ public void onHttpContentParsed(HttpContent content, @SuppressWarnings("UnusedParameters") public void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { - final HttpTransactionContext context = - HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = + HttpTxContext.get(ctx.getConnection()); final AsyncHandler handler = context.getHandler(); if (handler instanceof TransferCompletionHandler) { ((TransferCompletionHandler) handler).onHeaderWriteCompleted(); @@ -128,8 +127,8 @@ public void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) } public void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { - final HttpTransactionContext context = - HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = + HttpTxContext.get(ctx.getConnection()); final AsyncHandler handler = context.getHandler(); if (handler instanceof TransferCompletionHandler) { final int written = content.getContent().remaining(); @@ -147,8 +146,8 @@ public void onInitialLineParsed(HttpHeader httpHeader, return; } final Connection connection = ctx.getConnection(); - final HttpTransactionContext context = - HttpTransactionContext.get(connection); + final HttpTxContext context = + HttpTxContext.get(connection); final int status = ((HttpResponsePacket) httpHeader).getStatus(); if (HttpStatus.CONINTUE_100.statusMatches(status)) { ctx.notifyUpstream(new ContinueEvent(context)); @@ -222,8 +221,8 @@ public void onHttpHeaderError(final HttpHeader httpHeader, t.printStackTrace(); httpHeader.setSkipRemainder(true); - final HttpTransactionContext context = - HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = + HttpTxContext.get(ctx.getConnection()); context.abort(t); } @@ -234,7 +233,7 @@ public void onHttpHeadersParsed(HttpHeader httpHeader, //super.onHttpHeadersParsed(httpHeader, ctx); GrizzlyAsyncHttpProvider.LOGGER.debug("RESPONSE: {}", httpHeader); processKeepAlive(ctx.getConnection(), httpHeader); - final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); if (httpHeader.isSkipRemainder()) { return; @@ -270,10 +269,10 @@ public void onHttpHeadersParsed(HttpHeader httpHeader, final Connection c = m.obtainConnection(newRequest, context.getFuture()); - final HttpTransactionContext newContext = + final HttpTxContext newContext = context.copy(); context.setFuture(null); - HttpTransactionContext.set(c, newContext); + HttpTxContext.set(c, newContext); context.getProvider().execute(c, newRequest, newHandler, @@ -369,7 +368,7 @@ public boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) final HttpResponsePacket response = (HttpResponsePacket) httpHeader; - final HttpTransactionContext context = HttpTransactionContext.get( + final HttpTxContext context = HttpTxContext.get( ctx.getConnection()); cleanup(ctx); final AsyncHandler handler = context.getHandler(); @@ -405,7 +404,7 @@ private static void processKeepAlive(final Connection c, } - private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) { + private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTxContext context) { SimpleWebSocket ws = new SimpleWebSocket(context.getProtocolHandler()); AsyncHttpProviderConfig config = context.getProvider().getClientConfig().getAsyncHttpProviderConfig(); boolean bufferFragments = true; @@ -417,7 +416,7 @@ private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransact return new GrizzlyWebSocketAdapter(ws, bufferFragments); } - private static boolean isRedirectAllowed(final HttpTransactionContext ctx) { + private static boolean isRedirectAllowed(final HttpTxContext ctx) { boolean allowed = ctx.getRequest().isRedirectEnabled(); if (ctx.getRequest().isRedirectOverrideSet()) { return allowed; @@ -428,12 +427,12 @@ private static boolean isRedirectAllowed(final HttpTransactionContext ctx) { return allowed; } - private static HttpTransactionContext cleanup(final FilterChainContext ctx) { + private static HttpTxContext cleanup(final FilterChainContext ctx) { final Connection c = ctx.getConnection(); - final HttpTransactionContext context = - HttpTransactionContext.get(c); - HttpTransactionContext.set(c, null); + final HttpTxContext context = + HttpTxContext.get(c); + HttpTxContext.set(c, null); if (!Utils.isIgnored(ctx.getConnection())) { final ConnectionManager manager = context.getProvider().getConnectionManager(); @@ -452,7 +451,7 @@ private static HttpTransactionContext cleanup(final FilterChainContext ctx) { } - private static boolean redirectCountExceeded(final HttpTransactionContext context) { + private static boolean redirectCountExceeded(final HttpTxContext context) { return (context.getRedirectCount().get() > context.getMaxRedirectCount()); @@ -474,7 +473,7 @@ public static boolean isRedirect(final int status) { public static Request newRequest(final URI uri, final HttpResponsePacket response, - final HttpTransactionContext ctx, + final HttpTxContext ctx, boolean asGet) { final RequestBuilder builder = new RequestBuilder(ctx.getRequest()); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index 584268ed6a..f338897e6f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -174,7 +174,7 @@ public void run() { try { feeder.flush(); } catch (IOException ioe) { - HttpTransactionContext ctx = HttpTransactionContext.get(c); + HttpTxContext ctx = HttpTxContext.get(c); ctx.abort(ioe); } } @@ -353,10 +353,10 @@ private static void block(final Connection c, future.get(); } } catch (ExecutionException e) { - HttpTransactionContext ctx = HttpTransactionContext.get(c); + HttpTxContext ctx = HttpTxContext.get(c); ctx.abort(e.getCause()); } catch (Exception e) { - HttpTransactionContext ctx = HttpTransactionContext.get(c); + HttpTxContext ctx = HttpTxContext.get(c); ctx.abort(e); } } @@ -579,7 +579,7 @@ public void onWritePossible() throws Exception { public void onError(Throwable t) { c.setMaxAsyncWriteQueueSize( feedableBodyGenerator.origMaxPendingBytes); - HttpTransactionContext ctx = HttpTransactionContext.get(c); + HttpTxContext ctx = HttpTxContext.get(c); ctx.abort(t); } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 5be8420e10..12995bb4f6 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -241,8 +241,8 @@ public ListenableFuture execute(final Connection c, final AsyncHandler handler, final GrizzlyResponseFuture future) { Utils.addRequestInFlight(c); - if (HttpTransactionContext.get(c) == null) { - HttpTransactionContext.create(this, future, request, handler, c); + if (HttpTxContext.get(c) == null) { + HttpTxContext.create(this, future, request, handler, c); } c.write(request, createWriteCompletionHandler(future)); @@ -271,8 +271,8 @@ void initializeTransport(final AsyncHttpClientConfig clientConfig) { new IdleTimeoutFilter.TimeoutResolver() { @Override public long getTimeout(FilterChainContext ctx) { - final HttpTransactionContext context = - HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = + HttpTxContext.get(ctx.getConnection()); if (context != null) { if (context.isWSRequest()) { return clientConfig.getWebSocketIdleTimeoutInMs(); @@ -495,9 +495,9 @@ public void updated(WriteResult result) { void timeout(final Connection c) { - final HttpTransactionContext context = HttpTransactionContext.get(c); + final HttpTxContext context = HttpTxContext.get(c); if (context != null) { - HttpTransactionContext.set(c, null); + HttpTxContext.set(c, null); context.abort(new TimeoutException("Timeout exceeded")); } @@ -513,7 +513,7 @@ public boolean sendRequest(final FilterChainContext ctx, boolean isWriteComplete = true; if (requestHasEntityBody(request)) { - final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); BodyHandler handler = bodyHandlerFactory.getBodyHandler(request); if (requestPacket.getHeaders().contains(Header.Expect) && requestPacket.getHeaders().getValue(1).equalsIgnoreCase("100-Continue")) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java similarity index 89% rename from providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java rename to providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java index c2f0573bfa..344128f75a 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTransactionContext.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java @@ -29,10 +29,10 @@ import static org.asynchttpclient.providers.grizzly.statushandler.StatusHandler.InvocationStatus; -public final class HttpTransactionContext { +public final class HttpTxContext { - private static final Attribute REQUEST_STATE_ATTR = - Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTransactionContext.class.getName()); + private static final Attribute REQUEST_STATE_ATTR = + Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(HttpTxContext.class.getName()); private final AtomicInteger redirectCount = new AtomicInteger(0); @@ -62,10 +62,10 @@ public final class HttpTransactionContext { // -------------------------------------------------------- Constructors - private HttpTransactionContext(GrizzlyAsyncHttpProvider provider, - final GrizzlyResponseFuture future, - final Request request, - final AsyncHandler handler) { + private HttpTxContext(final GrizzlyAsyncHttpProvider provider, + final GrizzlyResponseFuture future, + final Request request, + final AsyncHandler handler) { this.provider = provider; this.future = future; @@ -82,7 +82,7 @@ private HttpTransactionContext(GrizzlyAsyncHttpProvider provider, public static void set(final AttributeStorage storage, - final HttpTransactionContext httpTransactionState) { + final HttpTxContext httpTransactionState) { if (httpTransactionState == null) { REQUEST_STATE_ATTR.remove(storage); @@ -92,20 +92,20 @@ public static void set(final AttributeStorage storage, } - public static HttpTransactionContext get(final AttributeStorage storage) { + public static HttpTxContext get(final AttributeStorage storage) { return REQUEST_STATE_ATTR.get(storage); } - public static HttpTransactionContext create(final GrizzlyAsyncHttpProvider provider, + public static HttpTxContext create(final GrizzlyAsyncHttpProvider provider, final GrizzlyResponseFuture future, final Request request, final AsyncHandler handler, final AttributeStorage storage) { - final HttpTransactionContext context = - new HttpTransactionContext(provider, future, request, handler); + final HttpTxContext context = + new HttpTxContext(provider, future, request, handler); set(storage, context); return context; } @@ -256,9 +256,9 @@ public void setWebSocket(WebSocket webSocket) { // ------------------------------------------------- Package Private Methods - public HttpTransactionContext copy() { - final HttpTransactionContext newContext = - new HttpTransactionContext(provider, + public HttpTxContext copy() { + final HttpTxContext newContext = + new HttpTxContext(provider, future, request, handler); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java index 8029d7f80c..368a3a2c09 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java @@ -16,7 +16,7 @@ import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.Request; import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.EmptyCompletionHandler; import org.glassfish.grizzly.FileTransfer; @@ -55,7 +55,7 @@ public boolean doHandle(final FilterChainContext ctx, final File f = request.getFile(); requestPacket.setContentLengthLong(f.length()); - final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { final FileInputStream fis = new FileInputStream(request.getFile()); final MemoryManager mm = ctx.getMemoryManager(); @@ -109,7 +109,7 @@ public void completed(WriteResult result) { // --------------------------------------------------------- Private Methods - private static void notifyHandlerIfNeeded(final HttpTransactionContext context, + private static void notifyHandlerIfNeeded(final HttpTxContext context, final HttpRequestPacket requestPacket, final WriteResult writeResult) { final AsyncHandler handler = context.getHandler(); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index eca4040f98..52527f597c 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -28,7 +28,7 @@ import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; import org.asynchttpclient.providers.grizzly.GrizzlyResponseFuture; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.asynchttpclient.providers.grizzly.Utils; import org.asynchttpclient.providers.grizzly.bodyhandler.ExpectHandler; import org.asynchttpclient.providers.grizzly.filters.events.ContinueEvent; @@ -207,7 +207,7 @@ private boolean sendAsGrizzlyRequest(final Request request, final FilterChainContext ctx) throws IOException { - final HttpTransactionContext httpCtx = HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext httpCtx = HttpTxContext.get(ctx.getConnection()); if (checkProxyAuthFailure(ctx, httpCtx)) { return true; @@ -218,7 +218,7 @@ private boolean sendAsGrizzlyRequest(final Request request, // If the request is secure, check to see if an error occurred during // the handshake. We have to do this here, as the error would occur - // out of the scope of a HttpTransactionContext so there would be + // out of the scope of a HttpTxContext so there would be // no good way to communicate the problem to the caller. if (secure && checkHandshakeError(ctx, httpCtx)) { return true; @@ -323,7 +323,7 @@ private static void initTransferCompletionHandler(final Request request, } private static boolean checkHandshakeError(final FilterChainContext ctx, - final HttpTransactionContext httpCtx) { + final HttpTxContext httpCtx) { Throwable t = getHandshakeError(ctx.getConnection()); if (t != null) { httpCtx.abort(t); @@ -333,7 +333,7 @@ private static boolean checkHandshakeError(final FilterChainContext ctx, } private static boolean checkProxyAuthFailure(final FilterChainContext ctx, - final HttpTransactionContext httpCtx) { + final HttpTxContext httpCtx) { final Boolean failed = PROXY_AUTH_FAILURE.get(ctx.getConnection()); if (failed != null && failed) { httpCtx.abort(new IllegalStateException("Unable to authenticate with proxy")); @@ -384,7 +384,7 @@ private static boolean isWSRequest(final String requestUri) { return (requestUri.charAt(0) == 'w' && requestUri.charAt(1) == 's'); } - private static void convertToUpgradeRequest(final HttpTransactionContext ctx) { + private static void convertToUpgradeRequest(final HttpTxContext ctx) { final int colonIdx = ctx.getRequestUrl().indexOf(':'); if (colonIdx < 2 || colonIdx > 3) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java index 8de7d91554..39982d6c5c 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java @@ -13,7 +13,7 @@ package org.asynchttpclient.providers.grizzly.filters; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.filterchain.NextAction; @@ -37,8 +37,8 @@ public final class AsyncHttpClientTransportFilter extends TransportFilter { @Override public NextAction handleRead(FilterChainContext ctx) throws IOException { - final HttpTransactionContext context = - HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = + HttpTxContext.get(ctx.getConnection()); if (context == null) { return super.handleRead(ctx); } @@ -68,7 +68,7 @@ public void updated(Object result) { @Override public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - final HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); if (context != null) { context.abort(error.getCause()); } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java index 9f479db7f4..0a2be3030b 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java @@ -17,7 +17,7 @@ import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Realm; import org.asynchttpclient.Request; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.glassfish.grizzly.filterchain.BaseFilter; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.filterchain.NextAction; @@ -65,7 +65,7 @@ public NextAction handleWrite(FilterChainContext ctx) throws IOException { org.glassfish.grizzly.http.HttpContent content = ctx.getMessage(); HttpRequestPacket request = (HttpRequestPacket) content.getHttpHeader(); - HttpTransactionContext context = HttpTransactionContext.get(ctx.getConnection()); + HttpTxContext context = HttpTxContext.get(ctx.getConnection()); assert(context != null); Request req = context.getRequest(); if (!secure) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java index 247bed46fa..a7a710369f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/ContinueEvent.java @@ -13,7 +13,7 @@ package org.asynchttpclient.providers.grizzly.filters.events; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.glassfish.grizzly.filterchain.FilterChainEvent; /** @@ -24,13 +24,13 @@ */ public final class ContinueEvent implements FilterChainEvent { - private final HttpTransactionContext context; + private final HttpTxContext context; // -------------------------------------------------------- Constructors - public ContinueEvent(final HttpTransactionContext context) { + public ContinueEvent(final HttpTxContext context) { this.context = context; @@ -49,7 +49,7 @@ public Object type() { // ---------------------------------------------------------- Public Methods - public HttpTransactionContext getContext() { + public HttpTxContext getContext() { return context; } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java index 04a2d72507..2ee3ef7b08 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java @@ -16,7 +16,7 @@ import org.asynchttpclient.Realm; import org.asynchttpclient.Request; import org.asynchttpclient.providers.grizzly.ConnectionManager; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.asynchttpclient.util.AuthenticatorUtils; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.filterchain.FilterChainContext; @@ -44,7 +44,7 @@ public boolean handlesStatus(int statusCode) { @SuppressWarnings({"unchecked"}) public boolean handleStatus(final HttpResponsePacket responsePacket, - final HttpTransactionContext httpTransactionContext, + final HttpTxContext httpTransactionContext, final FilterChainContext ctx) { final String auth = responsePacket.getHeader(Header.WWWAuthenticate); @@ -100,10 +100,10 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, req, responsePacket, httpTransactionContext); - final HttpTransactionContext newContext = + final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTransactionContext.set(c, newContext); + HttpTxContext.set(c, newContext); newContext.setInvocationStatus(STOP); httpTransactionContext.getProvider().execute(c, req, @@ -124,7 +124,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, private Connection getConnectionForNextRequest(final FilterChainContext ctx, final Request request, final HttpResponsePacket response, - final HttpTransactionContext httpCtx) + final HttpTxContext httpCtx) throws Exception { if (response.getProcessingState().isKeepAlive()) { return ctx.getConnection(); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java index 5903932971..dbe8ff5d9a 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -18,7 +18,7 @@ import org.asynchttpclient.Request; import org.asynchttpclient.providers.grizzly.ConnectionManager; import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.asynchttpclient.util.AuthenticatorUtils; import org.asynchttpclient.util.Base64; import org.glassfish.grizzly.Connection; @@ -53,7 +53,7 @@ public boolean handlesStatus(int statusCode) { @SuppressWarnings({"unchecked"}) public boolean handleStatus(final HttpResponsePacket responsePacket, - final HttpTransactionContext httpTransactionContext, + final HttpTxContext httpTransactionContext, final FilterChainContext ctx) { final String proxyAuth = @@ -146,10 +146,10 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, req, responsePacket, httpTransactionContext); - final HttpTransactionContext newContext = + final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTransactionContext.set(c, newContext); + HttpTxContext.set(c, newContext); newContext.setInvocationStatus(tempInvocationStatus); @@ -166,11 +166,11 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, return executeRequest(httpTransactionContext, req, c); } else if (isNTLMSecondHandShake(proxyAuth)) { final Connection c = ctx.getConnection(); - final HttpTransactionContext newContext = + final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTransactionContext.set(c, newContext); + HttpTxContext.set(c, newContext); newContext.setInvocationStatus(tempInvocationStatus); @@ -181,10 +181,10 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, req, responsePacket, httpTransactionContext); - final HttpTransactionContext newContext = + final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTransactionContext.set(c, newContext); + HttpTxContext.set(c, newContext); newContext.setInvocationStatus(tempInvocationStatus); @@ -199,7 +199,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, } private boolean executeRequest( - final HttpTransactionContext httpTransactionContext, + final HttpTxContext httpTransactionContext, final Request req, final Connection c) { httpTransactionContext.getProvider().execute(c, req, @@ -220,7 +220,7 @@ private static boolean isNTLMFirstHandShake(final String proxy_auth) { private Connection getConnectionForNextRequest(final FilterChainContext ctx, final Request request, final HttpResponsePacket response, - final HttpTransactionContext httpCtx) + final HttpTxContext httpCtx) throws Exception { if (response.getProcessingState().isKeepAlive()) { return ctx.getConnection(); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java index b9e2d6519d..448d004c16 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java @@ -16,7 +16,7 @@ import org.asynchttpclient.Request; import org.asynchttpclient.providers.grizzly.ConnectionManager; import org.asynchttpclient.providers.grizzly.EventHandler; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.filterchain.FilterChainContext; @@ -41,7 +41,7 @@ public boolean handlesStatus(int statusCode) { @SuppressWarnings({"unchecked"}) public boolean handleStatus(final HttpResponsePacket responsePacket, - final HttpTransactionContext httpTransactionContext, + final HttpTxContext httpTransactionContext, final FilterChainContext ctx) { final String redirectURL = responsePacket.getHeader(Header.Location); @@ -83,13 +83,13 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, try { final Connection c = m.obtainConnection(requestToSend, httpTransactionContext.getFuture()); - final HttpTransactionContext newContext = + final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); newContext.setInvocationStatus(CONTINUE); newContext.setRequest(requestToSend); newContext.setRequestUrl(requestToSend.getUrl()); - HttpTransactionContext.set(c, newContext); + HttpTxContext.set(c, newContext); httpTransactionContext.getProvider().execute(c, requestToSend, newContext.getHandler(), @@ -108,7 +108,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, // ------------------------------------------------- Private Methods private boolean sendAsGet(final HttpResponsePacket response, - final HttpTransactionContext ctx) { + final HttpTxContext ctx) { final int statusCode = response.getStatus(); return !(statusCode < 302 || statusCode > 303) && !(statusCode == 302 diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java index 5ec587a422..5e2ec5d0cc 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/StatusHandler.java @@ -13,7 +13,7 @@ package org.asynchttpclient.providers.grizzly.statushandler; -import org.asynchttpclient.providers.grizzly.HttpTransactionContext; +import org.asynchttpclient.providers.grizzly.HttpTxContext; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.http.HttpResponsePacket; @@ -25,7 +25,7 @@ public enum InvocationStatus { } boolean handleStatus(final HttpResponsePacket httpResponse, - final HttpTransactionContext httpTransactionContext, + final HttpTxContext httpTransactionContext, final FilterChainContext ctx); boolean handlesStatus(final int statusCode); From b8736f9e0c021e205aa01202933840b83afca143 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 25 Sep 2013 18:20:05 -0700 Subject: [PATCH 0573/2844] Include a timeout on all Future.get() calls. --- .../async/AsyncProvidersBasicTest.java | 86 +++++++++---------- .../async/AsyncStreamHandlerTest.java | 2 +- .../async/AuthTimeoutTest.java | 8 +- .../asynchttpclient/async/BasicAuthTest.java | 2 +- .../asynchttpclient/async/BasicHttpsTest.java | 4 +- .../asynchttpclient/async/BodyChunkTest.java | 3 +- .../async/BodyDeferringAsyncHandlerTest.java | 5 +- .../async/ByteBufferCapacityTest.java | 3 +- .../asynchttpclient/async/ChunkingTest.java | 3 +- .../async/ConnectionPoolTest.java | 8 +- .../asynchttpclient/async/EmptyBodyTest.java | 2 +- .../async/Expect100ContinueTest.java | 3 +- .../async/FilePartLargeFileTest.java | 5 +- .../org/asynchttpclient/async/FilterTest.java | 15 ++-- .../async/HostnameVerifierTest.java | 11 +-- .../async/HttpToHttpsRedirectTest.java | 9 +- .../async/IdleStateHandlerTest.java | 3 +- .../async/InputStreamTest.java | 3 +- .../async/MaxTotalConnectionTest.java | 7 +- .../async/MultipartUploadTest.java | 3 +- .../async/NoNullResponseTest.java | 5 +- .../async/NonAsciiContentLengthTest.java | 7 +- .../async/PerRequestRelative302Test.java | 9 +- .../async/PerRequestTimeoutTest.java | 9 +- .../async/PostRedirectGetTest.java | 5 +- .../org/asynchttpclient/async/ProxyTest.java | 2 +- .../async/ProxyTunnellingTest.java | 7 +- .../async/PutLargeFileTest.java | 5 +- .../async/QueryParametersTest.java | 5 +- .../org/asynchttpclient/async/RC10KTest.java | 3 +- .../async/RedirectConnectionUsageTest.java | 3 +- .../async/Relative302Test.java | 9 +- .../asynchttpclient/async/RemoteSiteTest.java | 16 ++-- .../async/RetryRequestTest.java | 3 +- .../SimpleAsyncClientErrorBehaviourTest.java | 5 +- .../async/SimpleAsyncHttpClientTest.java | 25 +++--- .../async/TransferListenerTest.java | 7 +- .../async/WebDavBasicTest.java | 35 +++++--- .../async/ZeroCopyFileTest.java | 9 +- .../websocket/ByteMessageTest.java | 9 +- .../websocket/CloseCodeReasonMessageTest.java | 5 +- .../websocket/RedirectTest.java | 35 ++++---- .../websocket/TextMessageTest.java | 19 ++-- 43 files changed, 234 insertions(+), 188 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 0472ef6ba6..974f264e3f 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -78,7 +78,7 @@ public void onThrowable(Throwable t) { fail("Unexpected exception: " + t.getMessage(), t); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertEquals(url, getTargetUrl() + "?q=%20%20x"); } finally { client.close(); @@ -103,7 +103,7 @@ public void onThrowable(Throwable t) { fail("Unexpected exception: " + t.getMessage(), t); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertEquals(url, getTargetUrl() + "?q=a%20b"); } finally { client.close(); @@ -128,7 +128,7 @@ public void onThrowable(Throwable t) { fail("Unexpected exception: " + t.getMessage(), t); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertEquals(url, getTargetUrl()); } finally { client.close(); @@ -172,7 +172,7 @@ public void onThrowable(Throwable t) { } } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -200,7 +200,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -227,7 +227,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -264,7 +264,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -301,7 +301,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -328,7 +328,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); try { String s = response.getResponseBody(); @@ -370,7 +370,7 @@ public void onThrowable(Throwable t) { } } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(10 * 5 * 1000, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -412,7 +412,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -447,7 +447,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -483,7 +483,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -511,7 +511,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -525,7 +525,7 @@ public Response onCompleted(Response response) throws Exception { public void asyncDoPostBodyIsoTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); + Response response = client.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(5, TimeUnit.SECONDS); assertEquals(response.getResponseBody().getBytes("ISO-8859-1"), "\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); } finally { client.close(); @@ -561,7 +561,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -601,7 +601,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -638,7 +638,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -670,7 +670,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -704,7 +704,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -734,7 +734,7 @@ public Response onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { } - }).get(); + }).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-Proxy-Connection"), "keep-alive"); @@ -756,7 +756,7 @@ public void asyncRequestVirtualServerPOSTTest() throws Exception { } Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).setVirtualHost("localhost:" + port1).build(); - Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(); + Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); if (response.getHeader("X-Host").startsWith("localhost")) { @@ -781,7 +781,7 @@ public void asyncDoPutTest() throws Exception { } sb.setLength(sb.length() - 1); - Response response = client.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); + Response response = client.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { @@ -897,7 +897,7 @@ public void asyncDoPostNullBytesTest() throws Exception { Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { @@ -952,7 +952,7 @@ public void asyncConnectInvalidFuture() throws Exception { public void onThrowable(Throwable t) { count.incrementAndGet(); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNull(response, "Should have thrown ExecutionException"); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); @@ -978,7 +978,7 @@ public void asyncConnectInvalidPortFuture() throws Exception { public void onThrowable(Throwable t) { t.printStackTrace(); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNull(response, "Should have thrown ExecutionException"); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); @@ -1004,7 +1004,7 @@ public void asyncConnectInvalidPort() throws Exception { public void onThrowable(Throwable t) { t.printStackTrace(); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNull(response, "No ExecutionException was thrown"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -1085,7 +1085,7 @@ public void onThrowable(Throwable t) { rightCause.set(true); } } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNull(response, "No ExecutionException was thrown"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -1107,7 +1107,7 @@ public void asyncContentLenghtGETTest() throws Exception { public void onThrowable(Throwable t) { fail("Unexpected exception", t); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -1126,7 +1126,7 @@ public void asyncResponseBodyTooLarge() throws Exception { public void onThrowable(Throwable t) { fail("Unexpected exception", t); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); } finally { @@ -1144,7 +1144,7 @@ public void asyncResponseEmptyBody() throws Exception { public void onThrowable(Throwable t) { fail("Unexpected exception", t); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertEquals(response.getResponseBody(), ""); } finally { @@ -1284,7 +1284,7 @@ public Response onCompleted(Response response) throws Exception { Request req = new RequestBuilder("GET").setUrl(getTargetUrl() + "?foo=bar").build(); - client.executeRequest(req, handler).get(); + client.executeRequest(req, handler).get(5, TimeUnit.SECONDS); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timed out"); @@ -1321,7 +1321,7 @@ public Response onCompleted(Response response) throws Exception { } }; - client.prepareGet(getTargetUrl()).execute(handler).get(); + client.prepareGet(getTargetUrl()).execute(handler).get(5, TimeUnit.SECONDS); client.prepareGet(getTargetUrl()).execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { @@ -1415,7 +1415,7 @@ public void onThrowable(Throwable t) { public void asyncDoGetStreamAndBodyTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); + Response response = client.prepareGet("http://www.lemonde.fr").execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -1426,7 +1426,7 @@ public void asyncDoGetStreamAndBodyTest() throws Exception { public void asyncUrlWithoutPathTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); + Response response = client.prepareGet("http://www.lemonde.fr").execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -1437,7 +1437,7 @@ public void asyncUrlWithoutPathTest() throws Exception { public void optionsTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareOptions(getTargetUrl()).execute().get(); + Response response = client.prepareOptions(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("Allow"), "GET,HEAD,POST,OPTIONS,TRACE"); @@ -1450,7 +1450,7 @@ public void optionsTest() throws Exception { public void testAwsS3() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(); + Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(5, TimeUnit.SECONDS); if (response.getResponseBody() == null || response.getResponseBody().equals("")) { fail("No response Body"); } else { @@ -1466,7 +1466,7 @@ public void testAsyncHttpProviderConfig() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setAsyncHttpClientProviderConfig(getProviderConfig()).build()); try { - Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(); + Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(5, TimeUnit.SECONDS); if (response.getResponseBody() == null || response.getResponseBody().equals("")) { fail("No response Body"); } else { @@ -1487,7 +1487,7 @@ public void idleRequestTimeoutTest() throws Exception { long t1 = millisTime(); try { - client.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(); + client.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(10, TimeUnit.SECONDS); fail(); } catch (Throwable ex) { final long elapsedTime = millisTime() - t1; @@ -1560,7 +1560,7 @@ public void headShouldNotAllowBody() throws IllegalArgumentException, IOExceptio public void invalidUri() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.executeRequest(client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build()).get(); + Response response = client.executeRequest(client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build()).get(5, TimeUnit.SECONDS); assertEquals(200, response.getStatusCode()); } finally { client.close(); @@ -1571,7 +1571,7 @@ public void invalidUri() throws Exception { public void asyncHttpClientConfigBeanTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfigBean().setUserAgent("test")); try { - Response response = client.executeRequest(client.prepareGet(getTargetUrl()).build()).get(); + Response response = client.executeRequest(client.prepareGet(getTargetUrl()).build()).get(5, TimeUnit.SECONDS); assertEquals(200, response.getStatusCode()); } finally { client.close(); @@ -1582,7 +1582,7 @@ public void asyncHttpClientConfigBeanTest() throws Exception { public void bodyAsByteTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet(getTargetUrl()).execute().get(); + Response response = client.prepareGet(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBodyAsBytes(), new byte[] {}); } finally { @@ -1594,7 +1594,7 @@ public void bodyAsByteTest() throws Exception { public void mirrorByteTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); + Response response = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(new String(response.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index 1d31d21ac7..d78692f9df 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -560,7 +560,7 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio public Response onCompleted() throws Exception { return builder.build(); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNotNull(r); assertEquals(r.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java index 962e996cd2..dd97e21dfa 100644 --- a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java @@ -85,7 +85,7 @@ public void basicAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server, false); - f.get(); + f.get(5, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { inspectException(e); @@ -99,7 +99,7 @@ public void basicPreemptiveAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server, true); - f.get(); + f.get(5, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { inspectException(e); @@ -113,7 +113,7 @@ public void digestAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server2, false); - f.get(); + f.get(5, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { inspectException(e); @@ -127,7 +127,7 @@ public void digestPreemptiveAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server2, true); - f.get(); + f.get(5, TimeUnit.SECONDS); fail("expected timeout"); } catch (Exception e) { inspectException(e); diff --git a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index 0fecd118d7..ac23977eaf 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -351,7 +351,7 @@ public void stringBuilderBodyConsumerTest() throws Exception { StringBuilder s = new StringBuilder(); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); - Response response = future.get(); + Response response = future.get(3, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(s.toString(), MY_MESSAGE); assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK); diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index 1efde2f983..bd24dce5e3 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -42,7 +42,7 @@ public void zeroCopyPostTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -80,7 +80,7 @@ public void multipleSSLWithoutCacheTest() throws Exception { c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute(); - Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(); + Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); assertEquals(response.getResponseBody(), body); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java index e6d19b6401..1993f43e43 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java @@ -24,6 +24,7 @@ import java.io.ByteArrayInputStream; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import static org.testng.Assert.assertEquals; @@ -50,7 +51,7 @@ public void negativeContentTypeTest() throws Exception { Future future = client.executeRequest(requestBuilder.build()); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBody(), MY_MESSAGE); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java index 09e16e9763..43efb9c44f 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java @@ -22,6 +22,7 @@ import java.io.PipedOutputStream; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import javax.servlet.ServletException; @@ -126,7 +127,7 @@ public void deferredSimple() throws IOException, ExecutionException, TimeoutExce // now be polite and wait for body arrival too (otherwise we would be // dropping the "line" on server) - f.get(); + f.get(5, TimeUnit.SECONDS); // it all should be here now assertEquals(cos.getByteCount(), HALF_GIG); } finally { @@ -155,7 +156,7 @@ public void deferredSimpleWithFailure() throws IOException, ExecutionException, // now be polite and wait for body arrival too (otherwise we would be // dropping the "line" on server) try { - f.get(); + f.get(5, TimeUnit.SECONDS); fail("get() should fail with IOException!"); } catch (Exception e) { // good diff --git a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java index 47c453e886..75165ae503 100644 --- a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java @@ -20,6 +20,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.Enumeration; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import javax.servlet.ServletException; @@ -86,7 +87,7 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep return super.onBodyPartReceived(content); } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index 66e9ef3692..10a0b3cf26 100644 --- a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -18,6 +18,7 @@ import java.io.BufferedInputStream; import java.io.FileInputStream; +import java.util.concurrent.TimeUnit; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -60,7 +61,7 @@ public void testCustomChunking() throws Exception { Request r = builder.build(); - Response response = c.executeRequest(r).get(); + Response response = c.executeRequest(r).get(5, TimeUnit.SECONDS); if (500 == response.getStatusCode()) { StringBuilder sb = new StringBuilder(); sb.append("==============\n"); diff --git a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java index 8bce85b03f..80572786b9 100644 --- a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java @@ -47,7 +47,7 @@ public void testMaxTotalConnections() { for (i = 0; i < 3; i++) { try { log.info("{} requesting url [{}]...", i, url); - Response response = client.prepareGet(url).execute().get(); + Response response = client.prepareGet(url).execute().get(5, TimeUnit.SECONDS); log.info("{} response [{}].", i, response); } catch (Exception ex) { exception = ex; @@ -71,7 +71,7 @@ public void testMaxTotalConnectionsException() { log.info("{} requesting url [{}]...", i, url); if (i < 5) { - client.prepareGet(url).execute().get(); + client.prepareGet(url).execute().get(5, TimeUnit.SECONDS); } else { client.prepareGet(url).execute(); } @@ -112,7 +112,7 @@ public Response onCompleted(Response response) throws Exception { } }; - client.prepareGet(getTargetUrl()).execute(handler).get(); + client.prepareGet(getTargetUrl()).execute(handler).get(5, TimeUnit.SECONDS); server.stop(); server.start(); client.prepareGet(getTargetUrl()).execute(handler); @@ -215,7 +215,7 @@ public Response onCompleted(Response response) throws Exception { }; try { - client.prepareGet(getTargetUrl()).execute(handler).get(); + client.prepareGet(getTargetUrl()).execute(handler).get(5, TimeUnit.SECONDS); fail("Must have received an exception"); } catch (ExecutionException ex) { assertNotNull(ex); diff --git a/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java index 044915333d..ca490c6788 100644 --- a/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java @@ -127,7 +127,7 @@ public Object onCompleted() throws Exception { public void testPutEmptyBody() throws Exception { AsyncHttpClient ahc = getAsyncHttpClient(null); try { - Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(); + Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 204); diff --git a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java index a1de248e24..9b2fb6e0e7 100644 --- a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java +++ b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -64,7 +65,7 @@ public void Expect100Continue() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setHeader("Expect", "100-continue").setBody(SIMPLE_TEXT_FILE).execute(); - Response resp = f.get(); + Response resp = f.get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); diff --git a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java index b6a14f2d39..73b1c71974 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java @@ -17,6 +17,7 @@ import java.io.File; import java.io.IOException; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; @@ -62,7 +63,7 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle public void testPutImageFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build()); try { - Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(); + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -75,7 +76,7 @@ public void testPutLargeTextFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(); + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/FilterTest.java b/api/src/test/java/org/asynchttpclient/async/FilterTest.java index 8f4c90725e..843fa417ee 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilterTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilterTest.java @@ -32,6 +32,7 @@ import java.util.Enumeration; import java.util.List; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import static org.testng.Assert.assertEquals; @@ -73,7 +74,7 @@ public void basicTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { @@ -94,7 +95,7 @@ public void loadThrottleTest() throws Exception { } for (Future f : futures) { - Response r = f.get(); + Response r = f.get(5, TimeUnit.SECONDS); assertNotNull(f.get()); assertEquals(r.getStatusCode(), 200); } @@ -110,7 +111,7 @@ public void maxConnectionsText() throws Exception { AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - /* Response response = */c.preparePost(getTargetUrl()).execute().get(); + /* Response response = */c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); fail("Should have timed out"); } catch (IOException ex) { assertNotNull(ex); @@ -134,7 +135,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -165,7 +166,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -197,7 +198,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(); + Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -230,7 +231,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong").execute().get(); + Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java index 0e2fb055b9..5c7fc5c2ca 100644 --- a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java @@ -20,6 +20,7 @@ import java.util.Enumeration; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.HostnameVerifier; @@ -130,7 +131,7 @@ public void positiveHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new PositiveHostVerifier()).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { Future f = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute(); - Response resp = f.get(); + Response resp = f.get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -145,7 +146,7 @@ public void negativeHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new NegativeHostVerifier()).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { try { - client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -160,7 +161,7 @@ public void remoteIDHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("bouette")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -174,7 +175,7 @@ public void remoteNegHostnameVerifierTest() throws Exception { // request is made to 127.0.0.1, but cert presented for localhost - this should fail final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -188,7 +189,7 @@ public void remotePosHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); + Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); diff --git a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java index e9c6ae6c8d..86bdf98fc0 100644 --- a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.Enumeration; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.ServletException; @@ -95,7 +96,7 @@ public void httpToHttpsRedirect() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2()).execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2()).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-httpToHttps"), "PASS"); @@ -111,13 +112,13 @@ public void httpToHttpsProperConfig() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/test2").execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/test2").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-httpToHttps"), "PASS"); // Test if the internal channel is downgraded to clean http. - response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/foo2").execute().get(); + response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/foo2").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-httpToHttps"), "PASS"); @@ -133,7 +134,7 @@ public void relativeLocationUrl() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "/foo/test").execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "/foo/test").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 302); assertEquals(response.getUri().toString(), getTargetUrl()); diff --git a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java index 3837b799c8..f24030b0ce 100644 --- a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -64,7 +65,7 @@ public void idleStateTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(cg); try { - c.prepareGet(getTargetUrl()).execute().get(); + c.prepareGet(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); } catch (ExecutionException e) { fail("Should allow to finish processing request.", e); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java index a519385473..9d4c86a665 100644 --- a/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java +++ b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java @@ -29,6 +29,7 @@ import java.io.InputStream; import java.io.ByteArrayOutputStream; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import static org.testng.Assert.assertEquals; @@ -96,7 +97,7 @@ public int read() throws IOException { } }; - Response resp = c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute().get(); + Response resp = c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute().get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getHeader("X-Param"), "abc"); diff --git a/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java index e2765f3a3e..ddcacb02d4 100644 --- a/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java @@ -28,6 +28,8 @@ import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; public abstract class MaxTotalConnectionTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); @@ -76,7 +78,8 @@ public void testMaxTotalConnections() { * JFA: Disable this test for 1.2.0 release as it can easily fail because a request may complete before the second one is made, hence failing. The issue occurs frequently on Linux. */ @Test(enabled = false) - public void testMaxTotalConnectionsCorrectExceptionHandling() { + public void testMaxTotalConnectionsCorrectExceptionHandling() + throws TimeoutException { String[] urls = new String[] { "http://google.com", "http://github.com/" }; AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(false).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); @@ -100,7 +103,7 @@ public void testMaxTotalConnectionsCorrectExceptionHandling() { // get results of executed requests for (Future future : futures) { try { - /* Response res = */future.get(); + /* Response res = */future.get(5, TimeUnit.SECONDS); } catch (InterruptedException e) { log.error("Error!", e); } catch (ExecutionException e) { diff --git a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java index d9eb881827..cca751a818 100644 --- a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.List; import java.util.UUID; +import java.util.concurrent.TimeUnit; import java.util.zip.GZIPInputStream; import javax.servlet.ServletException; @@ -181,7 +182,7 @@ public void testSendingSmallFilesAndByteArray() { Request r = builder.build(); - Response res = c.executeRequest(r).get(); + Response res = c.executeRequest(r).get(5, TimeUnit.SECONDS); assertEquals(res.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java index 8d4359b4ea..d3869e6c2c 100644 --- a/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java @@ -29,6 +29,7 @@ import java.security.GeneralSecurityException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; +import java.util.concurrent.TimeUnit; public abstract class NoNullResponseTest extends AbstractBasicTest { private static final String GOOGLE_HTTPS_URL = "https://www.google.com"; @@ -38,9 +39,9 @@ public void multipleSslRequestsWithDelayAndKeepAlive() throws Exception { final AsyncHttpClient client = create(); try { final BoundRequestBuilder builder = client.prepareGet(GOOGLE_HTTPS_URL); - final Response response1 = builder.execute().get(); + final Response response1 = builder.execute().get(5, TimeUnit.SECONDS); Thread.sleep(4000); - final Response response2 = builder.execute().get(); + final Response response2 = builder.execute().get(5, TimeUnit.SECONDS); if (response2 != null) { System.out.println("Success (2nd response was not null)."); } else { diff --git a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java index cbfdf6546c..ddd89be55d 100644 --- a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java @@ -18,6 +18,8 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; @@ -75,12 +77,13 @@ public void testNonAsciiContentLength() throws Exception { execute("\u4E00"); // Unicode CJK ideograph for one } - protected void execute(String body) throws IOException, InterruptedException, ExecutionException { + protected void execute(String body) + throws IOException, InterruptedException, ExecutionException, TimeoutException { AsyncHttpClient client = getAsyncHttpClient(null); try { BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(body).setBodyEncoding("UTF-8"); Future f = r.execute(); - Response resp = f.get(); + Response resp = f.get(5, TimeUnit.SECONDS); assertEquals(resp.getStatusCode(), 200); assertEquals(body, resp.getResponseBody("UTF-8")); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java index edc1856ce5..ddb72f9482 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java @@ -23,6 +23,7 @@ import java.net.URI; import java.util.Enumeration; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.ServletException; @@ -90,7 +91,7 @@ public void redirected302Test() throws Exception { isSet.getAndSet(false); AsyncHttpClient c = getAsyncHttpClient(null); try { - Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); + Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -110,7 +111,7 @@ public void notRedirected302Test() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(false).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); + Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(false).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 302); @@ -142,7 +143,7 @@ public void redirected302InvalidTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. - Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); + Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 404); @@ -159,7 +160,7 @@ public void relativeLocationUrl() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { - Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "/foo/test").execute().get(); + Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "/foo/test").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 302); assertEquals(response.getUri().toString(), getTargetUrl()); diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java index d1a139f324..8dd51d89dd 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java @@ -113,11 +113,12 @@ public void testRequestTimeout() throws IOException { } @Test(groups = { "standalone", "default_provider" }) - public void testGlobalDefaultPerRequestInfiniteTimeout() throws IOException { + public void testGlobalDefaultPerRequestInfiniteTimeout() + throws IOException, TimeoutException { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100).build()); try { Future responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(-1).execute(); - Response response = responseFuture.get(); + Response response = responseFuture.get(5, TimeUnit.SECONDS); assertNotNull(response); } catch (InterruptedException e) { fail("Interrupted.", e); @@ -149,7 +150,7 @@ public void testGlobalRequestTimeout() throws IOException { } @Test(groups = { "standalone", "default_provider" }) - public void testGlobalIdleTimeout() throws IOException { + public void testGlobalIdleTimeout() throws IOException, TimeoutException { final long times[] = new long[] { -1, -1 }; AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).build()); @@ -172,7 +173,7 @@ public void onThrowable(Throwable t) { super.onThrowable(t); } }); - Response response = responseFuture.get(); + Response response = responseFuture.get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getResponseBody(), MSG + MSG); } catch (InterruptedException e) { diff --git a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java index e6a338cfc0..b4c018e03b 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import javax.servlet.ServletException; @@ -101,7 +102,7 @@ public void onThrowable(Throwable t) { } }); - int statusCode = responseFuture.get(); + int statusCode = responseFuture.get(5, TimeUnit.SECONDS); assertEquals(statusCode, 200); } finally { p.close(); @@ -136,7 +137,7 @@ public void onThrowable(Throwable t) { } }); - int statusCode = responseFuture.get(); + int statusCode = responseFuture.get(5, TimeUnit.SECONDS); assertEquals(statusCode, 200); } finally { p.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java index 5436cb05d8..73cf2dc56b 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java @@ -122,7 +122,7 @@ public void testNonProxyHosts() throws IOException, ExecutionException, TimeoutE try { String target = "http://127.0.0.1:1234/"; - client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1).addNonProxyHost("127.0.0.1")).execute().get(); + client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1).addNonProxyHost("127.0.0.1")).execute().get(5, TimeUnit.SECONDS); assertFalse(true); } catch (Throwable e) { assertNotNull(e.getCause()); diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index e9cba6194c..204ebb0f02 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.asynchttpclient.AsyncCompletionHandlerBase; @@ -93,7 +94,7 @@ public Response onCompleted(Response response) throws Exception { return response; } }); - Response r = responseFuture.get(); + Response r = responseFuture.get(5, TimeUnit.SECONDS); assertEquals(r.getStatusCode(), 200); assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); } finally { @@ -121,7 +122,7 @@ public Response onCompleted(Response response) throws Exception { return response; } }); - Response r = responseFuture.get(); + Response r = responseFuture.get(5, TimeUnit.SECONDS); assertEquals(r.getStatusCode(), 200); assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); } finally { @@ -138,7 +139,7 @@ public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, .setHeader("Content-Type", "text/html")// .build(); try { - Response r = client.get().get(); + Response r = client.get().get(5, TimeUnit.SECONDS); assertEquals(r.getStatusCode(), 200); assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); diff --git a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index e4f1a68c75..70c21c588c 100644 --- a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -17,6 +17,7 @@ import java.io.File; import java.io.IOException; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -43,7 +44,7 @@ public void testPutLargeFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build()); try { - Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -57,7 +58,7 @@ public void testPutSmallFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java index 1bc842399a..7312598a60 100644 --- a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java +++ b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java @@ -84,7 +84,8 @@ public void testQueryParameters() throws IOException, ExecutionException, Timeou } @Test(groups = { "standalone", "default_provider" }) - public void testUrlRequestParametersEncoding() throws IOException, ExecutionException, InterruptedException { + public void testUrlRequestParametersEncoding() + throws IOException, ExecutionException, InterruptedException, TimeoutException { String URL = getTargetUrl() + "?q="; String REQUEST_PARAM = "github github \ngithub"; @@ -92,7 +93,7 @@ public void testUrlRequestParametersEncoding() throws IOException, ExecutionExce try { String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); LoggerFactory.getLogger(QueryParametersTest.class).info("Executing request [{}] ...", requestUrl2); - Response response = client.prepareGet(requestUrl2).execute().get(); + Response response = client.prepareGet(requestUrl2).execute().get(5, TimeUnit.SECONDS); String s = URLDecoder.decode(response.getHeader("q"), "UTF-8"); assertEquals(s, REQUEST_PARAM); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/RC10KTest.java b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java index 7cecf24d13..eefbbf8beb 100644 --- a/api/src/test/java/org/asynchttpclient/async/RC10KTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; @@ -106,7 +107,7 @@ public void rc10kProblem() throws IOException, ExecutionException, TimeoutExcept } i = 0; for (Future fResp : resps) { - Integer resp = fResp.get(); + Integer resp = fResp.get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.intValue(), i++); } diff --git a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java index a27873d108..e0524e9d81 100644 --- a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Date; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -86,7 +87,7 @@ public void testGetRedirectFinalUrl() throws Exception { ListenableFuture response = c.executeRequest(r); Response res = null; - res = response.get(); + res = response.get(3, TimeUnit.SECONDS); assertNotNull(res.getResponseBody()); assertEquals(res.getUri().toString(), BASE_URL + "/overthere"); diff --git a/api/src/test/java/org/asynchttpclient/async/Relative302Test.java b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java index 86c21eaac5..7f0bb6b1eb 100644 --- a/api/src/test/java/org/asynchttpclient/async/Relative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java @@ -23,6 +23,7 @@ import java.net.URI; import java.util.Enumeration; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.ServletException; @@ -89,7 +90,7 @@ public void redirected302Test() throws Exception { AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "http://www.google.com/").execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "http://www.google.com/").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -110,7 +111,7 @@ public void redirected302InvalidTest() throws Exception { // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 404); @@ -131,7 +132,7 @@ public void absolutePathRedirectTest() throws Exception { String redirectTarget = "/bar/test"; String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getUri().toString(), destinationUrl); @@ -152,7 +153,7 @@ public void relativePathRedirectTest() throws Exception { String redirectTarget = "bar/test1"; String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getUri().toString(), destinationUrl); diff --git a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java index a5025ffb17..1e2b0d96de 100644 --- a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java @@ -136,7 +136,7 @@ public Response onCompleted(Response response) throws Exception { l.countDown(); } } - }).get(); + }).get(5, TimeUnit.SECONDS); if (!l.await(5, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -153,7 +153,7 @@ public void invalidStreamTest2() throws Exception { AsyncHttpClient c = getAsyncHttpClient(config); try { - Response response = c.prepareGet("http://bit.ly/aUjTtG").execute().get(); + Response response = c.prepareGet("http://bit.ly/aUjTtG").execute().get(5, TimeUnit.SECONDS); if (response != null) { System.out.println(response); } @@ -170,7 +170,7 @@ public void invalidStreamTest2() throws Exception { public void asyncFullBodyProperlyRead() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); + Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(5, TimeUnit.SECONDS); InputStream stream = r.getResponseBodyAsStream(); // FIXME available is an ESTIMATE!!! @@ -191,7 +191,7 @@ public void testUrlRequestParametersEncoding() throws Exception { try { String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); logger.info(String.format("Executing request [%s] ...", requestUrl2)); - Response response = client.prepareGet(requestUrl2).execute().get(); + Response response = client.prepareGet(requestUrl2).execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 301); } finally { client.close(); @@ -207,7 +207,7 @@ public void testUrlRequestParametersEncoding() throws Exception { public void testAHC60() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(); + Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -220,7 +220,7 @@ public void stripQueryStringTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(); + Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -235,7 +235,7 @@ public void stripQueryStringNegativeTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setRemoveQueryParamsOnRedirect(false).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(); + Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 301); @@ -254,7 +254,7 @@ public void evilCoookieTest() throws Exception { builder2.addHeader("Content-Type", "text/plain"); builder2.addCookie(new Cookie(".google.com", "evilcookie", "evilcookie", "test", "/", 10, false, 1, false, false, null, null, Collections. emptySet())); Request request2 = builder2.build(); - Response response = c.executeRequest(request2).get(); + Response response = c.executeRequest(request2).get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java index 6c27502c6e..4d62240d49 100644 --- a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java @@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; +import java.util.concurrent.TimeUnit; import static org.testng.Assert.*; @@ -71,7 +72,7 @@ public AbstractHandler configureHandler() throws Exception { public void testMaxRetry() throws Exception { AsyncHttpClient ahc = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setMaxRequestRetry(0).build()); try { - ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build()).get(); + ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build()).get(5, TimeUnit.SECONDS); fail(); } catch (Exception t) { assertNotNull(t.getCause()); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java index 76dac21427..f8e697d431 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java @@ -17,6 +17,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -46,7 +47,7 @@ public void testAccumulateErrorBody() throws Exception { Future future = client.get(new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 404); assertEquals(o.toString(), ""); assertTrue(response.getResponseBody().startsWith("")); @@ -63,7 +64,7 @@ public void testOmitErrorBody() throws Exception { Future future = client.get(new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 404); assertEquals(o.toString(), ""); assertEquals(response.getResponseBody(), ""); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index ef0dfacf51..5ab0e349e9 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -19,6 +19,7 @@ import java.io.File; import java.io.IOException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import org.asynchttpclient.ByteArrayPart; import org.asynchttpclient.Response; @@ -45,7 +46,7 @@ public void inpuStreamBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBody(), MY_MESSAGE); } finally { @@ -62,7 +63,7 @@ public void stringBuilderBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(s.toString(), MY_MESSAGE); } finally { @@ -79,7 +80,7 @@ public void byteArrayOutputStreamBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -96,7 +97,7 @@ public void requestByteArrayOutputStreamBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -118,7 +119,7 @@ public void testPutZeroBytesFileTest() throws Exception { Future future = client.put(new FileBodyGenerator(tmpfile)); System.out.println("waiting for response"); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); tmpfile.delete(); @@ -152,7 +153,7 @@ public void testDeriveOverrideURL() throws Exception { try { Future future = derived.post(generator, consumer); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -203,7 +204,7 @@ public void onBytesReceived(String url, long amount, long current, long total) { Future future = client.post(generator, consumer); - Response response = future.get(); + Response response = future.get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -229,11 +230,11 @@ public void testCloseDerivedValidMaster() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl()).build(); SimpleAsyncHttpClient derived = client.derive().build(); try { - derived.get().get(); + derived.get().get(5, TimeUnit.SECONDS); derived.close(); - Response response = client.get().get(); + Response response = client.get().get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 200); } finally { @@ -249,7 +250,7 @@ public void testCloseMasterInvalidDerived() throws Exception { client.close(); try { - derived.get().get(); + derived.get().get(5, TimeUnit.SECONDS); fail("Expected closed AHC"); } catch (IOException e) { // expected @@ -260,7 +261,7 @@ public void testCloseMasterInvalidDerived() throws Exception { public void testMultiPartPut() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl() + "/multipart").build(); try { - Response response = client.put(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); + Response response = client.put(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(5, TimeUnit.SECONDS); String body = response.getResponseBody(); String contentType = response.getHeader("X-Content-Type"); @@ -284,7 +285,7 @@ public void testMultiPartPut() throws Exception { public void testMultiPartPost() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl() + "/multipart").build(); try { - Response response = client.post(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); + Response response = client.post(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(5, TimeUnit.SECONDS); String body = response.getResponseBody(); String contentType = response.getHeader("X-Content-Type"); diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 38e0e402b9..15b63b2b58 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -18,6 +18,7 @@ import java.io.File; import java.io.IOException; import java.util.Enumeration; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; @@ -114,7 +115,7 @@ public void onThrowable(Throwable t) { }); try { - Response response = c.prepareGet(getTargetUrl()).execute(tl).get(); + Response response = c.prepareGet(getTargetUrl()).execute(tl).get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -175,7 +176,7 @@ public void onThrowable(Throwable t) { }); try { - Response response = client.preparePut(getTargetUrl()).setBody(file).execute(tl).get(); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute(tl).get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -234,7 +235,7 @@ public void onThrowable(Throwable t) { }); try { - Response response = client.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(file)).execute(tl).get(); + Response response = client.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(file)).execute(tl).get(5, TimeUnit.SECONDS); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index 8959d7a8bc..dc03ca2afe 100644 --- a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -18,6 +18,8 @@ import java.io.File; import java.io.IOException; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import org.apache.catalina.Context; import org.apache.catalina.Engine; @@ -90,19 +92,20 @@ public void clean() throws InterruptedException, Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { Request deleteRequest = new RequestBuilder("DELETE").setUrl(getTargetUrl()).build(); - c.executeRequest(deleteRequest).get(); + c.executeRequest(deleteRequest).get(5, TimeUnit.SECONDS); } finally { c.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void mkcolWebDavTest1() throws InterruptedException, IOException, ExecutionException { + public void mkcolWebDavTest1() + throws InterruptedException, IOException, ExecutionException, TimeoutException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(); + Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 201); } finally { @@ -111,12 +114,13 @@ public void mkcolWebDavTest1() throws InterruptedException, IOException, Executi } @Test(groups = { "standalone", "default_provider" }) - public void mkcolWebDavTest2() throws InterruptedException, IOException, ExecutionException { + public void mkcolWebDavTest2() + throws InterruptedException, IOException, ExecutionException, TimeoutException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl() + "/folder2").build(); - Response response = c.executeRequest(mkcolRequest).get(); + Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 409); } finally { c.close(); @@ -124,12 +128,13 @@ public void mkcolWebDavTest2() throws InterruptedException, IOException, Executi } @Test(groups = { "standalone", "default_provider" }) - public void basicPropFindWebDavTest() throws InterruptedException, IOException, ExecutionException { + public void basicPropFindWebDavTest() + throws InterruptedException, IOException, ExecutionException, TimeoutException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(propFindRequest).get(); + Response response = c.executeRequest(propFindRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 404); } finally { @@ -138,20 +143,21 @@ public void basicPropFindWebDavTest() throws InterruptedException, IOException, } @Test(groups = { "standalone", "default_provider" }) - public void propFindWebDavTest() throws InterruptedException, IOException, ExecutionException { + public void propFindWebDavTest() + throws InterruptedException, IOException, ExecutionException, TimeoutException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(); + Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 201); Request putRequest = new RequestBuilder("PUT").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).setBody("this is a test").build(); - response = c.executeRequest(putRequest).get(); + response = c.executeRequest(putRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 201); Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).build(); - response = c.executeRequest(propFindRequest).get(); + response = c.executeRequest(propFindRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 207); assertTrue(response.getResponseBody().contains("HTTP/1.1 200 OK")); @@ -161,12 +167,13 @@ public void propFindWebDavTest() throws InterruptedException, IOException, Execu } @Test(groups = { "standalone", "default_provider" }) - public void propFindCompletionHandlerWebDavTest() throws InterruptedException, IOException, ExecutionException { + public void propFindCompletionHandlerWebDavTest() + throws InterruptedException, IOException, ExecutionException, TimeoutException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(); + Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); assertEquals(response.getStatusCode(), 201); Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); @@ -184,7 +191,7 @@ public void onThrowable(Throwable t) { public WebDavResponse onCompleted(WebDavResponse response) throws Exception { return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNotNull(webDavResponse); assertEquals(webDavResponse.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java index 490931ce8c..f2ba675ead 100644 --- a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java @@ -21,6 +21,7 @@ import java.net.URISyntaxException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; @@ -85,7 +86,7 @@ public STATE onContentWriteCompleted() { public Response onCompleted(Response response) throws Exception { return response; } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -101,7 +102,7 @@ public void zeroCopyPutTest() throws IOException, ExecutionException, TimeoutExc AsyncHttpClient client = getAsyncHttpClient(null); try { Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setBody(SIMPLE_TEXT_FILE).execute(); - Response resp = f.get(); + Response resp = f.get(5, TimeUnit.SECONDS); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -142,7 +143,7 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { public Response onCompleted() throws Exception { return null; } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNull(resp); assertEquals(SIMPLE_TEXT_FILE.length(), tmp.length()); } finally { @@ -184,7 +185,7 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { public Response onCompleted() throws Exception { return null; } - }).get(); + }).get(5, TimeUnit.SECONDS); assertNull(resp); assertEquals(SIMPLE_TEXT_FILE.length(), tmp.length()); } finally { diff --git a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java index 5a362fd53a..9788631eba 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java @@ -15,6 +15,7 @@ import static org.testng.Assert.assertEquals; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHttpClient; @@ -67,7 +68,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.sendMessage("ECHO".getBytes()); @@ -118,7 +119,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); @@ -170,7 +171,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); latch.await(); assertEquals(text.get(), "ECHOECHO".getBytes()); @@ -218,7 +219,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.stream("ECHO".getBytes(), false); websocket.stream("ECHO".getBytes(), true); latch.await(); diff --git a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java index 12fa531e6f..f4dcf1bae5 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java @@ -15,6 +15,7 @@ import static org.testng.Assert.*; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHttpClient; @@ -41,7 +42,7 @@ public void onCloseWithCode() throws Exception { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(5, TimeUnit.SECONDS); websocket.close(); @@ -59,7 +60,7 @@ public void onCloseWithCodeServerClose() throws Exception { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); + c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(5, TimeUnit.SECONDS); latch.await(); assertEquals(text.get(), "1001-Idle Timeout"); diff --git a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java index 92e08e10a2..74f2b359cf 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import javax.servlet.ServletException; @@ -79,26 +80,28 @@ public void testRedirectToWSResource() throws Exception { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getRedirectURL()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { + WebSocket websocket = c.prepareGet(getRedirectURL()).execute( + new WebSocketUpgradeHandler.Builder().addWebSocketListener( + new WebSocketListener() { - @Override - public void onOpen(WebSocket websocket) { - text.set("OnOpen"); - latch.countDown(); - } + @Override + public void onOpen(WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } - @Override - public void onClose(WebSocket websocket) { - } + @Override + public void onClose(WebSocket websocket) { + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(); + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(5, TimeUnit.SECONDS); - latch.await(); + latch.await(5, TimeUnit.SECONDS); assertEquals(text.get(), "OnOpen"); websocket.close(); } finally { diff --git a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java index a63c0a15eb..adc670585e 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java @@ -15,6 +15,7 @@ import static org.testng.Assert.*; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHttpClient; @@ -58,7 +59,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); latch.await(); assertEquals(text.get(), "OnOpen"); @@ -73,7 +74,7 @@ public void onEmptyListenerTest() throws Exception { try { WebSocket websocket = null; try { - websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().build()).get(); + websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().build()).get(5, TimeUnit.SECONDS); } catch (Throwable t) { fail(); } @@ -89,7 +90,7 @@ public void onFailureTest() throws Exception { try { Throwable t = null; try { - /* WebSocket websocket = */c.prepareGet("ws://abcdefg").execute(new WebSocketUpgradeHandler.Builder().build()).get(); + /* WebSocket websocket = */c.prepareGet("ws://abcdefg").execute(new WebSocketUpgradeHandler.Builder().build()).get(5, TimeUnit.SECONDS); } catch (Throwable t2) { t = t2; } @@ -123,7 +124,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); latch.await(); assertEquals(text.get(), "OnClose"); @@ -156,7 +157,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.close(); @@ -200,7 +201,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.sendTextMessage("ECHO"); @@ -270,7 +271,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.sendTextMessage("ECHO"); @@ -315,7 +316,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); latch.await(); assertEquals(text.get(), "ECHOECHO"); @@ -356,7 +357,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(); + }).build()).get(5, TimeUnit.SECONDS); websocket.streamText("ECHO", false); websocket.streamText("ECHO", true); From e9f0b877401e3366df2a60278a1a76b84b5a1bd4 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 25 Sep 2013 19:19:05 -0700 Subject: [PATCH 0574/2844] Reverting. --- .../async/AsyncProvidersBasicTest.java | 86 +++++++++---------- .../async/AsyncStreamHandlerTest.java | 2 +- .../async/AuthTimeoutTest.java | 8 +- .../asynchttpclient/async/BasicAuthTest.java | 2 +- .../asynchttpclient/async/BasicHttpsTest.java | 4 +- .../asynchttpclient/async/BodyChunkTest.java | 3 +- .../async/BodyDeferringAsyncHandlerTest.java | 5 +- .../async/ByteBufferCapacityTest.java | 3 +- .../asynchttpclient/async/ChunkingTest.java | 3 +- .../async/ConnectionPoolTest.java | 8 +- .../asynchttpclient/async/EmptyBodyTest.java | 2 +- .../async/Expect100ContinueTest.java | 3 +- .../async/FilePartLargeFileTest.java | 5 +- .../org/asynchttpclient/async/FilterTest.java | 15 ++-- .../async/HostnameVerifierTest.java | 11 ++- .../async/HttpToHttpsRedirectTest.java | 9 +- .../async/IdleStateHandlerTest.java | 3 +- .../async/InputStreamTest.java | 3 +- .../async/MaxTotalConnectionTest.java | 7 +- .../async/MultipartUploadTest.java | 3 +- .../async/NoNullResponseTest.java | 5 +- .../async/NonAsciiContentLengthTest.java | 7 +- .../async/PerRequestRelative302Test.java | 9 +- .../async/PerRequestTimeoutTest.java | 9 +- .../async/PostRedirectGetTest.java | 5 +- .../org/asynchttpclient/async/ProxyTest.java | 2 +- .../async/ProxyTunnellingTest.java | 7 +- .../async/PutLargeFileTest.java | 5 +- .../async/QueryParametersTest.java | 5 +- .../org/asynchttpclient/async/RC10KTest.java | 3 +- .../async/RedirectConnectionUsageTest.java | 3 +- .../async/Relative302Test.java | 9 +- .../asynchttpclient/async/RemoteSiteTest.java | 16 ++-- .../async/RetryRequestTest.java | 3 +- .../SimpleAsyncClientErrorBehaviourTest.java | 5 +- .../async/SimpleAsyncHttpClientTest.java | 25 +++--- .../async/TransferListenerTest.java | 7 +- .../async/WebDavBasicTest.java | 35 +++----- .../async/ZeroCopyFileTest.java | 9 +- .../websocket/ByteMessageTest.java | 9 +- .../websocket/CloseCodeReasonMessageTest.java | 5 +- .../websocket/RedirectTest.java | 35 ++++---- .../websocket/TextMessageTest.java | 19 ++-- 43 files changed, 188 insertions(+), 234 deletions(-) diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 974f264e3f..0472ef6ba6 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -78,7 +78,7 @@ public void onThrowable(Throwable t) { fail("Unexpected exception: " + t.getMessage(), t); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertEquals(url, getTargetUrl() + "?q=%20%20x"); } finally { client.close(); @@ -103,7 +103,7 @@ public void onThrowable(Throwable t) { fail("Unexpected exception: " + t.getMessage(), t); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertEquals(url, getTargetUrl() + "?q=a%20b"); } finally { client.close(); @@ -128,7 +128,7 @@ public void onThrowable(Throwable t) { fail("Unexpected exception: " + t.getMessage(), t); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertEquals(url, getTargetUrl()); } finally { client.close(); @@ -172,7 +172,7 @@ public void onThrowable(Throwable t) { } } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -200,7 +200,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -227,7 +227,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -264,7 +264,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -301,7 +301,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -328,7 +328,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); try { String s = response.getResponseBody(); @@ -370,7 +370,7 @@ public void onThrowable(Throwable t) { } } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(10 * 5 * 1000, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -412,7 +412,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -447,7 +447,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -483,7 +483,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -511,7 +511,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -525,7 +525,7 @@ public Response onCompleted(Response response) throws Exception { public void asyncDoPostBodyIsoTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(5, TimeUnit.SECONDS); + Response response = client.preparePost(getTargetUrl()).addHeader("X-ISO", "true").setBody("\u017D\u017D\u017D\u017D\u017D\u017D").execute().get(); assertEquals(response.getResponseBody().getBytes("ISO-8859-1"), "\u017D\u017D\u017D\u017D\u017D\u017D".getBytes("ISO-8859-1")); } finally { client.close(); @@ -561,7 +561,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -601,7 +601,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -638,7 +638,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -670,7 +670,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -704,7 +704,7 @@ public Response onCompleted(Response response) throws Exception { } return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timeout out"); } @@ -734,7 +734,7 @@ public Response onCompleted(Response response) throws Exception { @Override public void onThrowable(Throwable t) { } - }).get(5, TimeUnit.SECONDS); + }).get(); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-Proxy-Connection"), "keep-alive"); @@ -756,7 +756,7 @@ public void asyncRequestVirtualServerPOSTTest() throws Exception { } Request request = new RequestBuilder("POST").setUrl(getTargetUrl()).setHeaders(h).setParameters(m).setVirtualHost("localhost:" + port1).build(); - Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(5, TimeUnit.SECONDS); + Response response = client.executeRequest(request, new AsyncCompletionHandlerAdapter()).get(); assertEquals(response.getStatusCode(), 200); if (response.getHeader("X-Host").startsWith("localhost")) { @@ -781,7 +781,7 @@ public void asyncDoPutTest() throws Exception { } sb.setLength(sb.length() - 1); - Response response = client.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()).get(); assertEquals(response.getStatusCode(), 200); } finally { @@ -897,7 +897,7 @@ public void asyncDoPostNullBytesTest() throws Exception { Future future = client.preparePost(getTargetUrl()).setHeaders(h).setBody(sb.toString()).execute(new AsyncCompletionHandlerAdapter()); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { @@ -952,7 +952,7 @@ public void asyncConnectInvalidFuture() throws Exception { public void onThrowable(Throwable t) { count.incrementAndGet(); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNull(response, "Should have thrown ExecutionException"); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); @@ -978,7 +978,7 @@ public void asyncConnectInvalidPortFuture() throws Exception { public void onThrowable(Throwable t) { t.printStackTrace(); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNull(response, "Should have thrown ExecutionException"); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); @@ -1004,7 +1004,7 @@ public void asyncConnectInvalidPort() throws Exception { public void onThrowable(Throwable t) { t.printStackTrace(); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNull(response, "No ExecutionException was thrown"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -1085,7 +1085,7 @@ public void onThrowable(Throwable t) { rightCause.set(true); } } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNull(response, "No ExecutionException was thrown"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -1107,7 +1107,7 @@ public void asyncContentLenghtGETTest() throws Exception { public void onThrowable(Throwable t) { fail("Unexpected exception", t); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -1126,7 +1126,7 @@ public void asyncResponseBodyTooLarge() throws Exception { public void onThrowable(Throwable t) { fail("Unexpected exception", t); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNotNull(response.getResponseBodyExcerpt(Integer.MAX_VALUE)); } finally { @@ -1144,7 +1144,7 @@ public void asyncResponseEmptyBody() throws Exception { public void onThrowable(Throwable t) { fail("Unexpected exception", t); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertEquals(response.getResponseBody(), ""); } finally { @@ -1284,7 +1284,7 @@ public Response onCompleted(Response response) throws Exception { Request req = new RequestBuilder("GET").setUrl(getTargetUrl() + "?foo=bar").build(); - client.executeRequest(req, handler).get(5, TimeUnit.SECONDS); + client.executeRequest(req, handler).get(); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { fail("Timed out"); @@ -1321,7 +1321,7 @@ public Response onCompleted(Response response) throws Exception { } }; - client.prepareGet(getTargetUrl()).execute(handler).get(5, TimeUnit.SECONDS); + client.prepareGet(getTargetUrl()).execute(handler).get(); client.prepareGet(getTargetUrl()).execute(handler); if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { @@ -1415,7 +1415,7 @@ public void onThrowable(Throwable t) { public void asyncDoGetStreamAndBodyTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.lemonde.fr").execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -1426,7 +1426,7 @@ public void asyncDoGetStreamAndBodyTest() throws Exception { public void asyncUrlWithoutPathTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.lemonde.fr").execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet("http://www.lemonde.fr").execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -1437,7 +1437,7 @@ public void asyncUrlWithoutPathTest() throws Exception { public void optionsTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareOptions(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareOptions(getTargetUrl()).execute().get(); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("Allow"), "GET,HEAD,POST,OPTIONS,TRACE"); @@ -1450,7 +1450,7 @@ public void optionsTest() throws Exception { public void testAwsS3() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(); if (response.getResponseBody() == null || response.getResponseBody().equals("")) { fail("No response Body"); } else { @@ -1466,7 +1466,7 @@ public void testAsyncHttpProviderConfig() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setAsyncHttpClientProviderConfig(getProviderConfig()).build()); try { - Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet("http://test.s3.amazonaws.com/").execute().get(); if (response.getResponseBody() == null || response.getResponseBody().equals("")) { fail("No response Body"); } else { @@ -1487,7 +1487,7 @@ public void idleRequestTimeoutTest() throws Exception { long t1 = millisTime(); try { - client.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(10, TimeUnit.SECONDS); + client.prepareGet(getTargetUrl()).setHeaders(h).setUrl(getTargetUrl()).execute().get(); fail(); } catch (Throwable ex) { final long elapsedTime = millisTime() - t1; @@ -1560,7 +1560,7 @@ public void headShouldNotAllowBody() throws IllegalArgumentException, IOExceptio public void invalidUri() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.executeRequest(client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build()).get(5, TimeUnit.SECONDS); + Response response = client.executeRequest(client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build()).get(); assertEquals(200, response.getStatusCode()); } finally { client.close(); @@ -1571,7 +1571,7 @@ public void invalidUri() throws Exception { public void asyncHttpClientConfigBeanTest() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfigBean().setUserAgent("test")); try { - Response response = client.executeRequest(client.prepareGet(getTargetUrl()).build()).get(5, TimeUnit.SECONDS); + Response response = client.executeRequest(client.prepareGet(getTargetUrl()).build()).get(); assertEquals(200, response.getStatusCode()); } finally { client.close(); @@ -1582,7 +1582,7 @@ public void asyncHttpClientConfigBeanTest() throws Exception { public void bodyAsByteTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet(getTargetUrl()).execute().get(); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBodyAsBytes(), new byte[] {}); } finally { @@ -1594,7 +1594,7 @@ public void bodyAsByteTest() throws Exception { public void mirrorByteTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(5, TimeUnit.SECONDS); + Response response = client.preparePost(getTargetUrl()).setBody("MIRROR").execute().get(); assertEquals(response.getStatusCode(), 200); assertEquals(new String(response.getResponseBodyAsBytes(), "UTF-8"), "MIRROR"); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index d78692f9df..1d31d21ac7 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -560,7 +560,7 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio public Response onCompleted() throws Exception { return builder.build(); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNotNull(r); assertEquals(r.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java index dd97e21dfa..962e996cd2 100644 --- a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java @@ -85,7 +85,7 @@ public void basicAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server, false); - f.get(5, TimeUnit.SECONDS); + f.get(); fail("expected timeout"); } catch (Exception e) { inspectException(e); @@ -99,7 +99,7 @@ public void basicPreemptiveAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server, true); - f.get(5, TimeUnit.SECONDS); + f.get(); fail("expected timeout"); } catch (Exception e) { inspectException(e); @@ -113,7 +113,7 @@ public void digestAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server2, false); - f.get(5, TimeUnit.SECONDS); + f.get(); fail("expected timeout"); } catch (Exception e) { inspectException(e); @@ -127,7 +127,7 @@ public void digestPreemptiveAuthTimeoutTest() throws Exception { AsyncHttpClient client = newClient(); try { Future f = execute(client, server2, true); - f.get(5, TimeUnit.SECONDS); + f.get(); fail("expected timeout"); } catch (Exception e) { inspectException(e); diff --git a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java index ac23977eaf..0fecd118d7 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicAuthTest.java @@ -351,7 +351,7 @@ public void stringBuilderBodyConsumerTest() throws Exception { StringBuilder s = new StringBuilder(); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); - Response response = future.get(3, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(s.toString(), MY_MESSAGE); assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK); diff --git a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java index bd24dce5e3..1efde2f983 100644 --- a/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BasicHttpsTest.java @@ -42,7 +42,7 @@ public void zeroCopyPostTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); + Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -80,7 +80,7 @@ public void multipleSSLWithoutCacheTest() throws Exception { c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute(); - Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).setBody(body).setHeader("Content-Type", "text/html").execute().get(); assertEquals(response.getResponseBody(), body); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java index 1993f43e43..e6d19b6401 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyChunkTest.java @@ -24,7 +24,6 @@ import java.io.ByteArrayInputStream; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import static org.testng.Assert.assertEquals; @@ -51,7 +50,7 @@ public void negativeContentTypeTest() throws Exception { Future future = client.executeRequest(requestBuilder.build()); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBody(), MY_MESSAGE); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java index 43efb9c44f..09e16e9763 100644 --- a/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/BodyDeferringAsyncHandlerTest.java @@ -22,7 +22,6 @@ import java.io.PipedOutputStream; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import javax.servlet.ServletException; @@ -127,7 +126,7 @@ public void deferredSimple() throws IOException, ExecutionException, TimeoutExce // now be polite and wait for body arrival too (otherwise we would be // dropping the "line" on server) - f.get(5, TimeUnit.SECONDS); + f.get(); // it all should be here now assertEquals(cos.getByteCount(), HALF_GIG); } finally { @@ -156,7 +155,7 @@ public void deferredSimpleWithFailure() throws IOException, ExecutionException, // now be polite and wait for body arrival too (otherwise we would be // dropping the "line" on server) try { - f.get(5, TimeUnit.SECONDS); + f.get(); fail("get() should fail with IOException!"); } catch (Exception e) { // good diff --git a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java index 75165ae503..47c453e886 100644 --- a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java @@ -20,7 +20,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.Enumeration; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import javax.servlet.ServletException; @@ -87,7 +86,7 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep return super.onBodyPartReceived(content); } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java index 10a0b3cf26..66e9ef3692 100644 --- a/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ChunkingTest.java @@ -18,7 +18,6 @@ import java.io.BufferedInputStream; import java.io.FileInputStream; -import java.util.concurrent.TimeUnit; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -61,7 +60,7 @@ public void testCustomChunking() throws Exception { Request r = builder.build(); - Response response = c.executeRequest(r).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(r).get(); if (500 == response.getStatusCode()) { StringBuilder sb = new StringBuilder(); sb.append("==============\n"); diff --git a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java index 80572786b9..8bce85b03f 100644 --- a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java @@ -47,7 +47,7 @@ public void testMaxTotalConnections() { for (i = 0; i < 3; i++) { try { log.info("{} requesting url [{}]...", i, url); - Response response = client.prepareGet(url).execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet(url).execute().get(); log.info("{} response [{}].", i, response); } catch (Exception ex) { exception = ex; @@ -71,7 +71,7 @@ public void testMaxTotalConnectionsException() { log.info("{} requesting url [{}]...", i, url); if (i < 5) { - client.prepareGet(url).execute().get(5, TimeUnit.SECONDS); + client.prepareGet(url).execute().get(); } else { client.prepareGet(url).execute(); } @@ -112,7 +112,7 @@ public Response onCompleted(Response response) throws Exception { } }; - client.prepareGet(getTargetUrl()).execute(handler).get(5, TimeUnit.SECONDS); + client.prepareGet(getTargetUrl()).execute(handler).get(); server.stop(); server.start(); client.prepareGet(getTargetUrl()).execute(handler); @@ -215,7 +215,7 @@ public Response onCompleted(Response response) throws Exception { }; try { - client.prepareGet(getTargetUrl()).execute(handler).get(5, TimeUnit.SECONDS); + client.prepareGet(getTargetUrl()).execute(handler).get(); fail("Must have received an exception"); } catch (ExecutionException ex) { assertNotNull(ex); diff --git a/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java index ca490c6788..044915333d 100644 --- a/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/EmptyBodyTest.java @@ -127,7 +127,7 @@ public Object onCompleted() throws Exception { public void testPutEmptyBody() throws Exception { AsyncHttpClient ahc = getAsyncHttpClient(null); try { - Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(5, TimeUnit.SECONDS); + Response response = ahc.preparePut(getTargetUrl()).setBody("String").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 204); diff --git a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java index 9b2fb6e0e7..a1de248e24 100644 --- a/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java +++ b/api/src/test/java/org/asynchttpclient/async/Expect100ContinueTest.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -65,7 +64,7 @@ public void Expect100Continue() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setHeader("Expect", "100-continue").setBody(SIMPLE_TEXT_FILE).execute(); - Response resp = f.get(5, TimeUnit.SECONDS); + Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); diff --git a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java index 73b1c71974..b6a14f2d39 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilePartLargeFileTest.java @@ -17,7 +17,6 @@ import java.io.File; import java.io.IOException; -import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; @@ -63,7 +62,7 @@ public void handle(String arg0, Request arg1, HttpServletRequest req, HttpServle public void testPutImageFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100 * 6000).build()); try { - Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", LARGE_IMAGE_FILE, "application/octet-stream", "UTF-8")).execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -76,7 +75,7 @@ public void testPutLargeTextFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", "UTF-8")).execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/FilterTest.java b/api/src/test/java/org/asynchttpclient/async/FilterTest.java index 843fa417ee..8f4c90725e 100644 --- a/api/src/test/java/org/asynchttpclient/async/FilterTest.java +++ b/api/src/test/java/org/asynchttpclient/async/FilterTest.java @@ -32,7 +32,6 @@ import java.util.Enumeration; import java.util.List; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import static org.testng.Assert.assertEquals; @@ -74,7 +73,7 @@ public void basicTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); } finally { @@ -95,7 +94,7 @@ public void loadThrottleTest() throws Exception { } for (Future f : futures) { - Response r = f.get(5, TimeUnit.SECONDS); + Response r = f.get(); assertNotNull(f.get()); assertEquals(r.getStatusCode(), 200); } @@ -111,7 +110,7 @@ public void maxConnectionsText() throws Exception { AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - /* Response response = */c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + /* Response response = */c.preparePost(getTargetUrl()).execute().get(); fail("Should have timed out"); } catch (IOException ex) { assertNotNull(ex); @@ -135,7 +134,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -166,7 +165,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -198,7 +197,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -231,7 +230,7 @@ public FilterContext filter(FilterContext ctx) throws FilterException AsyncHttpClient c = getAsyncHttpClient(b.build()); try { - Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong").execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).addHeader("Ping", "Pong").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java index 5c7fc5c2ca..0e2fb055b9 100644 --- a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java @@ -20,7 +20,6 @@ import java.util.Enumeration; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.HostnameVerifier; @@ -131,7 +130,7 @@ public void positiveHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new PositiveHostVerifier()).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { Future f = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute(); - Response resp = f.get(5, TimeUnit.SECONDS); + Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -146,7 +145,7 @@ public void negativeHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new NegativeHostVerifier()).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { try { - client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -161,7 +160,7 @@ public void remoteIDHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("bouette")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -175,7 +174,7 @@ public void remoteNegHostnameVerifierTest() throws Exception { // request is made to 127.0.0.1, but cert presented for localhost - this should fail final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("localhost")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); + client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); fail("ConnectException expected"); } catch (ExecutionException ex) { assertEquals(ex.getCause().getClass(), ConnectException.class); @@ -189,7 +188,7 @@ public void remotePosHostnameVerifierTest() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(new Builder().setHostnameVerifier(new CheckHost("127.0.0.1")).setSSLContext(createSSLContext(new AtomicBoolean(true))).build()); try { - Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(5, TimeUnit.SECONDS); + Response resp = client.preparePost(getTargetUrl()).setBody(SIMPLE_TEXT_FILE).setHeader("Content-Type", "text/html").execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); diff --git a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java index 86bdf98fc0..e9c6ae6c8d 100644 --- a/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HttpToHttpsRedirectTest.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.Enumeration; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.ServletException; @@ -96,7 +95,7 @@ public void httpToHttpsRedirect() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2()).execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2()).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-httpToHttps"), "PASS"); @@ -112,13 +111,13 @@ public void httpToHttpsProperConfig() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/test2").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/test2").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-httpToHttps"), "PASS"); // Test if the internal channel is downgraded to clean http. - response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/foo2").execute().get(5, TimeUnit.SECONDS); + response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", getTargetUrl2() + "/foo2").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getHeader("X-httpToHttps"), "PASS"); @@ -134,7 +133,7 @@ public void relativeLocationUrl() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setMaximumNumberOfRedirects(5).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "/foo/test").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "/foo/test").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 302); assertEquals(response.getUri().toString(), getTargetUrl()); diff --git a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java index f24030b0ce..3837b799c8 100644 --- a/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/IdleStateHandlerTest.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -65,7 +64,7 @@ public void idleStateTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(cg); try { - c.prepareGet(getTargetUrl()).execute().get(5, TimeUnit.SECONDS); + c.prepareGet(getTargetUrl()).execute().get(); } catch (ExecutionException e) { fail("Should allow to finish processing request.", e); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java index 9d4c86a665..a519385473 100644 --- a/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java +++ b/api/src/test/java/org/asynchttpclient/async/InputStreamTest.java @@ -29,7 +29,6 @@ import java.io.InputStream; import java.io.ByteArrayOutputStream; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import static org.testng.Assert.assertEquals; @@ -97,7 +96,7 @@ public int read() throws IOException { } }; - Response resp = c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute().get(5, TimeUnit.SECONDS); + Response resp = c.preparePost(getTargetUrl()).setHeaders(h).setBody(is).execute().get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getHeader("X-Param"), "abc"); diff --git a/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java index ddcacb02d4..e2765f3a3e 100644 --- a/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MaxTotalConnectionTest.java @@ -28,8 +28,6 @@ import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; public abstract class MaxTotalConnectionTest extends AbstractBasicTest { protected final Logger log = LoggerFactory.getLogger(AbstractBasicTest.class); @@ -78,8 +76,7 @@ public void testMaxTotalConnections() { * JFA: Disable this test for 1.2.0 release as it can easily fail because a request may complete before the second one is made, hence failing. The issue occurs frequently on Linux. */ @Test(enabled = false) - public void testMaxTotalConnectionsCorrectExceptionHandling() - throws TimeoutException { + public void testMaxTotalConnectionsCorrectExceptionHandling() { String[] urls = new String[] { "http://google.com", "http://github.com/" }; AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(1000).setRequestTimeoutInMs(5000).setAllowPoolingConnection(false).setMaximumConnectionsTotal(1).setMaximumConnectionsPerHost(1).build()); @@ -103,7 +100,7 @@ public void testMaxTotalConnectionsCorrectExceptionHandling() // get results of executed requests for (Future future : futures) { try { - /* Response res = */future.get(5, TimeUnit.SECONDS); + /* Response res = */future.get(); } catch (InterruptedException e) { log.error("Error!", e); } catch (ExecutionException e) { diff --git a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java index cca751a818..d9eb881827 100644 --- a/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java +++ b/api/src/test/java/org/asynchttpclient/async/MultipartUploadTest.java @@ -28,7 +28,6 @@ import java.util.Arrays; import java.util.List; import java.util.UUID; -import java.util.concurrent.TimeUnit; import java.util.zip.GZIPInputStream; import javax.servlet.ServletException; @@ -182,7 +181,7 @@ public void testSendingSmallFilesAndByteArray() { Request r = builder.build(); - Response res = c.executeRequest(r).get(5, TimeUnit.SECONDS); + Response res = c.executeRequest(r).get(); assertEquals(res.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java index d3869e6c2c..8d4359b4ea 100644 --- a/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NoNullResponseTest.java @@ -29,7 +29,6 @@ import java.security.GeneralSecurityException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; -import java.util.concurrent.TimeUnit; public abstract class NoNullResponseTest extends AbstractBasicTest { private static final String GOOGLE_HTTPS_URL = "https://www.google.com"; @@ -39,9 +38,9 @@ public void multipleSslRequestsWithDelayAndKeepAlive() throws Exception { final AsyncHttpClient client = create(); try { final BoundRequestBuilder builder = client.prepareGet(GOOGLE_HTTPS_URL); - final Response response1 = builder.execute().get(5, TimeUnit.SECONDS); + final Response response1 = builder.execute().get(); Thread.sleep(4000); - final Response response2 = builder.execute().get(5, TimeUnit.SECONDS); + final Response response2 = builder.execute().get(); if (response2 != null) { System.out.println("Success (2nd response was not null)."); } else { diff --git a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java index ddd89be55d..cbfdf6546c 100644 --- a/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java +++ b/api/src/test/java/org/asynchttpclient/async/NonAsciiContentLengthTest.java @@ -18,8 +18,6 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; @@ -77,13 +75,12 @@ public void testNonAsciiContentLength() throws Exception { execute("\u4E00"); // Unicode CJK ideograph for one } - protected void execute(String body) - throws IOException, InterruptedException, ExecutionException, TimeoutException { + protected void execute(String body) throws IOException, InterruptedException, ExecutionException { AsyncHttpClient client = getAsyncHttpClient(null); try { BoundRequestBuilder r = client.preparePost(getTargetUrl()).setBody(body).setBodyEncoding("UTF-8"); Future f = r.execute(); - Response resp = f.get(5, TimeUnit.SECONDS); + Response resp = f.get(); assertEquals(resp.getStatusCode(), 200); assertEquals(body, resp.getResponseBody("UTF-8")); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java index ddb72f9482..edc1856ce5 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestRelative302Test.java @@ -23,7 +23,6 @@ import java.net.URI; import java.util.Enumeration; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.ServletException; @@ -91,7 +90,7 @@ public void redirected302Test() throws Exception { isSet.getAndSet(false); AsyncHttpClient c = getAsyncHttpClient(null); try { - Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -111,7 +110,7 @@ public void notRedirected302Test() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(false).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setFollowRedirects(false).setHeader("X-redirect", "http://www.microsoft.com/").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 302); @@ -143,7 +142,7 @@ public void redirected302InvalidTest() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. - Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 404); @@ -160,7 +159,7 @@ public void relativeLocationUrl() throws Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { - Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "/foo/test").execute().get(5, TimeUnit.SECONDS); + Response response = c.preparePost(getTargetUrl()).setFollowRedirects(true).setHeader("X-redirect", "/foo/test").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 302); assertEquals(response.getUri().toString(), getTargetUrl()); diff --git a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java index 8dd51d89dd..d1a139f324 100644 --- a/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PerRequestTimeoutTest.java @@ -113,12 +113,11 @@ public void testRequestTimeout() throws IOException { } @Test(groups = { "standalone", "default_provider" }) - public void testGlobalDefaultPerRequestInfiniteTimeout() - throws IOException, TimeoutException { + public void testGlobalDefaultPerRequestInfiniteTimeout() throws IOException { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setRequestTimeoutInMs(100).build()); try { Future responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(-1).execute(); - Response response = responseFuture.get(5, TimeUnit.SECONDS); + Response response = responseFuture.get(); assertNotNull(response); } catch (InterruptedException e) { fail("Interrupted.", e); @@ -150,7 +149,7 @@ public void testGlobalRequestTimeout() throws IOException { } @Test(groups = { "standalone", "default_provider" }) - public void testGlobalIdleTimeout() throws IOException, TimeoutException { + public void testGlobalIdleTimeout() throws IOException { final long times[] = new long[] { -1, -1 }; AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setIdleConnectionInPoolTimeoutInMs(2000).build()); @@ -173,7 +172,7 @@ public void onThrowable(Throwable t) { super.onThrowable(t); } }); - Response response = responseFuture.get(5, TimeUnit.SECONDS); + Response response = responseFuture.get(); assertNotNull(response); assertEquals(response.getResponseBody(), MSG + MSG); } catch (InterruptedException e) { diff --git a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java index b4c018e03b..e6a338cfc0 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java @@ -17,7 +17,6 @@ import java.io.IOException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import javax.servlet.ServletException; @@ -102,7 +101,7 @@ public void onThrowable(Throwable t) { } }); - int statusCode = responseFuture.get(5, TimeUnit.SECONDS); + int statusCode = responseFuture.get(); assertEquals(statusCode, 200); } finally { p.close(); @@ -137,7 +136,7 @@ public void onThrowable(Throwable t) { } }); - int statusCode = responseFuture.get(5, TimeUnit.SECONDS); + int statusCode = responseFuture.get(); assertEquals(statusCode, 200); } finally { p.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java index 73cf2dc56b..5436cb05d8 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTest.java @@ -122,7 +122,7 @@ public void testNonProxyHosts() throws IOException, ExecutionException, TimeoutE try { String target = "http://127.0.0.1:1234/"; - client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1).addNonProxyHost("127.0.0.1")).execute().get(5, TimeUnit.SECONDS); + client.prepareGet(target).setProxyServer(new ProxyServer("127.0.0.1", port1).addNonProxyHost("127.0.0.1")).execute().get(); assertFalse(true); } catch (Throwable e) { assertNotNull(e.getCause()); diff --git a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java index 204ebb0f02..e9cba6194c 100644 --- a/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ProxyTunnellingTest.java @@ -18,7 +18,6 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.asynchttpclient.AsyncCompletionHandlerBase; @@ -94,7 +93,7 @@ public Response onCompleted(Response response) throws Exception { return response; } }); - Response r = responseFuture.get(5, TimeUnit.SECONDS); + Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); } finally { @@ -122,7 +121,7 @@ public Response onCompleted(Response response) throws Exception { return response; } }); - Response r = responseFuture.get(5, TimeUnit.SECONDS); + Response r = responseFuture.get(); assertEquals(r.getStatusCode(), 200); assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); } finally { @@ -139,7 +138,7 @@ public void testSimpleAHCConfigProxy() throws IOException, InterruptedException, .setHeader("Content-Type", "text/html")// .build(); try { - Response r = client.get().get(5, TimeUnit.SECONDS); + Response r = client.get().get(); assertEquals(r.getStatusCode(), 200); assertEquals(r.getHeader("X-Proxy-Connection"), "keep-alive"); diff --git a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java index 70c21c588c..e4f1a68c75 100644 --- a/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PutLargeFileTest.java @@ -17,7 +17,6 @@ import java.io.File; import java.io.IOException; -import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -44,7 +43,7 @@ public void testPutLargeFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionTimeoutInMs(timeout).build()); try { - Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -58,7 +57,7 @@ public void testPutSmallFile() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); diff --git a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java index 7312598a60..1bc842399a 100644 --- a/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java +++ b/api/src/test/java/org/asynchttpclient/async/QueryParametersTest.java @@ -84,8 +84,7 @@ public void testQueryParameters() throws IOException, ExecutionException, Timeou } @Test(groups = { "standalone", "default_provider" }) - public void testUrlRequestParametersEncoding() - throws IOException, ExecutionException, InterruptedException, TimeoutException { + public void testUrlRequestParametersEncoding() throws IOException, ExecutionException, InterruptedException { String URL = getTargetUrl() + "?q="; String REQUEST_PARAM = "github github \ngithub"; @@ -93,7 +92,7 @@ public void testUrlRequestParametersEncoding() try { String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); LoggerFactory.getLogger(QueryParametersTest.class).info("Executing request [{}] ...", requestUrl2); - Response response = client.prepareGet(requestUrl2).execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet(requestUrl2).execute().get(); String s = URLDecoder.decode(response.getHeader("q"), "UTF-8"); assertEquals(s, REQUEST_PARAM); } finally { diff --git a/api/src/test/java/org/asynchttpclient/async/RC10KTest.java b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java index eefbbf8beb..7cecf24d13 100644 --- a/api/src/test/java/org/asynchttpclient/async/RC10KTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RC10KTest.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; @@ -107,7 +106,7 @@ public void rc10kProblem() throws IOException, ExecutionException, TimeoutExcept } i = 0; for (Future fResp : resps) { - Integer resp = fResp.get(5, TimeUnit.SECONDS); + Integer resp = fResp.get(); assertNotNull(resp); assertEquals(resp.intValue(), i++); } diff --git a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java index e0524e9d81..a27873d108 100644 --- a/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RedirectConnectionUsageTest.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Date; -import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -87,7 +86,7 @@ public void testGetRedirectFinalUrl() throws Exception { ListenableFuture response = c.executeRequest(r); Response res = null; - res = response.get(3, TimeUnit.SECONDS); + res = response.get(); assertNotNull(res.getResponseBody()); assertEquals(res.getUri().toString(), BASE_URL + "/overthere"); diff --git a/api/src/test/java/org/asynchttpclient/async/Relative302Test.java b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java index 7f0bb6b1eb..86c21eaac5 100644 --- a/api/src/test/java/org/asynchttpclient/async/Relative302Test.java +++ b/api/src/test/java/org/asynchttpclient/async/Relative302Test.java @@ -23,7 +23,6 @@ import java.net.URI; import java.util.Enumeration; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.ServletException; @@ -90,7 +89,7 @@ public void redirected302Test() throws Exception { AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "http://www.google.com/").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", "http://www.google.com/").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -111,7 +110,7 @@ public void redirected302InvalidTest() throws Exception { // If the test hit a proxy, no ConnectException will be thrown and instead of 404 will be returned. try { - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", String.format("http://127.0.0.1:%d/", port2)).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 404); @@ -132,7 +131,7 @@ public void absolutePathRedirectTest() throws Exception { String redirectTarget = "/bar/test"; String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getUri().toString(), destinationUrl); @@ -153,7 +152,7 @@ public void relativePathRedirectTest() throws Exception { String redirectTarget = "bar/test1"; String destinationUrl = new URI(getTargetUrl()).resolve(redirectTarget).toString(); - Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).setHeader("X-redirect", redirectTarget).execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); assertEquals(response.getUri().toString(), destinationUrl); diff --git a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java index 1e2b0d96de..a5025ffb17 100644 --- a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java @@ -136,7 +136,7 @@ public Response onCompleted(Response response) throws Exception { l.countDown(); } } - }).get(5, TimeUnit.SECONDS); + }).get(); if (!l.await(5, TimeUnit.SECONDS)) { fail("Timeout out"); @@ -153,7 +153,7 @@ public void invalidStreamTest2() throws Exception { AsyncHttpClient c = getAsyncHttpClient(config); try { - Response response = c.prepareGet("http://bit.ly/aUjTtG").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet("http://bit.ly/aUjTtG").execute().get(); if (response != null) { System.out.println(response); } @@ -170,7 +170,7 @@ public void invalidStreamTest2() throws Exception { public void asyncFullBodyProperlyRead() throws Exception { final AsyncHttpClient client = getAsyncHttpClient(null); try { - Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(5, TimeUnit.SECONDS); + Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); InputStream stream = r.getResponseBodyAsStream(); // FIXME available is an ESTIMATE!!! @@ -191,7 +191,7 @@ public void testUrlRequestParametersEncoding() throws Exception { try { String requestUrl2 = URL + URLEncoder.encode(REQUEST_PARAM, "UTF-8"); logger.info(String.format("Executing request [%s] ...", requestUrl2)); - Response response = client.prepareGet(requestUrl2).execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet(requestUrl2).execute().get(); assertEquals(response.getStatusCode(), 301); } finally { client.close(); @@ -207,7 +207,7 @@ public void testUrlRequestParametersEncoding() throws Exception { public void testAHC60() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(5, TimeUnit.SECONDS); + Response response = client.prepareGet("http://www.meetup.com/stackoverflow/Mountain-View-CA/").execute().get(); assertEquals(response.getStatusCode(), 200); } finally { client.close(); @@ -220,7 +220,7 @@ public void stripQueryStringTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -235,7 +235,7 @@ public void stripQueryStringNegativeTest() throws Exception { AsyncHttpClientConfig cg = new AsyncHttpClientConfig.Builder().setRemoveQueryParamsOnRedirect(false).setFollowRedirects(true).build(); AsyncHttpClient c = getAsyncHttpClient(cg); try { - Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(5, TimeUnit.SECONDS); + Response response = c.prepareGet("http://www.freakonomics.com/?p=55846").execute().get(); assertNotNull(response); assertEquals(response.getStatusCode(), 301); @@ -254,7 +254,7 @@ public void evilCoookieTest() throws Exception { builder2.addHeader("Content-Type", "text/plain"); builder2.addCookie(new Cookie(".google.com", "evilcookie", "evilcookie", "test", "/", 10, false, 1, false, false, null, null, Collections. emptySet())); Request request2 = builder2.build(); - Response response = c.executeRequest(request2).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(request2).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java index 4d62240d49..6c27502c6e 100644 --- a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java @@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; -import java.util.concurrent.TimeUnit; import static org.testng.Assert.*; @@ -72,7 +71,7 @@ public AbstractHandler configureHandler() throws Exception { public void testMaxRetry() throws Exception { AsyncHttpClient ahc = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setMaxRequestRetry(0).build()); try { - ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build()).get(5, TimeUnit.SECONDS); + ahc.executeRequest(ahc.prepareGet(getTargetUrl()).build()).get(); fail(); } catch (Exception t) { assertNotNull(t.getCause()); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java index f8e697d431..76dac21427 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java @@ -17,7 +17,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -47,7 +46,7 @@ public void testAccumulateErrorBody() throws Exception { Future future = client.get(new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 404); assertEquals(o.toString(), ""); assertTrue(response.getResponseBody().startsWith("")); @@ -64,7 +63,7 @@ public void testOmitErrorBody() throws Exception { Future future = client.get(new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 404); assertEquals(o.toString(), ""); assertEquals(response.getResponseBody(), ""); diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index 5ab0e349e9..ef0dfacf51 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -19,7 +19,6 @@ import java.io.File; import java.io.IOException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import org.asynchttpclient.ByteArrayPart; import org.asynchttpclient.Response; @@ -46,7 +45,7 @@ public void inpuStreamBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBody(), MY_MESSAGE); } finally { @@ -63,7 +62,7 @@ public void stringBuilderBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(s.toString(), MY_MESSAGE); } finally { @@ -80,7 +79,7 @@ public void byteArrayOutputStreamBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -97,7 +96,7 @@ public void requestByteArrayOutputStreamBodyConsumerTest() throws Exception { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -119,7 +118,7 @@ public void testPutZeroBytesFileTest() throws Exception { Future future = client.put(new FileBodyGenerator(tmpfile)); System.out.println("waiting for response"); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); tmpfile.delete(); @@ -153,7 +152,7 @@ public void testDeriveOverrideURL() throws Exception { try { Future future = derived.post(generator, consumer); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -204,7 +203,7 @@ public void onBytesReceived(String url, long amount, long current, long total) { Future future = client.post(generator, consumer); - Response response = future.get(5, TimeUnit.SECONDS); + Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -230,11 +229,11 @@ public void testCloseDerivedValidMaster() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl()).build(); SimpleAsyncHttpClient derived = client.derive().build(); try { - derived.get().get(5, TimeUnit.SECONDS); + derived.get().get(); derived.close(); - Response response = client.get().get(5, TimeUnit.SECONDS); + Response response = client.get().get(); assertEquals(response.getStatusCode(), 200); } finally { @@ -250,7 +249,7 @@ public void testCloseMasterInvalidDerived() throws Exception { client.close(); try { - derived.get().get(5, TimeUnit.SECONDS); + derived.get().get(); fail("Expected closed AHC"); } catch (IOException e) { // expected @@ -261,7 +260,7 @@ public void testCloseMasterInvalidDerived() throws Exception { public void testMultiPartPut() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl() + "/multipart").build(); try { - Response response = client.put(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(5, TimeUnit.SECONDS); + Response response = client.put(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); String body = response.getResponseBody(); String contentType = response.getHeader("X-Content-Type"); @@ -285,7 +284,7 @@ public void testMultiPartPut() throws Exception { public void testMultiPartPost() throws Exception { SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl() + "/multipart").build(); try { - Response response = client.post(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(5, TimeUnit.SECONDS); + Response response = client.post(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")).get(); String body = response.getResponseBody(); String contentType = response.getHeader("X-Content-Type"); diff --git a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java index 15b63b2b58..38e0e402b9 100644 --- a/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/TransferListenerTest.java @@ -18,7 +18,6 @@ import java.io.File; import java.io.IOException; import java.util.Enumeration; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; @@ -115,7 +114,7 @@ public void onThrowable(Throwable t) { }); try { - Response response = c.prepareGet(getTargetUrl()).execute(tl).get(5, TimeUnit.SECONDS); + Response response = c.prepareGet(getTargetUrl()).execute(tl).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -176,7 +175,7 @@ public void onThrowable(Throwable t) { }); try { - Response response = client.preparePut(getTargetUrl()).setBody(file).execute(tl).get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).setBody(file).execute(tl).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); @@ -235,7 +234,7 @@ public void onThrowable(Throwable t) { }); try { - Response response = client.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(file)).execute(tl).get(5, TimeUnit.SECONDS); + Response response = client.preparePut(getTargetUrl()).setBody(new FileBodyGenerator(file)).execute(tl).get(); assertNotNull(response); assertEquals(response.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index dc03ca2afe..8959d7a8bc 100644 --- a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -18,8 +18,6 @@ import java.io.File; import java.io.IOException; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import org.apache.catalina.Context; import org.apache.catalina.Engine; @@ -92,20 +90,19 @@ public void clean() throws InterruptedException, Exception { AsyncHttpClient c = getAsyncHttpClient(null); try { Request deleteRequest = new RequestBuilder("DELETE").setUrl(getTargetUrl()).build(); - c.executeRequest(deleteRequest).get(5, TimeUnit.SECONDS); + c.executeRequest(deleteRequest).get(); } finally { c.close(); } } @Test(groups = { "standalone", "default_provider" }) - public void mkcolWebDavTest1() - throws InterruptedException, IOException, ExecutionException, TimeoutException { + public void mkcolWebDavTest1() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(mkcolRequest).get(); assertEquals(response.getStatusCode(), 201); } finally { @@ -114,13 +111,12 @@ public void mkcolWebDavTest1() } @Test(groups = { "standalone", "default_provider" }) - public void mkcolWebDavTest2() - throws InterruptedException, IOException, ExecutionException, TimeoutException { + public void mkcolWebDavTest2() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl() + "/folder2").build(); - Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(mkcolRequest).get(); assertEquals(response.getStatusCode(), 409); } finally { c.close(); @@ -128,13 +124,12 @@ public void mkcolWebDavTest2() } @Test(groups = { "standalone", "default_provider" }) - public void basicPropFindWebDavTest() - throws InterruptedException, IOException, ExecutionException, TimeoutException { + public void basicPropFindWebDavTest() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(propFindRequest).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(propFindRequest).get(); assertEquals(response.getStatusCode(), 404); } finally { @@ -143,21 +138,20 @@ public void basicPropFindWebDavTest() } @Test(groups = { "standalone", "default_provider" }) - public void propFindWebDavTest() - throws InterruptedException, IOException, ExecutionException, TimeoutException { + public void propFindWebDavTest() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(mkcolRequest).get(); assertEquals(response.getStatusCode(), 201); Request putRequest = new RequestBuilder("PUT").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).setBody("this is a test").build(); - response = c.executeRequest(putRequest).get(5, TimeUnit.SECONDS); + response = c.executeRequest(putRequest).get(); assertEquals(response.getStatusCode(), 201); Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(String.format("http://127.0.0.1:%s/folder1/Test.txt", port1)).build(); - response = c.executeRequest(propFindRequest).get(5, TimeUnit.SECONDS); + response = c.executeRequest(propFindRequest).get(); assertEquals(response.getStatusCode(), 207); assertTrue(response.getResponseBody().contains("HTTP/1.1 200 OK")); @@ -167,13 +161,12 @@ public void propFindWebDavTest() } @Test(groups = { "standalone", "default_provider" }) - public void propFindCompletionHandlerWebDavTest() - throws InterruptedException, IOException, ExecutionException, TimeoutException { + public void propFindCompletionHandlerWebDavTest() throws InterruptedException, IOException, ExecutionException { AsyncHttpClient c = getAsyncHttpClient(null); try { Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); - Response response = c.executeRequest(mkcolRequest).get(5, TimeUnit.SECONDS); + Response response = c.executeRequest(mkcolRequest).get(); assertEquals(response.getStatusCode(), 201); Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); @@ -191,7 +184,7 @@ public void onThrowable(Throwable t) { public WebDavResponse onCompleted(WebDavResponse response) throws Exception { return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNotNull(webDavResponse); assertEquals(webDavResponse.getStatusCode(), 200); diff --git a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java index f2ba675ead..490931ce8c 100644 --- a/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ZeroCopyFileTest.java @@ -21,7 +21,6 @@ import java.net.URISyntaxException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; @@ -86,7 +85,7 @@ public STATE onContentWriteCompleted() { public Response onCompleted(Response response) throws Exception { return response; } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -102,7 +101,7 @@ public void zeroCopyPutTest() throws IOException, ExecutionException, TimeoutExc AsyncHttpClient client = getAsyncHttpClient(null); try { Future f = client.preparePut("http://127.0.0.1:" + port1 + "/").setBody(SIMPLE_TEXT_FILE).execute(); - Response resp = f.get(5, TimeUnit.SECONDS); + Response resp = f.get(); assertNotNull(resp); assertEquals(resp.getStatusCode(), HttpServletResponse.SC_OK); assertEquals(resp.getResponseBody(), SIMPLE_TEXT_FILE_STRING); @@ -143,7 +142,7 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { public Response onCompleted() throws Exception { return null; } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNull(resp); assertEquals(SIMPLE_TEXT_FILE.length(), tmp.length()); } finally { @@ -185,7 +184,7 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { public Response onCompleted() throws Exception { return null; } - }).get(5, TimeUnit.SECONDS); + }).get(); assertNull(resp); assertEquals(SIMPLE_TEXT_FILE.length(), tmp.length()); } finally { diff --git a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java index 9788631eba..5a362fd53a 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/ByteMessageTest.java @@ -15,7 +15,6 @@ import static org.testng.Assert.assertEquals; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHttpClient; @@ -68,7 +67,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.sendMessage("ECHO".getBytes()); @@ -119,7 +118,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.sendMessage("ECHO".getBytes()).sendMessage("ECHO".getBytes()); @@ -171,7 +170,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); latch.await(); assertEquals(text.get(), "ECHOECHO".getBytes()); @@ -219,7 +218,7 @@ public void onMessage(byte[] message) { @Override public void onFragment(byte[] fragment, boolean last) { } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.stream("ECHO".getBytes(), false); websocket.stream("ECHO".getBytes(), true); latch.await(); diff --git a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java index f4dcf1bae5..12fa531e6f 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/CloseCodeReasonMessageTest.java @@ -15,7 +15,6 @@ import static org.testng.Assert.*; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHttpClient; @@ -42,7 +41,7 @@ public void onCloseWithCode() throws Exception { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(5, TimeUnit.SECONDS); + WebSocket websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); websocket.close(); @@ -60,7 +59,7 @@ public void onCloseWithCodeServerClose() throws Exception { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(5, TimeUnit.SECONDS); + c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new Listener(latch, text)).build()).get(); latch.await(); assertEquals(text.get(), "1001-Idle Timeout"); diff --git a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java index 74f2b359cf..92e08e10a2 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/RedirectTest.java @@ -18,7 +18,6 @@ import java.io.IOException; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import javax.servlet.ServletException; @@ -80,28 +79,26 @@ public void testRedirectToWSResource() throws Exception { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference text = new AtomicReference(""); - WebSocket websocket = c.prepareGet(getRedirectURL()).execute( - new WebSocketUpgradeHandler.Builder().addWebSocketListener( - new WebSocketListener() { + WebSocket websocket = c.prepareGet(getRedirectURL()).execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(new WebSocketListener() { - @Override - public void onOpen(WebSocket websocket) { - text.set("OnOpen"); - latch.countDown(); - } + @Override + public void onOpen(WebSocket websocket) { + text.set("OnOpen"); + latch.countDown(); + } - @Override - public void onClose(WebSocket websocket) { - } + @Override + public void onClose(WebSocket websocket) { + } - @Override - public void onError(Throwable t) { - t.printStackTrace(); - latch.countDown(); - } - }).build()).get(5, TimeUnit.SECONDS); + @Override + public void onError(Throwable t) { + t.printStackTrace(); + latch.countDown(); + } + }).build()).get(); - latch.await(5, TimeUnit.SECONDS); + latch.await(); assertEquals(text.get(), "OnOpen"); websocket.close(); } finally { diff --git a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java index adc670585e..a63c0a15eb 100644 --- a/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java +++ b/api/src/test/java/org/asynchttpclient/websocket/TextMessageTest.java @@ -15,7 +15,6 @@ import static org.testng.Assert.*; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHttpClient; @@ -59,7 +58,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); latch.await(); assertEquals(text.get(), "OnOpen"); @@ -74,7 +73,7 @@ public void onEmptyListenerTest() throws Exception { try { WebSocket websocket = null; try { - websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().build()).get(5, TimeUnit.SECONDS); + websocket = c.prepareGet(getTargetUrl()).execute(new WebSocketUpgradeHandler.Builder().build()).get(); } catch (Throwable t) { fail(); } @@ -90,7 +89,7 @@ public void onFailureTest() throws Exception { try { Throwable t = null; try { - /* WebSocket websocket = */c.prepareGet("ws://abcdefg").execute(new WebSocketUpgradeHandler.Builder().build()).get(5, TimeUnit.SECONDS); + /* WebSocket websocket = */c.prepareGet("ws://abcdefg").execute(new WebSocketUpgradeHandler.Builder().build()).get(); } catch (Throwable t2) { t = t2; } @@ -124,7 +123,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); latch.await(); assertEquals(text.get(), "OnClose"); @@ -157,7 +156,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.close(); @@ -201,7 +200,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.sendTextMessage("ECHO"); @@ -271,7 +270,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.sendTextMessage("ECHO"); @@ -316,7 +315,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); latch.await(); assertEquals(text.get(), "ECHOECHO"); @@ -357,7 +356,7 @@ public void onError(Throwable t) { t.printStackTrace(); latch.countDown(); } - }).build()).get(5, TimeUnit.SECONDS); + }).build()).get(); websocket.streamText("ECHO", false); websocket.streamText("ECHO", true); From cce5a28e23bd6b4b8e1466d969af0cb526756988 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 27 Sep 2013 11:25:13 -0700 Subject: [PATCH 0575/2844] Refactoring in preparation for supporting spdy multiplexing. --- .../providers/grizzly/EventHandler.java | 33 +++--- .../grizzly/FeedableBodyGenerator.java | 54 +++++---- .../grizzly/GrizzlyAsyncHttpProvider.java | 99 ++++------------ .../providers/grizzly/HttpTxContext.java | 61 ++++++---- .../providers/grizzly/RequestInfoHolder.java | 66 +++++++++++ .../providers/grizzly/Utils.java | 12 ++ .../grizzly/bodyhandler/FileBodyHandler.java | 2 +- .../filters/AsyncHttpClientEventFilter.java | 10 +- .../filters/AsyncHttpClientFilter.java | 108 ++++++++++++++---- .../AsyncHttpClientTransportFilter.java | 77 ------------- .../grizzly/filters/ProxyFilter.java | 2 +- .../filters/events/SSLSwitchingEvent.java | 1 - .../statushandler/AuthorizationHandler.java | 5 +- .../ProxyAuthorizationHandler.java | 18 +-- .../statushandler/RedirectHandler.java | 5 +- 15 files changed, 292 insertions(+), 261 deletions(-) create mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/RequestInfoHolder.java delete mode 100644 providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index d1b94d5bc3..0b5ff84d7d 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -91,7 +91,7 @@ public final class EventHandler { public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - HttpTxContext.get(ctx.getConnection()).abort(error); + HttpTxContext.get(ctx).abort(error); } @@ -100,7 +100,7 @@ public void onHttpContentParsed(HttpContent content, FilterChainContext ctx) { final HttpTxContext context = - HttpTxContext.get(ctx.getConnection()); + HttpTxContext.get(ctx); final AsyncHandler handler = context.getHandler(); if (handler != null && context.getCurrentState() != ABORT) { try { @@ -119,7 +119,7 @@ public void onHttpContentParsed(HttpContent content, @SuppressWarnings("UnusedParameters") public void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) { final HttpTxContext context = - HttpTxContext.get(ctx.getConnection()); + HttpTxContext.get(ctx); final AsyncHandler handler = context.getHandler(); if (handler instanceof TransferCompletionHandler) { ((TransferCompletionHandler) handler).onHeaderWriteCompleted(); @@ -128,7 +128,7 @@ public void onHttpHeadersEncoded(HttpHeader httpHeader, FilterChainContext ctx) public void onHttpContentEncoded(HttpContent content, FilterChainContext ctx) { final HttpTxContext context = - HttpTxContext.get(ctx.getConnection()); + HttpTxContext.get(ctx); final AsyncHandler handler = context.getHandler(); if (handler instanceof TransferCompletionHandler) { final int written = content.getContent().remaining(); @@ -145,9 +145,7 @@ public void onInitialLineParsed(HttpHeader httpHeader, if (httpHeader.isSkipRemainder()) { return; } - final Connection connection = ctx.getConnection(); - final HttpTxContext context = - HttpTxContext.get(connection); + final HttpTxContext context = HttpTxContext.get(ctx); final int status = ((HttpResponsePacket) httpHeader).getStatus(); if (HttpStatus.CONINTUE_100.statusMatches(status)) { ctx.notifyUpstream(new ContinueEvent(context)); @@ -221,8 +219,7 @@ public void onHttpHeaderError(final HttpHeader httpHeader, t.printStackTrace(); httpHeader.setSkipRemainder(true); - final HttpTxContext context = - HttpTxContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx); context.abort(t); } @@ -233,7 +230,7 @@ public void onHttpHeadersParsed(HttpHeader httpHeader, //super.onHttpHeadersParsed(httpHeader, ctx); GrizzlyAsyncHttpProvider.LOGGER.debug("RESPONSE: {}", httpHeader); processKeepAlive(ctx.getConnection(), httpHeader); - final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx); if (httpHeader.isSkipRemainder()) { return; @@ -271,12 +268,13 @@ public void onHttpHeadersParsed(HttpHeader httpHeader, context.getFuture()); final HttpTxContext newContext = context.copy(); + newContext.setRequest(newRequest); context.setFuture(null); - HttpTxContext.set(c, newContext); context.getProvider().execute(c, newRequest, newHandler, - context.getFuture()); + context.getFuture(), + newContext); } catch (Exception e) { context.abort(e); } @@ -366,10 +364,7 @@ public boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx) return false; } - final HttpResponsePacket response = - (HttpResponsePacket) httpHeader; - final HttpTxContext context = HttpTxContext.get( - ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx); cleanup(ctx); final AsyncHandler handler = context.getHandler(); if (handler != null) { @@ -431,9 +426,9 @@ private static HttpTxContext cleanup(final FilterChainContext ctx) { final Connection c = ctx.getConnection(); final HttpTxContext context = - HttpTxContext.get(c); - HttpTxContext.set(c, null); - if (!Utils.isIgnored(ctx.getConnection())) { + HttpTxContext.get(ctx); + HttpTxContext.remove(ctx, context); + if (!Utils.isIgnored(c)) { final ConnectionManager manager = context.getProvider().getConnectionManager(); //if (!manager.canReturnConnection(c)) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index f338897e6f..e359626b0f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -21,10 +21,12 @@ import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.CompletionHandler; import org.glassfish.grizzly.Connection; +import org.glassfish.grizzly.OutputSink; import org.glassfish.grizzly.WriteHandler; import org.glassfish.grizzly.WriteResult; import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.http.HttpRequestPacket; import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.nio.NIOConnection; @@ -174,7 +176,7 @@ public void run() { try { feeder.flush(); } catch (IOException ioe) { - HttpTxContext ctx = HttpTxContext.get(c); + HttpTxContext ctx = HttpTxContext.get(context); ctx.abort(ioe); } } @@ -304,7 +306,7 @@ public final synchronized void feed(final Buffer buffer, final boolean last) throw new IllegalStateException( "Asynchronous transfer has not been initiated."); } - blockUntilQueueFree(feedableBodyGenerator.context.getConnection()); + blockUntilQueueFree(feedableBodyGenerator.context); final HttpContent content = feedableBodyGenerator.contentBuilder .content(buffer) @@ -321,11 +323,13 @@ public final synchronized void feed(final Buffer buffer, final boolean last) * will block is dependent on the write timeout of the transport * associated with the specified connection. */ - private static void blockUntilQueueFree(final Connection c) { - if (!c.canWrite()) { + private static void blockUntilQueueFree(final FilterChainContext ctx) { + HttpContext httpContext = HttpContext.get(ctx); + final OutputSink outputSink = httpContext.getOutputSink(); + if (!outputSink.canWrite()) { final FutureImpl future = Futures.createSafeFuture(); - c.notifyCanWrite(new WriteHandler() { + outputSink.notifyCanWrite(new WriteHandler() { @Override public void onWritePossible() throws Exception { @@ -338,26 +342,26 @@ public void onError(Throwable t) { } }); - block(c, future); + block(ctx, future); } } - private static void block(final Connection c, + private static void block(final FilterChainContext ctx, final FutureImpl future) { try { final long writeTimeout = - c.getTransport().getWriteTimeout(MILLISECONDS); + ctx.getConnection().getTransport().getWriteTimeout(MILLISECONDS); if (writeTimeout != -1) { future.get(writeTimeout, MILLISECONDS); } else { future.get(); } } catch (ExecutionException e) { - HttpTxContext ctx = HttpTxContext.get(c); - ctx.abort(e.getCause()); + HttpTxContext httpTxContext = HttpTxContext.get(ctx); + httpTxContext.abort(e.getCause()); } catch (Exception e) { - HttpTxContext ctx = HttpTxContext.get(c); - ctx.abort(e); + HttpTxContext httpTxContext = HttpTxContext.get(ctx); + httpTxContext.abort(e); } } @@ -493,17 +497,19 @@ public NonBlockingFeeder(final FeedableBodyGenerator feedableBodyGenerator) { */ @Override public synchronized void flush() { - final Connection c = feedableBodyGenerator.context.getConnection(); + final HttpContext httpContext = + HttpContext.get(feedableBodyGenerator.context); + final OutputSink outputSink = httpContext.getOutputSink(); if (isReady()) { - writeUntilFullOrDone(c); + writeUntilFullOrDone(outputSink); if (!isDone()) { if (!isReady()) { notifyReadyToFeed(new ReadyToFeedListenerImpl()); } - if (!c.canWrite()) { + if (!outputSink.canWrite()) { // write queue is full, leverage WriteListener to let us know // when it is safe to write again. - c.notifyCanWrite(new WriteHandlerImpl()); + outputSink.notifyCanWrite(new WriteHandlerImpl()); } } } else { @@ -515,8 +521,8 @@ public synchronized void flush() { // ----------------------------------------------------- Private Methods - private void writeUntilFullOrDone(final Connection c) { - while (c.canWrite()) { + private void writeUntilFullOrDone(final OutputSink outputSink) { + while (outputSink.canWrite()) { if (isReady()) { canFeed(); } @@ -548,6 +554,7 @@ private final class WriteHandlerImpl implements WriteHandler { private final Connection c; + private final FilterChainContext ctx; // -------------------------------------------------------- Constructors @@ -555,6 +562,7 @@ private final class WriteHandlerImpl implements WriteHandler { private WriteHandlerImpl() { this.c = feedableBodyGenerator.context.getConnection(); + this.ctx = feedableBodyGenerator.context; } @@ -577,10 +585,12 @@ public void onWritePossible() throws Exception { @Override public void onError(Throwable t) { - c.setMaxAsyncWriteQueueSize( - feedableBodyGenerator.origMaxPendingBytes); - HttpTxContext ctx = HttpTxContext.get(c); - ctx.abort(t); + if (!Utils.isSpdyConnection(c)) { + c.setMaxAsyncWriteQueueSize( + feedableBodyGenerator.origMaxPendingBytes); + } + HttpTxContext httpTxContext = HttpTxContext.get(ctx); + httpTxContext.abort(t); } } // END WriteHandlerImpl diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 12995bb4f6..f03decb5a9 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -24,12 +24,8 @@ import org.asynchttpclient.Request; import org.asynchttpclient.Response; import org.asynchttpclient.ntlm.NTLMEngine; -import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; -import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandlerFactory; -import org.asynchttpclient.providers.grizzly.bodyhandler.ExpectHandler; import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientEventFilter; import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientFilter; -import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientTransportFilter; import org.asynchttpclient.providers.grizzly.filters.AsyncSpdyClientEventFilter; import org.asynchttpclient.providers.grizzly.filters.ClientEncodingFilter; import org.asynchttpclient.providers.grizzly.filters.SwitchingSSLFilter; @@ -44,12 +40,11 @@ import org.glassfish.grizzly.filterchain.FilterChain; import org.glassfish.grizzly.filterchain.FilterChainBuilder; import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.filterchain.TransportFilter; import org.glassfish.grizzly.http.ContentEncoding; import org.glassfish.grizzly.http.GZipContentEncoding; import org.glassfish.grizzly.http.HttpClientFilter; -import org.glassfish.grizzly.http.HttpContent; -import org.glassfish.grizzly.http.HttpRequestPacket; -import org.glassfish.grizzly.http.Method; +import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.npn.ClientSideNegotiator; import org.glassfish.grizzly.spdy.NextProtoNegSupport; import org.glassfish.grizzly.spdy.SpdyFramingFilter; @@ -59,7 +54,6 @@ import org.glassfish.grizzly.ssl.SSLBaseFilter; import org.glassfish.grizzly.ssl.SSLConnectionContext; import org.glassfish.grizzly.ssl.SSLUtils; -import org.glassfish.grizzly.http.util.Header; import org.glassfish.grizzly.impl.SafeFutureImpl; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder; @@ -74,7 +68,6 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; -import java.io.File; import java.io.IOException; import java.util.LinkedHashSet; import java.util.List; @@ -99,7 +92,6 @@ public class GrizzlyAsyncHttpProvider implements AsyncHttpProvider { public static final Logger LOGGER = LoggerFactory.getLogger(GrizzlyAsyncHttpProvider.class); public final static NTLMEngine NTLM_ENGINE = new NTLMEngine(); - private final BodyHandlerFactory bodyHandlerFactory; private final AsyncHttpClientConfig clientConfig; private ConnectionManager connectionManager; @@ -123,8 +115,6 @@ public GrizzlyAsyncHttpProvider(final AsyncHttpClientConfig clientConfig) { } catch (IOException ioe) { throw new RuntimeException(ioe); } - bodyHandlerFactory = new BodyHandlerFactory(this); - } @@ -158,7 +148,7 @@ public void failed(final Throwable throwable) { public void completed(final Connection c) { try { touchConnection(c, request); - execute(c, request, handler, future); + execute(c, request, handler, future, null); } catch (Exception e) { failed(e); } @@ -239,12 +229,12 @@ public DelayedExecutor.Resolver getResolver() { public ListenableFuture execute(final Connection c, final Request request, final AsyncHandler handler, - final GrizzlyResponseFuture future) { + final GrizzlyResponseFuture future, + final HttpTxContext httpTxContext) { Utils.addRequestInFlight(c); - if (HttpTxContext.get(c) == null) { - HttpTxContext.create(this, future, request, handler, c); - } - c.write(request, createWriteCompletionHandler(future)); + final RequestInfoHolder requestInfoHolder = + new RequestInfoHolder(this, request, handler, future, httpTxContext); + c.write(requestInfoHolder, createWriteCompletionHandler(future)); return future; } @@ -253,7 +243,7 @@ public ListenableFuture execute(final Connection c, void initializeTransport(final AsyncHttpClientConfig clientConfig) { final FilterChainBuilder secure = FilterChainBuilder.stateless(); - secure.add(new AsyncHttpClientTransportFilter()); + secure.add(new TransportFilter()); final int timeout = clientConfig.getRequestTimeoutInMs(); if (timeout > 0) { @@ -271,8 +261,7 @@ void initializeTransport(final AsyncHttpClientConfig clientConfig) { new IdleTimeoutFilter.TimeoutResolver() { @Override public long getTimeout(FilterChainContext ctx) { - final HttpTxContext context = - HttpTxContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx); if (context != null) { if (context.isWSRequest()) { return clientConfig.getWebSocketIdleTimeoutInMs(); @@ -495,70 +484,26 @@ public void updated(WriteResult result) { void timeout(final Connection c) { - final HttpTxContext context = HttpTxContext.get(c); - if (context != null) { - HttpTxContext.set(c, null); - context.abort(new TimeoutException("Timeout exceeded")); - } - - } - - - @SuppressWarnings({"unchecked"}) - public boolean sendRequest(final FilterChainContext ctx, - final Request request, - final HttpRequestPacket requestPacket) - throws IOException { - - boolean isWriteComplete = true; - - if (requestHasEntityBody(request)) { - final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); - BodyHandler handler = bodyHandlerFactory.getBodyHandler(request); - if (requestPacket.getHeaders().contains(Header.Expect) - && requestPacket.getHeaders().getValue(1).equalsIgnoreCase("100-Continue")) { - // We have to set the content-length now as the headers will be flushed - // before the FileBodyHandler is invoked. If we don't do it here, and - // the user didn't explicitly set the length, then the transfer-encoding - // will be chunked and zero-copy file transfer will not occur. - final File f = request.getFile(); - if (f != null) { - requestPacket.setContentLengthLong(f.length()); - } - handler = new ExpectHandler(handler); + final String key = HttpTxContext.class.getName(); + HttpTxContext ctx = null; + if (!Utils.isSpdyConnection(c)) { + ctx = (HttpTxContext) c.getAttributes().getAttribute(key); + if (ctx != null) { + c.getAttributes().removeAttribute(key); + ctx.abort(new TimeoutException("Timeout exceeded")); } - context.setBodyHandler(handler); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("REQUEST: {}", requestPacket); - } - isWriteComplete = handler.doHandle(ctx, request, requestPacket); } else { - HttpContent content = HttpContent.builder(requestPacket).last(true).build(); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("REQUEST: {}", requestPacket); - } - ctx.write(content, ctx.getTransportContext().getCompletionHandler()); + throw new IllegalStateException(); } +// if (context != null) { +// HttpTxContext.set(c, null); +// context.abort(new TimeoutException("Timeout exceeded")); +// } - return isWriteComplete; } - public static boolean requestHasEntityBody(final Request request) { - - final String method = request.getMethod(); - return (Method.POST.matchesMethod(method) - || Method.PUT.matchesMethod(method) - || Method.PATCH.matchesMethod(method) - || Method.DELETE.matchesMethod(method)); - - } - - - // ----------------------------------------------------------- Inner Classes - - // ---------------------------------------------------------- Nested Classes diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java index 344128f75a..3ea419bf67 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java @@ -18,12 +18,17 @@ import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; import org.asynchttpclient.providers.grizzly.statushandler.StatusHandler; import org.asynchttpclient.websocket.WebSocket; +import org.glassfish.grizzly.CloseListener; +import org.glassfish.grizzly.CloseType; +import org.glassfish.grizzly.Closeable; import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.attributes.Attribute; -import org.glassfish.grizzly.attributes.AttributeStorage; +import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.websockets.HandShake; import org.glassfish.grizzly.websockets.ProtocolHandler; +import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; @@ -57,6 +62,15 @@ public final class HttpTxContext { private HandShake handshake; private ProtocolHandler protocolHandler; private WebSocket webSocket; + private CloseListener listener = new CloseListener< Closeable,CloseType>() { + @Override + public void onClosed(Closeable closeable, CloseType type) + throws IOException { + if (CloseType.REMOTELY.equals(type)) { + abort(new IOException("Remotely Closed")); + } + } + }; // -------------------------------------------------------- Constructors @@ -67,7 +81,6 @@ private HttpTxContext(final GrizzlyAsyncHttpProvider provider, final Request request, final AsyncHandler handler) { this.provider = provider; - this.future = future; this.request = request; this.handler = handler; @@ -81,35 +94,33 @@ private HttpTxContext(final GrizzlyAsyncHttpProvider provider, // ---------------------------------------------------------- Public Methods - public static void set(final AttributeStorage storage, - final HttpTxContext httpTransactionState) { - - if (httpTransactionState == null) { - REQUEST_STATE_ATTR.remove(storage); - } else { - REQUEST_STATE_ATTR.set(storage, httpTransactionState); - } - + public static void set(final FilterChainContext ctx, + final HttpTxContext httpTxContext) { + HttpContext httpContext = HttpContext.get(ctx); + httpContext.getCloseable().addCloseListener(httpTxContext.listener); + REQUEST_STATE_ATTR.set(httpContext, httpTxContext); } - public static HttpTxContext get(final AttributeStorage storage) { - - return REQUEST_STATE_ATTR.get(storage); - + public static void remove(final FilterChainContext ctx, + final HttpTxContext httpTxContext) { + HttpContext httpContext = HttpContext.get(ctx); + httpContext.getCloseable().removeCloseListener(httpTxContext.listener); + REQUEST_STATE_ATTR.remove(ctx); } - - public static HttpTxContext create(final GrizzlyAsyncHttpProvider provider, - final GrizzlyResponseFuture future, - final Request request, - final AsyncHandler handler, - final AttributeStorage storage) { - final HttpTxContext context = - new HttpTxContext(provider, future, request, handler); - set(storage, context); - return context; + public static HttpTxContext get(FilterChainContext ctx) { + HttpContext httpContext = HttpContext.get(ctx); + return ((httpContext != null) + ? REQUEST_STATE_ATTR.get(httpContext) + : null); } + public static HttpTxContext create(final RequestInfoHolder requestInfoHolder) { + return new HttpTxContext(requestInfoHolder.getProvider(), + requestInfoHolder.getFuture(), + requestInfoHolder.getRequest(), + requestInfoHolder.getHandler()); + } public void abort(final Throwable t) { if (future != null) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/RequestInfoHolder.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/RequestInfoHolder.java new file mode 100644 index 0000000000..7cf16c8ecd --- /dev/null +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/RequestInfoHolder.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.Request; + +public class RequestInfoHolder { + + private final GrizzlyAsyncHttpProvider provider; + private final Request request; + private final AsyncHandler handler; + private final GrizzlyResponseFuture future; + private final HttpTxContext httpTxContext; + + + // ------------------------------------------------------------ Constructors + + + public RequestInfoHolder(final GrizzlyAsyncHttpProvider provider, + final Request request, + final AsyncHandler handler, + final GrizzlyResponseFuture future, + final HttpTxContext httpTxContext) { + this.provider = provider; + this.request = request; + this.handler = handler; + this.future = future; + this.httpTxContext = httpTxContext; + } + + + // ---------------------------------------------------------- Public Methods + + + public GrizzlyAsyncHttpProvider getProvider() { + return provider; + } + + public Request getRequest() { + return request; + } + + public AsyncHandler getHandler() { + return handler; + } + + public GrizzlyResponseFuture getFuture() { + return future; + } + + public HttpTxContext getHttpTxContext() { + return httpTxContext; + } +} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/Utils.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/Utils.java index 3426376ee7..f54f828e1b 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/Utils.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/Utils.java @@ -13,10 +13,12 @@ package org.asynchttpclient.providers.grizzly; +import org.asynchttpclient.Request; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.Grizzly; import org.glassfish.grizzly.attributes.Attribute; import org.glassfish.grizzly.attributes.AttributeStorage; +import org.glassfish.grizzly.http.Method; import java.net.URI; import java.util.concurrent.atomic.AtomicInteger; @@ -88,4 +90,14 @@ public static boolean isSpdyConnection(final Connection c) { Boolean result = SPDY.get(c); return (result != null ? result : false); } + + public static boolean requestHasEntityBody(final Request request) { + + final String method = request.getMethod(); + return (Method.POST.matchesMethod(method) + || Method.PUT.matchesMethod(method) + || Method.PATCH.matchesMethod(method) + || Method.DELETE.matchesMethod(method)); + + } } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java index 368a3a2c09..be3248d776 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/FileBodyHandler.java @@ -55,7 +55,7 @@ public boolean doHandle(final FilterChainContext ctx, final File f = request.getFile(); requestPacket.setContentLengthLong(f.length()); - final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); + final HttpTxContext context = HttpTxContext.get(ctx); if (!SEND_FILE_SUPPORT || requestPacket.isSecure()) { final FileInputStream fis = new FileInputStream(request.getFile()); final MemoryManager mm = ctx.getMemoryManager(); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java index 8b2aa0783d..eb15b9a9aa 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java @@ -15,11 +15,13 @@ import org.asynchttpclient.providers.grizzly.EventHandler; import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; +import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.filterchain.NextAction; import org.glassfish.grizzly.http.HttpClientFilter; import org.glassfish.grizzly.http.HttpContent; +import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.http.HttpHeader; -import org.glassfish.grizzly.http.HttpResponsePacket; import java.io.IOException; @@ -51,6 +53,12 @@ public AsyncHttpClientEventFilter(final EventHandler eventHandler, this.eventHandler = eventHandler; } + @Override + public NextAction handleRead(FilterChainContext ctx) throws IOException { + final Connection c = ctx.getConnection(); + HttpContext.newInstance(ctx, c, c, c); + return super.handleRead(ctx); + } @Override public void exceptionOccurred(FilterChainContext ctx, Throwable error) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index 52527f597c..cda70498c6 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -29,7 +29,10 @@ import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; import org.asynchttpclient.providers.grizzly.GrizzlyResponseFuture; import org.asynchttpclient.providers.grizzly.HttpTxContext; +import org.asynchttpclient.providers.grizzly.RequestInfoHolder; import org.asynchttpclient.providers.grizzly.Utils; +import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; +import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandlerFactory; import org.asynchttpclient.providers.grizzly.bodyhandler.ExpectHandler; import org.asynchttpclient.providers.grizzly.filters.events.ContinueEvent; import org.asynchttpclient.providers.grizzly.filters.events.SSLSwitchingEvent; @@ -42,6 +45,7 @@ import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.filterchain.FilterChainEvent; import org.glassfish.grizzly.filterchain.NextAction; +import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.http.HttpRequestPacket; import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.ProcessingState; @@ -54,6 +58,7 @@ import org.glassfish.grizzly.ssl.SSLUtils; import org.glassfish.grizzly.websockets.Version; +import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; @@ -63,9 +68,11 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; + import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.http.HttpResponsePacket; +import org.slf4j.Logger; import static org.asynchttpclient.providers.grizzly.filters.SwitchingSSLFilter.getHandshakeError; import static org.asynchttpclient.util.AsyncHttpProviderUtils.getAuthority; @@ -83,9 +90,11 @@ public final class AsyncHttpClientFilter extends BaseFilter { private ConcurrentLinkedQueue requestCache = new ConcurrentLinkedQueue(); + private final Logger logger; private final AsyncHttpClientConfig config; private final GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider; + private final BodyHandlerFactory bodyHandlerFactory; private static final Attribute PROXY_AUTH_FAILURE = Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute(AsyncHttpClientFilter.class.getName() + "-PROXY-AUTH_FAILURE"); @@ -95,9 +104,9 @@ public final class AsyncHttpClientFilter extends BaseFilter { public AsyncHttpClientFilter(GrizzlyAsyncHttpProvider grizzlyAsyncHttpProvider, final AsyncHttpClientConfig config) { this.grizzlyAsyncHttpProvider = grizzlyAsyncHttpProvider; - this.config = config; - + bodyHandlerFactory = new BodyHandlerFactory(grizzlyAsyncHttpProvider); + logger = GrizzlyAsyncHttpProvider.LOGGER; } @@ -125,9 +134,9 @@ public NextAction handleWrite(final FilterChainContext ctx) throws IOException { Object message = ctx.getMessage(); - if (message instanceof Request) { + if (message instanceof RequestInfoHolder) { ctx.setMessage(null); - if (!sendAsGrizzlyRequest((Request) message, ctx)) { + if (!sendAsGrizzlyRequest((RequestInfoHolder) message, ctx)) { return ctx.getSuspendAction(); } } else if (message instanceof Buffer) { @@ -182,7 +191,8 @@ public Object onCompleted(Response response) throws Exception { grizzlyAsyncHttpProvider.execute(ctx.getConnection(), request, handler, - future); + future, + HttpTxContext.get(ctx)); return ctx.getSuspendAction(); } @@ -203,32 +213,36 @@ private static void recycleRequestResponsePackets(final Connection c, } } - private boolean sendAsGrizzlyRequest(final Request request, + private boolean sendAsGrizzlyRequest(final RequestInfoHolder requestInfoHolder, final FilterChainContext ctx) throws IOException { - final HttpTxContext httpCtx = HttpTxContext.get(ctx.getConnection()); + HttpTxContext httpTxContext = requestInfoHolder.getHttpTxContext(); + if (httpTxContext == null) { + httpTxContext = HttpTxContext.create(requestInfoHolder); + } - if (checkProxyAuthFailure(ctx, httpCtx)) { + if (checkProxyAuthFailure(ctx, httpTxContext)) { return true; } - final URI uri = httpCtx.getRequest().getURI(); + final URI uri = httpTxContext.getRequest().getURI(); boolean secure = Utils.isSecure(uri); // If the request is secure, check to see if an error occurred during // the handshake. We have to do this here, as the error would occur // out of the scope of a HttpTxContext so there would be // no good way to communicate the problem to the caller. - if (secure && checkHandshakeError(ctx, httpCtx)) { + if (secure && checkHandshakeError(ctx, httpTxContext)) { return true; } - if (isUpgradeRequest(httpCtx.getHandler()) && isWSRequest(httpCtx.getRequestUrl())) { - httpCtx.setWSRequest(true); - convertToUpgradeRequest(httpCtx); + if (isUpgradeRequest(httpTxContext.getHandler()) && isWSRequest(httpTxContext.getRequestUrl())) { + httpTxContext.setWSRequest(true); + convertToUpgradeRequest(httpTxContext); } + final Request request = httpTxContext.getRequest(); HttpRequestPacket requestPacket = requestCache.poll(); if (requestPacket == null) { requestPacket = new HttpRequestPacketImpl(); @@ -244,7 +258,7 @@ private boolean sendAsGrizzlyRequest(final Request request, requestPacket.setRequestURI(uri.getPath()); } - if (GrizzlyAsyncHttpProvider.requestHasEntityBody(request)) { + if (Utils.requestHasEntityBody(request)) { final long contentLength = request.getContentLength(); if (contentLength > 0) { requestPacket.setContentLengthLong(contentLength); @@ -254,16 +268,16 @@ private boolean sendAsGrizzlyRequest(final Request request, } } - if (httpCtx.isWSRequest()) { + if (httpTxContext.isWSRequest()) { try { - final URI wsURI = new URI(httpCtx.getWsRequestURI()); - httpCtx.setProtocolHandler(Version.RFC6455.createHandler(true)); - httpCtx.setHandshake( - httpCtx.getProtocolHandler().createHandShake(wsURI)); + final URI wsURI = new URI(httpTxContext.getWsRequestURI()); + httpTxContext.setProtocolHandler(Version.RFC6455.createHandler(true)); + httpTxContext.setHandshake( + httpTxContext.getProtocolHandler().createHandShake(wsURI)); requestPacket = (HttpRequestPacket) - httpCtx.getHandshake().composeHeaders().getHttpHeader(); + httpTxContext.getHandshake().composeHeaders().getHttpHeader(); } catch (URISyntaxException e) { - throw new IllegalArgumentException("Invalid WS URI: " + httpCtx.getWsRequestURI()); + throw new IllegalArgumentException("Invalid WS URI: " + httpTxContext.getWsRequestURI()); } } @@ -273,7 +287,7 @@ private boolean sendAsGrizzlyRequest(final Request request, addGeneralHeaders(request, requestPacket); addCookies(request, requestPacket); - initTransferCompletionHandler(request, httpCtx.getHandler()); + initTransferCompletionHandler(request, httpTxContext.getHandler()); final HttpRequestPacket requestPacketLocal = requestPacket; FilterChainContext sendingCtx = ctx; @@ -284,11 +298,55 @@ private boolean sendAsGrizzlyRequest(final Request request, // use a different FilterChainContext when invoking sendRequest(). sendingCtx = checkAndHandleFilterChainUpdate(ctx, sendingCtx); } + final Connection c = ctx.getConnection(); + HttpContext.newInstance(ctx, c, c, c); + HttpTxContext.set(ctx, httpTxContext); + return sendRequest(sendingCtx, request, requestPacketLocal); + + } + + @SuppressWarnings("unchecked") + public boolean sendRequest(final FilterChainContext ctx, + final Request request, + final HttpRequestPacket requestPacket) + throws IOException { + + boolean isWriteComplete = true; + + if (Utils.requestHasEntityBody(request)) { + final HttpTxContext context = + HttpTxContext.get(ctx); + BodyHandler handler = bodyHandlerFactory.getBodyHandler(request); + if (requestPacket.getHeaders().contains(Header.Expect) + && requestPacket.getHeaders() + .getValue(1) + .equalsIgnoreCase("100-Continue")) { + // We have to set the content-length now as the headers will be flushed + // before the FileBodyHandler is invoked. If we don't do it here, and + // the user didn't explicitly set the length, then the transfer-encoding + // will be chunked and zero-copy file transfer will not occur. + final File f = request.getFile(); + if (f != null) { + requestPacket.setContentLengthLong(f.length()); + } + handler = new ExpectHandler(handler); + } + context.setBodyHandler(handler); + if (logger.isDebugEnabled()) { + logger.debug("REQUEST: {}", requestPacket); + } + isWriteComplete = handler.doHandle(ctx, request, requestPacket); + } else { + HttpContent content = + HttpContent.builder(requestPacket).last(true).build(); + if (logger.isDebugEnabled()) { + logger.debug("REQUEST: {}", requestPacket); + } + ctx.write(content, ctx.getTransportContext().getCompletionHandler()); + } - return grizzlyAsyncHttpProvider.sendRequest(sendingCtx, - request, - requestPacketLocal); + return isWriteComplete; } private static FilterChainContext checkAndHandleFilterChainUpdate(final FilterChainContext ctx, diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java deleted file mode 100644 index 39982d6c5c..0000000000 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientTransportFilter.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2013 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.grizzly.filters; - -import org.asynchttpclient.providers.grizzly.HttpTxContext; -import org.glassfish.grizzly.CompletionHandler; -import org.glassfish.grizzly.filterchain.FilterChainContext; -import org.glassfish.grizzly.filterchain.NextAction; -import org.glassfish.grizzly.filterchain.TransportFilter; - -import java.io.EOFException; -import java.io.IOException; - -/** - * Custom {@link TransportFilter} implementation to capture and handle low-level - * exceptions. - * - * @since 1.7 - * @author The Grizzly Team - */ -public final class AsyncHttpClientTransportFilter extends TransportFilter { - - - // ----------------------------------------------------- Methods from Filter - - - @Override - public NextAction handleRead(FilterChainContext ctx) throws IOException { - final HttpTxContext context = - HttpTxContext.get(ctx.getConnection()); - if (context == null) { - return super.handleRead(ctx); - } - ctx.getTransportContext().setCompletionHandler(new CompletionHandler() { - @Override - public void cancelled() { - - } - - @Override - public void failed(Throwable throwable) { - if (throwable instanceof EOFException) { - context.abort(new IOException("Remotely Closed")); - } - } - - @Override - public void completed(Object result) { - } - - @Override - public void updated(Object result) { - } - }); - return super.handleRead(ctx); - } - - @Override - public void exceptionOccurred(FilterChainContext ctx, Throwable error) { - final HttpTxContext context = HttpTxContext.get(ctx.getConnection()); - if (context != null) { - context.abort(error.getCause()); - } - } - -} diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java index 0a2be3030b..6786a95550 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/ProxyFilter.java @@ -65,7 +65,7 @@ public NextAction handleWrite(FilterChainContext ctx) throws IOException { org.glassfish.grizzly.http.HttpContent content = ctx.getMessage(); HttpRequestPacket request = (HttpRequestPacket) content.getHttpHeader(); - HttpTxContext context = HttpTxContext.get(ctx.getConnection()); + HttpTxContext context = HttpTxContext.get(ctx); assert(context != null); Request req = context.getRequest(); if (!secure) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java index 84ae75f26c..17612dc953 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/events/SSLSwitchingEvent.java @@ -16,7 +16,6 @@ import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.filterchain.FilterChainEvent; -import java.util.concurrent.Callable; /** * {@link FilterChainEvent} to dynamically enable/disable the SSLFilter on diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java index 2ee3ef7b08..d9bf914507 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java @@ -103,12 +103,13 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTxContext.set(c, newContext); + HttpTxContext.set(ctx, newContext); newContext.setInvocationStatus(STOP); httpTransactionContext.getProvider().execute(c, req, httpTransactionContext.getHandler(), - httpTransactionContext.getFuture()); + httpTransactionContext.getFuture(), + newContext); return false; } catch (Exception e) { httpTransactionContext.abort(e); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java index dbe8ff5d9a..4720763ca3 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -23,6 +23,7 @@ import org.asynchttpclient.util.Base64; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.filterchain.FilterChainContext; +import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.util.Header; import org.glassfish.grizzly.http.util.HttpStatus; @@ -149,7 +150,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTxContext.set(c, newContext); + HttpTxContext.set(ctx, newContext); newContext.setInvocationStatus(tempInvocationStatus); @@ -163,18 +164,18 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, "Negotiate " + challengeHeader); - return executeRequest(httpTransactionContext, req, c); + return executeRequest(httpTransactionContext, req, c, newContext); } else if (isNTLMSecondHandShake(proxyAuth)) { final Connection c = ctx.getConnection(); final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTxContext.set(c, newContext); + HttpTxContext.set(ctx, newContext); newContext.setInvocationStatus(tempInvocationStatus); - return executeRequest(httpTransactionContext, req, c); + return executeRequest(httpTransactionContext, req, c, newContext); } else { final Connection c = getConnectionForNextRequest(ctx, @@ -184,12 +185,12 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, final HttpTxContext newContext = httpTransactionContext.copy(); httpTransactionContext.setFuture(null); - HttpTxContext.set(c, newContext); + HttpTxContext.set(ctx, newContext); newContext.setInvocationStatus(tempInvocationStatus); //NTLM needs the same connection to be used for exchange of tokens - return executeRequest(httpTransactionContext, req, c); + return executeRequest(httpTransactionContext, req, c, newContext); } } catch (Exception e) { httpTransactionContext.abort(e); @@ -200,11 +201,12 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, private boolean executeRequest( final HttpTxContext httpTransactionContext, - final Request req, final Connection c) { + final Request req, final Connection c, final HttpTxContext httpTxContext) { httpTransactionContext.getProvider().execute(c, req, httpTransactionContext.getHandler(), - httpTransactionContext.getFuture()); + httpTransactionContext.getFuture(), + httpTxContext); return false; } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java index 448d004c16..4a17602a3f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/RedirectHandler.java @@ -89,11 +89,12 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, newContext.setInvocationStatus(CONTINUE); newContext.setRequest(requestToSend); newContext.setRequestUrl(requestToSend.getUrl()); - HttpTxContext.set(c, newContext); + HttpTxContext.set(ctx, newContext); httpTransactionContext.getProvider().execute(c, requestToSend, newContext.getHandler(), - newContext.getFuture()); + newContext.getFuture(), + newContext); return false; } catch (Exception e) { httpTransactionContext.abort(e); From 078d86af833dbfbda824fd686befbf40c79464c5 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 27 Sep 2013 13:09:18 -0700 Subject: [PATCH 0576/2844] Uptake grizzly 2.3.7-SNAPSHOT. This release includes change necessary to support SPDY multiplexing with AHC. Simple test of 20 concurrent requests over a single connection to https://www.google.com confirm multiplexing is working. --- providers/grizzly/pom.xml | 2 +- .../providers/grizzly/EventHandler.java | 2 +- .../grizzly/GrizzlyAsyncHttpProvider.java | 3 +-- .../filters/AsyncHttpClientEventFilter.java | 7 ------ .../filters/AsyncHttpClientFilter.java | 22 ++++++++++++++++++- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index 775b199f1e..ab9d594d5b 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -14,7 +14,7 @@ - 2.3.6 + 2.3.7-SNAPSHOT 1.0 diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index 0b5ff84d7d..c0e28d05c1 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -428,7 +428,7 @@ private static HttpTxContext cleanup(final FilterChainContext ctx) { final HttpTxContext context = HttpTxContext.get(ctx); HttpTxContext.remove(ctx, context); - if (!Utils.isIgnored(c)) { + if (!Utils.isSpdyConnection(c) && !Utils.isIgnored(c)) { final ConnectionManager manager = context.getProvider().getConnectionManager(); //if (!manager.canReturnConnection(c)) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index f03decb5a9..a375d815de 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -44,7 +44,6 @@ import org.glassfish.grizzly.http.ContentEncoding; import org.glassfish.grizzly.http.GZipContentEncoding; import org.glassfish.grizzly.http.HttpClientFilter; -import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.npn.ClientSideNegotiator; import org.glassfish.grizzly.spdy.NextProtoNegSupport; import org.glassfish.grizzly.spdy.SpdyFramingFilter; @@ -485,7 +484,7 @@ public void updated(WriteResult result) { void timeout(final Connection c) { final String key = HttpTxContext.class.getName(); - HttpTxContext ctx = null; + HttpTxContext ctx; if (!Utils.isSpdyConnection(c)) { ctx = (HttpTxContext) c.getAttributes().getAttribute(key); if (ctx != null) { diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java index eb15b9a9aa..747d9982ad 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientEventFilter.java @@ -53,13 +53,6 @@ public AsyncHttpClientEventFilter(final EventHandler eventHandler, this.eventHandler = eventHandler; } - @Override - public NextAction handleRead(FilterChainContext ctx) throws IOException { - final Connection c = ctx.getConnection(); - HttpContext.newInstance(ctx, c, c, c); - return super.handleRead(ctx); - } - @Override public void exceptionOccurred(FilterChainContext ctx, Throwable error) { eventHandler.exceptionOccurred(ctx, error); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index cda70498c6..d2724f5925 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -54,6 +54,8 @@ import org.glassfish.grizzly.http.util.Header; import org.glassfish.grizzly.http.util.MimeHeaders; import org.glassfish.grizzly.impl.SafeFutureImpl; +import org.glassfish.grizzly.spdy.SpdySession; +import org.glassfish.grizzly.spdy.SpdyStream; import org.glassfish.grizzly.ssl.SSLConnectionContext; import org.glassfish.grizzly.ssl.SSLUtils; import org.glassfish.grizzly.websockets.Version; @@ -68,6 +70,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.locks.Lock; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.http.HttpContent; @@ -299,7 +302,24 @@ private boolean sendAsGrizzlyRequest(final RequestInfoHolder requestInfoHolder, sendingCtx = checkAndHandleFilterChainUpdate(ctx, sendingCtx); } final Connection c = ctx.getConnection(); - HttpContext.newInstance(ctx, c, c, c); + System.out.println("*** CONNECTION: " + c); + if (!Utils.isSpdyConnection(c)) { + HttpContext.newInstance(ctx, c, c, c); + } else { + SpdySession session = SpdySession.get(c); + final Lock lock = session.getNewClientStreamLock(); + try { + lock.lock(); + SpdyStream stream = session.openStream( + requestPacketLocal, + session.getNextLocalStreamId(), + 0, 0, 0, false, !requestPacketLocal.isExpectContent()); + HttpContext.newInstance(ctx, stream, stream, stream); + } finally { + lock.unlock(); + } + + } HttpTxContext.set(ctx, httpTxContext); return sendRequest(sendingCtx, request, requestPacketLocal); From dd2cc874df827332798818003f8bfc56d67377ae Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 11:28:04 +0200 Subject: [PATCH 0577/2844] Drop Netty 3 support, move Spnego into api, close #316 --- .../filter/ResponseFilter.java | 2 +- .../listener/TransferCompletionHandler.java | 62 +- .../asynchttpclient}/spnego/SpnegoEngine.java | 45 +- .../spnego/SpnegoTokenGenerator.java | 2 +- .../async/SimpleAsyncHttpClientTest.java | 85 +- .../filters/AsyncHttpClientFilter.java | 4 +- providers/netty/pom.xml | 41 +- .../providers/netty/BodyChunkedInput.java | 76 - .../providers/netty/BodyFileRegion.java | 57 - .../providers/netty}/Callback.java | 4 +- .../providers/netty}/Constants.java | 2 +- .../providers/netty}/DiscardEvent.java | 2 +- .../netty/FeedableBodyGenerator.java | 119 - .../netty/NettyAsyncHttpProvider.java | 2329 +---------------- .../netty/NettyAsyncHttpProviderConfig.java | 79 +- .../providers/netty/NettyConnectListener.java | 153 -- .../providers/netty/NettyConnectionsPool.java | 294 --- .../providers/netty/NettyResponse.java | 121 - .../providers/netty/NettyResponseFuture.java | 515 ---- .../providers/netty/NettyWebSocket.java | 236 -- .../providers/netty/Protocol.java | 27 - .../providers/netty/ResponseBodyPart.java | 134 - .../providers/netty/ResponseHeaders.java | 74 - .../providers/netty/ResponseStatus.java | 75 - .../providers/netty/WebSocketUtil.java | 72 - .../providers/netty/channel}/Channels.java | 176 +- .../netty/channel}/NettyConnectionsPool.java | 4 +- .../netty/channel/NonConnectionsPool.java} | 35 +- .../providers/netty/future}/FutureReaper.java | 9 +- .../netty/future}/NettyResponseFuture.java | 6 +- .../netty/future}/NettyResponseFutures.java | 2 +- .../providers/netty/handler/HttpProtocol.java | 450 ++++ .../netty/handler/NettyChannelHandler.java | 199 ++ .../providers/netty/handler/Protocol.java | 137 + .../netty/handler/WebSocketProtocol.java | 221 ++ .../netty/request}/BodyChunkedInput.java | 2 +- .../netty/request}/BodyFileRegion.java | 2 +- .../netty/request}/FeedableBodyGenerator.java | 2 +- .../netty/request}/NettyConnectListener.java | 23 +- .../netty/request}/NettyRequestSender.java | 298 ++- .../netty/request}/NettyRequests.java | 37 +- .../netty/request}/ProgressListener.java | 36 +- .../netty/response}/NettyResponse.java | 2 +- .../netty/response}/ResponseBodyPart.java | 4 +- .../netty/response}/ResponseHeaders.java | 2 +- .../netty/response}/ResponseStatus.java | 2 +- .../providers/netty/spnego/SpnegoEngine.java | 172 -- .../providers/netty}/util/ByteBufUtil.java | 2 +- .../netty/util/ChannelBufferUtil.java | 35 - .../netty/util/CleanupChannelGroup.java | 34 +- .../providers/netty}/util/HttpUtil.java | 2 +- .../providers/netty/ws}/NettyWebSocket.java | 130 +- .../providers/netty/ws}/WebSocketUtil.java | 2 +- .../netty/NettyAsyncHttpProviderTest.java | 23 - .../netty/NettyAsyncProviderBasicTest.java | 8 +- .../netty/NettyAsyncProviderPipelineTest.java | 58 +- .../netty/NettyAsyncResponseTest.java | 21 +- .../providers/netty/NettyAuthTimeoutTest.java | 1 - .../providers/netty/NettyBasicAuthTest.java | 7 - .../netty/NettyConnectionPoolTest.java | 7 +- .../netty/NettyMultipartUploadTest.java | 2 - .../netty/NettyPerRequestTimeoutTest.java | 2 +- .../providers/netty/NettyProviderUtil.java | 11 +- .../NettyRequestThrottleTimeoutTest.java | 23 +- .../netty/RetryNonBlockingIssue.java | 11 +- .../netty/websocket/NettyRedirectTest.java | 2 - .../netty/websocket/NettyTextMessageTest.java | 2 - providers/netty4/pom.xml | 51 - .../netty4/NettyAsyncHttpProvider.java | 94 - .../netty4/NettyAsyncHttpProviderConfig.java | 227 -- .../providers/netty4/NettyChannelHandler.java | 873 ------ .../providers/netty4/OptimizedFileRegion.java | 68 - .../providers/netty4/Protocol.java | 24 - .../providers/netty4/ThreadLocalBoolean.java | 19 - .../netty4/spnego/SpnegoTokenGenerator.java | 55 - .../netty4/util/CleanupChannelGroup.java | 110 - .../netty4/NettyAsyncHttpProviderTest.java | 25 - .../netty4/NettyAsyncProviderBasicTest.java | 36 - .../NettyAsyncProviderPipelineTest.java | 89 - .../netty4/NettyAsyncResponseTest.java | 94 - .../netty4/NettyAsyncStreamHandlerTest.java | 25 - .../netty4/NettyAsyncStreamLifecycleTest.java | 24 - .../netty4/NettyAuthTimeoutTest.java | 27 - .../providers/netty4/NettyBasicAuthTest.java | 31 - .../providers/netty4/NettyBasicHttpsTest.java | 25 - .../providers/netty4/NettyBodyChunkTest.java | 25 - .../NettyBodyDeferringAsyncHandlerTest.java | 26 - .../netty4/NettyByteBufferCapacityTest.java | 25 - .../providers/netty4/NettyChunkingTest.java | 12 - .../netty4/NettyComplexClientTest.java | 25 - .../netty4/NettyConnectionPoolTest.java | 115 - .../providers/netty4/NettyDigestAuthTest.java | 24 - .../providers/netty4/NettyEmptyBodyTest.java | 25 - .../netty4/NettyErrorResponseTest.java | 25 - .../netty4/NettyExpect100ContinueTest.java | 25 - .../netty4/NettyFilePartLargeFileTest.java | 24 - .../providers/netty4/NettyFilterTest.java | 24 - .../netty4/NettyFollowingThreadTest.java | 25 - .../providers/netty4/NettyHead302Test.java | 25 - .../netty4/NettyHostnameVerifierTest.java | 25 - .../netty4/NettyHttpToHttpsRedirectTest.java | 24 - .../netty4/NettyIdleStateHandlerTest.java | 24 - .../netty4/NettyInputStreamTest.java | 24 - .../netty4/NettyListenableFutureTest.java | 26 - .../netty4/NettyMaxConnectionsInThreads.java | 23 - .../netty4/NettyMaxTotalConnectionTest.java | 24 - .../netty4/NettyMultipartUploadTest.java | 29 - .../netty4/NettyMultipleHeaderTest.java | 24 - .../netty4/NettyNoNullResponseTest.java | 24 - .../NettyNonAsciiContentLengthTest.java | 25 - .../netty4/NettyParamEncodingTest.java | 24 - .../NettyPerRequestRelative302Test.java | 24 - .../netty4/NettyPerRequestTimeoutTest.java | 33 - .../netty4/NettyPostRedirectGetTest.java | 27 - .../providers/netty4/NettyPostWithQSTest.java | 24 - .../providers/netty4/NettyProxyTest.java | 25 - .../netty4/NettyProxyTunnellingTest.java | 29 - .../netty4/NettyPutLargeFileTest.java | 24 - .../netty4/NettyQueryParametersTest.java | 24 - .../providers/netty4/NettyRC10KTest.java | 24 - .../NettyRedirectConnectionUsageTest.java | 24 - .../netty4/NettyRelative302Test.java | 25 - .../providers/netty4/NettyRemoteSiteTest.java | 28 - .../NettyRequestThrottleTimeoutTest.java | 135 - .../netty4/NettyRetryRequestTest.java | 28 - .../NettySimpleAsyncHttpClientTest.java | 35 - .../netty4/NettyTransferListenerTest.java | 24 - .../netty4/NettyWebDavBasicTest.java | 24 - .../netty4/NettyZeroCopyFileTest.java | 24 - .../netty4/RetryNonBlockingIssue.java | 266 -- .../websocket/NettyByteMessageTest.java | 25 - .../NettyCloseCodeReasonMsgTest.java | 27 - .../netty4/websocket/NettyRedirectTest.java | 26 - .../websocket/NettyTextMessageTest.java | 25 - providers/netty4/src/test/resources/300k.png | Bin 265495 -> 0 bytes .../src/test/resources/SimpleTextFile.txt | 1 - .../netty4/src/test/resources/client.keystore | Bin 1277 -> 0 bytes .../netty4/src/test/resources/gzip.txt.gz | Bin 47 -> 0 bytes .../src/test/resources/logback-test.xml | 13 - .../src/test/resources/realm.properties | 1 - .../src/test/resources/ssltest-cacerts.jks | Bin 29888 -> 0 bytes .../src/test/resources/ssltest-keystore.jks | Bin 1445 -> 0 bytes .../netty4/src/test/resources/textfile.txt | 1 - .../netty4/src/test/resources/textfile2.txt | 1 - providers/pom.xml | 1 - 145 files changed, 1727 insertions(+), 8673 deletions(-) rename {providers/netty4/src/main/java/org/asynchttpclient/providers/netty4 => api/src/main/java/org/asynchttpclient}/spnego/SpnegoEngine.java (84%) rename {providers/netty/src/main/java/org/asynchttpclient/providers/netty => api/src/main/java/org/asynchttpclient}/spnego/SpnegoTokenGenerator.java (97%) delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty}/Callback.java (72%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty}/Constants.java (86%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty}/DiscardEvent.java (66%) delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java delete mode 100755 providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/channel}/Channels.java (84%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/channel}/NettyConnectionsPool.java (98%) rename providers/{netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProviderUtil.java => netty/src/main/java/org/asynchttpclient/providers/netty/channel/NonConnectionsPool.java} (50%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/future}/FutureReaper.java (91%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/future}/NettyResponseFuture.java (98%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/future}/NettyResponseFutures.java (98%) create mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java create mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java create mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java create mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/BodyChunkedInput.java (97%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/BodyFileRegion.java (97%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/FeedableBodyGenerator.java (98%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/NettyConnectListener.java (87%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/NettyRequestSender.java (64%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/NettyRequests.java (92%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/request}/ProgressListener.java (70%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/response}/NettyResponse.java (98%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/response}/ResponseBodyPart.java (95%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/response}/ResponseHeaders.java (97%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/response}/ResponseStatus.java (98%) delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty}/util/ByteBufUtil.java (95%) delete mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty}/util/HttpUtil.java (94%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/ws}/NettyWebSocket.java (71%) rename providers/{netty4/src/main/java/org/asynchttpclient/providers/netty4 => netty/src/main/java/org/asynchttpclient/providers/netty/ws}/WebSocketUtil.java (98%) delete mode 100644 providers/netty4/pom.xml delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/OptimizedFileRegion.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ThreadLocalBoolean.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoTokenGenerator.java delete mode 100644 providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/CleanupChannelGroup.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderBasicTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncResponseTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamHandlerTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamLifecycleTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicHttpsTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyChunkTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyDeferringAsyncHandlerTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyByteBufferCapacityTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyChunkingTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyComplexClientTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyConnectionPoolTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyDigestAuthTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyEmptyBodyTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyErrorResponseTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyExpect100ContinueTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilePartLargeFileTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilterTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFollowingThreadTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHead302Test.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHostnameVerifierTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHttpToHttpsRedirectTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyIdleStateHandlerTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyInputStreamTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyListenableFutureTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxConnectionsInThreads.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxTotalConnectionTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipartUploadTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipleHeaderTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNoNullResponseTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNonAsciiContentLengthTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyParamEncodingTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestRelative302Test.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestTimeoutTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostRedirectGetTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostWithQSTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPutLargeFileTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyQueryParametersTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRC10KTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRelative302Test.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRemoteSiteTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRetryRequestTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettySimpleAsyncHttpClientTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyTransferListenerTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyWebDavBasicTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyZeroCopyFileTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyByteMessageTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java delete mode 100644 providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyTextMessageTest.java delete mode 100644 providers/netty4/src/test/resources/300k.png delete mode 100644 providers/netty4/src/test/resources/SimpleTextFile.txt delete mode 100644 providers/netty4/src/test/resources/client.keystore delete mode 100644 providers/netty4/src/test/resources/gzip.txt.gz delete mode 100644 providers/netty4/src/test/resources/logback-test.xml delete mode 100644 providers/netty4/src/test/resources/realm.properties delete mode 100644 providers/netty4/src/test/resources/ssltest-cacerts.jks delete mode 100644 providers/netty4/src/test/resources/ssltest-keystore.jks delete mode 100644 providers/netty4/src/test/resources/textfile.txt delete mode 100644 providers/netty4/src/test/resources/textfile2.txt diff --git a/api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java b/api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java index 8c26bcca9a..cdad3ce23c 100644 --- a/api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java +++ b/api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java @@ -15,7 +15,7 @@ /** * A Filter interface that gets invoked before making the processing of the response bytes. {@link ResponseFilter} are invoked * before the actual response's status code get processed. That means authorization, proxy authentication and redirects - * processing hasn't occured when {@link ResponseFilter} gets invoked. + * processing hasn't occurred when {@link ResponseFilter} gets invoked. */ public interface ResponseFilter { diff --git a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java index ff7417be3b..94a5888af5 100644 --- a/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java +++ b/api/src/main/java/org/asynchttpclient/listener/TransferCompletionHandler.java @@ -13,7 +13,6 @@ package org.asynchttpclient.listener; import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.atomic.AtomicLong; import org.asynchttpclient.AsyncCompletionHandlerBase; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; @@ -42,7 +41,7 @@ * public void onBytesReceived(ByteBuffer buffer) { * } *

- * public void onBytesSent(ByteBuffer buffer) { + * public void onBytesSent(long amount, long current, long total) { * } *

* public void onRequestResponseCompleted() { @@ -61,9 +60,7 @@ public class TransferCompletionHandler extends AsyncCompletionHandlerBase { private final static Logger logger = LoggerFactory.getLogger(TransferCompletionHandler.class); private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); private final boolean accumulateResponseBytes; - private TransferAdapter transferAdapter; - private AtomicLong bytesTransferred = new AtomicLong(0); - private AtomicLong totalBytesToTransfer = new AtomicLong(-1); + private FluentCaseInsensitiveStringsMap headers; /** * Create a TransferCompletionHandler that will not accumulate bytes. The resulting {@link org.asynchttpclient.Response#getResponseBody()}, @@ -109,13 +106,13 @@ public TransferCompletionHandler removeTransferListener(TransferListener t) { } /** - * Associate a {@link TransferCompletionHandler.TransferAdapter} with this listener. + * Set headers to this listener. * - * @param transferAdapter - * {@link TransferAdapter} + * @param headers + * {@link FluentCaseInsensitiveStringsMap} */ - public void transferAdapter(TransferAdapter transferAdapter) { - this.transferAdapter = transferAdapter; + public void headers(FluentCaseInsensitiveStringsMap headers) { + this.headers = headers; } @Override @@ -136,49 +133,20 @@ public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Excep @Override public Response onCompleted(Response response) throws Exception { - if (bytesTransferred.get() > 0L) { - // onContentWriteCompleted hasn't been notified, it would have been set to -1L (async race) - onContentWriteCompleted(); - } fireOnEnd(); return response; } @Override public STATE onHeaderWriteCompleted() { - if (transferAdapter != null) { - fireOnHeadersSent(transferAdapter.getHeaders()); - } - return STATE.CONTINUE; - } - - @Override - public STATE onContentWriteCompleted() { - // onContentWriteProgress might not have been called on last write - long transferred = bytesTransferred.getAndSet(-1L); - long expected = totalBytesToTransfer.get(); - - if (expected <= 0L && transferAdapter != null) { - FluentCaseInsensitiveStringsMap headers = transferAdapter.getHeaders(); - String contentLengthString = headers.getFirstValue("Content-Length"); - if (contentLengthString != null) - expected = Long.valueOf(contentLengthString); - } - - if (expected > 0L && transferred != expected) { - fireOnBytesSent(expected - transferred, expected, expected); + if (headers != null) { + fireOnHeadersSent(headers); } - return STATE.CONTINUE; } @Override public STATE onContentWriteProgress(long amount, long current, long total) { - bytesTransferred.addAndGet(amount); - - if (total > 0L) - totalBytesToTransfer.set(total); - fireOnBytesSent(amount, current, total); return STATE.CONTINUE; } @@ -247,16 +215,4 @@ private void fireOnThrowable(Throwable t) { } } } - - public static class TransferAdapter { - private final FluentCaseInsensitiveStringsMap headers; - - public TransferAdapter(FluentCaseInsensitiveStringsMap headers) { - this.headers = headers; - } - - public FluentCaseInsensitiveStringsMap getHeaders() { - return headers; - } - } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoEngine.java b/api/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java similarity index 84% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoEngine.java rename to api/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java index eeeb83365f..aa42c011aa 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoEngine.java +++ b/api/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java @@ -35,7 +35,7 @@ * . */ -package org.asynchttpclient.providers.netty4.spnego; +package org.asynchttpclient.spnego; import org.asynchttpclient.util.Base64; import org.ietf.jgss.GSSContext; @@ -49,9 +49,8 @@ import java.io.IOException; /** - * SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) authentication - * scheme. - * + * SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) authentication scheme. + * * @since 4.1 */ public class SpnegoEngine { @@ -70,8 +69,9 @@ public SpnegoEngine(final SpnegoTokenGenerator spnegoGenerator) { public SpnegoEngine() { this(null); } - + private static SpnegoEngine instance; + public static SpnegoEngine instance() { if (instance == null) instance = new SpnegoEngine(); @@ -85,17 +85,16 @@ public String generateToken(String server) throws Throwable { try { log.debug("init {}", server); - /* Using the SPNEGO OID is the correct method. - * Kerberos v5 works for IIS but not JBoss. Unwrapping - * the initial token when using SPNEGO OID looks like what is - * described here... - * + /* + * Using the SPNEGO OID is the correct method. Kerberos v5 works for IIS but not JBoss. Unwrapping the initial token when using SPNEGO OID looks like what is described + * here... + * * http://msdn.microsoft.com/en-us/library/ms995330.aspx - * + * * Another helpful URL... - * + * * http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tsec_SPNEGO_token.html - * + * * Unfortunately SPNEGO is JRE >=1.6. */ @@ -106,9 +105,7 @@ public String generateToken(String server) throws Throwable { try { GSSManager manager = GSSManager.getInstance(); GSSName serverName = manager.createName("HTTP@" + server, GSSName.NT_HOSTBASED_SERVICE); - gssContext = manager.createContext( - serverName.canonicalize(negotiationOid), negotiationOid, null, - GSSContext.DEFAULT_LIFETIME); + gssContext = manager.createContext(serverName.canonicalize(negotiationOid), negotiationOid, null, GSSContext.DEFAULT_LIFETIME); gssContext.requestMutualAuth(true); gssContext.requestCredDeleg(true); } catch (GSSException ex) { @@ -124,14 +121,12 @@ public String generateToken(String server) throws Throwable { } if (tryKerberos) { - /* Kerberos v5 GSS-API mechanism defined in RFC 1964.*/ + /* Kerberos v5 GSS-API mechanism defined in RFC 1964. */ log.debug("Using Kerberos MECH {}", KERBEROS_OID); negotiationOid = new Oid(KERBEROS_OID); GSSManager manager = GSSManager.getInstance(); GSSName serverName = manager.createName("HTTP@" + server, GSSName.NT_HOSTBASED_SERVICE); - gssContext = manager.createContext( - serverName.canonicalize(negotiationOid), negotiationOid, null, - GSSContext.DEFAULT_LIFETIME); + gssContext = manager.createContext(serverName.canonicalize(negotiationOid), negotiationOid, null, GSSContext.DEFAULT_LIFETIME); gssContext.requestMutualAuth(true); gssContext.requestCredDeleg(true); } @@ -147,8 +142,7 @@ public String generateToken(String server) throws Throwable { } /* - * IIS accepts Kerberos and SPNEGO tokens. Some other servers Jboss, Glassfish? - * seem to only accept SPNEGO. Below wraps Kerberos into SPNEGO token. + * IIS accepts Kerberos and SPNEGO tokens. Some other servers Jboss, Glassfish? seem to only accept SPNEGO. Below wraps Kerberos into SPNEGO token. */ if (spnegoGenerator != null && negotiationOid.toString().equals(KERBEROS_OID)) { token = spnegoGenerator.generateSpnegoDERObject(token); @@ -162,14 +156,11 @@ public String generateToken(String server) throws Throwable { return tokenstr; } catch (GSSException gsse) { log.error("generateToken", gsse); - if (gsse.getMajor() == GSSException.DEFECTIVE_CREDENTIAL - || gsse.getMajor() == GSSException.CREDENTIALS_EXPIRED) + if (gsse.getMajor() == GSSException.DEFECTIVE_CREDENTIAL || gsse.getMajor() == GSSException.CREDENTIALS_EXPIRED) throw new Exception(gsse.getMessage(), gsse); if (gsse.getMajor() == GSSException.NO_CRED) throw new Exception(gsse.getMessage(), gsse); - if (gsse.getMajor() == GSSException.DEFECTIVE_TOKEN - || gsse.getMajor() == GSSException.DUPLICATE_TOKEN - || gsse.getMajor() == GSSException.OLD_TOKEN) + if (gsse.getMajor() == GSSException.DEFECTIVE_TOKEN || gsse.getMajor() == GSSException.DUPLICATE_TOKEN || gsse.getMajor() == GSSException.OLD_TOKEN) throw new Exception(gsse.getMessage(), gsse); // other error throw new Exception(gsse.getMessage()); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoTokenGenerator.java b/api/src/main/java/org/asynchttpclient/spnego/SpnegoTokenGenerator.java similarity index 97% rename from providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoTokenGenerator.java rename to api/src/main/java/org/asynchttpclient/spnego/SpnegoTokenGenerator.java index 20d6dcc1ad..ead1c19335 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoTokenGenerator.java +++ b/api/src/main/java/org/asynchttpclient/spnego/SpnegoTokenGenerator.java @@ -36,7 +36,7 @@ * */ -package org.asynchttpclient.providers.netty.spnego; +package org.asynchttpclient.spnego; import java.io.IOException; diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java index ef0dfacf51..49a340fde9 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncHttpClientTest.java @@ -18,6 +18,9 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.concurrent.Future; import org.asynchttpclient.ByteArrayPart; @@ -40,11 +43,11 @@ public abstract class SimpleAsyncHttpClientTest extends AbstractBasicTest { @Test(groups = { "standalone", "default_provider" }) public void inpuStreamBodyConsumerTest() throws Exception { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100) + .setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes()))); - System.out.println("waiting for response"); Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(response.getResponseBody(), MY_MESSAGE); @@ -56,12 +59,12 @@ public void inpuStreamBodyConsumerTest() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void stringBuilderBodyConsumerTest() throws Exception { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100) + .setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { StringBuilder s = new StringBuilder(); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s)); - System.out.println("waiting for response"); Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(s.toString(), MY_MESSAGE); @@ -73,12 +76,12 @@ public void stringBuilderBodyConsumerTest() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void byteArrayOutputStreamBodyConsumerTest() throws Exception { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100) + .setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 60 * 1000).setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build(); try { ByteArrayOutputStream o = new ByteArrayOutputStream(10); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); - System.out.println("waiting for response"); Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); @@ -95,7 +98,6 @@ public void requestByteArrayOutputStreamBodyConsumerTest() throws Exception { ByteArrayOutputStream o = new ByteArrayOutputStream(10); Future future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new OutputStreamBodyConsumer(o)); - System.out.println("waiting for response"); Response response = future.get(); assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); @@ -109,7 +111,8 @@ public void requestByteArrayOutputStreamBodyConsumerTest() throws Exception { */ @Test(groups = { "standalone", "default_provider" }, enabled = true) public void testPutZeroBytesFileTest() throws Exception { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100).setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 1000).setUrl(getTargetUrl() + "/testPutZeroBytesFileTest.txt").setHeader("Content-Type", "text/plain") + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setIdleConnectionInPoolTimeoutInMs(100) + .setMaximumConnectionsTotal(50).setRequestTimeoutInMs(5 * 1000).setUrl(getTargetUrl() + "/testPutZeroBytesFileTest.txt").setHeader("Content-Type", "text/plain") .build(); try { File tmpfile = File.createTempFile("testPutZeroBytesFile", ".tmp"); @@ -164,37 +167,66 @@ public void testDeriveOverrideURL() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void testSimpleTransferListener() throws Exception { + final List errors = Collections.synchronizedList(new ArrayList()); + SimpleAHCTransferListener listener = new SimpleAHCTransferListener() { public void onStatus(String url, int statusCode, String statusText) { - assertEquals(statusCode, 200); - assertEquals(url, getTargetUrl()); + try { + assertEquals(statusCode, 200); + assertEquals(url, getTargetUrl()); + } catch (Error e) { + errors.add(e); + throw e; + } } public void onHeaders(String url, HeaderMap headers) { - assertEquals(url, getTargetUrl()); - assertNotNull(headers); - assertTrue(!headers.isEmpty()); - assertEquals(headers.getFirstValue("X-Custom"), "custom"); + try { + assertEquals(url, getTargetUrl()); + assertNotNull(headers); + assertTrue(!headers.isEmpty()); + assertEquals(headers.getFirstValue("X-Custom"), "custom"); + } catch (Error e) { + errors.add(e); + throw e; + } } public void onCompleted(String url, int statusCode, String statusText) { - assertEquals(statusCode, 200); - assertEquals(url, getTargetUrl()); + try { + assertEquals(statusCode, 200); + assertEquals(url, getTargetUrl()); + } catch (Error e) { + errors.add(e); + throw e; + } } public void onBytesSent(String url, long amount, long current, long total) { - assertEquals(url, getTargetUrl()); - assertEquals(total, MY_MESSAGE.getBytes().length); + try { + assertEquals(url, getTargetUrl()); + // FIXME Netty bug, see https://github.com/netty/netty/issues/1855 +// assertEquals(total, MY_MESSAGE.getBytes().length); + } catch (Error e) { + errors.add(e); + throw e; + } } public void onBytesReceived(String url, long amount, long current, long total) { - assertEquals(url, getTargetUrl()); - assertEquals(total, -1); + try { + assertEquals(url, getTargetUrl()); + assertEquals(total, -1); + } catch (Error e) { + errors.add(e); + throw e; + } } }; - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl()).setHeader("Custom", "custom").setListener(listener).build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl()).setHeader("Custom", "custom") + .setListener(listener).build(); try { ByteArrayOutputStream o = new ByteArrayOutputStream(10); @@ -204,6 +236,14 @@ public void onBytesReceived(String url, long amount, long current, long total) { Future future = client.post(generator, consumer); Response response = future.get(); + + if (!errors.isEmpty()) { + for (Error e : errors) { + e.printStackTrace(); + } + throw errors.get(0); + } + assertEquals(response.getStatusCode(), 200); assertEquals(o.toString(), MY_MESSAGE); } finally { @@ -220,7 +260,8 @@ public void testNullUrl() throws Exception { } catch (NullPointerException ex) { fail(); } finally { - if (client != null) client.close(); + if (client != null) + client.close(); } } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index d2724f5925..0cd609ad8f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -25,7 +25,6 @@ import org.asynchttpclient.Response; import org.asynchttpclient.UpgradeHandler; import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; import org.asynchttpclient.providers.grizzly.GrizzlyResponseFuture; import org.asynchttpclient.providers.grizzly.HttpTxContext; @@ -395,8 +394,7 @@ private static void initTransferCompletionHandler(final Request request, if (h instanceof TransferCompletionHandler) { final FluentCaseInsensitiveStringsMap map = new FluentCaseInsensitiveStringsMap(request.getHeaders()); - TransferCompletionHandler.class.cast(h) - .transferAdapter(new TransferAdapter(map)); + TransferCompletionHandler.class.cast(h).headers(map); } } diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 1e1cf573c8..8905736367 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -1,6 +1,5 @@ - + org.asynchttpclient async-http-client-providers-parent @@ -8,16 +7,44 @@ 4.0.0 async-http-client-netty-provider - Asynchronous Http Client Netty Provider + Asynchronous Http Client Netty 4 Provider - The Async Http Client Netty Provider. + The Async Http Client Netty 4 Provider. + + + sonatype-releases + https://oss.sonatype.org/content/repositories/releases + + true + + + false + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + + io.netty - netty - 3.7.0.Final + netty-all + 4.0.10.Final-SNAPSHOT + + + org.javassist + javassist + 3.18.0-GA diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java deleted file mode 100644 index 8c260cb25b..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyChunkedInput.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import org.asynchttpclient.Body; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.handler.stream.ChunkedInput; - -import java.nio.ByteBuffer; - -/** - * Adapts a {@link Body} to Netty's {@link ChunkedInput}. - */ -class BodyChunkedInput implements ChunkedInput { - - private static final int DEFAULT_CHUNK_SIZE = 8 * 1024; - - private final Body body; - private final int contentLength; - private final int chunkSize; - - private boolean endOfInput; - - public BodyChunkedInput(Body body) { - if (body == null) { - throw new IllegalArgumentException("no body specified"); - } - this.body = body; - contentLength = (int) body.getContentLength(); - if (contentLength <= 0) - chunkSize = DEFAULT_CHUNK_SIZE; - else - chunkSize = Math.min(contentLength, DEFAULT_CHUNK_SIZE); - } - - public boolean hasNextChunk() throws Exception { - // unused - throw new UnsupportedOperationException(); - } - - public Object nextChunk() throws Exception { - if (endOfInput) { - return null; - } else { - ByteBuffer buffer = ByteBuffer.allocate(chunkSize); - long r = body.read(buffer); - if (r < 0L) { - endOfInput = true; - return null; - } else { - endOfInput = r == contentLength || r < chunkSize && contentLength > 0; - buffer.flip(); - return ChannelBuffers.wrappedBuffer(buffer); - } - } - } - - public boolean isEndOfInput() throws Exception { - // called by ChunkedWriteHandler AFTER nextChunk - return endOfInput; - } - - public void close() throws Exception { - body.close(); - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java deleted file mode 100644 index 68a271a4da..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/BodyFileRegion.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import org.asynchttpclient.RandomAccessBody; -import org.jboss.netty.channel.FileRegion; - -import java.io.IOException; -import java.nio.channels.WritableByteChannel; - -/** - * Adapts a {@link RandomAccessBody} to Netty's {@link FileRegion}. - */ -class BodyFileRegion - implements FileRegion { - - private final RandomAccessBody body; - - public BodyFileRegion(RandomAccessBody body) { - if (body == null) { - throw new IllegalArgumentException("no body specified"); - } - this.body = body; - } - - public long getPosition() { - return 0; - } - - public long getCount() { - return body.getContentLength(); - } - - public long transferTo(WritableByteChannel target, long position) - throws IOException { - return body.transferTo(position, Long.MAX_VALUE, target); - } - - public void releaseExternalResources() { - try { - body.close(); - } catch (IOException e) { - // we tried - } - } - -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Callback.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Callback.java similarity index 72% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Callback.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/Callback.java index 477f55feae..277b424e13 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Callback.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Callback.java @@ -1,4 +1,6 @@ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty; + +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; public abstract class Callback { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Constants.java similarity index 86% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/Constants.java index 1565673ff1..ede1d05e27 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Constants.java @@ -1,4 +1,4 @@ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty; import java.nio.charset.Charset; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/DiscardEvent.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/DiscardEvent.java similarity index 66% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/DiscardEvent.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/DiscardEvent.java index 6796d5bbc7..f18c40f962 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/DiscardEvent.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/DiscardEvent.java @@ -1,4 +1,4 @@ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty; // Simple marker for stopping publishing bytes. public enum DiscardEvent { diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java deleted file mode 100644 index 2c121c46bb..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/FeedableBodyGenerator.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.Queue; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.atomic.AtomicInteger; - -import org.asynchttpclient.Body; -import org.asynchttpclient.BodyGenerator; - -/** - * {@link BodyGenerator} which may return just part of the payload at the time - * handler is requesting it. If it happens - PartialBodyGenerator becomes responsible - * for finishing payload transferring asynchronously. - */ -public class FeedableBodyGenerator implements BodyGenerator { - private final static byte[] END_PADDING = "\r\n".getBytes(); - private final static byte[] ZERO = "0".getBytes(); - private final Queue queue = new ConcurrentLinkedQueue(); - private final AtomicInteger queueSize = new AtomicInteger(); - private FeedListener listener; - - @Override - public Body createBody() throws IOException { - return new PushBody(); - } - - public void feed(final ByteBuffer buffer, final boolean isLast) throws IOException { - queue.offer(new BodyPart(buffer, isLast)); - queueSize.incrementAndGet(); - if (listener != null) { - listener.onContentAdded(); - } - } - - public static interface FeedListener { - public void onContentAdded(); - } - - public void setListener(FeedListener listener) { - this.listener = listener; - } - - private final class PushBody implements Body { - private final int ONGOING = 0; - private final int CLOSING = 1; - private final int FINISHED = 2; - - private int finishState = 0; - - @Override - public long getContentLength() { - return -1; - } - - @Override - public long read(final ByteBuffer buffer) throws IOException { - BodyPart nextPart = queue.peek(); - if (nextPart == null) { - // Nothing in the queue - switch (finishState) { - case ONGOING: - return 0; - case CLOSING: - buffer.put(ZERO); - buffer.put(END_PADDING); - finishState = FINISHED; - return buffer.position(); - case FINISHED: - buffer.put(END_PADDING); - return -1; - } - } - int capacity = buffer.remaining() - 10; // be safe (we'll have to add size, ending, etc.) - int size = Math.min(nextPart.buffer.remaining(), capacity); - buffer.put(Integer.toHexString(size).getBytes()); - buffer.put(END_PADDING); - for (int i=0; i < size; i++) { - buffer.put(nextPart.buffer.get()); - } - buffer.put(END_PADDING); - if (!nextPart.buffer.hasRemaining()) { - if (nextPart.isLast) { - finishState = CLOSING; - } - queue.remove(); - } - return size; - } - - @Override - public void close() throws IOException { - } - - } - - private final static class BodyPart { - private final boolean isLast; - private final ByteBuffer buffer; - - public BodyPart(final ByteBuffer buffer, final boolean isLast) { - this.buffer = buffer; - this.isLast = isLast; - } - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index e6f97d738d..60656ffad2 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -15,2342 +15,73 @@ */ package org.asynchttpclient.providers.netty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHandler.STATE; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.Body; -import org.asynchttpclient.BodyGenerator; -import org.asynchttpclient.ConnectionPoolKeyStrategy; -import org.asynchttpclient.ConnectionsPool; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.MaxRedirectException; -import org.asynchttpclient.ProgressAsyncHandler; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.RandomAccessBody; -import org.asynchttpclient.Realm; import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; -import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; -import org.asynchttpclient.filter.IOExceptionFilter; -import org.asynchttpclient.filter.ResponseFilter; -import org.asynchttpclient.generators.InputStreamBodyGenerator; -import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; -import org.asynchttpclient.multipart.MultipartBody; -import org.asynchttpclient.multipart.MultipartRequestEntity; -import org.asynchttpclient.ntlm.NTLMEngine; -import org.asynchttpclient.ntlm.NTLMEngineException; -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieEncoder; -import org.asynchttpclient.providers.netty.FeedableBodyGenerator.FeedListener; -import org.asynchttpclient.providers.netty.spnego.SpnegoEngine; -import org.asynchttpclient.providers.netty.util.CleanupChannelGroup; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.util.AuthenticatorUtils; -import org.asynchttpclient.util.ProxyUtils; -import org.asynchttpclient.util.SslUtils; -import org.asynchttpclient.util.UTF8UrlEncoder; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; -import org.jboss.netty.bootstrap.ClientBootstrap; -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFuture; -import org.jboss.netty.channel.ChannelFutureProgressListener; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.channel.ChannelPipeline; -import org.jboss.netty.channel.ChannelPipelineFactory; -import org.jboss.netty.channel.ChannelStateEvent; -import org.jboss.netty.channel.DefaultChannelFuture; -import org.jboss.netty.channel.ExceptionEvent; -import org.jboss.netty.channel.FileRegion; -import org.jboss.netty.channel.MessageEvent; -import org.jboss.netty.channel.SimpleChannelUpstreamHandler; -import org.jboss.netty.channel.group.ChannelGroup; -import org.jboss.netty.channel.socket.ClientSocketChannelFactory; -import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; -import org.jboss.netty.channel.socket.oio.OioClientSocketChannelFactory; -import org.jboss.netty.handler.codec.PrematureChannelClosureException; -import org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer; -import org.jboss.netty.handler.codec.http.DefaultHttpRequest; -import org.jboss.netty.handler.codec.http.HttpChunk; -import org.jboss.netty.handler.codec.http.HttpChunkTrailer; -import org.jboss.netty.handler.codec.http.HttpClientCodec; -import org.jboss.netty.handler.codec.http.HttpContentCompressor; -import org.jboss.netty.handler.codec.http.HttpContentDecompressor; -import org.jboss.netty.handler.codec.http.HttpHeaders; -import org.jboss.netty.handler.codec.http.HttpMethod; -import org.jboss.netty.handler.codec.http.HttpRequest; -import org.jboss.netty.handler.codec.http.HttpRequestEncoder; -import org.jboss.netty.handler.codec.http.HttpResponse; -import org.jboss.netty.handler.codec.http.HttpResponseDecoder; -import org.jboss.netty.handler.codec.http.HttpVersion; -import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder; -import org.jboss.netty.handler.codec.http.websocketx.WebSocket08FrameEncoder; -import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame; -import org.jboss.netty.handler.ssl.SslHandler; -import org.jboss.netty.handler.stream.ChunkedFile; -import org.jboss.netty.handler.stream.ChunkedWriteHandler; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.handler.NettyChannelHandler; +import org.asynchttpclient.providers.netty.request.NettyRequestSender; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.net.ssl.SSLEngine; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.net.ConnectException; -import java.net.InetSocketAddress; -import java.net.MalformedURLException; -import java.net.URI; -import java.nio.channels.ClosedChannelException; -import java.nio.channels.FileChannel; -import java.nio.channels.WritableByteChannel; -import java.nio.charset.Charset; -import java.security.GeneralSecurityException; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Map.Entry; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.RejectedExecutionException; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; -import static org.asynchttpclient.util.DateUtil.millisTime; -import static org.asynchttpclient.util.MiscUtil.isNonEmpty; -import static org.jboss.netty.channel.Channels.pipeline; - -public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler implements AsyncHttpProvider { - private final static String HTTP_HANDLER = "httpHandler"; - protected final static String SSL_HANDLER = "sslHandler"; - private final static String HTTPS = "https"; - private final static String HTTP = "http"; - private static final String WEBSOCKET = "ws"; - private static final String WEBSOCKET_SSL = "wss"; +public class NettyAsyncHttpProvider implements AsyncHttpProvider { - private final static Logger log = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); - private final static Charset UTF8 = Charset.forName("UTF-8"); + private static final Logger LOGGER = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); - private final ClientBootstrap plainBootstrap; - private final ClientBootstrap secureBootstrap; - private final ClientBootstrap webSocketBootstrap; - private final ClientBootstrap secureWebSocketBootstrap; - private final static int MAX_BUFFERED_BYTES = 8192; private final AsyncHttpClientConfig config; - private final AtomicBoolean isClose = new AtomicBoolean(false); - private final ClientSocketChannelFactory socketChannelFactory; - private final boolean allowReleaseSocketChannelFactory; - - private final ChannelGroup openChannels = new CleanupChannelGroup("asyncHttpClient") { - @Override - public boolean remove(Object o) { - boolean removed = super.remove(o); - if (removed && trackConnections) { - freeConnections.release(); - } - return removed; - } - }; - private final ConnectionsPool connectionsPool; - private Semaphore freeConnections = null; private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; - private boolean executeConnectAsync = true; - public static final ThreadLocal IN_IO_THREAD = new ThreadLocalBoolean(); - private final boolean trackConnections; - private final boolean useRawUrl; - private final static NTLMEngine ntlmEngine = new NTLMEngine(); - private static SpnegoEngine spnegoEngine = null; - private final Protocol httpProtocol = new HttpProtocol(); - private final Protocol webSocketProtocol = new WebSocketProtocol(); - private final boolean managedExecutorService; - private ExecutorService service; - - private static boolean isNTLM(List auth) { - return isNonEmpty(auth) && auth.get(0).startsWith("NTLM"); - } + private final AtomicBoolean closed = new AtomicBoolean(false); + private final Channels channels; + private final NettyRequestSender requestSender; + private final NettyChannelHandler channelHandler; public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { - if (config.getAsyncHttpProviderConfig() instanceof NettyAsyncHttpProviderConfig) { - asyncHttpProviderConfig = NettyAsyncHttpProviderConfig.class.cast(config.getAsyncHttpProviderConfig()); - } else { - asyncHttpProviderConfig = new NettyAsyncHttpProviderConfig(); - } - service = config.executorService(); - managedExecutorService = (service == null); - if (service == null) { - service = AsyncHttpProviderUtils.createDefaultExecutorService(); - } - - if (asyncHttpProviderConfig.isUseBlockingIO()) { - socketChannelFactory = new OioClientSocketChannelFactory(service); - this.allowReleaseSocketChannelFactory = true; - } else { - // check if external NioClientSocketChannelFactory is defined - NioClientSocketChannelFactory scf = asyncHttpProviderConfig.getSocketChannelFactory(); - if (scf != null) { - this.socketChannelFactory = scf; - - // cannot allow releasing shared channel factory - this.allowReleaseSocketChannelFactory = false; - } else { - ExecutorService e = asyncHttpProviderConfig.getBossExecutorService(); - if (e == null) { - e = Executors.newCachedThreadPool(); - } - int numWorkers = config.getIoThreadMultiplier() * Runtime.getRuntime().availableProcessors(); - log.debug("Number of application's worker threads is {}", numWorkers); - socketChannelFactory = new NioClientSocketChannelFactory(e, service, numWorkers); - this.allowReleaseSocketChannelFactory = true; - } - } - plainBootstrap = new ClientBootstrap(socketChannelFactory); - secureBootstrap = new ClientBootstrap(socketChannelFactory); - webSocketBootstrap = new ClientBootstrap(socketChannelFactory); - secureWebSocketBootstrap = new ClientBootstrap(socketChannelFactory); this.config = config; + asyncHttpProviderConfig = config.getAsyncHttpProviderConfig() instanceof NettyAsyncHttpProviderConfig ? // + NettyAsyncHttpProviderConfig.class.cast(config.getAsyncHttpProviderConfig()) + : new NettyAsyncHttpProviderConfig(); - configureNetty(); - - // This is dangerous as we can't catch a wrong typed ConnectionsPool - ConnectionsPool cp = (ConnectionsPool) config.getConnectionsPool(); - if (cp == null && config.getAllowPoolingConnection()) { - cp = new NettyConnectionsPool(this); - } else if (cp == null) { - cp = new NonConnectionsPool(); - } - this.connectionsPool = cp; - - if (config.getMaxTotalConnections() != -1) { - trackConnections = true; - freeConnections = new Semaphore(config.getMaxTotalConnections()); - } else { - trackConnections = false; - } - - useRawUrl = config.isUseRawUrl(); + channels = new Channels(config, asyncHttpProviderConfig); + requestSender = new NettyRequestSender(closed, config, channels); + channelHandler = new NettyChannelHandler(config, requestSender, channels, closed); + channels.configure(channelHandler); } @Override public String toString() { - return String.format("NettyAsyncHttpProvider:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", config.getMaxTotalConnections() - freeConnections.availablePermits(), openChannels.toString(), connectionsPool.toString()); - } - - void configureNetty() { - if (asyncHttpProviderConfig != null) { - for (Entry entry : asyncHttpProviderConfig.propertiesSet()) { - String key = entry.getKey(); - Object value = entry.getValue(); - plainBootstrap.setOption(key, value); - webSocketBootstrap.setOption(key, value); - secureBootstrap.setOption(key, value); - secureWebSocketBootstrap.setOption(key, value); - } - } - - plainBootstrap.setPipelineFactory(createPlainPipelineFactory()); - DefaultChannelFuture.setUseDeadLockChecker(false); - - if (asyncHttpProviderConfig != null) { - executeConnectAsync = config.isAsyncConnectMode(); - if (!executeConnectAsync) { - DefaultChannelFuture.setUseDeadLockChecker(true); - } - } - - webSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { - - /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); - pipeline.addLast("http-decoder", new HttpResponseDecoder()); - pipeline.addLast("http-encoder", new HttpRequestEncoder()); - pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; - } - }); - } - - protected HttpClientCodec newHttpClientCodec() { - if (asyncHttpProviderConfig != null) { - return new HttpClientCodec(asyncHttpProviderConfig.getMaxInitialLineLength(), asyncHttpProviderConfig.getMaxHeaderSize(), asyncHttpProviderConfig.getMaxChunkSize(), false); - - } else { - return new HttpClientCodec(); - } - } - - protected ChannelPipelineFactory createPlainPipelineFactory() { - return new ChannelPipelineFactory() { - - /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); - - pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); - - if (config.getRequestCompressionLevel() > 0) { - pipeline.addLast("deflater", new HttpContentCompressor(config.getRequestCompressionLevel())); - } - - if (config.isCompressionEnabled()) { - pipeline.addLast("inflater", new HttpContentDecompressor()); - } - pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); - pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; - } - }; - } - - void constructSSLPipeline(final NettyConnectListener cl) { - - secureBootstrap.setPipelineFactory(new ChannelPipelineFactory() { - - /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); - - try { - pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); - } catch (Throwable ex) { - abort(cl.future(), ex); - } - - pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); - - if (config.isCompressionEnabled()) { - pipeline.addLast("inflater", new HttpContentDecompressor()); - } - pipeline.addLast("chunkedWriter", new ChunkedWriteHandler()); - pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - return pipeline; - } - }); - - secureWebSocketBootstrap.setPipelineFactory(new ChannelPipelineFactory() { - - /* @Override */ - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipeline(); - - try { - pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); - } catch (Throwable ex) { - abort(cl.future(), ex); - } - - pipeline.addLast("http-decoder", new HttpResponseDecoder()); - pipeline.addLast("http-encoder", new HttpRequestEncoder()); - pipeline.addLast("httpProcessor", NettyAsyncHttpProvider.this); - - return pipeline; - } - }); - } - - private Channel lookupInCache(URI uri, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) { - final Channel channel = connectionsPool.poll(connectionPoolKeyStrategy.getKey(uri)); - - if (channel != null) { - log.debug("Using cached Channel {}\n for uri {}\n", channel, uri); - - try { - // Always make sure the channel who got cached support the proper protocol. It could - // only occurs when a HttpMethod.CONNECT is used against a proxy that require upgrading from http to - // https. - return verifyChannelPipeline(channel, uri.getScheme()); - } catch (Exception ex) { - log.debug(ex.getMessage(), ex); - } - } - return null; - } - - private SSLEngine createSSLEngine() throws IOException, GeneralSecurityException { - SSLEngine sslEngine = config.getSSLEngineFactory().newSSLEngine(); - if (sslEngine == null) { - sslEngine = SslUtils.getSSLEngine(); - } - return sslEngine; - } - - private Channel verifyChannelPipeline(Channel channel, String scheme) throws IOException, GeneralSecurityException { - - if (channel.getPipeline().get(SSL_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { - channel.getPipeline().remove(SSL_HANDLER); - } else if (channel.getPipeline().get(HTTP_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { - return channel; - } else if (channel.getPipeline().get(SSL_HANDLER) == null && isSecure(scheme)) { - channel.getPipeline().addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); - } - return channel; - } - - protected final void writeRequest(final Channel channel, final AsyncHttpClientConfig config, final NettyResponseFuture future, final HttpRequest nettyRequest) { - try { - /** - * If the channel is dead because it was pooled and the remote server decided to close it, we just let it go and the closeChannel do it's work. - */ - if (!channel.isOpen() || !channel.isConnected()) { - return; - } - - Body body = null; - if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) { - BodyGenerator bg = future.getRequest().getBodyGenerator(); - if (bg != null) { - // Netty issue with chunking. - if (bg instanceof InputStreamBodyGenerator) { - InputStreamBodyGenerator.class.cast(bg).patchNettyChunkingIssue(true); - } - - try { - body = bg.createBody(); - } catch (IOException ex) { - throw new IllegalStateException(ex); - } - long length = body.getContentLength(); - if (length >= 0) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, length); - } else { - nettyRequest.setHeader(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); - } - } else if (future.getRequest().getParts() != null) { - String contentType = nettyRequest.getHeader(HttpHeaders.Names.CONTENT_TYPE); - String length = nettyRequest.getHeader(HttpHeaders.Names.CONTENT_LENGTH); - body = new MultipartBody(future.getRequest().getParts(), contentType, length); - } - } - - if (future.getAsyncHandler() instanceof TransferCompletionHandler) { - - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - for (String s : future.getNettyRequest().getHeaderNames()) { - for (String header : future.getNettyRequest().getHeaders(s)) { - h.add(s, header); - } - } - - TransferCompletionHandler.class.cast(future.getAsyncHandler()).transferAdapter(new TransferAdapter(h)); - } - - // Leave it to true. - if (future.getAndSetWriteHeaders(true)) { - try { - channel.write(nettyRequest).addListener(new ProgressListener(true, future.getAsyncHandler(), future)); - } catch (Throwable cause) { - log.debug(cause.getMessage(), cause); - try { - channel.close(); - } catch (RuntimeException ex) { - log.debug(ex.getMessage(), ex); - } - return; - } - } - - if (future.getAndSetWriteBody(true)) { - if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) { - - if (future.getRequest().getFile() != null) { - final File file = future.getRequest().getFile(); - long fileLength = 0; - final RandomAccessFile raf = new RandomAccessFile(file, "r"); - - try { - fileLength = raf.length(); - - ChannelFuture writeFuture; - if (channel.getPipeline().get(SslHandler.class) != null) { - writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, MAX_BUFFERED_BYTES)); - } else { - final FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); - writeFuture = channel.write(region); - } - writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future) { - public void operationComplete(ChannelFuture cf) { - try { - raf.close(); - } catch (IOException e) { - log.warn("Failed to close request body: {}", e.getMessage(), e); - } - super.operationComplete(cf); - } - }); - } catch (IOException ex) { - if (raf != null) { - try { - raf.close(); - } catch (IOException e) { - } - } - throw ex; - } - } else if (body != null) { - - ChannelFuture writeFuture; - if (channel.getPipeline().get(SslHandler.class) == null && (body instanceof RandomAccessBody)) { - BodyFileRegion bodyFileRegion = new BodyFileRegion((RandomAccessBody) body); - writeFuture = channel.write(bodyFileRegion); - } else { - BodyChunkedInput bodyChunkedInput = new BodyChunkedInput(body); - BodyGenerator bg = future.getRequest().getBodyGenerator(); - if (bg instanceof FeedableBodyGenerator) { - ((FeedableBodyGenerator) bg).setListener(new FeedListener() { - @Override - public void onContentAdded() { - channel.getPipeline().get(ChunkedWriteHandler.class).resumeTransfer(); - } - }); - } - writeFuture = channel.write(bodyChunkedInput); - } - - final Body b = body; - writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future) { - public void operationComplete(ChannelFuture cf) { - try { - b.close(); - } catch (IOException e) { - log.warn("Failed to close request body: {}", e.getMessage(), e); - } - super.operationComplete(cf); - } - }); - } - } - } - } catch (Throwable ioe) { - try { - channel.close(); - } catch (RuntimeException ex) { - log.debug(ex.getMessage(), ex); - } - } - - try { - future.touch(); - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, future.getRequest()); - int schedulePeriod = requestTimeout != -1 ? (config.getIdleConnectionTimeoutInMs() != -1 ? Math.min(requestTimeout, config.getIdleConnectionTimeoutInMs()) : requestTimeout) : config.getIdleConnectionTimeoutInMs(); - - if (schedulePeriod != -1 && !future.isDone() && !future.isCancelled()) { - ReaperFuture reaperFuture = new ReaperFuture(future); - Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, schedulePeriod, TimeUnit.MILLISECONDS); - reaperFuture.setScheduledFuture(scheduledFuture); - future.setReaperFuture(reaperFuture); - } - } catch (RejectedExecutionException ex) { - abort(future, ex); - } - - } - - protected final static HttpRequest buildRequest(AsyncHttpClientConfig config, Request request, URI uri, boolean allowConnect, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { - - String method = request.getMethod(); - if (allowConnect && proxyServer != null && isSecure(uri)) { - method = HttpMethod.CONNECT.toString(); - } - return construct(config, request, new HttpMethod(method), uri, buffer, proxyServer); - } - - private static SpnegoEngine getSpnegoEngine() { - if (spnegoEngine == null) - spnegoEngine = new SpnegoEngine(); - return spnegoEngine; - } - - private static HttpRequest construct(AsyncHttpClientConfig config, Request request, HttpMethod m, URI uri, ChannelBuffer buffer, ProxyServer proxyServer) throws IOException { - - String host = null; - boolean webSocket = isWebSocket(uri); - - if (request.getVirtualHost() != null) { - host = request.getVirtualHost(); - } else { - host = AsyncHttpProviderUtils.getHost(uri); - } - - HttpRequest nettyRequest; - if (m.equals(HttpMethod.CONNECT)) { - nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_0, m, AsyncHttpProviderUtils.getAuthority(uri)); - } else { - String path = null; - if (proxyServer != null && !(isSecure(uri) && config.isUseRelativeURIsWithSSLProxies())) - path = uri.toString(); - else if (uri.getRawQuery() != null) - path = uri.getRawPath() + "?" + uri.getRawQuery(); - else - path = uri.getRawPath(); - nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, m, path); - } - - if (webSocket) { - nettyRequest.addHeader(HttpHeaders.Names.UPGRADE, HttpHeaders.Values.WEBSOCKET); - nettyRequest.addHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.UPGRADE); - nettyRequest.addHeader(HttpHeaders.Names.ORIGIN, "http://" + uri.getHost() + ":" + (uri.getPort() == -1 ? isSecure(uri.getScheme()) ? 443 : 80 : uri.getPort())); - nettyRequest.addHeader(HttpHeaders.Names.SEC_WEBSOCKET_KEY, WebSocketUtil.getKey()); - nettyRequest.addHeader(HttpHeaders.Names.SEC_WEBSOCKET_VERSION, "13"); - } - - if (host != null) { - if (request.getVirtualHost() != null || uri.getPort() == -1) { - nettyRequest.setHeader(HttpHeaders.Names.HOST, host); - } else { - nettyRequest.setHeader(HttpHeaders.Names.HOST, host + ":" + uri.getPort()); - } - } else { - host = "127.0.0.1"; - } - - if (!m.equals(HttpMethod.CONNECT)) { - FluentCaseInsensitiveStringsMap h = request.getHeaders(); - if (h != null) { - for (Entry> header : h) { - String name = header.getKey(); - if (!HttpHeaders.Names.HOST.equalsIgnoreCase(name)) { - for (String value : header.getValue()) { - nettyRequest.addHeader(name, value); - } - } - } - } - - if (config.isCompressionEnabled()) { - nettyRequest.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP); - } - } else { - List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); - if (isNTLM(auth)) { - nettyRequest.addHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, auth.get(0)); - } - } - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - - if (realm != null && realm.getUsePreemptiveAuth()) { - - String domain = realm.getNtlmDomain(); - if (proxyServer != null && proxyServer.getNtlmDomain() != null) { - domain = proxyServer.getNtlmDomain(); - } - - String authHost = realm.getNtlmHost(); - if (proxyServer != null && proxyServer.getHost() != null) { - host = proxyServer.getHost(); - } - - switch (realm.getAuthScheme()) { - case BASIC: - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeBasicAuthentication(realm)); - break; - case DIGEST: - if (isNonEmpty(realm.getNonce())) { - try { - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, AuthenticatorUtils.computeDigestAuthentication(realm)); - } catch (NoSuchAlgorithmException e) { - throw new SecurityException(e); - } - } - break; - case NTLM: - try { - String msg = ntlmEngine.generateType1Msg("NTLM " + domain, authHost); - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); - } catch (NTLMEngineException e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; - } - break; - case KERBEROS: - case SPNEGO: - String challengeHeader = null; - String server = proxyServer == null ? host : proxyServer.getHost(); - try { - challengeHeader = getSpnegoEngine().generateToken(server); - } catch (Throwable e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; - } - nettyRequest.setHeader(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); - break; - case NONE: - break; - default: - throw new IllegalStateException("Invalid Authentication " + realm); - } - } - - if (!webSocket && !request.getHeaders().containsKey(HttpHeaders.Names.CONNECTION)) { - nettyRequest.setHeader(HttpHeaders.Names.CONNECTION, AsyncHttpProviderUtils.keepAliveHeaderValue(config)); - } - - if (proxyServer != null) { - if (!request.getHeaders().containsKey("Proxy-Connection")) { - nettyRequest.setHeader("Proxy-Connection", AsyncHttpProviderUtils.keepAliveHeaderValue(config)); - } - - if (proxyServer.getPrincipal() != null) { - if (isNonEmpty(proxyServer.getNtlmDomain())) { - - List auth = request.getHeaders().get(HttpHeaders.Names.PROXY_AUTHORIZATION); - if (!isNTLM(auth)) { - try { - String msg = ntlmEngine.generateType1Msg(proxyServer.getNtlmDomain(), proxyServer.getHost()); - nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, "NTLM " + msg); - } catch (NTLMEngineException e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; - } - } - } else { - nettyRequest.setHeader(HttpHeaders.Names.PROXY_AUTHORIZATION, AuthenticatorUtils.computeBasicAuthentication(proxyServer)); - } - } - } - - // Add default accept headers. - if (request.getHeaders().getFirstValue(HttpHeaders.Names.ACCEPT) == null) { - nettyRequest.setHeader(HttpHeaders.Names.ACCEPT, "*/*"); - } - - String userAgentHeader = request.getHeaders().getFirstValue(HttpHeaders.Names.USER_AGENT); - if (userAgentHeader != null) { - nettyRequest.setHeader(HttpHeaders.Names.USER_AGENT, userAgentHeader); - } else if (config.getUserAgent() != null) { - nettyRequest.setHeader(HttpHeaders.Names.USER_AGENT, config.getUserAgent()); - } else { - nettyRequest.setHeader(HttpHeaders.Names.USER_AGENT, AsyncHttpProviderUtils.constructUserAgent(NettyAsyncHttpProvider.class, config)); - } - - if (!m.equals(HttpMethod.CONNECT)) { - if (isNonEmpty(request.getCookies())) { - nettyRequest.setHeader(HttpHeaders.Names.COOKIE, CookieEncoder.encodeClientSide(request.getCookies(), config.isRfc6265CookieEncoding())); - } - - String reqType = request.getMethod(); - if (!"HEAD".equals(reqType) && !"OPTION".equals(reqType) && !"TRACE".equals(reqType)) { - - String bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : request.getBodyEncoding(); - - // We already have processed the body. - if (buffer != null && buffer.writerIndex() != 0) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, buffer.writerIndex()); - nettyRequest.setContent(buffer); - } else if (request.getByteData() != null) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(request.getByteData().length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(request.getByteData())); - } else if (request.getStringData() != null) { - byte[] bytes = request.getStringData().getBytes(bodyCharset); - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(bytes.length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes)); - } else if (request.getStreamData() != null) { - int[] lengthWrapper = new int[1]; - // FIXME should be streaming instead! - byte[] bytes = AsyncHttpProviderUtils.readFully(request.getStreamData(), lengthWrapper); - int length = lengthWrapper[0]; - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(length)); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(bytes, 0, length)); - } else if (isNonEmpty(request.getParams())) { - StringBuilder sb = new StringBuilder(); - for (final Entry> paramEntry : request.getParams()) { - final String key = paramEntry.getKey(); - for (final String value : paramEntry.getValue()) { - if (sb.length() > 0) { - sb.append("&"); - } - UTF8UrlEncoder.appendEncoded(sb, key); - sb.append("="); - UTF8UrlEncoder.appendEncoded(sb, value); - } - } - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(sb.length())); - nettyRequest.setContent(ChannelBuffers.wrappedBuffer(sb.toString().getBytes(bodyCharset))); - - if (!request.getHeaders().containsKey(HttpHeaders.Names.CONTENT_TYPE)) { - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, HttpHeaders.Values.APPLICATION_X_WWW_FORM_URLENCODED); - } - - } else if (request.getParts() != null) { - MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getHeaders()); - - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(mre.getContentLength())); - - } else if (request.getFile() != null) { - File file = request.getFile(); - if (!file.isFile()) { - throw new IOException(String.format("File %s is not a file or doesn't exist", file.getAbsolutePath())); - } - nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, file.length()); - } - } - } - return nettyRequest; + return String.format("NettyAsyncHttpProvider4:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", config.getMaxTotalConnections() + - channels.freeConnections.availablePermits(), channels.openChannels.toString(), channels.connectionsPool.toString()); } + @Override public void close() { - isClose.set(true); + closed.set(true); try { - connectionsPool.destroy(); - openChannels.close(); - - for (Channel channel : openChannels) { - ChannelHandlerContext ctx = channel.getPipeline().getContext(NettyAsyncHttpProvider.class); - if (ctx.getAttachment() instanceof NettyResponseFuture) { - NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); - future.setReaperFuture(null); - } - } - - if (managedExecutorService) { - service.shutdown(); - } + channels.close(); config.reaper().shutdown(); - if (this.allowReleaseSocketChannelFactory) { - socketChannelFactory.releaseExternalResources(); - plainBootstrap.releaseExternalResources(); - secureBootstrap.releaseExternalResources(); - webSocketBootstrap.releaseExternalResources(); - secureWebSocketBootstrap.releaseExternalResources(); - } } catch (Throwable t) { - log.warn("Unexpected error on close", t); + LOGGER.warn("Unexpected error on close", t); } } - /* @Override */ - + @Override public Response prepareResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, final List bodyParts) { - return new NettyResponse(status, headers, bodyParts); - } - - /* @Override */ - - public ListenableFuture execute(Request request, final AsyncHandler asyncHandler) throws IOException { - return doConnect(request, asyncHandler, null, true, executeConnectAsync, false); - } - - private void execute(final Request request, final NettyResponseFuture f, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { - doConnect(request, f.getAsyncHandler(), f, useCache, asyncConnect, reclaimCache); - } - - private ListenableFuture doConnect(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture f, boolean useCache, boolean asyncConnect, boolean reclaimCache) throws IOException { - - if (isClose.get()) { - throw new IOException("Closed"); - } - - if (request.getUrl().startsWith(WEBSOCKET) && !validateWebSocketRequest(request, asyncHandler)) { - throw new IOException("WebSocket method must be a GET"); - } - - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - boolean useProxy = proxyServer != null; - URI uri; - if (useRawUrl) { - uri = request.getRawURI(); - } else { - uri = request.getURI(); - } - Channel channel = null; - - if (useCache) { - if (f != null && f.reuseChannel() && f.channel() != null) { - channel = f.channel(); - } else { - URI connectionKeyUri = useProxy ? proxyServer.getURI() : uri; - channel = lookupInCache(connectionKeyUri, request.getConnectionPoolKeyStrategy()); - } - } - - ChannelBuffer bufferedBytes = null; - if (f != null && f.getRequest().getFile() == null && !f.getNettyRequest().getMethod().getName().equals(HttpMethod.CONNECT.getName())) { - bufferedBytes = f.getNettyRequest().getContent(); - } - - boolean useSSl = isSecure(uri) && !useProxy; - if (channel != null && channel.isOpen() && channel.isConnected()) { - HttpRequest nettyRequest = null; - - if (f == null) { - nettyRequest = buildRequest(config, request, uri, false, bufferedBytes, proxyServer); - f = newFuture(uri, request, asyncHandler, nettyRequest, config, this, proxyServer); - } else { - nettyRequest = buildRequest(config, request, uri, f.isConnectAllowed(), bufferedBytes, proxyServer); - f.setNettyRequest(nettyRequest); - } - f.setState(NettyResponseFuture.STATE.POOLED); - f.attachChannel(channel, false); - - log.debug("\nUsing cached Channel {}\n for request \n{}\n", channel, nettyRequest); - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(f); - - try { - writeRequest(channel, config, f, nettyRequest); - } catch (Exception ex) { - log.debug("writeRequest failure", ex); - if (useSSl && ex.getMessage() != null && ex.getMessage().contains("SSLEngine")) { - log.debug("SSLEngine failure", ex); - f = null; - } else { - try { - asyncHandler.onThrowable(ex); - } catch (Throwable t) { - log.warn("doConnect.writeRequest()", t); - } - IOException ioe = new IOException(ex.getMessage()); - ioe.initCause(ex); - throw ioe; - } - } - return f; - } - - // Do not throw an exception when we need an extra connection for a redirect. - if (!reclaimCache && !connectionsPool.canCacheConnection()) { - IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); - try { - asyncHandler.onThrowable(ex); - } catch (Throwable t) { - log.warn("!connectionsPool.canCacheConnection()", t); - } - throw ex; - } - - boolean acquiredConnection = false; - - if (trackConnections) { - if (!reclaimCache) { - if (!freeConnections.tryAcquire()) { - IOException ex = new IOException("Too many connections " + config.getMaxTotalConnections()); - try { - asyncHandler.onThrowable(ex); - } catch (Throwable t) { - log.warn("!connectionsPool.canCacheConnection()", t); - } - throw ex; - } else { - acquiredConnection = true; - } - } - } - - NettyConnectListener c = new NettyConnectListener.Builder(config, request, asyncHandler, f, this, bufferedBytes).build(uri); - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, uri.getHost()); - - if (useSSl) { - constructSSLPipeline(c); - } - - ChannelFuture channelFuture; - ClientBootstrap bootstrap = request.getUrl().startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); - bootstrap.setOption("connectTimeoutMillis", config.getConnectionTimeoutInMs()); - - try { - InetSocketAddress remoteAddress; - if (request.getInetAddress() != null) { - remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); - } else if (proxyServer == null || avoidProxy) { - remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); - } else { - remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); - } - - if (request.getLocalAddress() != null) { - channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); - } else { - channelFuture = bootstrap.connect(remoteAddress); - } - - } catch (Throwable t) { - if (acquiredConnection) { - freeConnections.release(); - } - abort(c.future(), t.getCause() == null ? t : t.getCause()); - return c.future(); - } - - boolean directInvokation = !(IN_IO_THREAD.get() && DefaultChannelFuture.isUseDeadLockChecker()); - - if (directInvokation && !asyncConnect && request.getFile() == null) { - int timeOut = config.getConnectionTimeoutInMs() > 0 ? config.getConnectionTimeoutInMs() : Integer.MAX_VALUE; - if (!channelFuture.awaitUninterruptibly(timeOut, TimeUnit.MILLISECONDS)) { - if (acquiredConnection) { - freeConnections.release(); - } - channelFuture.cancel(); - abort(c.future(), new ConnectException(String.format("Connect operation to %s timeout %s", uri, timeOut))); - } - - try { - c.operationComplete(channelFuture); - } catch (Exception e) { - if (acquiredConnection) { - freeConnections.release(); - } - IOException ioe = new IOException(e.getMessage()); - ioe.initCause(e); - try { - asyncHandler.onThrowable(ioe); - } catch (Throwable t) { - log.warn("c.operationComplete()", t); - } - throw ioe; - } - } else { - channelFuture.addListener(c); - } - - log.debug("\nNon cached request \n{}\n\nusing Channel \n{}\n", c.future().getNettyRequest(), channelFuture.getChannel()); - - if (!c.future().isCancelled() || !c.future().isDone()) { - openChannels.add(channelFuture.getChannel()); - c.future().attachChannel(channelFuture.getChannel(), false); - } - return c.future(); - } - - private void closeChannel(final ChannelHandlerContext ctx) { - connectionsPool.removeAll(ctx.getChannel()); - finishChannel(ctx); - } - - private void finishChannel(final ChannelHandlerContext ctx) { - ctx.setAttachment(new DiscardEvent()); - - // The channel may have already been removed if a timeout occurred, and this method may be called just after. - if (ctx.getChannel() == null) { - return; - } - - log.debug("Closing Channel {} ", ctx.getChannel()); - - try { - ctx.getChannel().close(); - } catch (Throwable t) { - log.debug("Error closing a connection", t); - } - - if (ctx.getChannel() != null) { - openChannels.remove(ctx.getChannel()); - } - + throw new UnsupportedOperationException("Mocked, should be refactored"); } @Override - public void messageReceived(final ChannelHandlerContext ctx, MessageEvent e) throws Exception { - // call super to reset the read timeout - super.messageReceived(ctx, e); - IN_IO_THREAD.set(Boolean.TRUE); - if (ctx.getAttachment() == null) { - log.debug("ChannelHandlerContext wasn't having any attachment"); - } - - if (ctx.getAttachment() instanceof DiscardEvent) { - return; - } else if (ctx.getAttachment() instanceof AsyncCallable) { - if (e.getMessage() instanceof HttpChunk) { - HttpChunk chunk = (HttpChunk) e.getMessage(); - if (chunk.isLast()) { - AsyncCallable ac = (AsyncCallable) ctx.getAttachment(); - ac.call(); - } else { - return; - } - } else { - AsyncCallable ac = (AsyncCallable) ctx.getAttachment(); - ac.call(); - } - ctx.setAttachment(new DiscardEvent()); - return; - } else if (!(ctx.getAttachment() instanceof NettyResponseFuture)) { - try { - ctx.getChannel().close(); - } catch (Throwable t) { - log.trace("Closing an orphan channel {}", ctx.getChannel()); - } - return; - } - - Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); - p.handle(ctx, e); - } - - private Realm kerberosChallenge(List proxyAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, NettyResponseFuture future) throws NTLMEngineException { - - URI uri = request.getURI(); - String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); - String server = proxyServer == null ? host : proxyServer.getHost(); - try { - String challengeHeader = getSpnegoEngine().generateToken(server); - headers.remove(HttpHeaders.Names.AUTHORIZATION); - headers.add(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); - - Realm.RealmBuilder realmBuilder; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm); - } else { - realmBuilder = new Realm.RealmBuilder(); - } - return realmBuilder.setUri(uri.getRawPath()).setMethodName(request.getMethod()).setScheme(Realm.AuthScheme.KERBEROS).build(); - } catch (Throwable throwable) { - if (isNTLM(proxyAuth)) { - return ntlmChallenge(proxyAuth, request, proxyServer, headers, realm, future); - } - abort(future, throwable); - return null; - } - } - - private void addType3NTLMAuthorizationHeader(List auth, FluentCaseInsensitiveStringsMap headers, String username, String password, String domain, String workstation) - throws NTLMEngineException { - headers.remove(HttpHeaders.Names.AUTHORIZATION); - - if (isNTLM(auth)) { - String serverChallenge = auth.get(0).trim().substring("NTLM ".length()); - String challengeHeader = ntlmEngine.generateType3Msg(username, password, domain, workstation, serverChallenge); - - headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); - } - } - - private Realm ntlmChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, NettyResponseFuture future) throws NTLMEngineException { - - boolean useRealm = (proxyServer == null && realm != null); - - String ntlmDomain = useRealm ? realm.getNtlmDomain() : proxyServer.getNtlmDomain(); - String ntlmHost = useRealm ? realm.getNtlmHost() : proxyServer.getHost(); - String principal = useRealm ? realm.getPrincipal() : proxyServer.getPrincipal(); - String password = useRealm ? realm.getPassword() : proxyServer.getPassword(); - - Realm newRealm; - if (realm != null && !realm.isNtlmMessageType2Received()) { - String challengeHeader = ntlmEngine.generateType1Msg(ntlmDomain, ntlmHost); - - URI uri = request.getURI(); - headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(uri.getRawPath()).setMethodName(request.getMethod()).setNtlmMessageType2Received(true).build(); - future.getAndSetAuth(false); - } else { - addType3NTLMAuthorizationHeader(wwwAuth, headers, principal, password, ntlmDomain, ntlmHost); - - Realm.RealmBuilder realmBuilder; - Realm.AuthScheme authScheme; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm); - authScheme = realm.getAuthScheme(); - } else { - realmBuilder = new Realm.RealmBuilder(); - authScheme = Realm.AuthScheme.NTLM; - } - newRealm = realmBuilder.setScheme(authScheme).setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); - } - - return newRealm; - } - - private Realm ntlmProxyChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, NettyResponseFuture future) throws NTLMEngineException { - future.getAndSetAuth(false); - headers.remove(HttpHeaders.Names.PROXY_AUTHORIZATION); - - addType3NTLMAuthorizationHeader(wwwAuth, headers, proxyServer.getPrincipal(), proxyServer.getPassword(), proxyServer.getNtlmDomain(), proxyServer.getHost()); - - Realm newRealm; - Realm.RealmBuilder realmBuilder; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm); - } else { - realmBuilder = new Realm.RealmBuilder(); - } - newRealm = realmBuilder// .setScheme(realm.getAuthScheme()) - .setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); - - return newRealm; - } - - private String getPoolKey(NettyResponseFuture future) throws MalformedURLException { - URI uri = future.getProxyServer() != null ? future.getProxyServer().getURI() : future.getURI(); - return future.getConnectionPoolKeyStrategy().getKey(uri); - } - - private void drainChannel(final ChannelHandlerContext ctx, final NettyResponseFuture future) { - ctx.setAttachment(new AsyncCallable(future) { - public Object call() throws Exception { - if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { - return null; - } - - finishChannel(ctx); - return null; - } - - @Override - public String toString() { - return "Draining task for channel " + ctx.getChannel(); - } - }); - } - - private FilterContext handleIoException(FilterContext fc, NettyResponseFuture future) { - for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { - try { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - abort(future, efe); - } - } - return fc; - } - - private void replayRequest(final NettyResponseFuture future, FilterContext fc, HttpResponse response, ChannelHandlerContext ctx) throws IOException { - final Request newRequest = fc.getRequest(); - future.setAsyncHandler(fc.getAsyncHandler()); - future.setState(NettyResponseFuture.STATE.NEW); - future.touch(); - - log.debug("\n\nReplaying Request {}\n for Future {}\n", newRequest, future); - drainChannel(ctx, future); - nextRequest(newRequest, future); - return; - } - - private List getAuthorizationToken(List> list, String headerAuth) { - ArrayList l = new ArrayList(); - for (Entry e : list) { - if (e.getKey().equalsIgnoreCase(headerAuth)) { - l.add(e.getValue().trim()); - } - } - return l; - } - - private void nextRequest(final Request request, final NettyResponseFuture future) throws IOException { - nextRequest(request, future, true); - } - - private void nextRequest(final Request request, final NettyResponseFuture future, final boolean useCache) throws IOException { - execute(request, future, useCache, true, true); - } - - private void abort(NettyResponseFuture future, Throwable t) { - Channel channel = future.channel(); - if (channel != null && openChannels.contains(channel)) { - closeChannel(channel.getPipeline().getContext(NettyAsyncHttpProvider.class)); - openChannels.remove(channel); - } - - if (!future.isCancelled() && !future.isDone()) { - log.debug("Aborting Future {}\n", future); - log.debug(t.getMessage(), t); - } - - future.abort(t); - } - - private void upgradeProtocol(ChannelPipeline p, String scheme) throws IOException, GeneralSecurityException { - if (p.get(HTTP_HANDLER) != null) { - p.remove(HTTP_HANDLER); - } - - if (isSecure(scheme)) { - if (p.get(SSL_HANDLER) == null) { - p.addFirst(HTTP_HANDLER, newHttpClientCodec()); - p.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine())); - } else { - p.addAfter(SSL_HANDLER, HTTP_HANDLER, newHttpClientCodec()); - } - - } else { - p.addFirst(HTTP_HANDLER, newHttpClientCodec()); - } - } - - public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { - - if (isClose.get()) { - return; - } - - connectionsPool.removeAll(ctx.getChannel()); - try { - super.channelClosed(ctx, e); - } catch (Exception ex) { - log.trace("super.channelClosed", ex); - } - - log.debug("Channel Closed: {} with attachment {}", e.getChannel(), ctx.getAttachment()); - - if (ctx.getAttachment() instanceof AsyncCallable) { - AsyncCallable ac = (AsyncCallable) ctx.getAttachment(); - ctx.setAttachment(ac.future()); - ac.call(); - return; - } - - if (ctx.getAttachment() instanceof NettyResponseFuture) { - NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); - future.touch(); - - if (!config.getIOExceptionFilters().isEmpty()) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); - fc = handleIoException(fc, future); - - if (fc.replayRequest() && !future.cannotBeReplay()) { - replayRequest(future, fc, null, ctx); - return; - } - } - - Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); - p.onClose(ctx, e); - - if (future != null && !future.isDone() && !future.isCancelled()) { - if (remotelyClosed(ctx.getChannel(), future)) { - abort(future, new IOException("Remotely Closed")); - } - } else { - closeChannel(ctx); - } - } - } - - protected boolean remotelyClosed(Channel channel, NettyResponseFuture future) { - - if (isClose.get()) { - return true; - } - - connectionsPool.removeAll(channel); - - if (future == null) { - Object attachment = channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); - if (attachment instanceof NettyResponseFuture) - future = (NettyResponseFuture) attachment; - } - - if (future == null || future.cannotBeReplay()) { - log.debug("Unable to recover future {}\n", future); - return true; - } - - future.setState(NettyResponseFuture.STATE.RECONNECTED); - future.getAndSetStatusReceived(false); - - log.debug("Trying to recover request {}\n", future.getNettyRequest()); - - try { - nextRequest(future.getRequest(), future); - return false; - } catch (IOException iox) { - future.setState(NettyResponseFuture.STATE.CLOSED); - future.abort(iox); - log.error("Remotely Closed, unable to recover", iox); - } - return true; - } - - private void markAsDone(final NettyResponseFuture future, final ChannelHandlerContext ctx) throws MalformedURLException { - // We need to make sure everything is OK before adding the connection back to the pool. - try { - future.done(); - } catch (Throwable t) { - // Never propagate exception once we know we are done. - log.debug(t.getMessage(), t); - } - - if (!future.isKeepAlive() || !ctx.getChannel().isReadable()) { - closeChannel(ctx); - } - } - - private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { - if (lastValidChunk && future.isKeepAlive()) { - drainChannel(ctx, future); - } else { - if (future.isKeepAlive() && ctx.getChannel().isReadable() && connectionsPool.offer(getPoolKey(future), ctx.getChannel())) { - markAsDone(future, ctx); - return; - } - finishChannel(ctx); - } - markAsDone(future, ctx); - } - - private final boolean updateStatusAndInterrupt(AsyncHandler handler, HttpResponseStatus c) throws Exception { - return handler.onStatusReceived(c) != STATE.CONTINUE; - } - - private final boolean updateHeadersAndInterrupt(AsyncHandler handler, HttpResponseHeaders c) throws Exception { - return handler.onHeadersReceived(c) != STATE.CONTINUE; - } - - private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { - boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; - if (c.closeUnderlyingConnection()) { - future.setKeepAlive(false); - } - return state; - } - - // Simple marker for stopping publishing bytes. - - final static class DiscardEvent { - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { - Channel channel = e.getChannel(); - Throwable cause = e.getCause(); - NettyResponseFuture future = null; - - if (e.getCause() instanceof PrematureChannelClosureException) { - return; - } - - if (log.isDebugEnabled()) { - log.debug("Unexpected I/O exception on channel {}", channel, cause); - } - - try { - - if (cause instanceof ClosedChannelException) { - return; - } - - if (ctx.getAttachment() instanceof NettyResponseFuture) { - future = (NettyResponseFuture) ctx.getAttachment(); - future.attachChannel(null, false); - future.touch(); - - if (cause instanceof IOException) { - - if (!config.getIOExceptionFilters().isEmpty()) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(new IOException("Channel Closed")).build(); - fc = handleIoException(fc, future); - - if (fc.replayRequest()) { - replayRequest(future, fc, null, ctx); - return; - } - } else { - // Close the channel so the recovering can occurs. - try { - ctx.getChannel().close(); - } catch (Throwable t) { - ; // Swallow. - } - return; - } - } - - if (abortOnReadCloseException(cause) || abortOnWriteCloseException(cause)) { - log.debug("Trying to recover from dead Channel: {}", channel); - return; - } - } else if (ctx.getAttachment() instanceof AsyncCallable) { - future = ((AsyncCallable) ctx.getAttachment()).future(); - } - } catch (Throwable t) { - cause = t; - } - - if (future != null) { - try { - log.debug("Was unable to recover Future: {}", future); - abort(future, cause); - } catch (Throwable t) { - log.error(t.getMessage(), t); - } - } - - Protocol p = (ctx.getPipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); - p.onError(ctx, e); - - closeChannel(ctx); - ctx.sendUpstream(e); - } - - protected static boolean abortOnConnectCloseException(Throwable cause) { - try { - for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("sun.nio.ch.SocketChannelImpl") && element.getMethodName().equals("checkConnect")) { - return true; - } - } - - if (cause.getCause() != null) { - return abortOnConnectCloseException(cause.getCause()); - } - - } catch (Throwable t) { - } - return false; - } - - protected static boolean abortOnDisconnectException(Throwable cause) { - try { - for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("org.jboss.netty.handler.ssl.SslHandler") && element.getMethodName().equals("channelDisconnected")) { - return true; - } - } - - if (cause.getCause() != null) { - return abortOnConnectCloseException(cause.getCause()); - } - - } catch (Throwable t) { - } - return false; - } - - protected static boolean abortOnReadCloseException(Throwable cause) { - - for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") && element.getMethodName().equals("read")) { - return true; - } - } - - if (cause.getCause() != null) { - return abortOnReadCloseException(cause.getCause()); - } - - return false; - } - - protected static boolean abortOnWriteCloseException(Throwable cause) { - - for (StackTraceElement element : cause.getStackTrace()) { - if (element.getClassName().equals("sun.nio.ch.SocketDispatcher") && element.getMethodName().equals("write")) { - return true; - } - } - - if (cause.getCause() != null) { - return abortOnReadCloseException(cause.getCause()); - } - - return false; - } - - private final static int getPredefinedContentLength(Request request, HttpRequest r) { - int length = (int) request.getContentLength(); - if (length == -1 && r.getHeader(HttpHeaders.Names.CONTENT_LENGTH) != null) { - length = Integer.valueOf(r.getHeader(HttpHeaders.Names.CONTENT_LENGTH)); - } - - return length; - } - - public static NettyResponseFuture newFuture(URI uri, Request request, AsyncHandler asyncHandler, HttpRequest nettyRequest, AsyncHttpClientConfig config, NettyAsyncHttpProvider provider, ProxyServer proxyServer) { - - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - NettyResponseFuture f = new NettyResponseFuture(uri,// - request,// - asyncHandler,// - nettyRequest,// - requestTimeout,// - config.getIdleConnectionTimeoutInMs(),// - provider,// - request.getConnectionPoolKeyStrategy(),// - proxyServer); - - String expectHeader = request.getHeaders().getFirstValue(HttpHeaders.Names.EXPECT); - if (expectHeader != null && expectHeader.equalsIgnoreCase(HttpHeaders.Values.CONTINUE)) { - f.getAndSetWriteBody(false); - } - return f; - } - - private class ProgressListener implements ChannelFutureProgressListener { - - private final boolean notifyHeaders; - private final AsyncHandler asyncHandler; - private final NettyResponseFuture future; - - public ProgressListener(boolean notifyHeaders, AsyncHandler asyncHandler, NettyResponseFuture future) { - this.notifyHeaders = notifyHeaders; - this.asyncHandler = asyncHandler; - this.future = future; - } - - public void operationComplete(ChannelFuture cf) { - // The write operation failed. If the channel was cached, it means it got asynchronously closed. - // Let's retry a second time. - Throwable cause = cf.getCause(); - if (cause != null && future.getState() != NettyResponseFuture.STATE.NEW) { - - if (cause instanceof IllegalStateException) { - log.debug(cause.getMessage(), cause); - try { - cf.getChannel().close(); - } catch (RuntimeException ex) { - log.debug(ex.getMessage(), ex); - } - return; - } - - if (cause instanceof ClosedChannelException || abortOnReadCloseException(cause) || abortOnWriteCloseException(cause)) { - - if (log.isDebugEnabled()) { - log.debug(cf.getCause() == null ? "" : cf.getCause().getMessage(), cf.getCause()); - } - - try { - cf.getChannel().close(); - } catch (RuntimeException ex) { - log.debug(ex.getMessage(), ex); - } - return; - } else { - future.abort(cause); - } - return; - } - future.touch(); - - /** - * We need to make sure we aren't in the middle of an authorization process before publishing events as we will re-publish again the same event after the authorization, causing unpredictable behavior. - */ - Realm realm = future.getRequest().getRealm() != null ? future.getRequest().getRealm() : NettyAsyncHttpProvider.this.getConfig().getRealm(); - boolean startPublishing = future.isInAuth() || realm == null || realm.getUsePreemptiveAuth() == true; - - if (startPublishing && asyncHandler instanceof ProgressAsyncHandler) { - if (notifyHeaders) { - ProgressAsyncHandler.class.cast(asyncHandler).onHeaderWriteCompleted(); - } else { - ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteCompleted(); - } - } - } - - public void operationProgressed(ChannelFuture cf, long amount, long current, long total) { - future.touch(); - if (asyncHandler instanceof ProgressAsyncHandler) { - ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(amount, current, total); - } - } - } - - /** - * Because some implementation of the ThreadSchedulingService do not clean up cancel task until they try to run them, we wrap the task with the future so the when the NettyResponseFuture cancel the reaper future this wrapper will release the references to the channel and the - * nettyResponseFuture immediately. Otherwise, the memory referenced this way will only be released after the request timeout period which can be arbitrary long. - */ - private final class ReaperFuture implements Future, Runnable { - private Future scheduledFuture; - private NettyResponseFuture nettyResponseFuture; - - public ReaperFuture(NettyResponseFuture nettyResponseFuture) { - this.nettyResponseFuture = nettyResponseFuture; - } - - public void setScheduledFuture(Future scheduledFuture) { - this.scheduledFuture = scheduledFuture; - } - - /** - * @Override - */ - public boolean cancel(boolean mayInterruptIfRunning) { - nettyResponseFuture = null; - return scheduledFuture.cancel(mayInterruptIfRunning); - } - - /** - * @Override - */ - public Object get() throws InterruptedException, ExecutionException { - return scheduledFuture.get(); - } - - /** - * @Override - */ - public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { - return scheduledFuture.get(timeout, unit); - } - - /** - * @Override - */ - public boolean isCancelled() { - return scheduledFuture.isCancelled(); - } - - /** - * @Override - */ - public boolean isDone() { - return scheduledFuture.isDone(); - } - - private void expire(String message) { - log.debug("{} for {}", message, nettyResponseFuture); - abort(nettyResponseFuture, new TimeoutException(message)); - nettyResponseFuture = null; - } - - /** - * @Override - */ - public synchronized void run() { - if (isClose.get()) { - cancel(true); - return; - } - - boolean futureDone = nettyResponseFuture.isDone(); - boolean futureCanceled = nettyResponseFuture.isCancelled(); - - if (nettyResponseFuture != null && !futureDone && !futureCanceled) { - long now = millisTime(); - if (nettyResponseFuture.hasRequestTimedOut(now)) { - long age = now - nettyResponseFuture.getStart(); - expire("Request reached time out of " + nettyResponseFuture.getRequestTimeoutInMs() + " ms after " + age + " ms"); - } else if (nettyResponseFuture.hasConnectionIdleTimedOut(now)) { - long age = now - nettyResponseFuture.getStart(); - expire("Request reached idle time out of " + nettyResponseFuture.getIdleConnectionTimeoutInMs() + " ms after " + age + " ms"); - } - - } else if (nettyResponseFuture == null || futureDone || futureCanceled) { - cancel(true); - } - } - } - - private abstract class AsyncCallable implements Callable { - - private final NettyResponseFuture future; - - public AsyncCallable(NettyResponseFuture future) { - this.future = future; - } - - abstract public Object call() throws Exception; - - public NettyResponseFuture future() { - return future; - } - } - - public static class ThreadLocalBoolean extends ThreadLocal { - - private final boolean defaultValue; - - public ThreadLocalBoolean() { - this(false); - } - - public ThreadLocalBoolean(boolean defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - protected Boolean initialValue() { - return defaultValue ? Boolean.TRUE : Boolean.FALSE; - } - } - - public static class OptimizedFileRegion implements FileRegion { - - private final FileChannel file; - private final RandomAccessFile raf; - private final long position; - private final long count; - private long byteWritten; - - public OptimizedFileRegion(RandomAccessFile raf, long position, long count) { - this.raf = raf; - this.file = raf.getChannel(); - this.position = position; - this.count = count; - } - - public long getPosition() { - return position; - } - - public long getCount() { - return count; - } - - public long transferTo(WritableByteChannel target, long position) throws IOException { - long count = this.count - position; - if (count < 0 || position < 0) { - throw new IllegalArgumentException("position out of range: " + position + " (expected: 0 - " + (this.count - 1) + ")"); - } - if (count == 0) { - return 0L; - } - - long bw = file.transferTo(this.position + position, count, target); - byteWritten += bw; - if (byteWritten == raf.length()) { - releaseExternalResources(); - } - return bw; - } - - public void releaseExternalResources() { - try { - file.close(); - } catch (IOException e) { - log.warn("Failed to close a file.", e); - } - - try { - raf.close(); - } catch (IOException e) { - log.warn("Failed to close a file.", e); - } - } - } - - protected AsyncHttpClientConfig getConfig() { - return config; - } - - private static class NonConnectionsPool implements ConnectionsPool { - - public boolean offer(String uri, Channel connection) { - return false; - } - - public Channel poll(String uri) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - } - } - - private static final boolean validateWebSocketRequest(Request request, AsyncHandler asyncHandler) { - if (request.getMethod() != "GET" || !(asyncHandler instanceof WebSocketUpgradeHandler)) { - return false; - } - return true; - } - - private boolean redirect(Request request, NettyResponseFuture future, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { - - int statusCode = response.getStatus().getCode(); - boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - if (redirectEnabled && (statusCode == 302 || statusCode == 301 || statusCode == 303 || statusCode == 307)) { - - if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { - // We must allow 401 handling again. - future.getAndSetAuth(false); - - String location = response.getHeader(HttpHeaders.Names.LOCATION); - URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); - boolean stripQueryString = config.isRemoveQueryParamOnRedirect(); - if (!uri.toString().equals(future.getURI().toString())) { - final RequestBuilder nBuilder = stripQueryString ? new RequestBuilder(future.getRequest()).setQueryParameters(null) : new RequestBuilder(future.getRequest()); - - if (!(statusCode < 302 || statusCode > 303) && !(statusCode == 302 && config.isStrict302Handling())) { - nBuilder.setMethod("GET"); - } - final boolean initialConnectionKeepAlive = future.isKeepAlive(); - final String initialPoolKey = getPoolKey(future); - future.setURI(uri); - String newUrl = uri.toString(); - if (request.getUrl().startsWith(WEBSOCKET)) { - newUrl = newUrl.replace(HTTP, WEBSOCKET); - } - - log.debug("Redirecting to {}", newUrl); - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE)) { - for (Cookie c : CookieDecoder.decode(cookieStr)) { - nBuilder.addOrReplaceCookie(c); - } - } - - for (String cookieStr : future.getHttpResponse().getHeaders(HttpHeaders.Names.SET_COOKIE2)) { - for (Cookie c : CookieDecoder.decode(cookieStr)) { - nBuilder.addOrReplaceCookie(c); - } - } - - AsyncCallable ac = new AsyncCallable(future) { - public Object call() throws Exception { - if (initialConnectionKeepAlive && ctx.getChannel().isReadable() && connectionsPool.offer(initialPoolKey, ctx.getChannel())) { - return null; - } - finishChannel(ctx); - return null; - } - }; - - if (response.isChunked()) { - // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); - } else { - ac.call(); - } - nextRequest(nBuilder.setUrl(newUrl).build(), future); - return true; - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } - return false; - } - - private final class HttpProtocol implements Protocol { - // @Override - public void handle(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception { - final NettyResponseFuture future = (NettyResponseFuture) ctx.getAttachment(); - future.touch(); - - // The connect timeout occured. - if (future.isCancelled() || future.isDone()) { - finishChannel(ctx); - return; - } - - HttpRequest nettyRequest = future.getNettyRequest(); - AsyncHandler handler = future.getAsyncHandler(); - Request request = future.getRequest(); - ProxyServer proxyServer = future.getProxyServer(); - HttpResponse response = null; - try { - if (e.getMessage() instanceof HttpResponse) { - response = (HttpResponse) e.getMessage(); - - log.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); - - // Required if there is some trailing headers. - future.setHttpResponse(response); - - int statusCode = response.getStatus().getCode(); - - String ka = response.getHeader(HttpHeaders.Names.CONNECTION); - future.setKeepAlive(ka == null || !ka.toLowerCase(Locale.ENGLISH).equals("close")); - - List wwwAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.WWW_AUTHENTICATE); - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - - HttpResponseStatus status = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); - HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).responseStatus(status).responseHeaders(responseHeaders).build(); - - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - try { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - abort(future, efe); - } - } - - // The handler may have been wrapped. - handler = fc.getAsyncHandler(); - future.setAsyncHandler(handler); - - // The request has changed - if (fc.replayRequest()) { - replayRequest(future, fc, response, ctx); - return; - } - - Realm newRealm = null; - final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); - final RequestBuilder builder = new RequestBuilder(future.getRequest()); - - // if (realm != null && !future.getURI().getPath().equalsIgnoreCase(realm.getUri())) { - // builder.setUrl(future.getURI().toString()); - // } - - if (statusCode == 401 && realm != null && !wwwAuth.isEmpty() && !future.getAndSetAuth(true)) { - - future.setState(NettyResponseFuture.STATE.NEW); - // NTLM - if (!wwwAuth.contains("Kerberos") && (isNTLM(wwwAuth) || (wwwAuth.contains("Negotiate")))) { - newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (wwwAuth.contains("Negotiate")) { - newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) - return; - } else { - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(request.getURI().getPath()).setMethodName(request.getMethod()).setUsePreemptiveAuth(true).parseWWWAuthenticateHeader(wwwAuth.get(0)).build(); - } - - final Realm nr = new Realm.RealmBuilder().clone(newRealm).setUri(URI.create(request.getUrl()).getPath()).build(); - - log.debug("Sending authentication to {}", request.getUrl()); - AsyncCallable ac = new AsyncCallable(future) { - public Object call() throws Exception { - drainChannel(ctx, future); - nextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); - return null; - } - }; - - if (future.isKeepAlive() && response.isChunked()) { - // We must make sure there is no bytes left before executing the next request. - ctx.setAttachment(ac); - } else { - ac.call(); - } - return; - } - - if (statusCode == 100) { - future.getAndSetWriteHeaders(false); - future.getAndSetWriteBody(true); - writeRequest(ctx.getChannel(), config, future, nettyRequest); - return; - } - - List proxyAuth = getAuthorizationToken(response.getHeaders(), HttpHeaders.Names.PROXY_AUTHENTICATE); - if (statusCode == 407 && realm != null && !proxyAuth.isEmpty() && !future.getAndSetAuth(true)) { - - log.debug("Sending proxy authentication to {}", request.getUrl()); - - future.setState(NettyResponseFuture.STATE.NEW); - - if (!proxyAuth.contains("Kerberos") && (isNTLM(proxyAuth) || (proxyAuth.contains("Negotiate")))) { - newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (proxyAuth.contains("Negotiate")) { - newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) - return; - } else { - newRealm = future.getRequest().getRealm(); - } - - Request req = builder.setHeaders(headers).setRealm(newRealm).build(); - future.setReuseChannel(true); - future.setConnectAllowed(true); - nextRequest(req, future); - return; - } - - if (future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT) && statusCode == 200) { - - log.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); - - if (future.isKeepAlive()) { - future.attachChannel(ctx.getChannel(), true); - } - - try { - log.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - upgradeProtocol(ctx.getChannel().getPipeline(), request.getURI().getScheme()); - } catch (Throwable ex) { - abort(future, ex); - } - Request req = builder.build(); - future.setReuseChannel(true); - future.setConnectAllowed(false); - nextRequest(req, future); - return; - } - - if (redirect(request, future, response, ctx)) - return; - - if (!future.getAndSetStatusReceived(true) && updateStatusAndInterrupt(handler, status)) { - finishUpdate(future, ctx, response.isChunked()); - return; - } else if (updateHeadersAndInterrupt(handler, responseHeaders)) { - finishUpdate(future, ctx, response.isChunked()); - return; - } else if (!response.isChunked()) { - if (response.getContent().readableBytes() != 0) { - updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); - } - finishUpdate(future, ctx, false); - return; - } - - if (nettyRequest.getMethod().equals(HttpMethod.HEAD)) { - updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), response, NettyAsyncHttpProvider.this, true)); - markAsDone(future, ctx); - drainChannel(ctx, future); - } - - } else if (e.getMessage() instanceof HttpChunk) { - HttpChunk chunk = (HttpChunk) e.getMessage(); - - if (handler != null) { - if (chunk.isLast() || updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, chunk, chunk.isLast()))) { - if (chunk instanceof DefaultHttpChunkTrailer) { - updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getURI(), future.getHttpResponse(), NettyAsyncHttpProvider.this, (HttpChunkTrailer) chunk)); - } - finishUpdate(future, ctx, !chunk.isLast()); - } - } - } - } catch (Exception t) { - if (t instanceof IOException && !config.getIOExceptionFilters().isEmpty()) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(IOException.class.cast(t)).build(); - fc = handleIoException(fc, future); - - if (fc.replayRequest()) { - replayRequest(future, fc, response, ctx); - return; - } - } - - try { - abort(future, t); - } finally { - finishUpdate(future, ctx, false); - throw t; - } - } - } - - // @Override - public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { - } - - // @Override - public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { - } - } - - private final class WebSocketProtocol implements Protocol { - private static final byte OPCODE_CONT = 0x0; - private static final byte OPCODE_TEXT = 0x1; - private static final byte OPCODE_BINARY = 0x2; - private static final byte OPCODE_UNKNOWN = -1; - protected byte pendingOpcode = OPCODE_UNKNOWN; - - // We don't need to synchronize as replacing the "ws-decoder" will process using the same thread. - private void invokeOnSucces(ChannelHandlerContext ctx, WebSocketUpgradeHandler h) { - if (!h.touchSuccess()) { - try { - h.onSuccess(new NettyWebSocket(ctx.getChannel())); - } catch (Exception ex) { - NettyAsyncHttpProvider.log.warn("onSuccess unexexpected exception", ex); - } - } - } - - // @Override - public void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception { - NettyResponseFuture future = NettyResponseFuture.class.cast(ctx.getAttachment()); - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); - Request request = future.getRequest(); - - if (e.getMessage() instanceof HttpResponse) { - HttpResponse response = (HttpResponse) e.getMessage(); - - HttpResponseStatus s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); - HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response, NettyAsyncHttpProvider.this); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(h).request(request).responseStatus(s).responseHeaders(responseHeaders).build(); - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - try { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - abort(future, efe); - } - - } - - // The handler may have been wrapped. - future.setAsyncHandler(fc.getAsyncHandler()); - - // The request has changed - if (fc.replayRequest()) { - replayRequest(future, fc, response, ctx); - return; - } - - future.setHttpResponse(response); - if (redirect(request, future, response, ctx)) - return; - - final org.jboss.netty.handler.codec.http.HttpResponseStatus status = new org.jboss.netty.handler.codec.http.HttpResponseStatus(101, "Web Socket Protocol Handshake"); - - final boolean validStatus = response.getStatus().equals(status); - final boolean validUpgrade = response.getHeader(HttpHeaders.Names.UPGRADE) != null; - String c = response.getHeader(HttpHeaders.Names.CONNECTION); - if (c == null) { - c = response.getHeader(HttpHeaders.Names.CONNECTION.toLowerCase(Locale.ENGLISH)); - } - - final boolean validConnection = c == null ? false : c.equalsIgnoreCase(HttpHeaders.Values.UPGRADE); - - s = new ResponseStatus(future.getURI(), response, NettyAsyncHttpProvider.this); - final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; - - final boolean headerOK = h.onHeadersReceived(responseHeaders) == STATE.CONTINUE; - if (!headerOK || !validStatus || !validUpgrade || !validConnection || !statusReceived) { - abort(future, new IOException("Invalid handshake response")); - return; - } - - String accept = response.getHeader(HttpHeaders.Names.SEC_WEBSOCKET_ACCEPT); - String key = WebSocketUtil.getAcceptKey(future.getNettyRequest().getHeader(HttpHeaders.Names.SEC_WEBSOCKET_KEY)); - if (accept == null || !accept.equals(key)) { - throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); - } - - ctx.getPipeline().replace("http-encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); - ctx.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder", new WebSocket08FrameDecoder(false, false)); - - invokeOnSucces(ctx, h); - future.done(); - } else if (e.getMessage() instanceof WebSocketFrame) { - - invokeOnSucces(ctx, h); - - final WebSocketFrame frame = (WebSocketFrame) e.getMessage(); - - if (frame instanceof TextWebSocketFrame) { - pendingOpcode = OPCODE_TEXT; - } else if (frame instanceof BinaryWebSocketFrame) { - pendingOpcode = OPCODE_BINARY; - } - - HttpChunk webSocketChunk = new HttpChunk() { - private ChannelBuffer content; - - // @Override - public boolean isLast() { - return false; - } - - // @Override - public ChannelBuffer getContent() { - return content; - } - - // @Override - public void setContent(ChannelBuffer content) { - this.content = content; - } - }; - - if (frame.getBinaryData() != null) { - webSocketChunk.setContent(ChannelBuffers.wrappedBuffer(frame.getBinaryData())); - ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), null, NettyAsyncHttpProvider.this, webSocketChunk, true); - h.onBodyPartReceived(rp); - - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - - if (webSocket != null) { - if (pendingOpcode == OPCODE_BINARY) { - webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); - } else { - webSocket.onTextFragment(frame.getBinaryData().toString(UTF8), frame.isFinalFragment()); - } - - if (frame instanceof CloseWebSocketFrame) { - try { - ctx.setAttachment(DiscardEvent.class); - webSocket.onClose(CloseWebSocketFrame.class.cast(frame).getStatusCode(), CloseWebSocketFrame.class.cast(frame).getReasonText()); - } catch (Throwable t) { - // Swallow any exception that may comes from a Netty version released before 3.4.0 - log.trace("", t); - } - } - } else { - log.debug("UpgradeHandler returned a null NettyWebSocket "); - } - } - } else { - log.error("Invalid attachment {}", ctx.getAttachment()); - } - } - - // @Override - public void onError(ChannelHandlerContext ctx, ExceptionEvent e) { - try { - log.warn("onError {}", e); - if (!(ctx.getAttachment() instanceof NettyResponseFuture)) { - return; - } - - NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); - - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - if (webSocket != null) { - webSocket.onError(e.getCause()); - webSocket.close(); - } - } catch (Throwable t) { - log.error("onError", t); - } - } - - // @Override - public void onClose(ChannelHandlerContext ctx, ChannelStateEvent e) { - log.trace("onClose {}", e); - if (!(ctx.getAttachment() instanceof NettyResponseFuture)) { - return; - } - - try { - NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(ctx.getAttachment()); - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - - if (!(ctx.getAttachment() instanceof DiscardEvent)) - webSocket.close(1006, "Connection was closed abnormally (that is, with no close frame being sent)."); - } catch (Throwable t) { - log.error("onError", t); - } - } - } - - private static boolean isWebSocket(URI uri) { - return WEBSOCKET.equalsIgnoreCase(uri.getScheme()) || WEBSOCKET_SSL.equalsIgnoreCase(uri.getScheme()); - } - - private static boolean isSecure(String scheme) { - return HTTPS.equalsIgnoreCase(scheme) || WEBSOCKET_SSL.equalsIgnoreCase(scheme); - } - - private static boolean isSecure(URI uri) { - return isSecure(uri.getScheme()); + public ListenableFuture execute(Request request, final AsyncHandler asyncHandler) throws IOException { + return requestSender.sendRequest(request, asyncHandler, null, asyncHttpProviderConfig.isAsyncConnect(), false); } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java index d184b19aa7..210f1dc8a9 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java @@ -16,16 +16,17 @@ */ package org.asynchttpclient.providers.netty; +import io.netty.channel.Channel; +import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; + import java.util.HashMap; -import java.util.Locale; import java.util.Map; import java.util.Set; -import java.util.concurrent.ExecutorService; -import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory; +import org.asynchttpclient.AsyncHttpProviderConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.asynchttpclient.AsyncHttpProviderConfig; /** * This class can be used to pass Netty's internal configuration options. See Netty documentation for more information. @@ -40,14 +41,19 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig properties = new HashMap(); @@ -96,7 +102,7 @@ public NettyAsyncHttpProviderConfig() { */ public NettyAsyncHttpProviderConfig addProperty(String name, Object value) { - if (name.equals(REUSE_ADDRESS) && value == Boolean.TRUE && System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("win")) { + if (name.equals(REUSE_ADDRESS) && value == Boolean.TRUE && System.getProperty("os.name").toLowerCase().contains("win")) { LOGGER.warn("Can't enable {} on Windows", REUSE_ADDRESS); } else { properties.put(name, value); @@ -142,20 +148,20 @@ public void setUseBlockingIO(boolean useBlockingIO) { this.useBlockingIO = useBlockingIO; } - public NioClientSocketChannelFactory getSocketChannelFactory() { - return socketChannelFactory; + public EventLoopGroup getEventLoopGroup() { + return eventLoopGroup; } - public void setSocketChannelFactory(NioClientSocketChannelFactory socketChannelFactory) { - this.socketChannelFactory = socketChannelFactory; + public void setEventLoopGroup(EventLoopGroup eventLoopGroup) { + this.eventLoopGroup = eventLoopGroup; } - public ExecutorService getBossExecutorService() { - return bossExecutorService; + public boolean isAsyncConnect() { + return asyncConnect; } - public void setBossExecutorService(ExecutorService bossExecutorService) { - this.bossExecutorService = bossExecutorService; + public void setAsyncConnect(boolean asyncConnect) { + this.asyncConnect = asyncConnect; } public int getMaxInitialLineLength() { @@ -181,4 +187,41 @@ public int getMaxChunkSize() { public void setMaxChunkSize(int maxChunkSize) { this.maxChunkSize = maxChunkSize; } + + public AdditionalChannelInitializer getHttpAdditionalChannelInitializer() { + return httpAdditionalChannelInitializer; + } + + public void setHttpAdditionalChannelInitializer(AdditionalChannelInitializer httpAdditionalChannelInitializer) { + this.httpAdditionalChannelInitializer = httpAdditionalChannelInitializer; + } + + public AdditionalChannelInitializer getWsAdditionalChannelInitializer() { + return wsAdditionalChannelInitializer; + } + + public void setWsAdditionalChannelInitializer(AdditionalChannelInitializer wsAdditionalChannelInitializer) { + this.wsAdditionalChannelInitializer = wsAdditionalChannelInitializer; + } + + public AdditionalChannelInitializer getHttpsAdditionalChannelInitializer() { + return httpsAdditionalChannelInitializer; + } + + public void setHttpsAdditionalChannelInitializer(AdditionalChannelInitializer httpsAdditionalChannelInitializer) { + this.httpsAdditionalChannelInitializer = httpsAdditionalChannelInitializer; + } + + public AdditionalChannelInitializer getWssAdditionalChannelInitializer() { + return wssAdditionalChannelInitializer; + } + + public void setWssAdditionalChannelInitializer(AdditionalChannelInitializer wssAdditionalChannelInitializer) { + this.wssAdditionalChannelInitializer = wssAdditionalChannelInitializer; + } + + public static interface AdditionalChannelInitializer { + + void initChannel(Channel ch) throws Exception; + } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java deleted file mode 100644 index 0d090275fb..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectListener.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - */ -package org.asynchttpclient.providers.netty; - -import java.io.IOException; -import java.net.ConnectException; -import java.net.URI; -import java.nio.channels.ClosedChannelException; -import java.util.concurrent.atomic.AtomicBoolean; - -import javax.net.ssl.HostnameVerifier; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFuture; -import org.jboss.netty.channel.ChannelFutureListener; -import org.jboss.netty.handler.codec.http.HttpRequest; -import org.jboss.netty.handler.ssl.SslHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Request; -import org.asynchttpclient.util.ProxyUtils; - - -/** - * Non Blocking connect. - */ -final class NettyConnectListener implements ChannelFutureListener { - private final static Logger logger = LoggerFactory.getLogger(NettyConnectListener.class); - private final AsyncHttpClientConfig config; - private final NettyResponseFuture future; - private final HttpRequest nettyRequest; - private final AtomicBoolean handshakeDone = new AtomicBoolean(false); - - private NettyConnectListener(AsyncHttpClientConfig config, - NettyResponseFuture future, - HttpRequest nettyRequest) { - this.config = config; - this.future = future; - this.nettyRequest = nettyRequest; - } - - public NettyResponseFuture future() { - return future; - } - - public final void operationComplete(ChannelFuture f) throws Exception { - if (f.isSuccess()) { - Channel channel = f.getChannel(); - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(future); - SslHandler sslHandler = (SslHandler) channel.getPipeline().get(NettyAsyncHttpProvider.SSL_HANDLER); - if (!handshakeDone.getAndSet(true) && (sslHandler != null)) { - ((SslHandler) channel.getPipeline().get(NettyAsyncHttpProvider.SSL_HANDLER)).handshake().addListener(this); - return; - } - - HostnameVerifier v = config.getHostnameVerifier(); - if (sslHandler != null) { - if (!v.verify(future.getURI().getHost(), sslHandler.getEngine().getSession())) { - ConnectException exception = new ConnectException("HostnameVerifier exception."); - future.abort(exception); - throw exception; - } - } - - future.provider().writeRequest(f.getChannel(), config, future, nettyRequest); - } else { - Throwable cause = f.getCause(); - - logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", f.getChannel(), future.canRetry()); - if (future.canRetry() && cause != null && (NettyAsyncHttpProvider.abortOnDisconnectException(cause) - || cause instanceof ClosedChannelException - || future.getState() != NettyResponseFuture.STATE.NEW)) { - - logger.debug("Retrying {} ", nettyRequest); - if (future.provider().remotelyClosed(f.getChannel(), future)) { - return; - } - } - - logger.debug("Failed to recover from exception: {} with channel {}", cause, f.getChannel()); - - boolean printCause = f.getCause() != null && cause.getMessage() != null; - ConnectException e = new ConnectException(printCause ? cause.getMessage() + " to " + future.getURI().toString() : future.getURI().toString()); - if (cause != null) { - e.initCause(cause); - } - future.abort(e); - } - } - - public static class Builder { - private final AsyncHttpClientConfig config; - - private final Request request; - private final AsyncHandler asyncHandler; - private NettyResponseFuture future; - private final NettyAsyncHttpProvider provider; - private final ChannelBuffer buffer; - - public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler asyncHandler, - NettyAsyncHttpProvider provider, ChannelBuffer buffer) { - - this.config = config; - this.request = request; - this.asyncHandler = asyncHandler; - this.future = null; - this.provider = provider; - this.buffer = buffer; - } - - public Builder(AsyncHttpClientConfig config, Request request, AsyncHandler asyncHandler, - NettyResponseFuture future, NettyAsyncHttpProvider provider, ChannelBuffer buffer) { - - this.config = config; - this.request = request; - this.asyncHandler = asyncHandler; - this.future = future; - this.provider = provider; - this.buffer = buffer; - } - - public NettyConnectListener build(final URI uri) throws IOException { - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - HttpRequest nettyRequest = NettyAsyncHttpProvider.buildRequest(config, request, uri, true, buffer, proxyServer); - if (future == null) { - future = NettyAsyncHttpProvider.newFuture(uri, request, asyncHandler, nettyRequest, config, provider, proxyServer); - } else { - future.setNettyRequest(nettyRequest); - future.setRequest(request); - } - return new NettyConnectListener(config, future, nettyRequest); - } - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java deleted file mode 100644 index 96b273f879..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyConnectionsPool.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import static org.asynchttpclient.util.DateUtil.millisTime; -import org.asynchttpclient.ConnectionsPool; -import org.jboss.netty.channel.Channel; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.atomic.AtomicBoolean; - -/** - * A simple implementation of {@link org.asynchttpclient.ConnectionsPool} based on a {@link java.util.concurrent.ConcurrentHashMap} - */ -public class NettyConnectionsPool implements ConnectionsPool { - - private final static Logger log = LoggerFactory.getLogger(NettyConnectionsPool.class); - private final ConcurrentHashMap> connectionsPool = new ConcurrentHashMap>(); - private final ConcurrentHashMap channel2IdleChannel = new ConcurrentHashMap(); - private final ConcurrentHashMap channel2CreationDate = new ConcurrentHashMap(); - private final AtomicBoolean isClosed = new AtomicBoolean(false); - private final Timer idleConnectionDetector; - private final boolean sslConnectionPoolEnabled; - private final int maxTotalConnections; - private final int maxConnectionPerHost; - private final int maxConnectionLifeTimeInMs; - private final long maxIdleTime; - - public NettyConnectionsPool(NettyAsyncHttpProvider provider) { - this(provider.getConfig().getMaxTotalConnections(), provider.getConfig().getMaxConnectionPerHost(), provider.getConfig().getIdleConnectionInPoolTimeoutInMs(), provider.getConfig().isSslConnectionPoolEnabled(), provider.getConfig().getMaxConnectionLifeTimeInMs(), new Timer(true)); - } - - public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, boolean sslConnectionPoolEnabled, int maxConnectionLifeTimeInMs, Timer idleConnectionDetector) { - this.maxTotalConnections = maxTotalConnections; - this.maxConnectionPerHost = maxConnectionPerHost; - this.sslConnectionPoolEnabled = sslConnectionPoolEnabled; - this.maxIdleTime = maxIdleTime; - this.maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs; - this.idleConnectionDetector = idleConnectionDetector; - this.idleConnectionDetector.schedule(new IdleChannelDetector(), maxIdleTime, maxIdleTime); - } - - private static class IdleChannel { - final String uri; - final Channel channel; - final long start; - - IdleChannel(String uri, Channel channel) { - this.uri = uri; - this.channel = channel; - this.start = millisTime(); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof IdleChannel)) return false; - - IdleChannel that = (IdleChannel) o; - - if (channel != null ? !channel.equals(that.channel) : that.channel != null) return false; - - return true; - } - - @Override - public int hashCode() { - return channel != null ? channel.hashCode() : 0; - } - } - - private class IdleChannelDetector extends TimerTask { - @Override - public void run() { - try { - if (isClosed.get()) return; - - if (log.isDebugEnabled()) { - Set keys = connectionsPool.keySet(); - - for (String s : keys) { - log.debug("Entry count for : {} : {}", s, connectionsPool.get(s).size()); - } - } - - List channelsInTimeout = new ArrayList(); - long currentTime = millisTime(); - - for (IdleChannel idleChannel : channel2IdleChannel.values()) { - long age = currentTime - idleChannel.start; - if (age > maxIdleTime) { - - log.debug("Adding Candidate Idle Channel {}", idleChannel.channel); - - // store in an unsynchronized list to minimize the impact on the ConcurrentHashMap. - channelsInTimeout.add(idleChannel); - } - } - long endConcurrentLoop = millisTime(); - - for (IdleChannel idleChannel : channelsInTimeout) { - Object attachment = idleChannel.channel.getPipeline().getContext(NettyAsyncHttpProvider.class).getAttachment(); - if (attachment != null) { - if (attachment instanceof NettyResponseFuture) { - NettyResponseFuture future = (NettyResponseFuture) attachment; - - if (!future.isDone() && !future.isCancelled()) { - log.debug("Future not in appropriate state %s\n", future); - continue; - } - } - } - - if (remove(idleChannel)) { - log.debug("Closing Idle Channel {}", idleChannel.channel); - close(idleChannel.channel); - } - } - - if (log.isTraceEnabled()) { - int openChannels = 0; - for (ConcurrentLinkedQueue hostChannels: connectionsPool.values()) { - openChannels += hostChannels.size(); - } - log.trace(String.format("%d channel open, %d idle channels closed (times: 1st-loop=%d, 2nd-loop=%d).\n", - openChannels, channelsInTimeout.size(), endConcurrentLoop - currentTime, millisTime() - endConcurrentLoop)); - } - } catch (Throwable t) { - log.error("uncaught exception!", t); - } - } - } - - /** - * {@inheritDoc} - */ - public boolean offer(String uri, Channel channel) { - if (isClosed.get()) return false; - - if (!sslConnectionPoolEnabled && uri.startsWith("https")) { - return false; - } - - Long createTime = channel2CreationDate.get(channel); - if (createTime == null){ - channel2CreationDate.putIfAbsent(channel, millisTime()); - } - else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeInMs) < millisTime() ) { - log.debug("Channel {} expired", channel); - return false; - } - - log.debug("Adding uri: {} for channel {}", uri, channel); - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); - - ConcurrentLinkedQueue idleConnectionForHost = connectionsPool.get(uri); - if (idleConnectionForHost == null) { - ConcurrentLinkedQueue newPool = new ConcurrentLinkedQueue(); - idleConnectionForHost = connectionsPool.putIfAbsent(uri, newPool); - if (idleConnectionForHost == null) idleConnectionForHost = newPool; - } - - boolean added; - int size = idleConnectionForHost.size(); - if (maxConnectionPerHost == -1 || size < maxConnectionPerHost) { - IdleChannel idleChannel = new IdleChannel(uri, channel); - synchronized (idleConnectionForHost) { - added = idleConnectionForHost.add(idleChannel); - - if (channel2IdleChannel.put(channel, idleChannel) != null) { - log.error("Channel {} already exists in the connections pool!", channel); - } - } - } else { - log.debug("Maximum number of requests per host reached {} for {}", maxConnectionPerHost, uri); - added = false; - } - return added; - } - - /** - * {@inheritDoc} - */ - public Channel poll(String uri) { - if (!sslConnectionPoolEnabled && uri.startsWith("https")) { - return null; - } - - IdleChannel idleChannel = null; - ConcurrentLinkedQueue idleConnectionForHost = connectionsPool.get(uri); - if (idleConnectionForHost != null) { - boolean poolEmpty = false; - while (!poolEmpty && idleChannel == null) { - if (idleConnectionForHost.size() > 0) { - synchronized (idleConnectionForHost) { - idleChannel = idleConnectionForHost.poll(); - if (idleChannel != null) { - channel2IdleChannel.remove(idleChannel.channel); - } - } - } - - if (idleChannel == null) { - poolEmpty = true; - } else if (!idleChannel.channel.isConnected() || !idleChannel.channel.isOpen()) { - idleChannel = null; - log.trace("Channel not connected or not opened!"); - } - } - } - return idleChannel != null ? idleChannel.channel : null; - } - - private boolean remove(IdleChannel pooledChannel) { - if (pooledChannel == null || isClosed.get()) return false; - - boolean isRemoved = false; - ConcurrentLinkedQueue pooledConnectionForHost = connectionsPool.get(pooledChannel.uri); - if (pooledConnectionForHost != null) { - isRemoved = pooledConnectionForHost.remove(pooledChannel); - } - isRemoved |= channel2IdleChannel.remove(pooledChannel.channel) != null; - return isRemoved; - } - - /** - * {@inheritDoc} - */ - public boolean removeAll(Channel channel) { - channel2CreationDate.remove(channel); - return !isClosed.get() && remove(channel2IdleChannel.get(channel)); - } - - /** - * {@inheritDoc} - */ - public boolean canCacheConnection() { - if (!isClosed.get() && maxTotalConnections != -1 && channel2IdleChannel.size() >= maxTotalConnections) { - return false; - } else { - return true; - } - } - - /** - * {@inheritDoc} - */ - public void destroy() { - if (isClosed.getAndSet(true)) return; - - // stop timer - idleConnectionDetector.cancel(); - idleConnectionDetector.purge(); - - for (Channel channel : channel2IdleChannel.keySet()) { - close(channel); - } - connectionsPool.clear(); - channel2IdleChannel.clear(); - channel2CreationDate.clear(); - } - - private void close(Channel channel) { - try { - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); - channel2CreationDate.remove(channel); - channel.close(); - } catch (Throwable t) { - // noop - } - } - - public final String toString() { - return String.format("NettyConnectionPool: {pool-size: %d}", channel2IdleChannel.size()); - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java deleted file mode 100644 index 81b520fbc6..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponse.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBufferInputStream; -import org.jboss.netty.buffer.ChannelBuffers; - -import org.asynchttpclient.Cookie; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.providers.ResponseBase; -import org.asynchttpclient.providers.netty.util.ChannelBufferUtil; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; - -/** - * Wrapper around the {@link org.asynchttpclient.Response} API. - */ -public class NettyResponse extends ResponseBase { - - public NettyResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) { - super(status, headers, bodyParts); - } - - /* @Override */ - public String getResponseBodyExcerpt(int maxLength) throws IOException { - return getResponseBodyExcerpt(maxLength, null); - } - - public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - // should be fine; except that it may split multi-byte chars (last char may become '?') - charset = calculateCharset(charset); - byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); - return new String(b, charset); - } - - protected List buildCookies() { - List cookies = new ArrayList(); - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - cookies.addAll(CookieDecoder.decode(value)); - } - } - } - return Collections.unmodifiableList(cookies); - } - - /* @Override */ - public byte[] getResponseBodyAsBytes() throws IOException { - return ChannelBufferUtil.channelBuffer2bytes(getResponseBodyAsChannelBuffer()); - } - - /* @Override */ - public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { - return getResponseBodyAsChannelBuffer().toByteBuffer(); - } - - /* @Override */ - public String getResponseBody() throws IOException { - return getResponseBody(null); - } - - /* @Override */ - public String getResponseBody(String charset) throws IOException { - return getResponseBodyAsChannelBuffer().toString(Charset.forName(calculateCharset(charset))); - } - - /* @Override */ - public InputStream getResponseBodyAsStream() throws IOException { - return new ChannelBufferInputStream(getResponseBodyAsChannelBuffer()); - } - - public ChannelBuffer getResponseBodyAsChannelBuffer() throws IOException { - ChannelBuffer b = null; - switch (bodyParts.size()) { - case 0: - b = ChannelBuffers.EMPTY_BUFFER; - break; - case 1: - b = ResponseBodyPart.class.cast(bodyParts.get(0)).getChannelBuffer(); - break; - default: - ChannelBuffer[] channelBuffers = new ChannelBuffer[bodyParts.size()]; - for (int i = 0; i < bodyParts.size(); i++) { - channelBuffers[i] = ResponseBodyPart.class.cast(bodyParts.get(i)).getChannelBuffer(); - } - b = ChannelBuffers.wrappedBuffer(channelBuffers); - } - - return b; - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java deleted file mode 100755 index a5e75f4c32..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyResponseFuture.java +++ /dev/null @@ -1,515 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty; - -import static org.asynchttpclient.util.DateUtil.millisTime; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.ConnectionPoolKeyStrategy; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Request; -import org.asynchttpclient.listenable.AbstractListenableFuture; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.handler.codec.http.HttpRequest; -import org.jboss.netty.handler.codec.http.HttpResponse; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.net.MalformedURLException; -import java.net.URI; -import java.util.concurrent.CancellationException; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; - -/** - * A {@link Future} that can be used to track when an asynchronous HTTP request has been fully processed. - * - * @param - */ -public final class NettyResponseFuture extends AbstractListenableFuture { - - private final static Logger logger = LoggerFactory.getLogger(NettyResponseFuture.class); - public final static String MAX_RETRY = "org.asynchttpclient.providers.netty.maxRetry"; - - enum STATE { - NEW, POOLED, RECONNECTED, CLOSED, - } - - private final CountDownLatch latch = new CountDownLatch(1); - private final AtomicBoolean isDone = new AtomicBoolean(false); - private final AtomicBoolean isCancelled = new AtomicBoolean(false); - private AsyncHandler asyncHandler; - private final int requestTimeoutInMs; - private final int idleConnectionTimeoutInMs; - private Request request; - private HttpRequest nettyRequest; - private final AtomicReference content = new AtomicReference(); - private URI uri; - private boolean keepAlive = true; - private HttpResponse httpResponse; - private final AtomicReference exEx = new AtomicReference(); - private final AtomicInteger redirectCount = new AtomicInteger(); - private volatile Future reaperFuture; - private final AtomicBoolean inAuth = new AtomicBoolean(false); - private final AtomicBoolean statusReceived = new AtomicBoolean(false); - private final AtomicLong touch = new AtomicLong(millisTime()); - private final long start = millisTime(); - private final NettyAsyncHttpProvider asyncHttpProvider; - private final AtomicReference state = new AtomicReference(STATE.NEW); - private final AtomicBoolean contentProcessed = new AtomicBoolean(false); - private Channel channel; - private boolean reuseChannel = false; - private final AtomicInteger currentRetry = new AtomicInteger(0); - private final int maxRetry; - private boolean writeHeaders; - private boolean writeBody; - private final AtomicBoolean throwableCalled = new AtomicBoolean(false); - private boolean allowConnect = false; - private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; - private final ProxyServer proxyServer; - - public NettyResponseFuture(URI uri,// - Request request,// - AsyncHandler asyncHandler,// - HttpRequest nettyRequest,// - int requestTimeoutInMs,// - int idleConnectionTimeoutInMs,// - NettyAsyncHttpProvider asyncHttpProvider,// - ConnectionPoolKeyStrategy connectionPoolKeyStrategy,// - ProxyServer proxyServer) { - - this.asyncHandler = asyncHandler; - this.requestTimeoutInMs = requestTimeoutInMs; - this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs; - this.request = request; - this.nettyRequest = nettyRequest; - this.uri = uri; - this.asyncHttpProvider = asyncHttpProvider; - this.connectionPoolKeyStrategy = connectionPoolKeyStrategy; - this.proxyServer = proxyServer; - - if (System.getProperty(MAX_RETRY) != null) { - maxRetry = Integer.valueOf(System.getProperty(MAX_RETRY)); - } else { - maxRetry = asyncHttpProvider.getConfig().getMaxRequestRetry(); - } - writeHeaders = true; - writeBody = true; - } - - protected URI getURI() throws MalformedURLException { - return uri; - } - - protected void setURI(URI uri) { - this.uri = uri; - } - - public ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy() { - return connectionPoolKeyStrategy; - } - - public ProxyServer getProxyServer() { - return proxyServer; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean isDone() { - return isDone.get(); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean isCancelled() { - return isCancelled.get(); - } - - void setAsyncHandler(AsyncHandler asyncHandler) { - this.asyncHandler = asyncHandler; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean cancel(boolean force) { - cancelReaper(); - - if (isCancelled.get()) - return false; - - try { - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); - channel.close(); - } catch (Throwable t) { - // Ignore - } - if (!throwableCalled.getAndSet(true)) { - try { - asyncHandler.onThrowable(new CancellationException()); - } catch (Throwable t) { - logger.warn("cancel", t); - } - } - latch.countDown(); - isCancelled.set(true); - runListeners(); - return true; - } - - /** - * Is the Future still valid - * - * @return true if response has expired and should be terminated. - */ - public boolean hasExpired() { - long now = millisTime(); - return hasConnectionIdleTimedOut(now) || hasRequestTimedOut(now); - } - - public boolean hasConnectionIdleTimedOut(long now) { - return idleConnectionTimeoutInMs != -1 && (now - touch.get()) >= idleConnectionTimeoutInMs; - } - - public boolean hasRequestTimedOut(long now) { - return requestTimeoutInMs != -1 && (now - start) >= requestTimeoutInMs; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public V get() throws InterruptedException, ExecutionException { - try { - return get(requestTimeoutInMs, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - cancelReaper(); - throw new ExecutionException(e); - } - } - - void cancelReaper() { - if (reaperFuture != null) { - reaperFuture.cancel(false); - } - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, ExecutionException { - if (!isDone() && !isCancelled()) { - boolean expired = false; - if (l == -1) { - latch.await(); - } else { - expired = !latch.await(l, tu); - } - - if (expired) { - isCancelled.set(true); - try { - channel.getPipeline().getContext(NettyAsyncHttpProvider.class).setAttachment(new NettyAsyncHttpProvider.DiscardEvent()); - channel.close(); - } catch (Throwable t) { - // Ignore - } - TimeoutException te = new TimeoutException(String.format("No response received after %s %s", l, tu.name().toLowerCase())); - if (!throwableCalled.getAndSet(true)) { - try { - asyncHandler.onThrowable(te); - } catch (Throwable t) { - logger.debug("asyncHandler.onThrowable", t); - } - cancelReaper(); - throw new ExecutionException(te); - } - } - isDone.set(true); - - ExecutionException e = exEx.getAndSet(null); - if (e != null) { - throw e; - } - } - return getContent(); - } - - V getContent() throws ExecutionException { - ExecutionException e = exEx.getAndSet(null); - if (e != null) { - throw e; - } - - V update = content.get(); - // No more retry - currentRetry.set(maxRetry); - if (exEx.get() == null && !contentProcessed.getAndSet(true)) { - try { - update = asyncHandler.onCompleted(); - } catch (Throwable ex) { - if (!throwableCalled.getAndSet(true)) { - try { - asyncHandler.onThrowable(ex); - } catch (Throwable t) { - logger.debug("asyncHandler.onThrowable", t); - } - cancelReaper(); - throw new RuntimeException(ex); - } - } - content.compareAndSet(null, update); - } - return update; - } - - public final void done() { - - try { - cancelReaper(); - - if (exEx.get() != null) { - return; - } - getContent(); - isDone.set(true); - } catch (ExecutionException t) { - return; - } catch (RuntimeException t) { - Throwable exception = t.getCause() != null ? t.getCause() : t; - exEx.compareAndSet(null, new ExecutionException(exception)); - - } finally { - latch.countDown(); - } - - runListeners(); - } - - public final void abort(final Throwable t) { - cancelReaper(); - - if (isDone.get() || isCancelled.get()) - return; - - exEx.compareAndSet(null, new ExecutionException(t)); - if (!throwableCalled.getAndSet(true)) { - try { - asyncHandler.onThrowable(t); - } catch (Throwable te) { - logger.debug("asyncHandler.onThrowable", te); - } finally { - isCancelled.set(true); - } - } - latch.countDown(); - runListeners(); - } - - public void content(V v) { - content.set(v); - } - - protected final Request getRequest() { - return request; - } - - public final HttpRequest getNettyRequest() { - return nettyRequest; - } - - protected final void setNettyRequest(HttpRequest nettyRequest) { - this.nettyRequest = nettyRequest; - } - - protected final AsyncHandler getAsyncHandler() { - return asyncHandler; - } - - protected final boolean isKeepAlive() { - return keepAlive; - } - - protected final void setKeepAlive(final boolean keepAlive) { - this.keepAlive = keepAlive; - } - - protected final HttpResponse getHttpResponse() { - return httpResponse; - } - - protected final void setHttpResponse(final HttpResponse httpResponse) { - this.httpResponse = httpResponse; - } - - protected int incrementAndGetCurrentRedirectCount() { - return redirectCount.incrementAndGet(); - } - - protected void setReaperFuture(Future reaperFuture) { - cancelReaper(); - this.reaperFuture = reaperFuture; - } - - protected boolean isInAuth() { - return inAuth.get(); - } - - protected boolean getAndSetAuth(boolean inDigestAuth) { - return inAuth.getAndSet(inDigestAuth); - } - - protected STATE getState() { - return state.get(); - } - - protected void setState(STATE state) { - this.state.set(state); - } - - public boolean getAndSetStatusReceived(boolean sr) { - return statusReceived.getAndSet(sr); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public void touch() { - touch.set(millisTime()); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean getAndSetWriteHeaders(boolean writeHeaders) { - boolean b = this.writeHeaders; - this.writeHeaders = writeHeaders; - return b; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean getAndSetWriteBody(boolean writeBody) { - boolean b = this.writeBody; - this.writeBody = writeBody; - return b; - } - - protected NettyAsyncHttpProvider provider() { - return asyncHttpProvider; - } - - protected void attachChannel(Channel channel) { - this.channel = channel; - } - - public void setReuseChannel(boolean reuseChannel) { - this.reuseChannel = reuseChannel; - } - - public boolean isConnectAllowed() { - return allowConnect; - } - - public void setConnectAllowed(boolean allowConnect) { - this.allowConnect = allowConnect; - } - - protected void attachChannel(Channel channel, boolean reuseChannel) { - this.channel = channel; - this.reuseChannel = reuseChannel; - } - - protected Channel channel() { - return channel; - } - - protected boolean reuseChannel() { - return reuseChannel; - } - - protected boolean canRetry() { - if (currentRetry.incrementAndGet() > maxRetry) { - return false; - } - return true; - } - - public void setRequest(Request request) { - this.request = request; - } - - /** - * Return true if the {@link Future} cannot be recovered. There is some scenario where a connection can be closed by an unexpected IOException, and in some situation we can - * recover from that exception. - * - * @return true if that {@link Future} cannot be recovered. - */ - public boolean cannotBeReplay() { - return isDone() || !canRetry() || isCancelled() || (channel() != null && channel().isOpen() && uri.getScheme().compareToIgnoreCase("https") != 0) || isInAuth(); - } - - public long getStart() { - return start; - } - - public long getRequestTimeoutInMs() { - return requestTimeoutInMs; - } - - public long getIdleConnectionTimeoutInMs() { - return idleConnectionTimeoutInMs; - } - - @Override - public String toString() { - return "NettyResponseFuture{" + // - "currentRetry=" + currentRetry + // - ",\n\tisDone=" + isDone + // - ",\n\tisCancelled=" + isCancelled + // - ",\n\tasyncHandler=" + asyncHandler + // - ",\n\trequestTimeoutInMs=" + requestTimeoutInMs + // - ",\n\tnettyRequest=" + nettyRequest + // - ",\n\tcontent=" + content + // - ",\n\turi=" + uri + // - ",\n\tkeepAlive=" + keepAlive + // - ",\n\thttpResponse=" + httpResponse + // - ",\n\texEx=" + exEx + // - ",\n\tredirectCount=" + redirectCount + // - ",\n\treaperFuture=" + reaperFuture + // - ",\n\tinAuth=" + inAuth + // - ",\n\tstatusReceived=" + statusReceived + // - ",\n\ttouch=" + touch + // - '}'; - } - -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java deleted file mode 100644 index 38c08df1a3..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyWebSocket.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import org.asynchttpclient.websocket.WebSocket; -import org.asynchttpclient.websocket.WebSocketByteListener; -import org.asynchttpclient.websocket.WebSocketCloseCodeReasonListener; -import org.asynchttpclient.websocket.WebSocketListener; -import org.asynchttpclient.websocket.WebSocketTextListener; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.PingWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.PongWebSocketFrame; -import org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.ByteArrayOutputStream; -import java.util.concurrent.ConcurrentLinkedQueue; - -import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer; - -public class NettyWebSocket implements WebSocket { - private final static Logger logger = LoggerFactory.getLogger(NettyWebSocket.class); - - private final Channel channel; - private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue(); - - private StringBuilder textBuffer; - private ByteArrayOutputStream byteBuffer; - private int maxBufferSize = 128000000; - - public NettyWebSocket(Channel channel) { - this.channel = channel; - } - - // @Override - public WebSocket sendMessage(byte[] message) { - channel.write(new BinaryWebSocketFrame(wrappedBuffer(message))); - return this; - } - - // @Override - public WebSocket stream(byte[] fragment, boolean last) { - throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); - } - - // @Override - public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { - throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); - } - - // @Override - public WebSocket sendTextMessage(String message) { - channel.write(new TextWebSocketFrame(message)); - return this; - } - - // @Override - public WebSocket streamText(String fragment, boolean last) { - throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); - } - - // @Override - public WebSocket sendPing(byte[] payload) { - channel.write(new PingWebSocketFrame(wrappedBuffer(payload))); - return this; - } - - // @Override - public WebSocket sendPong(byte[] payload) { - channel.write(new PongWebSocketFrame(wrappedBuffer(payload))); - return this; - } - - // @Override - public WebSocket addWebSocketListener(WebSocketListener l) { - listeners.add(l); - return this; - } - - // @Override - public WebSocket removeWebSocketListener(WebSocketListener l) { - listeners.remove(l); - return this; - } - - public int getMaxBufferSize() { - return maxBufferSize; - } - - public void setMaxBufferSize(int bufferSize) { - maxBufferSize = bufferSize; - - if(maxBufferSize < 8192) - maxBufferSize = 8192; - } - - // @Override - public boolean isOpen() { - return channel.isOpen(); - } - - // @Override - public void close() { - onClose(); - listeners.clear(); - try { - channel.write(new CloseWebSocketFrame()); - channel.getCloseFuture().awaitUninterruptibly(); - } finally { - channel.close(); - } - } - - // @Override - public void close(int statusCode, String reason) { - onClose(statusCode, reason); - listeners.clear(); - try { - channel.write(new CloseWebSocketFrame(statusCode, reason)); - channel.getCloseFuture().awaitUninterruptibly(); - } finally { - channel.close(); - } - } - - protected void onBinaryFragment(byte[] message, boolean last) { - for (WebSocketListener l : listeners) { - if (l instanceof WebSocketByteListener) { - try { - WebSocketByteListener.class.cast(l).onFragment(message,last); - - if(byteBuffer == null) { - byteBuffer = new ByteArrayOutputStream(); - } - - byteBuffer.write(message); - - if(byteBuffer.size() > maxBufferSize) { - Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); - l.onError(e); - this.close(); - return; - } - - - if(last) { - WebSocketByteListener.class.cast(l).onMessage(byteBuffer.toByteArray()); - byteBuffer = null; - textBuffer = null; - } - } catch (Exception ex) { - l.onError(ex); - } - } - } - } - - protected void onTextFragment(String message, boolean last) { - for (WebSocketListener l : listeners) { - if (l instanceof WebSocketTextListener) { - try { - WebSocketTextListener.class.cast(l).onFragment(message,last); - - if(textBuffer == null) { - textBuffer = new StringBuilder(); - } - - textBuffer.append(message); - - if(textBuffer.length() > maxBufferSize) { - Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); - l.onError(e); - this.close(); - return; - } - - if(last) { - WebSocketTextListener.class.cast(l).onMessage(textBuffer.toString()); - byteBuffer = null; - textBuffer = null; - } - } catch (Exception ex) { - l.onError(ex); - } - } - } - } - - protected void onError(Throwable t) { - for (WebSocketListener l : listeners) { - try { - l.onError(t); - } catch (Throwable t2) { - logger.error("", t2); - } - - } - } - - protected void onClose() { - onClose(1000, "Normal closure; the connection successfully completed whatever purpose for which it was created."); - } - - protected void onClose(int code, String reason) { - for (WebSocketListener l : listeners) { - try { - if (l instanceof WebSocketCloseCodeReasonListener) { - WebSocketCloseCodeReasonListener.class.cast(l).onClose(this, code, reason); - } - l.onClose(this); - } catch (Throwable t) { - l.onError(t); - } - } - } - - @Override - public String toString() { - return "NettyWebSocket{" + - "channel=" + channel + - '}'; - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java deleted file mode 100644 index f9d6f39eff..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/Protocol.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.channel.ChannelStateEvent; -import org.jboss.netty.channel.ExceptionEvent; -import org.jboss.netty.channel.MessageEvent; - -public interface Protocol { - - void handle(ChannelHandlerContext ctx, MessageEvent e) throws Exception; - - void onError(ChannelHandlerContext ctx, ExceptionEvent e); - - void onClose(ChannelHandlerContext ctx, ChannelStateEvent e); -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java deleted file mode 100644 index 7f138bbc36..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseBodyPart.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicReference; - -import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.handler.codec.http.HttpChunk; -import org.jboss.netty.handler.codec.http.HttpResponse; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.providers.netty.util.ChannelBufferUtil; - -/** - * A callback class used when an HTTP response body is received. - */ -public class ResponseBodyPart extends HttpResponseBodyPart { - - private final HttpChunk chunk; - private final HttpResponse response; - private final AtomicReference bytes = new AtomicReference(null); - private final boolean isLast; - private boolean closeConnection = false; - - /** - * Constructor used for non-chunked GET requests and HEAD requests. - */ - // FIXME Why notify with a null chunk??? - public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, boolean last) { - this(uri, response, provider, null, last); - } - - public ResponseBodyPart(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunk chunk, boolean last) { - super(uri, provider); - this.chunk = chunk; - this.response = response; - isLast = last; - } - - /** - * Return the response body's part bytes received. - * - * @return the response body's part bytes received. - */ - @Override - public byte[] getBodyPartBytes() { - byte[] bp = bytes.get(); - if (bp != null) { - return bp; - } - - byte[] rb = ChannelBufferUtil.channelBuffer2bytes(getChannelBuffer()); - bytes.set(rb); - return rb; - } - - @Override - public InputStream readBodyPartBytes() { - return new ByteArrayInputStream(getBodyPartBytes()); - } - - @Override - public int length() { - ChannelBuffer b = (chunk != null) ? chunk.getContent() : response.getContent(); - return b.readableBytes(); - } - - @Override - public int writeTo(OutputStream outputStream) throws IOException { - ChannelBuffer b = getChannelBuffer(); - int available = b.readableBytes(); - if (available > 0) { - b.getBytes(b.readerIndex(), outputStream, available); - } - return available; - } - - @Override - public ByteBuffer getBodyByteBuffer() { - return ByteBuffer.wrap(getBodyPartBytes()); - } - - public ChannelBuffer getChannelBuffer() { - return chunk != null ? chunk.getContent() : response.getContent(); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isLast() { - return isLast; - } - - /** - * {@inheritDoc} - */ - @Override - public void markUnderlyingConnectionAsClosed() { - closeConnection = true; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean closeUnderlyingConnection() { - return closeConnection; - } - - protected HttpChunk chunk() { - return chunk; - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java deleted file mode 100644 index 971eadbf72..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseHeaders.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseHeaders; -import org.jboss.netty.handler.codec.http.HttpChunkTrailer; -import org.jboss.netty.handler.codec.http.HttpResponse; - -import java.net.URI; -import java.util.Map; - -/** - * A class that represent the HTTP headers. - */ -public class ResponseHeaders extends HttpResponseHeaders { - - private final HttpChunkTrailer trailingHeaders; - private final HttpResponse response; - private final FluentCaseInsensitiveStringsMap headers; - - public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provider) { - super(uri, provider, false); - this.trailingHeaders = null; - this.response = response; - headers = computerHeaders(); - } - - public ResponseHeaders(URI uri, HttpResponse response, AsyncHttpProvider provider, HttpChunkTrailer traillingHeaders) { - super(uri, provider, true); - this.trailingHeaders = traillingHeaders; - this.response = response; - headers = computerHeaders(); - } - - private FluentCaseInsensitiveStringsMap computerHeaders() { - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - for (Map.Entry header: response.getHeaders()) { - h.add(header.getKey(), header.getValue()); - } - - if (trailingHeaders != null) { - for (Map.Entry header: trailingHeaders.getHeaders()) { - h.add(header.getKey(), header.getValue()); - } - } - - return h; - } - - /** - * Return the HTTP header - * - * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap} - */ - @Override - public FluentCaseInsensitiveStringsMap getHeaders() { - return headers; - } -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java deleted file mode 100644 index 4cec5faf8a..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ResponseStatus.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - */ -package org.asynchttpclient.providers.netty; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseStatus; -import org.jboss.netty.handler.codec.http.HttpResponse; - -import java.net.URI; - -/** - * A class that represent the HTTP response' status line (code + text) - */ -public class ResponseStatus extends HttpResponseStatus { - - private final HttpResponse response; - - public ResponseStatus(URI uri, HttpResponse response, AsyncHttpProvider provider) { - super(uri, provider); - this.response = response; - } - - /** - * Return the response status code - * - * @return the response status code - */ - public int getStatusCode() { - return response.getStatus().getCode(); - } - - /** - * Return the response status text - * - * @return the response status text - */ - public String getStatusText() { - return response.getStatus().getReasonPhrase(); - } - - @Override - public String getProtocolName() { - return response.getProtocolVersion().getProtocolName(); - } - - @Override - public int getProtocolMajorVersion() { - return response.getProtocolVersion().getMajorVersion(); - } - - @Override - public int getProtocolMinorVersion() { - return response.getProtocolVersion().getMinorVersion(); - } - - @Override - public String getProtocolText() { - return response.getProtocolVersion().getText(); - } - -} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java deleted file mode 100644 index 8aabcc9542..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/WebSocketUtil.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty; - -import org.asynchttpclient.util.Base64; - -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -public final class WebSocketUtil { - public static final String MAGIC_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - - public static String getKey() { - byte[] nonce = createRandomBytes(16); - return base64Encode(nonce); - } - - public static String getAcceptKey(String key) throws UnsupportedEncodingException { - String acceptSeed = key + MAGIC_GUID; - byte[] sha1 = sha1(acceptSeed.getBytes("US-ASCII")); - return base64Encode(sha1); - } - - public static byte[] md5(byte[] bytes) { - try { - MessageDigest md = MessageDigest.getInstance("MD5"); - return md.digest(bytes); - } catch (NoSuchAlgorithmException e) { - throw new InternalError("MD5 not supported on this platform"); - } - } - - public static byte[] sha1(byte[] bytes) { - try { - MessageDigest md = MessageDigest.getInstance("SHA1"); - return md.digest(bytes); - } catch (NoSuchAlgorithmException e) { - throw new InternalError("SHA-1 not supported on this platform"); - } - } - - public static String base64Encode(byte[] bytes) { - return Base64.encode(bytes); - } - - public static byte[] createRandomBytes(int size) { - byte[] bytes = new byte[size]; - - for (int i = 0; i < size; i++) { - bytes[i] = (byte) createRandomNumber(0, 255); - } - - return bytes; - } - - public static int createRandomNumber(int min, int max) { - return (int) (Math.random() * max + min); - } - -} - diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java similarity index 84% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java index b6ee69b065..84e73efb71 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Channels.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java @@ -1,8 +1,21 @@ -package org.asynchttpclient.providers.netty4; - -import static org.asynchttpclient.providers.netty4.util.HttpUtil.HTTP; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.WEBSOCKET; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.isSecure; +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.channel; + +import static org.asynchttpclient.providers.netty.util.HttpUtil.*; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; @@ -43,7 +56,12 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ConnectionPoolKeyStrategy; import org.asynchttpclient.ConnectionsPool; -import org.asynchttpclient.providers.netty4.util.CleanupChannelGroup; +import org.asynchttpclient.providers.netty.Callback; +import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.handler.NettyChannelHandler; +import org.asynchttpclient.providers.netty.util.CleanupChannelGroup; import org.asynchttpclient.util.SslUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -89,8 +107,6 @@ public boolean remove(Object o) { } }; - private NettyChannelHandler httpProcessor; - public Channels(final AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig asyncHttpProviderConfig) { this.config = config; @@ -170,26 +186,28 @@ public Channels(final AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig } } - // FIXME clean up - plainBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectionTimeoutInMs()); - webSocketBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectionTimeoutInMs()); - secureBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectionTimeoutInMs()); - secureWebSocketBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectionTimeoutInMs()); + int timeOut = config.getConnectionTimeoutInMs() > 0 ? config.getConnectionTimeoutInMs() : Integer.MAX_VALUE; + plainBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, timeOut); + webSocketBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, timeOut); + secureBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, timeOut); + secureWebSocketBootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, timeOut); + } - // FIXME What was the meaning of this and what is it still a matter with - // Netty4 - // DefaultChannelFuture.setUseDeadLockChecker(false); + private SSLEngine createSSLEngine() throws IOException, GeneralSecurityException { + SSLEngine sslEngine = config.getSSLEngineFactory().newSSLEngine(); + if (sslEngine == null) { + sslEngine = SslUtils.getSSLEngine(); + } + return sslEngine; } public void configure(final NettyChannelHandler httpProcessor) { - this.httpProcessor = httpProcessor; - - ChannelInitializer httpChannelInitializer = new ChannelInitializer() { + plainBootstrap.handler(new ChannelInitializer() { @Override protected void initChannel(Channel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline()// - .addLast(HTTP_HANDLER, newHttpClientCodec()); + .addLast(HTTP_HANDLER, newHttpClientCodec()); if (config.getRequestCompressionLevel() > 0) { pipeline.addLast(DEFLATER_HANDLER, new HttpContentCompressor(config.getRequestCompressionLevel())); @@ -199,75 +217,41 @@ protected void initChannel(Channel ch) throws Exception { pipeline.addLast(INFLATER_HANDLER, new HttpContentDecompressor()); } pipeline.addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler())// - .addLast(AHC_HANDLER, httpProcessor); + .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getHttpAdditionalChannelInitializer() != null) { asyncHttpProviderConfig.getHttpAdditionalChannelInitializer().initChannel(ch); } } - }; + }); - ChannelInitializer webSocketChannelInitializer = new ChannelInitializer() { + webSocketBootstrap.handler(new ChannelInitializer() { @Override protected void initChannel(Channel ch) throws Exception { ch.pipeline()// - .addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())// - .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())// - .addLast(AHC_HANDLER, httpProcessor); + .addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())// + .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())// + .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getWsAdditionalChannelInitializer() != null) { asyncHttpProviderConfig.getWsAdditionalChannelInitializer().initChannel(ch); } } - }; - - plainBootstrap.handler(httpChannelInitializer); - webSocketBootstrap.handler(webSocketChannelInitializer); - } - - public Bootstrap getBootstrap(String url, boolean useSSl) { - Bootstrap bootstrap = url.startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); - - return bootstrap; - } - - public void close() { - connectionsPool.destroy(); - for (Channel channel : openChannels) { - Object attribute = getDefaultAttribute(channel); - if (attribute instanceof NettyResponseFuture) { - NettyResponseFuture future = (NettyResponseFuture) attribute; - future.setReaperFuture(null); - } - } - openChannels.close(); - if (allowReleaseEventLoopGroup) { - eventLoopGroup.shutdownGracefully(); - } - } - - void constructSSLPipeline(final NettyResponseFuture future) { + }); secureBootstrap.handler(new ChannelInitializer() { @Override protected void initChannel(Channel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline(); - - try { - pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); - } catch (Throwable ex) { - LOGGER.error("Channel {} could not add SslHandler {}", ch, ex); - abort(future, ex); - } - - pipeline.addLast(HTTP_HANDLER, newHttpClientCodec()); + ChannelPipeline pipeline = ch.pipeline()// + .addLast(SSL_HANDLER, new SslHandler(createSSLEngine()))// + .addLast(HTTP_HANDLER, newHttpClientCodec()); if (config.isCompressionEnabled()) { pipeline.addLast(INFLATER_HANDLER, new HttpContentDecompressor()); } pipeline.addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler())// - .addLast(AHC_HANDLER, httpProcessor); + .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getHttpsAdditionalChannelInitializer() != null) { asyncHttpProviderConfig.getHttpsAdditionalChannelInitializer().initChannel(ch); @@ -279,18 +263,11 @@ protected void initChannel(Channel ch) throws Exception { @Override protected void initChannel(Channel ch) throws Exception { - ChannelPipeline pipeline = ch.pipeline(); - - try { - pipeline.addLast(SSL_HANDLER, new SslHandler(createSSLEngine())); - } catch (Throwable ex) { - LOGGER.error("Channel {} could not add SslHandler {}", ch, ex); - abort(future, ex); - } - - pipeline.addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())// - .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())// - .addLast(AHC_HANDLER, httpProcessor); + ch.pipeline()// + .addLast(SSL_HANDLER, new SslHandler(createSSLEngine()))// + .addLast(HTTP_DECODER_HANDLER, new HttpResponseDecoder())// + .addLast(HTTP_ENCODER_HANDLER, new HttpRequestEncoder())// + .addLast(AHC_HANDLER, httpProcessor); if (asyncHttpProviderConfig.getWssAdditionalChannelInitializer() != null) { asyncHttpProviderConfig.getWssAdditionalChannelInitializer().initChannel(ch); @@ -299,15 +276,26 @@ protected void initChannel(Channel ch) throws Exception { }); } - private SSLEngine createSSLEngine() throws IOException, GeneralSecurityException { - SSLEngine sslEngine = config.getSSLEngineFactory().newSSLEngine(); - if (sslEngine == null) { - sslEngine = SslUtils.getSSLEngine(); + public Bootstrap getBootstrap(String url, boolean useSSl) { + return url.startsWith(WEBSOCKET) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap) : (useSSl ? secureBootstrap : plainBootstrap); + } + + public void close() { + connectionsPool.destroy(); + for (Channel channel : openChannels) { + Object attribute = getDefaultAttribute(channel); + if (attribute instanceof NettyResponseFuture) { + NettyResponseFuture future = (NettyResponseFuture) attribute; + future.setReaperFuture(null); + } + } + openChannels.close(); + if (allowReleaseEventLoopGroup) { + eventLoopGroup.shutdownGracefully(); } - return sslEngine; } - // FIXME what for? + // some servers can use the same port for HTTP and HTTPS public Channel verifyChannelPipeline(Channel channel, String scheme) throws IOException, GeneralSecurityException { if (channel.pipeline().get(SSL_HANDLER) != null && HTTP.equalsIgnoreCase(scheme)) { @@ -507,26 +495,4 @@ public static void setDefaultAttribute(Channel channel, Object o) { public static void setDefaultAttribute(ChannelHandlerContext ctx, Object o) { ctx.attr(DEFAULT_ATTRIBUTE).set(o); } - - private static class NonConnectionsPool implements ConnectionsPool { - - public boolean offer(String uri, Channel connection) { - return false; - } - - public Channel poll(String uri) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - } - } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/NettyConnectionsPool.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/NettyConnectionsPool.java index 0da9e4a0cd..b9abe8c925 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectionsPool.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/NettyConnectionsPool.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.channel; import static org.asynchttpclient.util.DateUtil.millisTime; import io.netty.channel.Channel; @@ -26,6 +26,8 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ConnectionsPool; +import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProviderUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/NonConnectionsPool.java similarity index 50% rename from providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProviderUtil.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/NonConnectionsPool.java index d68cdb947d..c4a7961c76 100644 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProviderUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/NonConnectionsPool.java @@ -1,5 +1,5 @@ /* - * Copyright 2010 Ning, Inc. + * Copyright 2010-2013 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the @@ -13,17 +13,30 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.channel; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; +import io.netty.channel.Channel; -public class NettyProviderUtil { +import org.asynchttpclient.ConnectionsPool; - public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { - if (config == null) { - config = new AsyncHttpClientConfig.Builder().build(); - } - return new AsyncHttpClient(new NettyAsyncHttpProvider(config), config); +public class NonConnectionsPool implements ConnectionsPool { + + public boolean offer(String uri, Channel connection) { + return false; + } + + public Channel poll(String uri) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { } -} +} \ No newline at end of file diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/FutureReaper.java similarity index 91% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/FutureReaper.java index 974e2bc618..550b9d135c 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FutureReaper.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/FutureReaper.java @@ -1,4 +1,4 @@ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.future; import static org.asynchttpclient.util.DateUtil.millisTime; @@ -9,12 +9,17 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Because some implementation of the ThreadSchedulingService do not clean up cancel task until they try to run them, we wrap the task with the future so the when the NettyResponseFuture cancel the reaper future this wrapper will release the references to the channel and the * nettyResponseFuture immediately. Otherwise, the memory referenced this way will only be released after the request timeout period which can be arbitrary long. */ public final class FutureReaper implements Runnable { + + private static final Logger LOGGER = LoggerFactory.getLogger(FutureReaper.class); private final AtomicBoolean closed; private final Channels channels; @@ -70,7 +75,7 @@ public boolean isDone() { } private void expire(String message) { - NettyAsyncHttpProvider.LOGGER.debug("{} for {}", message, nettyResponseFuture); + LOGGER.debug("{} for {}", message, nettyResponseFuture); channels.abort(nettyResponseFuture, new TimeoutException(message)); nettyResponseFuture = null; } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java index 65fa6c714d..ff5790ca3a 100755 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.future; import static org.asynchttpclient.util.DateUtil.millisTime; import io.netty.channel.Channel; @@ -38,6 +38,8 @@ import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Request; import org.asynchttpclient.listenable.AbstractListenableFuture; +import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.channel.Channels; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -256,7 +258,7 @@ public V getContent() throws ExecutionException { currentRetry.set(maxRetry); if (exEx.get() == null && !contentProcessed.getAndSet(true)) { try { - update = (V) asyncHandler.onCompleted(); + update = asyncHandler.onCompleted(); } catch (Throwable ex) { if (!throwableCalled.getAndSet(true)) { try { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFutures.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFutures.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFutures.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFutures.java index 2d3d34f74b..3b87f48127 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponseFutures.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFutures.java @@ -1,4 +1,4 @@ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.future; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpRequest; diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java new file mode 100644 index 0000000000..a5d689ac91 --- /dev/null +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java @@ -0,0 +1,450 @@ +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.handler; + +import static io.netty.handler.codec.http.HttpResponseStatus.*; +import static org.asynchttpclient.providers.netty.util.HttpUtil.isNTLM; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.HttpContent; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpRequest; +import io.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.LastHttpContent; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Map.Entry; +import java.util.concurrent.atomic.AtomicReference; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.AsyncHandler.STATE; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.ntlm.NTLMEngine; +import org.asynchttpclient.ntlm.NTLMEngineException; +import org.asynchttpclient.spnego.SpnegoEngine; +import org.asynchttpclient.providers.netty.Callback; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.request.NettyRequestSender; +import org.asynchttpclient.providers.netty.response.ResponseBodyPart; +import org.asynchttpclient.providers.netty.response.ResponseHeaders; +import org.asynchttpclient.providers.netty.response.ResponseStatus; +import org.asynchttpclient.util.AsyncHttpProviderUtils; + +final class HttpProtocol extends Protocol { + + public HttpProtocol(Channels channels, AsyncHttpClientConfig config, NettyRequestSender requestSender) { + super(channels, config, requestSender); + } + + private Realm kerberosChallenge(List proxyAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, + NettyResponseFuture future) throws NTLMEngineException { + + URI uri = request.getURI(); + String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); + String server = proxyServer == null ? host : proxyServer.getHost(); + try { + String challengeHeader = SpnegoEngine.instance().generateToken(server); + headers.remove(HttpHeaders.Names.AUTHORIZATION); + headers.add(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); + + Realm.RealmBuilder realmBuilder; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm); + } else { + realmBuilder = new Realm.RealmBuilder(); + } + return realmBuilder.setUri(uri.getRawPath()).setMethodName(request.getMethod()).setScheme(Realm.AuthScheme.KERBEROS).build(); + } catch (Throwable throwable) { + if (isNTLM(proxyAuth)) { + return ntlmChallenge(proxyAuth, request, proxyServer, headers, realm, future); + } + channels.abort(future, throwable); + return null; + } + } + + private Realm ntlmChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, + NettyResponseFuture future) throws NTLMEngineException { + + boolean useRealm = (proxyServer == null && realm != null); + + String ntlmDomain = useRealm ? realm.getNtlmDomain() : proxyServer.getNtlmDomain(); + String ntlmHost = useRealm ? realm.getNtlmHost() : proxyServer.getHost(); + String principal = useRealm ? realm.getPrincipal() : proxyServer.getPrincipal(); + String password = useRealm ? realm.getPassword() : proxyServer.getPassword(); + + Realm newRealm; + if (realm != null && !realm.isNtlmMessageType2Received()) { + String challengeHeader = NTLMEngine.INSTANCE.generateType1Msg(ntlmDomain, ntlmHost); + + URI uri = request.getURI(); + headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(uri.getRawPath()).setMethodName(request.getMethod()) + .setNtlmMessageType2Received(true).build(); + future.getAndSetAuth(false); + } else { + addType3NTLMAuthorizationHeader(wwwAuth, headers, principal, password, ntlmDomain, ntlmHost); + + Realm.RealmBuilder realmBuilder; + Realm.AuthScheme authScheme; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm); + authScheme = realm.getAuthScheme(); + } else { + realmBuilder = new Realm.RealmBuilder(); + authScheme = Realm.AuthScheme.NTLM; + } + newRealm = realmBuilder.setScheme(authScheme).setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); + } + + return newRealm; + } + + private Realm ntlmProxyChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, + NettyResponseFuture future) throws NTLMEngineException { + future.getAndSetAuth(false); + headers.remove(HttpHeaders.Names.PROXY_AUTHORIZATION); + + addType3NTLMAuthorizationHeader(wwwAuth, headers, proxyServer.getPrincipal(), proxyServer.getPassword(), proxyServer.getNtlmDomain(), proxyServer.getHost()); + + Realm newRealm; + Realm.RealmBuilder realmBuilder; + if (realm != null) { + realmBuilder = new Realm.RealmBuilder().clone(realm); + } else { + realmBuilder = new Realm.RealmBuilder(); + } + newRealm = realmBuilder// .setScheme(realm.getAuthScheme()) + .setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); + + return newRealm; + } + + private void addType3NTLMAuthorizationHeader(List auth, FluentCaseInsensitiveStringsMap headers, String username, String password, String domain, String workstation) + throws NTLMEngineException { + headers.remove(HttpHeaders.Names.AUTHORIZATION); + + if (isNTLM(auth)) { + String serverChallenge = auth.get(0).trim().substring("NTLM ".length()); + String challengeHeader = NTLMEngine.INSTANCE.generateType3Msg(username, password, domain, workstation, serverChallenge); + + headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); + } + } + + private List getAuthorizationToken(Iterable> list, String headerAuth) { + ArrayList l = new ArrayList(); + for (Entry e : list) { + if (e.getKey().equalsIgnoreCase(headerAuth)) { + l.add(e.getValue().trim()); + } + } + return l; + } + + private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { + if (lastValidChunk && future.isKeepAlive()) { + channels.drainChannel(ctx, future); + } else { + if (future.isKeepAlive() && ctx.channel().isActive() && channels.offerToPool(channels.getPoolKey(future), ctx.channel())) { + markAsDone(future, ctx); + return; + } + channels.finishChannel(ctx); + } + markAsDone(future, ctx); + } + + private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { + boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; + if (c.closeUnderlyingConnection()) { + future.setKeepAlive(false); + } + return state; + } + + private void markAsDone(final NettyResponseFuture future, final ChannelHandlerContext ctx) throws MalformedURLException { + // We need to make sure everything is OK before adding the + // connection back to the pool. + try { + future.done(); + } catch (Throwable t) { + // Never propagate exception once we know we are done. + NettyChannelHandler.LOGGER.debug(t.getMessage(), t); + } + + if (!future.isKeepAlive() || !ctx.channel().isActive()) { + channels.closeChannel(ctx); + } + } + + private boolean applyResponseFiltersAndReplayRequest(ChannelHandlerContext ctx, NettyResponseFuture future, HttpResponseStatus status, + HttpResponseHeaders responseHeaders) throws IOException { + + AsyncHandler handler = future.getAsyncHandler(); + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(future.getRequest()).responseStatus(status).responseHeaders(responseHeaders) + .build(); + + for (ResponseFilter asyncFilter : config.getResponseFilters()) { + try { + fc = asyncFilter.filter(fc); + // FIXME Is it worth protecting against this? + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + channels.abort(future, efe); + } + } + + // The handler may have been wrapped. + handler = fc.getAsyncHandler(); + future.setAsyncHandler(handler); + + // The request has changed + if (fc.replayRequest()) { + requestSender.replayRequest(future, fc, ctx); + return true; + } + return false; + } + + private boolean handleResponseAndExit(final ChannelHandlerContext ctx, final NettyResponseFuture future, AsyncHandler handler, HttpRequest nettyRequest, + ProxyServer proxyServer, HttpResponse response) throws Exception { + Request request = future.getRequest(); + int statusCode = response.getStatus().code(); + HttpResponseStatus status = new ResponseStatus(future.getURI(), response); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); + final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); + final RequestBuilder builder = new RequestBuilder(future.getRequest()); + Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); + + // store the original headers so we can re-send all them to + // the handler in case of trailing headers + future.setHttpResponse(response); + + future.setKeepAlive(!HttpHeaders.Values.CLOSE.equalsIgnoreCase(response.headers().get(HttpHeaders.Names.CONNECTION))); + + if (!config.getResponseFilters().isEmpty() && applyResponseFiltersAndReplayRequest(ctx, future, status, responseHeaders)) { + return true; + } + + // FIXME handle without returns + if (statusCode == UNAUTHORIZED.code() && realm != null) { + List wwwAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.WWW_AUTHENTICATE); + if (!wwwAuth.isEmpty() && !future.getAndSetAuth(true)) { + future.setState(NettyResponseFuture.STATE.NEW); + Realm newRealm = null; + // NTLM + boolean negociate = wwwAuth.contains("Negotiate"); + if (!wwwAuth.contains("Kerberos") && (isNTLM(wwwAuth) || negociate)) { + newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (negociate) { + newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) { + return true; + } + } else { + newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(request.getURI().getPath()).setMethodName(request.getMethod()) + .setUsePreemptiveAuth(true).parseWWWAuthenticateHeader(wwwAuth.get(0)).build(); + } + + final Realm nr = new Realm.RealmBuilder().clone(newRealm).setUri(URI.create(request.getUrl()).getPath()).build(); + + NettyChannelHandler.LOGGER.debug("Sending authentication to {}", request.getUrl()); + Callback callback = new Callback(future) { + public void call() throws Exception { + channels.drainChannel(ctx, future); + requestSender.sendNextRequest(builder.setHeaders(headers).setRealm(nr).build(), future); + } + }; + + if (future.isKeepAlive() && HttpHeaders.isTransferEncodingChunked(response)) { + // We must make sure there is no bytes left + // before executing the next request. + Channels.setDefaultAttribute(ctx, callback); + } else { + callback.call(); + } + + return true; + } + + } else if (statusCode == CONTINUE.code()) { + future.getAndSetWriteHeaders(false); + future.getAndSetWriteBody(true); + // FIXME why not reuse the channel? + requestSender.writeRequest(ctx.channel(), config, future); + return true; + + } else if (statusCode == PROXY_AUTHENTICATION_REQUIRED.code()) { + List proxyAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.PROXY_AUTHENTICATE); + if (realm != null && !proxyAuth.isEmpty() && !future.getAndSetAuth(true)) { + NettyChannelHandler.LOGGER.debug("Sending proxy authentication to {}", request.getUrl()); + + future.setState(NettyResponseFuture.STATE.NEW); + Realm newRealm = null; + + boolean negociate = proxyAuth.contains("Negotiate"); + if (!proxyAuth.contains("Kerberos") && (isNTLM(proxyAuth) || negociate)) { + newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); + // SPNEGO KERBEROS + } else if (negociate) { + newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); + if (newRealm == null) { + return true; + } + } else { + newRealm = future.getRequest().getRealm(); + } + + future.setReuseChannel(true); + future.setConnectAllowed(true); + requestSender.sendNextRequest(builder.setHeaders(headers).setRealm(newRealm).build(), future); + return true; + } + + } else if (statusCode == OK.code() && nettyRequest.getMethod() == HttpMethod.CONNECT) { + + NettyChannelHandler.LOGGER.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); + + if (future.isKeepAlive()) { + future.attachChannel(ctx.channel(), true); + } + + try { + NettyChannelHandler.LOGGER.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); + channels.upgradeProtocol(ctx.channel().pipeline(), request.getURI().getScheme()); + } catch (Throwable ex) { + channels.abort(future, ex); + } + future.setReuseChannel(true); + future.setConnectAllowed(false); + requestSender.sendNextRequest(builder.build(), future); + return true; + + } + + if (redirect(request, future, response, ctx)) { + return true; + } + + if (!future.getAndSetStatusReceived(true) && (handler.onStatusReceived(status) != STATE.CONTINUE || handler.onHeadersReceived(responseHeaders) != STATE.CONTINUE)) { + finishUpdate(future, ctx, HttpHeaders.isTransferEncodingChunked(response)); + return true; + } + + return false; + } + + @Override + public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture future, final Object e) throws Exception { + future.touch(); + + // The connect timeout occurred. + if (future.isCancelled() || future.isDone()) { + channels.finishChannel(ctx); + return; + } + + HttpRequest nettyRequest = future.getNettyRequest(); + AsyncHandler handler = future.getAsyncHandler(); + Request request = future.getRequest(); + ProxyServer proxyServer = future.getProxyServer(); + try { + if (e instanceof HttpResponse) { + HttpResponse response = (HttpResponse) e; + NettyChannelHandler.LOGGER.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); + future.getPendingResponse().set(response); + return; + } + + if (e instanceof HttpContent) { + + AtomicReference responseRef = future.getPendingResponse(); + HttpResponse response = responseRef.getAndSet(null); + if (handler != null) { + if (response != null && handleResponseAndExit(ctx, future, handler, nettyRequest, proxyServer, response)) { + return; + } + + HttpContent chunk = (HttpContent) e; + + boolean interrupt = false; + boolean last = chunk instanceof LastHttpContent; + + // FIXME + // Netty 3 provider is broken: in case of trailing headers, + // onHeadersReceived should be called before + // updateBodyAndInterrupt + if (last) { + LastHttpContent lastChunk = (LastHttpContent) chunk; + HttpHeaders trailingHeaders = lastChunk.trailingHeaders(); + if (!trailingHeaders.isEmpty()) { + interrupt = handler.onHeadersReceived(new ResponseHeaders(future.getURI(), future.getHttpResponse().headers(), trailingHeaders)) != STATE.CONTINUE; + } + } + + if (!interrupt && chunk.content().readableBytes() > 0) { + // FIXME why + interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk.content(), last)); + } + + if (interrupt || last) { + finishUpdate(future, ctx, !last); + } + } + } + } catch (Exception t) { + if (t instanceof IOException && !config.getIOExceptionFilters().isEmpty() + && requestSender.applyIoExceptionFiltersAndReplayRequest(ctx, future, IOException.class.cast(t))) { + return; + } + + try { + channels.abort(future, t); + } finally { + finishUpdate(future, ctx, false); + throw t; + } + } + } + + @Override + public void onError(ChannelHandlerContext ctx, Throwable error) { + } + + @Override + public void onClose(ChannelHandlerContext ctx) { + } +} \ No newline at end of file diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java new file mode 100644 index 0000000000..fb47346455 --- /dev/null +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java @@ -0,0 +1,199 @@ +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler.Sharable; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.PrematureChannelClosureException; +import io.netty.handler.codec.http.HttpClientCodec; +import io.netty.handler.codec.http.LastHttpContent; + +import java.io.IOException; +import java.nio.channels.ClosedChannelException; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.providers.netty.Callback; +import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.future.NettyResponseFutures; +import org.asynchttpclient.providers.netty.request.NettyRequestSender; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Sharable +public class NettyChannelHandler extends ChannelInboundHandlerAdapter { + + static final Logger LOGGER = LoggerFactory.getLogger(NettyChannelHandler.class); + + private final AsyncHttpClientConfig config; + private final NettyRequestSender requestSender; + private final Channels channels; + private final AtomicBoolean closed; + private final Protocol httpProtocol; + private final Protocol webSocketProtocol; + + public NettyChannelHandler(AsyncHttpClientConfig config, NettyRequestSender requestSender, Channels channels, AtomicBoolean isClose) { + this.config = config; + this.requestSender = requestSender; + this.channels = channels; + this.closed = isClose; + httpProtocol = new HttpProtocol(channels, config, requestSender); + webSocketProtocol = new WebSocketProtocol(channels, config, requestSender); + } + + @Override + public void channelRead(final ChannelHandlerContext ctx, Object e) throws Exception { + + Object attribute = Channels.getDefaultAttribute(ctx); + + // FIXME is || !(e instanceof HttpContent) necessary? + if (attribute instanceof Callback && (e instanceof LastHttpContent /* || !(e instanceof HttpContent) */)) { + Callback ac = (Callback) attribute; + ac.call(); + Channels.setDefaultAttribute(ctx, DiscardEvent.INSTANCE); + + } else if (attribute instanceof NettyResponseFuture) { + Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + NettyResponseFuture future = (NettyResponseFuture) attribute; + + p.handle(ctx, future, e); + + } else if (attribute != DiscardEvent.INSTANCE) { + try { + LOGGER.trace("Closing an orphan channel {}", ctx.channel()); + ctx.channel().close(); + } catch (Throwable t) { + } + } + } + + public void channelInactive(ChannelHandlerContext ctx) throws Exception { + + if (closed.get()) { + return; + } + + try { + super.channelInactive(ctx); + } catch (Exception ex) { + LOGGER.trace("super.channelClosed", ex); + } + + channels.removeFromPool(ctx); + Object attachment = Channels.getDefaultAttribute(ctx); + LOGGER.debug("Channel Closed: {} with attachment {}", ctx.channel(), attachment); + + if (attachment instanceof Callback) { + Callback callback = (Callback) attachment; + Channels.setDefaultAttribute(ctx, callback.future()); + callback.call(); + + } else if (attachment instanceof NettyResponseFuture) { + NettyResponseFuture future = NettyResponseFuture.class.cast(attachment); + future.touch(); + + if (!config.getIOExceptionFilters().isEmpty() && requestSender.applyIoExceptionFiltersAndReplayRequest(ctx, future, new IOException("Channel Closed"))) { + return; + } + + Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); + p.onClose(ctx); + + if (future != null && !future.isDone() && !future.isCancelled()) { + if (!requestSender.retry(ctx.channel(), future)) { + channels.abort(future, new IOException("Remotely Closed")); + } + } else { + channels.closeChannel(ctx); + } + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Exception { + Channel channel = ctx.channel(); + Throwable cause = e.getCause() != null ? e.getCause() : e; + NettyResponseFuture future = null; + + if (cause instanceof PrematureChannelClosureException) { + return; + } + + LOGGER.debug("Unexpected I/O exception on channel {}", channel, cause); + + try { + if (cause instanceof ClosedChannelException) { + return; + } + + Object attribute = Channels.getDefaultAttribute(ctx); + if (attribute instanceof NettyResponseFuture) { + future = (NettyResponseFuture) attribute; + future.attachChannel(null, false); + future.touch(); + + if (cause instanceof IOException) { + + // FIXME why drop the original exception and create a new + // one? + if (!config.getIOExceptionFilters().isEmpty()) { + if (requestSender.applyIoExceptionFiltersAndReplayRequest(ctx, future, new IOException("Channel Closed"))) { + return; + } + } else { + // Close the channel so the recovering can occurs. + try { + ctx.channel().close(); + } catch (Throwable t) { + // Swallow. + } + return; + } + } + + if (NettyResponseFutures.abortOnReadCloseException(cause) || NettyResponseFutures.abortOnWriteCloseException(cause)) { + LOGGER.debug("Trying to recover from dead Channel: {}", channel); + return; + } + } else if (attribute instanceof Callback) { + future = Callback.class.cast(attribute).future(); + } + } catch (Throwable t) { + cause = t; + } + + if (future != null) { + try { + LOGGER.debug("Was unable to recover Future: {}", future); + channels.abort(future, cause); + } catch (Throwable t) { + LOGGER.error(t.getMessage(), t); + } + } + + Protocol protocol = ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol; + protocol.onError(ctx, e); + + channels.closeChannel(ctx); + // FIXME not really sure + // ctx.fireChannelRead(e); + ctx.close(); + } +} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java new file mode 100644 index 0000000000..dcd456f41d --- /dev/null +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package org.asynchttpclient.providers.netty.handler; + +import static io.netty.handler.codec.http.HttpResponseStatus.*; +import static org.asynchttpclient.providers.netty.util.HttpUtil.*; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpResponse; + +import java.net.URI; + +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; +import org.asynchttpclient.providers.netty.Callback; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.request.NettyRequestSender; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public abstract class Protocol { + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + protected final Channels channels; + protected final AsyncHttpClientConfig config; + protected final NettyRequestSender requestSender; + + public Protocol(Channels channels, AsyncHttpClientConfig config, NettyRequestSender requestSender) { + this.channels = channels; + this.config = config; + this.requestSender = requestSender; + } + + public abstract void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object message) throws Exception; + + public abstract void onError(ChannelHandlerContext ctx, Throwable error); + + public abstract void onClose(ChannelHandlerContext ctx); + + protected boolean redirect(Request request, NettyResponseFuture future, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { + + io.netty.handler.codec.http.HttpResponseStatus status = response.getStatus(); + boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); + boolean isRedirectStatus = status.equals(MOVED_PERMANENTLY) || status.equals(FOUND) || status.equals(SEE_OTHER) || status.equals(TEMPORARY_REDIRECT); + if (redirectEnabled && isRedirectStatus) { + + if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { + // We must allow 401 handling again. + future.getAndSetAuth(false); + + String location = response.headers().get(HttpHeaders.Names.LOCATION); + URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); + + if (!uri.toString().equals(future.getURI().toString())) { + final RequestBuilder nBuilder = new RequestBuilder(future.getRequest()); + if (config.isRemoveQueryParamOnRedirect()) { + nBuilder.setQueryParameters(null); + } + + // FIXME why not do that for 301 and 307 too? + if ((status.equals(FOUND) || status.equals(SEE_OTHER)) && !(status.equals(FOUND) && config.isStrict302Handling())) { + nBuilder.setMethod(HttpMethod.GET.name()); + } + + // in case of a redirect from HTTP to HTTPS, future attributes might change + final boolean initialConnectionKeepAlive = future.isKeepAlive(); + final String initialPoolKey = channels.getPoolKey(future); + + future.setURI(uri); + String newUrl = uri.toString(); + if (request.getUrl().startsWith(WEBSOCKET)) { + newUrl = newUrl.replace(HTTP, WEBSOCKET); + } + + logger.debug("Redirecting to {}", newUrl); + + for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE)) { + for (Cookie c : CookieDecoder.decode(cookieStr)) { + nBuilder.addOrReplaceCookie(c); + } + } + + for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE2)) { + for (Cookie c : CookieDecoder.decode(cookieStr)) { + nBuilder.addOrReplaceCookie(c); + } + } + + Callback callback = new Callback(future) { + public void call() throws Exception { + if (!(initialConnectionKeepAlive && ctx.channel().isActive() && channels.offerToPool(initialPoolKey, ctx.channel()))) { + channels.finishChannel(ctx); + } + } + }; + + if (HttpHeaders.isTransferEncodingChunked(response)) { + // We must make sure there is no bytes left before + // executing the next request. + // FIXME investigate this + Channels.setDefaultAttribute(ctx, callback); + } else { + // FIXME don't understand: this offers the connection to the pool, or even closes it, while the request has not been sent, right? + callback.call(); + } + + Request target = nBuilder.setUrl(newUrl).build(); + future.setRequest(target); + // FIXME why not reuse the channel is same host? + requestSender.sendNextRequest(target, future); + return true; + } + } else { + throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); + } + } + return false; + } +} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java new file mode 100644 index 0000000000..eee8b91515 --- /dev/null +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java @@ -0,0 +1,221 @@ +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.handler; + +import static io.netty.handler.codec.http.HttpResponseStatus.SWITCHING_PROTOCOLS; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.LastHttpContent; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; + +import java.io.IOException; + +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Request; +import org.asynchttpclient.AsyncHandler.STATE; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.providers.netty.Constants; +import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.request.NettyRequestSender; +import org.asynchttpclient.providers.netty.response.ResponseBodyPart; +import org.asynchttpclient.providers.netty.response.ResponseHeaders; +import org.asynchttpclient.providers.netty.response.ResponseStatus; +import org.asynchttpclient.providers.netty.ws.NettyWebSocket; +import org.asynchttpclient.providers.netty.ws.WebSocketUtil; +import org.asynchttpclient.websocket.WebSocketUpgradeHandler; + +final class WebSocketProtocol extends Protocol { + + private static final byte OPCODE_TEXT = 0x1; + private static final byte OPCODE_BINARY = 0x2; + private static final byte OPCODE_UNKNOWN = -1; + protected byte pendingOpcode = OPCODE_UNKNOWN; + + public WebSocketProtocol(Channels channels, AsyncHttpClientConfig config, NettyRequestSender requestSender) { + super(channels, config, requestSender); + } + + // We don't need to synchronize as replacing the "ws-decoder" will + // process using the same thread. + private void invokeOnSucces(ChannelHandlerContext ctx, WebSocketUpgradeHandler h) { + if (!h.touchSuccess()) { + try { + h.onSuccess(new NettyWebSocket(ctx.channel())); + } catch (Exception ex) { + NettyChannelHandler.LOGGER.warn("onSuccess unexpected exception", ex); + } + } + } + + @Override + public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object e) throws Exception { + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); + Request request = future.getRequest(); + + if (e instanceof HttpResponse) { + HttpResponse response = (HttpResponse) e; + + HttpResponseStatus s = new ResponseStatus(future.getURI(), response); + HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); + + // FIXME there's a method for that IIRC + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(h).request(request).responseStatus(s).responseHeaders(responseHeaders).build(); + for (ResponseFilter asyncFilter : config.getResponseFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + channels.abort(future, efe); + } + } + + // The handler may have been wrapped. + future.setAsyncHandler(fc.getAsyncHandler()); + + // The request has changed + if (fc.replayRequest()) { + requestSender.replayRequest(future, fc, ctx); + return; + } + + future.setHttpResponse(response); + if (redirect(request, future, response, ctx)) + return; + + boolean validStatus = response.getStatus().equals(SWITCHING_PROTOCOLS); + boolean validUpgrade = response.headers().get(HttpHeaders.Names.UPGRADE) != null; + String c = response.headers().get(HttpHeaders.Names.CONNECTION); + if (c == null) { + c = response.headers().get(HttpHeaders.Names.CONNECTION.toLowerCase()); + } + + boolean validConnection = c == null ? false : c.equalsIgnoreCase(HttpHeaders.Values.UPGRADE); + + s = new ResponseStatus(future.getURI(), response); + final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; + + final boolean headerOK = h.onHeadersReceived(responseHeaders) == STATE.CONTINUE; + if (!headerOK || !validStatus || !validUpgrade || !validConnection || !statusReceived) { + channels.abort(future, new IOException("Invalid handshake response")); + return; + } + + String accept = response.headers().get(HttpHeaders.Names.SEC_WEBSOCKET_ACCEPT); + String key = WebSocketUtil.getAcceptKey(future.getNettyRequest().headers().get(HttpHeaders.Names.SEC_WEBSOCKET_KEY)); + if (accept == null || !accept.equals(key)) { + throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); + } + + Channels.upgradePipelineForWebSockets(ctx); + + invokeOnSucces(ctx, h); + future.done(); + + } else if (e instanceof WebSocketFrame) { + + final WebSocketFrame frame = (WebSocketFrame) e; + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + invokeOnSucces(ctx, h); + + if (webSocket != null) { + if (frame instanceof CloseWebSocketFrame) { + Channels.setDefaultAttribute(ctx, DiscardEvent.INSTANCE); + CloseWebSocketFrame closeFrame = CloseWebSocketFrame.class.cast(frame); + webSocket.onClose(closeFrame.statusCode(), closeFrame.reasonText()); + } else { + if (frame instanceof TextWebSocketFrame) { + pendingOpcode = OPCODE_TEXT; + } else if (frame instanceof BinaryWebSocketFrame) { + pendingOpcode = OPCODE_BINARY; + } + + if (frame.content() != null && frame.content().readableBytes() > 0) { + ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), frame.content(), frame.isFinalFragment()); + h.onBodyPartReceived(rp); + + if (pendingOpcode == OPCODE_BINARY) { + webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); + } else { + webSocket.onTextFragment(frame.content().toString(Constants.UTF8), frame.isFinalFragment()); + } + } + } + } else { + NettyChannelHandler.LOGGER.debug("UpgradeHandler returned a null NettyWebSocket "); + } + } else if (e instanceof LastHttpContent) { + // FIXME what to do with this kind of messages? + } else { + NettyChannelHandler.LOGGER.error("Invalid message {}", e); + } + } + + @Override + public void onError(ChannelHandlerContext ctx, Throwable e) { + try { + Object attribute = Channels.getDefaultAttribute(ctx); + NettyChannelHandler.LOGGER.warn("onError {}", e); + if (!(attribute instanceof NettyResponseFuture)) { + return; + } + + NettyResponseFuture nettyResponse = (NettyResponseFuture) attribute; + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + if (webSocket != null) { + webSocket.onError(e.getCause()); + webSocket.close(); + } + } catch (Throwable t) { + NettyChannelHandler.LOGGER.error("onError", t); + } + } + + @Override + public void onClose(ChannelHandlerContext ctx) { + NettyChannelHandler.LOGGER.trace("onClose {}"); + Object attribute = Channels.getDefaultAttribute(ctx); + if (!(attribute instanceof NettyResponseFuture)) { + return; + } + + try { + NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(attribute); + WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); + NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); + + // FIXME How could this test not succeed, attachment is a + // NettyResponseFuture???? + if (attribute != DiscardEvent.INSTANCE) + webSocket.close(1006, "Connection was closed abnormally (that is, with no close frame being sent)."); + } catch (Throwable t) { + NettyChannelHandler.LOGGER.error("onError", t); + } + } +} \ No newline at end of file diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/BodyChunkedInput.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/BodyChunkedInput.java similarity index 97% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/BodyChunkedInput.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/BodyChunkedInput.java index 22d6b15e92..0bfb24ca2f 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/BodyChunkedInput.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/BodyChunkedInput.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.request; import org.asynchttpclient.Body; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/BodyFileRegion.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/BodyFileRegion.java similarity index 97% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/BodyFileRegion.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/BodyFileRegion.java index 7a2db0bd79..3cd6664ebb 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/BodyFileRegion.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/BodyFileRegion.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.request; import io.netty.channel.FileRegion; import io.netty.util.AbstractReferenceCounted; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FeedableBodyGenerator.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/FeedableBodyGenerator.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FeedableBodyGenerator.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/FeedableBodyGenerator.java index 7bcd37442d..95f3e61024 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/FeedableBodyGenerator.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/FeedableBodyGenerator.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.request; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyConnectListener.java similarity index 87% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyConnectListener.java index 052cf816a3..1135547e2d 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyConnectListener.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyConnectListener.java @@ -14,7 +14,7 @@ * under the License. * */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.request; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -27,12 +27,13 @@ import java.net.URI; import java.nio.channels.ClosedChannelException; -import javax.net.ssl.HostnameVerifier; - import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Request; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.future.NettyResponseFutures; import org.asynchttpclient.util.ProxyUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,24 +59,20 @@ public NettyResponseFuture future() { return future; } - private void onFutureSuccess(final Channel channel) throws Exception { + public void onFutureSuccess(final Channel channel) throws ConnectException { Channels.setDefaultAttribute(channel, future); SslHandler sslHandler = Channels.getSslHandler(channel); - if (sslHandler != null) { - // FIXME done on connect or on every request? - HostnameVerifier v = config.getHostnameVerifier(); - if (!v.verify(future.getURI().getHost(), sslHandler.engine().getSession())) { - ConnectException exception = new ConnectException("HostnameVerifier exception."); - future.abort(exception); - throw exception; - } + if (sslHandler != null && !config.getHostnameVerifier().verify(future.getURI().getHost(), sslHandler.engine().getSession())) { + ConnectException exception = new ConnectException("HostnameVerifier exception"); + future.abort(exception); + throw exception; } requestSender.writeRequest(channel, config, future); } - private void onFutureFailure(Channel channel, Throwable cause) throws Exception { + public void onFutureFailure(Channel channel, Throwable cause) { logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", channel, future.canRetry()); if (future.canRetry() && cause != null diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java similarity index 64% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java index 2f0ce718c1..8dd47cbae2 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java @@ -1,12 +1,27 @@ -package org.asynchttpclient.providers.netty4; - -import static org.asynchttpclient.providers.netty4.util.HttpUtil.WEBSOCKET; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.isSecure; +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.request; + +import static org.asynchttpclient.providers.netty.util.HttpUtil.*; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelProgressiveFuture; +import io.netty.channel.DefaultFileRegion; import io.netty.channel.FileRegion; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpMethod; @@ -33,17 +48,24 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Body; import org.asynchttpclient.BodyGenerator; +import org.asynchttpclient.ConnectionPoolKeyStrategy; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.ProxyServer; import org.asynchttpclient.RandomAccessBody; import org.asynchttpclient.Request; import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; import org.asynchttpclient.generators.InputStreamBodyGenerator; import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.listener.TransferCompletionHandler.TransferAdapter; import org.asynchttpclient.multipart.MultipartBody; -import org.asynchttpclient.providers.netty4.FeedableBodyGenerator.FeedListener; +import org.asynchttpclient.providers.netty.Constants; +import org.asynchttpclient.providers.netty.channel.Channels; +import org.asynchttpclient.providers.netty.future.FutureReaper; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.future.NettyResponseFutures; +import org.asynchttpclient.providers.netty.request.FeedableBodyGenerator.FeedListener; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.asynchttpclient.util.ProxyUtils; import org.asynchttpclient.websocket.WebSocketUpgradeHandler; @@ -84,7 +106,7 @@ public boolean retry(Channel channel, NettyResponseFuture future) { LOGGER.debug("Trying to recover request {}\n", future.getNettyRequest()); try { - execute(future.getRequest(), future); + sendNextRequest(future.getRequest(), future); success = true; } catch (IOException iox) { @@ -99,10 +121,32 @@ public boolean retry(Channel channel, NettyResponseFuture future) { return success; } - // FIXME Netty 3: only called from nextRequest, useCache, asyncConnect and - // reclaimCache always passed as true - public void execute(final Request request, final NettyResponseFuture f) throws IOException { - doConnect(request, f.getAsyncHandler(), f, true, true, true); + public boolean applyIoExceptionFiltersAndReplayRequest(ChannelHandlerContext ctx, NettyResponseFuture future, IOException e) throws IOException { + + boolean replayed = false; + + FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(e).build(); + for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { + try { + fc = asyncFilter.filter(fc); + if (fc == null) { + throw new NullPointerException("FilterContext is null"); + } + } catch (FilterException efe) { + channels.abort(future, efe); + } + } + + if (fc.replayRequest()) { + replayRequest(future, fc, ctx); + replayed = true; + } + return replayed; + } + + public void sendNextRequest(final Request request, final NettyResponseFuture f) throws IOException { + // FIXME Why is sendNextRequest always asyncConnect? + sendRequest(request, f.getAsyncHandler(), f, true, true); } // FIXME is this useful? Can't we do that when building the request? @@ -110,105 +154,124 @@ private final boolean validateWebSocketRequest(Request request, AsyncHandler return request.getMethod().equals(HttpMethod.GET.name()) && asyncHandler instanceof WebSocketUpgradeHandler; } - public ListenableFuture doConnect(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture future, boolean useCache, boolean asyncConnect, - boolean reclaimCache) throws IOException { + private Channel getCachedChannel(NettyResponseFuture future, URI uri, ConnectionPoolKeyStrategy poolKeyGen, ProxyServer proxyServer) { - if (closed.get()) { - throw new IOException("Closed"); - } - - if (request.getUrl().startsWith(WEBSOCKET) && !validateWebSocketRequest(request, asyncHandler)) { - throw new IOException("WebSocket method must be a GET"); + if (future != null && future.reuseChannel() && future.channel() != null) { + return future.channel(); + } else { + URI connectionKeyUri = proxyServer != null ? proxyServer.getURI() : uri; + return channels.lookupInCache(connectionKeyUri, poolKeyGen); } + } - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - boolean useProxy = proxyServer != null; + private ListenableFuture sendRequestWithCachedChannel(Channel channel, Request request, URI uri, ProxyServer proxy, NettyResponseFuture future, + AsyncHandler asyncHandler) throws IOException { + HttpRequest nettyRequest = null; - URI uri; - if (config.isUseRawUrl()) { - uri = request.getRawURI(); + if (future == null) { + nettyRequest = NettyRequests.newNettyRequest(config, request, uri, false, proxy); + future = NettyResponseFutures.newNettyResponseFuture(uri, request, asyncHandler, nettyRequest, config, proxy); } else { - uri = request.getURI(); + nettyRequest = NettyRequests.newNettyRequest(config, request, uri, future.isConnectAllowed(), proxy); + future.setNettyRequest(nettyRequest); } - Channel channel = null; + future.setState(NettyResponseFuture.STATE.POOLED); + future.attachChannel(channel, false); + + LOGGER.debug("\nUsing cached Channel {}\n for request \n{}\n", channel, nettyRequest); + Channels.setDefaultAttribute(channel, future); - if (useCache) { - if (future != null && future.reuseChannel() && future.channel() != null) { - channel = future.channel(); + try { + writeRequest(channel, config, future); + } catch (Exception ex) { + LOGGER.debug("writeRequest failure", ex); + if (ex.getMessage() != null && ex.getMessage().contains("SSLEngine")) { + LOGGER.debug("SSLEngine failure", ex); + future = null; } else { - URI connectionKeyUri = useProxy ? proxyServer.getURI() : uri; - channel = channels.lookupInCache(connectionKeyUri, request.getConnectionPoolKeyStrategy()); + try { + asyncHandler.onThrowable(ex); + } catch (Throwable t) { + LOGGER.warn("doConnect.writeRequest()", t); + } + IOException ioe = new IOException(ex.getMessage()); + ioe.initCause(ex); + throw ioe; } } + return future; + } - boolean useSSl = isSecure(uri) && !useProxy; - if (channel != null && channel.isOpen() && channel.isActive()) { - HttpRequest nettyRequest = null; + private ChannelFuture connect(Request request, URI uri, ProxyServer proxy, Bootstrap bootstrap) { + InetSocketAddress remoteAddress; + if (request.getInetAddress() != null) { + remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); + } else if (proxy == null || ProxyUtils.avoidProxy(proxy, uri.getHost())) { + remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); + } else { + remoteAddress = new InetSocketAddress(proxy.getHost(), proxy.getPort()); + } - if (future == null) { - nettyRequest = NettyRequests.newNettyRequest(config, request, uri, false, proxyServer); - future = NettyResponseFutures.newNettyResponseFuture(uri, request, asyncHandler, nettyRequest, config, proxyServer); - } else { - nettyRequest = NettyRequests.newNettyRequest(config, request, uri, future.isConnectAllowed(), proxyServer); - future.setNettyRequest(nettyRequest); - } - future.setState(NettyResponseFuture.STATE.POOLED); - future.attachChannel(channel, false); + if (request.getLocalAddress() != null) { + return bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); + } else { + return bootstrap.connect(remoteAddress); + } + } - LOGGER.debug("\nUsing cached Channel {}\n for request \n{}\n", channel, nettyRequest); - Channels.setDefaultAttribute(channel, future); + private void performSyncConnect(ChannelFuture channelFuture, URI uri, boolean acquiredConnection, NettyConnectListener cl, AsyncHandler asyncHandler) throws IOException { - try { - writeRequest(channel, config, future); - } catch (Exception ex) { - LOGGER.debug("writeRequest failure", ex); - if (useSSl && ex.getMessage() != null && ex.getMessage().contains("SSLEngine")) { - LOGGER.debug("SSLEngine failure", ex); - future = null; - } else { - try { - asyncHandler.onThrowable(ex); - } catch (Throwable t) { - LOGGER.warn("doConnect.writeRequest()", t); - } - IOException ioe = new IOException(ex.getMessage()); - ioe.initCause(ex); - throw ioe; - } + try { + channelFuture.syncUninterruptibly(); + } catch (Throwable t) { + if (t.getCause() != null) + t = t.getCause(); + + ConnectException ce = null; + if (t instanceof ConnectException) + ce = ConnectException.class.cast(t); + else + ce = new ConnectException(t.getMessage()); + + if (acquiredConnection) { + channels.releaseFreeConnections(); } - return future; + channelFuture.cancel(false); + channels.abort(cl.future(), ce); } - // Do not throw an exception when we need an extra connection for a - // redirect. - boolean acquiredConnection = !reclaimCache && channels.acquireConnection(asyncHandler); - - NettyConnectListener cl = new NettyConnectListener.Builder(config, this, request, asyncHandler, future).build(uri); + try { + cl.operationComplete(channelFuture); + } catch (Exception e) { + if (acquiredConnection) { + channels.releaseFreeConnections(); + } + IOException ioe = new IOException(e.getMessage()); + ioe.initCause(e); + try { + asyncHandler.onThrowable(ioe); + } catch (Throwable t) { + LOGGER.warn("c.operationComplete()", t); + } + throw ioe; + } + } - boolean avoidProxy = ProxyUtils.avoidProxy(proxyServer, uri.getHost()); + private ListenableFuture sendRequestWithNewChannel(Request request, URI uri, ProxyServer proxy, NettyResponseFuture future, AsyncHandler asyncHandler, + boolean asyncConnect, boolean reclaimCache) throws IOException { - if (useSSl) { - channels.constructSSLPipeline(cl.future()); - } + boolean useSSl = isSecure(uri) && proxy == null; + // Do not throw an exception when we need an extra connection for a redirect + // FIXME why? This violate the max connection per host handling, right? + boolean acquiredConnection = !reclaimCache && channels.acquireConnection(asyncHandler); Bootstrap bootstrap = channels.getBootstrap(request.getUrl(), useSSl); + NettyConnectListener cl = new NettyConnectListener.Builder(config, this, request, asyncHandler, future).build(uri); + ChannelFuture channelFuture; try { - InetSocketAddress remoteAddress; - if (request.getInetAddress() != null) { - remoteAddress = new InetSocketAddress(request.getInetAddress(), AsyncHttpProviderUtils.getPort(uri)); - } else if (proxyServer == null || avoidProxy) { - remoteAddress = new InetSocketAddress(AsyncHttpProviderUtils.getHost(uri), AsyncHttpProviderUtils.getPort(uri)); - } else { - remoteAddress = new InetSocketAddress(proxyServer.getHost(), proxyServer.getPort()); - } - - if (request.getLocalAddress() != null) { - channelFuture = bootstrap.connect(remoteAddress, new InetSocketAddress(request.getLocalAddress(), 0)); - } else { - channelFuture = bootstrap.connect(remoteAddress); - } + channelFuture = connect(request, uri, proxy, bootstrap); } catch (Throwable t) { if (acquiredConnection) { @@ -220,36 +283,11 @@ public ListenableFuture doConnect(final Request request, final AsyncHandl // FIXME what does it have to do with the presence of a file? if (!asyncConnect && request.getFile() == null) { - int timeOut = config.getConnectionTimeoutInMs() > 0 ? config.getConnectionTimeoutInMs() : Integer.MAX_VALUE; - if (!channelFuture.awaitUninterruptibly(timeOut, TimeUnit.MILLISECONDS)) { - if (acquiredConnection) { - channels.releaseFreeConnections(); - } - // FIXME false or true? - channelFuture.cancel(false); - channels.abort(cl.future(), new ConnectException(String.format("Connect operation to %s timeout %s", uri, timeOut))); - } - - try { - cl.operationComplete(channelFuture); - } catch (Exception e) { - if (acquiredConnection) { - channels.releaseFreeConnections(); - } - IOException ioe = new IOException(e.getMessage()); - ioe.initCause(e); - try { - asyncHandler.onThrowable(ioe); - } catch (Throwable t) { - LOGGER.warn("c.operationComplete()", t); - } - throw ioe; - } + performSyncConnect(channelFuture, uri, acquiredConnection, cl, asyncHandler); } else { channelFuture.addListener(cl); } - // FIXME Why non cached??? LOGGER.debug("\nNon cached request \n{}\n\nusing Channel \n{}\n", cl.future().getNettyRequest(), channelFuture.channel()); if (!cl.future().isCancelled() || !cl.future().isDone()) { @@ -259,6 +297,29 @@ public ListenableFuture doConnect(final Request request, final AsyncHandl return cl.future(); } + public ListenableFuture sendRequest(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture future, boolean asyncConnect, boolean reclaimCache) + throws IOException { + + if (closed.get()) { + throw new IOException("Closed"); + } + + // FIXME really useful? Why not do this check when building the request? + if (request.getUrl().startsWith(WEBSOCKET) && !validateWebSocketRequest(request, asyncHandler)) { + throw new IOException("WebSocket method must be a GET"); + } + + URI uri = config.isUseRawUrl() ? request.getRawURI() : request.getURI(); + ProxyServer proxy = ProxyUtils.getProxyServer(config, request); + Channel channel = getCachedChannel(future, uri, request.getConnectionPoolKeyStrategy(), proxy); + + if (channel != null && channel.isOpen() && channel.isActive()) { + return sendRequestWithCachedChannel(channel, request, uri, proxy, future, asyncHandler); + } else { + return sendRequestWithNewChannel(request, uri, proxy, future, asyncHandler, asyncConnect, reclaimCache); + } + } + private void sendFileBody(Channel channel, File file, NettyResponseFuture future) throws IOException { final RandomAccessFile raf = new RandomAccessFile(file, "r"); @@ -269,10 +330,10 @@ private void sendFileBody(Channel channel, File file, NettyResponseFuture fut if (Channels.getSslHandler(channel) != null) { writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, Constants.MAX_BUFFERED_BYTES), channel.newProgressivePromise()); } else { - // FIXME why not use io.netty.channel.DefaultFileRegion? - FileRegion region = new OptimizedFileRegion(raf, 0, fileLength); + FileRegion region = new DefaultFileRegion(raf.getChannel(), 0, fileLength); writeFuture = channel.write(region, channel.newProgressivePromise()); } + // FIXME probably useless in Netty 4 writeFuture.addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { public void operationComplete(ChannelProgressiveFuture cf) { try { @@ -389,7 +450,7 @@ private void configureTransferAdapter(AsyncHandler handler, HttpRequest netty h.add(entries.getKey(), entries.getValue()); } - TransferCompletionHandler.class.cast(handler).transferAdapter(new TransferAdapter(h)); + TransferCompletionHandler.class.cast(handler).headers(h); } private void scheduleReaper(NettyResponseFuture future) { @@ -410,7 +471,7 @@ private void scheduleReaper(NettyResponseFuture future) { } } - protected final void writeRequest(final Channel channel, final AsyncHttpClientConfig config, final NettyResponseFuture future) { + public final void writeRequest(final Channel channel, final AsyncHttpClientConfig config, final NettyResponseFuture future) { try { // If the channel is dead because it was pooled and the remote // server decided to close it, we just let it go and the @@ -474,8 +535,7 @@ protected final void writeRequest(final Channel channel, final AsyncHttpClie scheduleReaper(future); } - // FIXME Clean up Netty 3: replayRequest's response parameter is unused + - // WTF return??? + // FIXME Clean up Netty 3: replayRequest's response parameter is unused + WTF return??? public void replayRequest(final NettyResponseFuture future, FilterContext fc, ChannelHandlerContext ctx) throws IOException { Request newRequest = fc.getRequest(); future.setAsyncHandler(fc.getAsyncHandler()); @@ -484,6 +544,6 @@ public void replayRequest(final NettyResponseFuture future, FilterContext fc, LOGGER.debug("\n\nReplaying Request {}\n for Future {}\n", newRequest, future); channels.drainChannel(ctx, future); - execute(newRequest, future); + sendNextRequest(newRequest, future); } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java similarity index 92% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java index e41b387115..ad2436db13 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequests.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java @@ -1,8 +1,21 @@ -package org.asynchttpclient.providers.netty4; - -import static org.asynchttpclient.providers.netty4.util.HttpUtil.isNTLM; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.isSecure; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.isWebSocket; +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.request; + +import static org.asynchttpclient.providers.netty.util.HttpUtil.*; import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; import io.netty.buffer.ByteBuf; @@ -32,7 +45,9 @@ import org.asynchttpclient.ntlm.NTLMEngine; import org.asynchttpclient.ntlm.NTLMEngineException; import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieEncoder; -import org.asynchttpclient.providers.netty4.spnego.SpnegoEngine; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProvider; +import org.asynchttpclient.providers.netty.ws.WebSocketUtil; +import org.asynchttpclient.spnego.SpnegoEngine; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.asynchttpclient.util.AuthenticatorUtils; import org.asynchttpclient.util.UTF8UrlEncoder; @@ -145,9 +160,7 @@ else if (uri.getRawQuery() != null) String msg = NTLMEngine.INSTANCE.generateType1Msg("NTLM " + domain, authHost); headers.put(HttpHeaders.Names.AUTHORIZATION, "NTLM " + msg); } catch (NTLMEngineException e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; + throw new IOException(e); } break; case KERBEROS: @@ -157,9 +170,7 @@ else if (uri.getRawQuery() != null) try { challengeHeader = SpnegoEngine.instance().generateToken(server); } catch (Throwable e) { - IOException ie = new IOException(); - ie.initCause(e); - throw ie; + throw new IOException(e); } headers.put(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); break; @@ -257,11 +268,11 @@ else if (uri.getRawQuery() != null) } } else if (request.getParts() != null) { + // FIXME use Netty multipart MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getHeaders()); headers.put(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); headers.put(HttpHeaders.Names.CONTENT_LENGTH, mre.getContentLength()); - hasDeferredContent = true; } else if (request.getFile() != null) { diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/ProgressListener.java similarity index 70% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/ProgressListener.java index 10739dac52..823bbc3a29 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ProgressListener.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/ProgressListener.java @@ -1,4 +1,19 @@ -package org.asynchttpclient.providers.netty4; +/* + * Copyright 2010-2013 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.request; import io.netty.channel.ChannelProgressiveFuture; import io.netty.channel.ChannelProgressiveFutureListener; @@ -10,8 +25,14 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ProgressAsyncHandler; import org.asynchttpclient.Realm; +import org.asynchttpclient.providers.netty.future.NettyResponseFuture; +import org.asynchttpclient.providers.netty.future.NettyResponseFutures; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ProgressListener implements ChannelProgressiveFutureListener { + + private static final Logger LOGGER = LoggerFactory.getLogger(ProgressListener.class); private final AsyncHttpClientConfig config; private final boolean notifyHeaders; @@ -28,32 +49,31 @@ public ProgressListener(AsyncHttpClientConfig config, boolean notifyHeaders, Asy @Override public void operationComplete(ChannelProgressiveFuture cf) { - // FIXME remove this with next 4.0.9: https://github.com/netty/netty/issues/1809 // The write operation failed. If the channel was cached, it means it got asynchronously closed. // Let's retry a second time. Throwable cause = cf.cause(); if (cause != null && future.getState() != NettyResponseFuture.STATE.NEW) { if (cause instanceof IllegalStateException) { - NettyAsyncHttpProvider.LOGGER.debug(cause.getMessage(), cause); + LOGGER.debug(cause.getMessage(), cause); try { cf.channel().close(); } catch (RuntimeException ex) { - NettyAsyncHttpProvider.LOGGER.debug(ex.getMessage(), ex); + LOGGER.debug(ex.getMessage(), ex); } return; } if (cause instanceof ClosedChannelException || NettyResponseFutures.abortOnReadCloseException(cause) || NettyResponseFutures.abortOnWriteCloseException(cause)) { - if (NettyAsyncHttpProvider.LOGGER.isDebugEnabled()) { - NettyAsyncHttpProvider.LOGGER.debug(cf.cause() == null ? "" : cf.cause().getMessage(), cf.cause()); + if (LOGGER.isDebugEnabled()) { + LOGGER.debug(cf.cause() == null ? "" : cf.cause().getMessage(), cf.cause()); } try { cf.channel().close(); } catch (RuntimeException ex) { - NettyAsyncHttpProvider.LOGGER.debug(ex.getMessage(), ex); + LOGGER.debug(ex.getMessage(), ex); } return; } else { @@ -82,7 +102,7 @@ public void operationComplete(ChannelProgressiveFuture cf) { @Override public void operationProgressed(ChannelProgressiveFuture f, long progress, long total) { future.touch(); - if (asyncHandler instanceof ProgressAsyncHandler) { + if (!notifyHeaders && asyncHandler instanceof ProgressAsyncHandler) { long lastProgressValue = lastProgress.getAndSet(progress); ProgressAsyncHandler.class.cast(asyncHandler).onContentWriteProgress(progress - lastProgressValue, progress, total); } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponse.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponse.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java index acf9a994c8..61b5f13671 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyResponse.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.response; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java similarity index 95% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java index 2206317f25..86289d146d 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseBodyPart.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.response; import io.netty.buffer.ByteBuf; @@ -25,7 +25,7 @@ import java.nio.ByteBuffer; import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.providers.netty4.util.ByteBufUtil; +import org.asynchttpclient.providers.netty.util.ByteBufUtil; /** * A callback class used when an HTTP response body is received. diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseHeaders.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java similarity index 97% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseHeaders.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java index f3c02e262d..a024e8a624 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseHeaders.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.response; import io.netty.handler.codec.http.HttpHeaders; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseStatus.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseStatus.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java index ff8f3cd77e..45c7274245 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ResponseStatus.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java @@ -14,7 +14,7 @@ * under the License. * */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.response; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpProvider; diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java deleted file mode 100644 index b0d653391c..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/spnego/SpnegoEngine.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ - -package org.asynchttpclient.providers.netty.spnego; - -import org.asynchttpclient.util.Base64; -import org.ietf.jgss.GSSContext; -import org.ietf.jgss.GSSException; -import org.ietf.jgss.GSSManager; -import org.ietf.jgss.GSSName; -import org.ietf.jgss.Oid; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - -/** - * SPNEGO (Simple and Protected GSSAPI Negotiation Mechanism) authentication - * scheme. - * - * @since 4.1 - */ -public class SpnegoEngine { - private static final String SPNEGO_OID = "1.3.6.1.5.5.2"; - private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; - - private final Logger log = LoggerFactory.getLogger(getClass()); - - private final SpnegoTokenGenerator spnegoGenerator; - - public SpnegoEngine(final SpnegoTokenGenerator spnegoGenerator) { - this.spnegoGenerator = spnegoGenerator; - } - - public SpnegoEngine() { - this(null); - } - - public String generateToken(String server) throws Throwable { - GSSContext gssContext = null; - byte[] token = null; // base64 decoded challenge - Oid negotiationOid = null; - - try { - log.debug("init {}", server); - /* Using the SPNEGO OID is the correct method. - * Kerberos v5 works for IIS but not JBoss. Unwrapping - * the initial token when using SPNEGO OID looks like what is - * described here... - * - * http://msdn.microsoft.com/en-us/library/ms995330.aspx - * - * Another helpful URL... - * - * http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tsec_SPNEGO_token.html - * - * Unfortunately SPNEGO is JRE >=1.6. - */ - - /** Try SPNEGO by default, fall back to Kerberos later if error */ - negotiationOid = new Oid(SPNEGO_OID); - - boolean tryKerberos = false; - try { - GSSManager manager = GSSManager.getInstance(); - GSSName serverName = manager.createName("HTTP@" + server, GSSName.NT_HOSTBASED_SERVICE); - gssContext = manager.createContext( - serverName.canonicalize(negotiationOid), negotiationOid, null, - GSSContext.DEFAULT_LIFETIME); - gssContext.requestMutualAuth(true); - gssContext.requestCredDeleg(true); - } catch (GSSException ex) { - log.error("generateToken", ex); - // BAD MECH means we are likely to be using 1.5, fall back to Kerberos MECH. - // Rethrow any other exception. - if (ex.getMajor() == GSSException.BAD_MECH) { - log.debug("GSSException BAD_MECH, retry with Kerberos MECH"); - tryKerberos = true; - } else { - throw ex; - } - - } - if (tryKerberos) { - /* Kerberos v5 GSS-API mechanism defined in RFC 1964.*/ - log.debug("Using Kerberos MECH {}", KERBEROS_OID); - negotiationOid = new Oid(KERBEROS_OID); - GSSManager manager = GSSManager.getInstance(); - GSSName serverName = manager.createName("HTTP@" + server, GSSName.NT_HOSTBASED_SERVICE); - gssContext = manager.createContext( - serverName.canonicalize(negotiationOid), negotiationOid, null, - GSSContext.DEFAULT_LIFETIME); - gssContext.requestMutualAuth(true); - gssContext.requestCredDeleg(true); - } - - // TODO suspicious: this will always be null because no value has been assigned before. Assign directly? - if (token == null) { - token = new byte[0]; - } - - token = gssContext.initSecContext(token, 0, token.length); - if (token == null) { - throw new Exception("GSS security context initialization failed"); - } - - /* - * IIS accepts Kerberos and SPNEGO tokens. Some other servers Jboss, Glassfish? - * seem to only accept SPNEGO. Below wraps Kerberos into SPNEGO token. - */ - if (spnegoGenerator != null && negotiationOid.toString().equals(KERBEROS_OID)) { - token = spnegoGenerator.generateSpnegoDERObject(token); - } - - gssContext.dispose(); - - String tokenstr = new String(Base64.encode(token)); - log.debug("Sending response '{}' back to the server", tokenstr); - - return tokenstr; - } catch (GSSException gsse) { - log.error("generateToken", gsse); - if (gsse.getMajor() == GSSException.DEFECTIVE_CREDENTIAL - || gsse.getMajor() == GSSException.CREDENTIALS_EXPIRED) - throw new Exception(gsse.getMessage(), gsse); - if (gsse.getMajor() == GSSException.NO_CRED) - throw new Exception(gsse.getMessage(), gsse); - if (gsse.getMajor() == GSSException.DEFECTIVE_TOKEN - || gsse.getMajor() == GSSException.DUPLICATE_TOKEN - || gsse.getMajor() == GSSException.OLD_TOKEN) - throw new Exception(gsse.getMessage(), gsse); - // other error - throw new Exception(gsse.getMessage()); - } catch (IOException ex) { - throw new Exception(ex.getMessage()); - } - } -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/ByteBufUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java similarity index 95% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/ByteBufUtil.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java index 952d787828..fa64563e70 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/ByteBufUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.asynchttpclient.providers.netty4.util; +package org.asynchttpclient.providers.netty.util; import io.netty.buffer.ByteBuf; diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java deleted file mode 100644 index e577d54735..0000000000 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ChannelBufferUtil.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty.util; - -import org.jboss.netty.buffer.ChannelBuffer; - -public class ChannelBufferUtil { - - public static byte[] channelBuffer2bytes(ChannelBuffer b) { - int readable = b.readableBytes(); - int readerIndex = b.readerIndex(); - if (b.hasArray()) { - byte[] array = b.array(); - if (b.arrayOffset() == 0 && readerIndex == 0 && array.length == readable) { - return array; - } - } - byte[] array = new byte[readable]; - b.getBytes(readerIndex, array); - return array; - } -} \ No newline at end of file diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java index 486c61ef32..671da09988 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/CleanupChannelGroup.java @@ -28,17 +28,11 @@ package org.asynchttpclient.providers.netty.util; -import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelFuture; -import org.jboss.netty.channel.group.ChannelGroup; -import org.jboss.netty.channel.group.ChannelGroupFuture; -import org.jboss.netty.channel.group.DefaultChannelGroup; -import org.jboss.netty.channel.group.DefaultChannelGroupFuture; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import io.netty.channel.Channel; +import io.netty.channel.group.ChannelGroupFuture; +import io.netty.channel.group.DefaultChannelGroup; +import io.netty.util.concurrent.GlobalEventExecutor; -import java.util.ArrayList; -import java.util.Collection; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -50,24 +44,20 @@ */ public class CleanupChannelGroup extends DefaultChannelGroup { - private final static Logger logger = LoggerFactory.getLogger(CleanupChannelGroup.class); // internal vars -------------------------------------------------------------------------------------------------- - private final AtomicBoolean closed; - private final ReentrantReadWriteLock lock; + private final AtomicBoolean closed = new AtomicBoolean(false); + private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); // constructors --------------------------------------------------------------------------------------------------- public CleanupChannelGroup() { - this.closed = new AtomicBoolean(false); - this.lock = new ReentrantReadWriteLock(); + super(GlobalEventExecutor.INSTANCE); } public CleanupChannelGroup(String name) { - super(name); - this.closed = new AtomicBoolean(false); - this.lock = new ReentrantReadWriteLock(); + super(name, GlobalEventExecutor.INSTANCE); } // DefaultChannelGroup -------------------------------------------------------------------------------------------- @@ -80,9 +70,11 @@ public ChannelGroupFuture close() { // First time close() is called. return super.close(); } else { - Collection futures = new ArrayList(); - logger.debug("CleanupChannelGroup Already closed"); - return new DefaultChannelGroupFuture(ChannelGroup.class.cast(this), futures); + // FIXME DefaultChannelGroupFuture is package protected +// Collection futures = new ArrayList(); +// logger.debug("CleanupChannelGroup already closed"); +// return new DefaultChannelGroupFuture(ChannelGroup.class.cast(this), futures, GlobalEventExecutor.INSTANCE); + throw new UnsupportedOperationException("CleanupChannelGroup already closed"); } } finally { this.lock.writeLock().unlock(); diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/HttpUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/HttpUtil.java similarity index 94% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/HttpUtil.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/HttpUtil.java index cf6b49a3a6..5889de9ea5 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/HttpUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/HttpUtil.java @@ -1,4 +1,4 @@ -package org.asynchttpclient.providers.netty4.util; +package org.asynchttpclient.providers.netty.util; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws/NettyWebSocket.java similarity index 71% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws/NettyWebSocket.java index f4a4a8dd76..77e32b998f 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyWebSocket.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws/NettyWebSocket.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.ws; import org.asynchttpclient.websocket.WebSocket; import org.asynchttpclient.websocket.WebSocketByteListener; @@ -45,74 +45,74 @@ public NettyWebSocket(Channel channel) { this.channel = channel; } - // @Override + @Override public WebSocket sendMessage(byte[] message) { channel.writeAndFlush(new BinaryWebSocketFrame(wrappedBuffer(message))); return this; } - // @Override + @Override public WebSocket stream(byte[] fragment, boolean last) { throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } - // @Override + @Override public WebSocket stream(byte[] fragment, int offset, int len, boolean last) { throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } - // @Override + @Override public WebSocket sendTextMessage(String message) { channel.writeAndFlush(new TextWebSocketFrame(message)); return this; } - // @Override + @Override public WebSocket streamText(String fragment, boolean last) { throw new UnsupportedOperationException("Streaming currently only supported by the Grizzly provider."); } - // @Override + @Override public WebSocket sendPing(byte[] payload) { channel.writeAndFlush(new PingWebSocketFrame(wrappedBuffer(payload))); return this; } - // @Override + @Override public WebSocket sendPong(byte[] payload) { channel.writeAndFlush(new PongWebSocketFrame(wrappedBuffer(payload))); return this; } - // @Override + @Override public WebSocket addWebSocketListener(WebSocketListener l) { listeners.add(l); return this; } - // @Override + @Override public WebSocket removeWebSocketListener(WebSocketListener l) { listeners.remove(l); return this; } public int getMaxBufferSize() { - return maxBufferSize; + return maxBufferSize; } - + public void setMaxBufferSize(int bufferSize) { - maxBufferSize = bufferSize; - - if(maxBufferSize < 8192) - maxBufferSize = 8192; + maxBufferSize = bufferSize; + + if (maxBufferSize < 8192) + maxBufferSize = 8192; } - - // @Override + + @Override public boolean isOpen() { return channel.isOpen(); } - // @Override + @Override public void close() { onClose(); listeners.clear(); @@ -124,7 +124,6 @@ public void close() { } } - // @Override public void close(int statusCode, String reason) { onClose(statusCode, reason); listeners.clear(); @@ -136,31 +135,30 @@ public void close(int statusCode, String reason) { } } - protected void onBinaryFragment(byte[] message, boolean last) { + public void onBinaryFragment(byte[] message, boolean last) { for (WebSocketListener l : listeners) { if (l instanceof WebSocketByteListener) { try { - WebSocketByteListener.class.cast(l).onFragment(message,last); - - if(byteBuffer == null) { - byteBuffer = new ByteArrayOutputStream(); - } - - byteBuffer.write(message); - - if(byteBuffer.size() > maxBufferSize) { - Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); + WebSocketByteListener.class.cast(l).onFragment(message, last); + + if (byteBuffer == null) { + byteBuffer = new ByteArrayOutputStream(); + } + + byteBuffer.write(message); + + if (byteBuffer.size() > maxBufferSize) { + Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); l.onError(e); - this.close(); - return; - } - - - if(last) { - WebSocketByteListener.class.cast(l).onMessage(byteBuffer.toByteArray()); - byteBuffer = null; - textBuffer = null; - } + this.close(); + return; + } + + if (last) { + WebSocketByteListener.class.cast(l).onMessage(byteBuffer.toByteArray()); + byteBuffer = null; + textBuffer = null; + } } catch (Exception ex) { l.onError(ex); } @@ -168,30 +166,30 @@ protected void onBinaryFragment(byte[] message, boolean last) { } } - protected void onTextFragment(String message, boolean last) { + public void onTextFragment(String message, boolean last) { for (WebSocketListener l : listeners) { if (l instanceof WebSocketTextListener) { try { - WebSocketTextListener.class.cast(l).onFragment(message,last); - - if(textBuffer == null) { - textBuffer = new StringBuilder(); - } - - textBuffer.append(message); - - if(textBuffer.length() > maxBufferSize) { - Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); + WebSocketTextListener.class.cast(l).onFragment(message, last); + + if (textBuffer == null) { + textBuffer = new StringBuilder(); + } + + textBuffer.append(message); + + if (textBuffer.length() > maxBufferSize) { + Exception e = new Exception("Exceeded Netty Web Socket maximum buffer size of " + getMaxBufferSize()); l.onError(e); - this.close(); - return; - } - - if(last) { - WebSocketTextListener.class.cast(l).onMessage(textBuffer.toString()); - byteBuffer = null; - textBuffer = null; - } + this.close(); + return; + } + + if (last) { + WebSocketTextListener.class.cast(l).onMessage(textBuffer.toString()); + byteBuffer = null; + textBuffer = null; + } } catch (Exception ex) { l.onError(ex); } @@ -199,7 +197,7 @@ protected void onTextFragment(String message, boolean last) { } } - protected void onError(Throwable t) { + public void onError(Throwable t) { for (WebSocketListener l : listeners) { try { l.onError(t); @@ -210,11 +208,11 @@ protected void onError(Throwable t) { } } - protected void onClose() { + public void onClose() { onClose(1000, "Normal closure; the connection successfully completed whatever purpose for which it was created."); } - protected void onClose(int code, String reason) { + public void onClose(int code, String reason) { for (WebSocketListener l : listeners) { try { if (l instanceof WebSocketCloseCodeReasonListener) { @@ -229,8 +227,6 @@ protected void onClose(int code, String reason) { @Override public String toString() { - return "NettyWebSocket{" + - "channel=" + channel + - '}'; + return "NettyWebSocket{" + "channel=" + channel + '}'; } } diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/WebSocketUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws/WebSocketUtil.java similarity index 98% rename from providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/WebSocketUtil.java rename to providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws/WebSocketUtil.java index 5c92684365..3321677f48 100644 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/WebSocketUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/ws/WebSocketUtil.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package org.asynchttpclient.providers.netty4; +package org.asynchttpclient.providers.netty.ws; import org.asynchttpclient.util.Base64; diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java index c55b13996c..4ceea15708 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderTest.java @@ -12,16 +12,8 @@ */ package org.asynchttpclient.providers.netty; -import static org.testng.Assert.assertEquals; - -import java.util.concurrent.Executors; - -import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; -import org.testng.annotations.Test; - import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; public class NettyAsyncHttpProviderTest extends AbstractBasicTest { @@ -30,19 +22,4 @@ public class NettyAsyncHttpProviderTest extends AbstractBasicTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - - @Test - public void bossThreadPoolExecutor() throws Exception { - NettyAsyncHttpProviderConfig conf = new NettyAsyncHttpProviderConfig(); - conf.setBossExecutorService(Executors.newSingleThreadExecutor()); - - AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder().setAsyncHttpClientProviderConfig(conf).build(); - AsyncHttpClient c = getAsyncHttpClient(cf); - try { - Response r = c.prepareGet(getTargetUrl()).execute().get(); - assertEquals(r.getStatusCode(), 200); - } finally { - c.close(); - } - } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java index d422b202ac..3ef9a5b966 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderBasicTest.java @@ -12,15 +12,11 @@ */ package org.asynchttpclient.providers.netty; -import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; -import org.testng.annotations.Test; - import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.async.AsyncProvidersBasicTest; -@Test public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { @Override @@ -29,9 +25,9 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } @Override - protected AsyncHttpProviderConfig getProviderConfig() { + protected AsyncHttpProviderConfig getProviderConfig() { final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); - config.addProperty("tcpNoDelay", true); + config.addProperty("TCP_NODELAY", true); return config; } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java index 87c313345d..ab0a698ad6 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncProviderPipelineTest.java @@ -14,6 +14,10 @@ package org.asynchttpclient.providers.netty; import static org.testng.Assert.*; +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.http.HttpMessage; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -24,24 +28,28 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.channel.ChannelPipeline; -import org.jboss.netty.channel.ChannelPipelineFactory; -import org.jboss.netty.channel.MessageEvent; -import org.jboss.netty.channel.SimpleChannelHandler; -import org.jboss.netty.handler.codec.http.HttpMessage; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig.AdditionalChannelInitializer; import org.testng.annotations.Test; public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return new AsyncHttpClient(new CopyEncodingNettyAsyncHttpProvider(config), config); + return NettyProviderUtil.nettyProvider(config); } @Test(groups = { "standalone", "netty_provider" }) public void asyncPipelineTest() throws Exception { - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).build()); + + NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); + nettyConfig.setHttpAdditionalChannelInitializer(new AdditionalChannelInitializer() { + public void initChannel(Channel ch) throws Exception { + // super.initPlainChannel(ch); + ch.pipeline().addBefore("inflater", "copyEncodingHeader", new CopyEncodingHandler()); + } + }); + AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAsyncHttpClientProviderConfig(nettyConfig).build()); + try { final CountDownLatch l = new CountDownLatch(1); Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); @@ -65,35 +73,17 @@ public Response onCompleted(Response response) throws Exception { } } - private static class CopyEncodingNettyAsyncHttpProvider extends - NettyAsyncHttpProvider { - public CopyEncodingNettyAsyncHttpProvider(AsyncHttpClientConfig config) { - super(config); - } - - protected ChannelPipelineFactory createPlainPipelineFactory() { - final ChannelPipelineFactory pipelineFactory = super.createPlainPipelineFactory(); - return new ChannelPipelineFactory() { - public ChannelPipeline getPipeline() throws Exception { - ChannelPipeline pipeline = pipelineFactory.getPipeline(); - pipeline.addBefore("inflater", "copyEncodingHeader", new CopyEncodingHandler()); - return pipeline; - } - }; - } - } - - private static class CopyEncodingHandler extends SimpleChannelHandler { + private static class CopyEncodingHandler extends ChannelInboundHandlerAdapter { @Override - public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { - Object msg = e.getMessage(); - if (msg instanceof HttpMessage) { - HttpMessage m = (HttpMessage) msg; - // for test there is no Content-Encoding header so just hard coding value + public void channelRead(ChannelHandlerContext ctx, Object e) { + if (e instanceof HttpMessage) { + HttpMessage m = (HttpMessage) e; + // for test there is no Content-Encoding header so just hard + // coding value // for verification - m.setHeader("X-Original-Content-Encoding", ""); + m.headers().set("X-Original-Content-Encoding", ""); } - ctx.sendUpstream(e); + ctx.fireChannelRead(e); } } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java index 812a04e0fe..e679303540 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java @@ -13,12 +13,7 @@ package org.asynchttpclient.providers.netty; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.providers.netty.NettyResponse; -import org.asynchttpclient.providers.netty.ResponseStatus; -import org.testng.annotations.Test; +import static org.testng.Assert.*; import java.text.SimpleDateFormat; import java.util.Date; @@ -26,8 +21,12 @@ import java.util.Locale; import java.util.TimeZone; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.providers.netty.response.NettyResponse; +import org.asynchttpclient.providers.netty.response.ResponseStatus; +import org.testng.annotations.Test; /** * @author Benjamin Hanzelmann @@ -44,7 +43,7 @@ public void testCookieParseExpires() { final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); NettyResponse - response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); @@ -61,7 +60,7 @@ public FluentCaseInsensitiveStringsMap getHeaders() { @Test(groups = "standalone") public void testCookieParseMaxAge() { final String cookieDef = "efmembercheck=true; max-age=60; path=/; domain=.eclipse.org"; - NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + NettyResponse response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); @@ -77,7 +76,7 @@ public FluentCaseInsensitiveStringsMap getHeaders() { @Test(groups = "standalone") public void testCookieParseWeirdExpiresValue() { final String cookieDef = "efmembercheck=true; expires=60; path=/; domain=.eclipse.org"; - NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders(null, null, false) { + NettyResponse response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java index 61a633e002..1056d502fa 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAuthTimeoutTest.java @@ -22,5 +22,4 @@ public class NettyAuthTimeoutTest extends AuthTimeoutTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java index 2e0a4091fc..69dfb34b78 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyBasicAuthTest.java @@ -15,9 +15,7 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.BasicAuthTest; -import org.testng.annotations.Test; -@Test public class NettyBasicAuthTest extends BasicAuthTest { @Override @@ -29,9 +27,4 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { public String getProviderClass() { return NettyAsyncHttpProvider.class.getName(); } - - @Test(enabled = false) - public void stringBuilderBodyConsumerTest() throws Exception { - // FIXME - } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java index 945761d5e1..11e6d709b6 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyConnectionPoolTest.java @@ -12,14 +12,11 @@ */ package org.asynchttpclient.providers.netty; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; +import static org.testng.Assert.*; +import io.netty.channel.Channel; import java.util.concurrent.TimeUnit; -import org.jboss.netty.channel.Channel; - import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.ConnectionsPool; diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java index 4989481508..fdbfb52d13 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyMultipartUploadTest.java @@ -15,12 +15,10 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.async.MultipartUploadTest; -import org.testng.annotations.Test; /** * @author dominict */ -@Test public class NettyMultipartUploadTest extends MultipartUploadTest { @Override diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java index c4692cb476..ff4eef3f1c 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyPerRequestTimeoutTest.java @@ -12,7 +12,7 @@ */ package org.asynchttpclient.providers.netty; -import static org.testng.Assert.assertTrue; +import static org.testng.Assert.*; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java index 499e0025c4..983076d728 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyProviderUtil.java @@ -21,16 +21,9 @@ public class NettyProviderUtil { public static AsyncHttpClient nettyProvider(AsyncHttpClientConfig config) { - // FIXME why do tests fail with this set up? Seems like we have a race condition - // if (config == null) { - // config = new AsyncHttpClientConfig.Builder().build(); - // } - // return new AsyncHttpClient(new NettyAsyncHttpProvider(config), config); - if (config == null) { - return new AsyncHttpClient(); - } else { - return new AsyncHttpClient(config); + config = new AsyncHttpClientConfig.Builder().build(); } + return new AsyncHttpClient(new NettyAsyncHttpProvider(config), config); } } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java index 6ca05960ab..01f53bffa9 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyRequestThrottleTimeoutTest.java @@ -12,11 +12,11 @@ */ package org.asynchttpclient.providers.netty; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; +import static org.testng.Assert.*; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; @@ -27,17 +27,16 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.eclipse.jetty.continuation.Continuation; -import org.eclipse.jetty.continuation.ContinuationSupport; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; - import org.asynchttpclient.AsyncCompletionHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; import org.asynchttpclient.async.AbstractBasicTest; +import org.eclipse.jetty.continuation.Continuation; +import org.eclipse.jetty.continuation.ContinuationSupport; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { private static final String MSG = "Enough is enough."; @@ -80,11 +79,12 @@ public void run() { public void testRequestTimeout() throws IOException { final Semaphore requestThrottle = new Semaphore(1); - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true).setMaximumConnectionsTotal(1).build()); + final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true) + .setMaximumConnectionsTotal(1).build()); try { final CountDownLatch latch = new CountDownLatch(2); + final List tooManyConnections = Collections.synchronizedList(new ArrayList(2)); - final List tooManyConnections = new ArrayList(2); for (int i = 0; i < 2; i++) { new Thread(new Runnable() { @@ -119,7 +119,6 @@ public void onThrowable(Throwable t) { } }).start(); - } try { @@ -128,7 +127,7 @@ public void onThrowable(Throwable t) { fail("failed to wait for requests to complete"); } - assertTrue(tooManyConnections.size() == 0, "Should not have any connection errors where too many connections have been attempted"); + assertTrue(tooManyConnections.isEmpty(), "Should not have any connection errors where too many connections have been attempted"); } finally { client.close(); } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java index 6169dc0fe3..09f89010cd 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java @@ -40,7 +40,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -// FIXME there's no retry actually +//FIXME there's no retry actually public class RetryNonBlockingIssue extends AbstractBasicTest { @Override @@ -52,9 +52,11 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { public void setUpGlobal() throws Exception { port1 = findFreePort(); server = newJettyHttpServer(port1); + ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); context.addServlet(new ServletHolder(new MockExceptionServlet()), "/*"); + server.setHandler(context); server.start(); } @@ -138,7 +140,7 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - assertEquals(200, theres.getStatusCode()); + assertEquals(theres.getStatusCode(), 200); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -179,7 +181,7 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut StringBuilder b = new StringBuilder(); for (ListenableFuture r : res) { Response theres = r.get(); - assertEquals(200, theres.getStatusCode()); + assertEquals(theres.getStatusCode(), 200); b.append("==============\r\n"); b.append("Response Headers\r\n"); Map> heads = theres.getHeaders(); @@ -188,7 +190,8 @@ public void testRetryBlocking() throws IOException, InterruptedException, Execut assertTrue(heads.size() > 0); } - logger.debug(b.toString()); + System.out.println(b.toString()); + System.out.flush(); } finally { client.close(); diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java index 63b875480c..185ffb1806 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyRedirectTest.java @@ -15,7 +15,6 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.providers.netty.NettyProviderUtil; -import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.RedirectTest; public class NettyRedirectTest extends RedirectTest { @@ -24,5 +23,4 @@ public class NettyRedirectTest extends RedirectTest { public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { return NettyProviderUtil.nettyProvider(config); } - } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java index cb35f53be2..c1286255ad 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/websocket/NettyTextMessageTest.java @@ -16,9 +16,7 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.providers.netty.NettyProviderUtil; import org.asynchttpclient.websocket.TextMessageTest; -import org.testng.annotations.Test; -@Test public class NettyTextMessageTest extends TextMessageTest { @Override public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { diff --git a/providers/netty4/pom.xml b/providers/netty4/pom.xml deleted file mode 100644 index 90a29ea432..0000000000 --- a/providers/netty4/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - org.asynchttpclient - async-http-client-providers-parent - 2.0.0-SNAPSHOT - - 4.0.0 - async-http-client-netty4-provider - Asynchronous Http Client Netty 4 Provider - - The Async Http Client Netty 4 Provider. - - - - - sonatype-releases - https://oss.sonatype.org/content/repositories/releases - - true - - - false - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - - - - io.netty - netty-all - 4.0.9.Final - - - org.javassist - javassist - 3.18.0-GA - - - - \ No newline at end of file diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java deleted file mode 100644 index a17fc9e1e5..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProvider.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2010-2013 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty4; - -import java.io.IOException; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; - -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.Request; -import org.asynchttpclient.Response; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class NettyAsyncHttpProvider implements AsyncHttpProvider { - - static final Logger LOGGER = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); - - private final AsyncHttpClientConfig config; - private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; - private final AtomicBoolean closed = new AtomicBoolean(false); - private final Channels channels; - private final NettyRequestSender requestSender; - private final NettyChannelHandler channelHandler; - private final boolean executeConnectAsync; - - public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { - - this.config = config; - if (config.getAsyncHttpProviderConfig() instanceof NettyAsyncHttpProviderConfig) { - asyncHttpProviderConfig = NettyAsyncHttpProviderConfig.class.cast(config.getAsyncHttpProviderConfig()); - } else { - asyncHttpProviderConfig = new NettyAsyncHttpProviderConfig(); - } - - channels = new Channels(config, asyncHttpProviderConfig); - requestSender = new NettyRequestSender(closed, config, channels); - channelHandler = new NettyChannelHandler(config, requestSender, channels, closed); - channels.configure(channelHandler); - - executeConnectAsync = asyncHttpProviderConfig.isAsyncConnect(); - // FIXME - // if (!executeConnectAsync) { - // DefaultChannelFuture.setUseDeadLockChecker(true); - // } - } - - @Override - public String toString() { - return String.format("NettyAsyncHttpProvider4:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", config.getMaxTotalConnections() - - channels.freeConnections.availablePermits(), channels.openChannels.toString(), channels.connectionsPool.toString()); - } - - @Override - public void close() { - closed.set(true); - try { - channels.close(); -// config.executorService().shutdown(); - config.reaper().shutdown(); - } catch (Throwable t) { - LOGGER.warn("Unexpected error on close", t); - } - } - - @Override - public Response prepareResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, final List bodyParts) { - throw new UnsupportedOperationException("Mocked, should be refactored"); - } - - @Override - public ListenableFuture execute(Request request, final AsyncHandler asyncHandler) throws IOException { - return requestSender.doConnect(request, asyncHandler, null, true, executeConnectAsync, false); - } -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java deleted file mode 100644 index be8aa75d44..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderConfig.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - */ -package org.asynchttpclient.providers.netty4; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelOption; -import io.netty.channel.EventLoopGroup; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import org.asynchttpclient.AsyncHttpProviderConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This class can be used to pass Netty's internal configuration options. See Netty documentation for more information. - */ -public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig { - - private final static Logger LOGGER = LoggerFactory.getLogger(NettyAsyncHttpProviderConfig.class); - - /** - * Use Netty's blocking IO stategy. - */ - private boolean useBlockingIO; - - /** - * Allow configuring the Netty's event loop. - */ - private EventLoopGroup eventLoopGroup; - - private AdditionalChannelInitializer httpAdditionalChannelInitializer; - private AdditionalChannelInitializer wsAdditionalChannelInitializer; - private AdditionalChannelInitializer httpsAdditionalChannelInitializer; - private AdditionalChannelInitializer wssAdditionalChannelInitializer; - - /** - * Execute the connect operation asynchronously. - */ - private boolean asyncConnect; - - /** - * HttpClientCodec's maxInitialLineLength - */ - private int maxInitialLineLength = 4096; - - /** - * HttpClientCodec's maxHeaderSize - */ - private int maxHeaderSize = 8192; - - /** - * HttpClientCodec's maxChunkSize - */ - private int maxChunkSize = 8192; - - /** - * Use direct {@link java.nio.ByteBuffer} - */ - public final static String USE_DIRECT_BYTEBUFFER = "bufferFactory"; - - /** - * Allow nested request from any {@link org.asynchttpclient.AsyncHandler} - */ - public final static String DISABLE_NESTED_REQUEST = "disableNestedRequest"; - - /** - * See {@link java.net.Socket#setReuseAddress(boolean)} - */ - public final static String REUSE_ADDRESS = ChannelOption.SO_REUSEADDR.name(); - - private final Map properties = new HashMap(); - - public NettyAsyncHttpProviderConfig() { - properties.put(REUSE_ADDRESS, Boolean.FALSE); - } - - /** - * Add a property that will be used when the AsyncHttpClient initialize its {@link org.asynchttpclient.AsyncHttpProvider} - * - * @param name - * the name of the property - * @param value - * the value of the property - * @return this instance of AsyncHttpProviderConfig - */ - public NettyAsyncHttpProviderConfig addProperty(String name, Object value) { - - if (name.equals(REUSE_ADDRESS) && value == Boolean.TRUE && System.getProperty("os.name").toLowerCase().contains("win")) { - LOGGER.warn("Can't enable {} on Windows", REUSE_ADDRESS); - } else { - properties.put(name, value); - } - - return this; - } - - /** - * Return the value associated with the property's name - * - * @param name - * @return this instance of AsyncHttpProviderConfig - */ - public Object getProperty(String name) { - return properties.get(name); - } - - /** - * Remove the value associated with the property's name - * - * @param name - * @return true if removed - */ - public Object removeProperty(String name) { - return properties.remove(name); - } - - /** - * Return the curent entry set. - * - * @return a the curent entry set. - */ - public Set> propertiesSet() { - return properties.entrySet(); - } - - public boolean isUseBlockingIO() { - return useBlockingIO; - } - - public void setUseBlockingIO(boolean useBlockingIO) { - this.useBlockingIO = useBlockingIO; - } - - public EventLoopGroup getEventLoopGroup() { - return eventLoopGroup; - } - - public void setEventLoopGroup(EventLoopGroup eventLoopGroup) { - this.eventLoopGroup = eventLoopGroup; - } - - public boolean isAsyncConnect() { - return asyncConnect; - } - - public void setAsyncConnect(boolean asyncConnect) { - this.asyncConnect = asyncConnect; - } - - public int getMaxInitialLineLength() { - return maxInitialLineLength; - } - - public void setMaxInitialLineLength(int maxInitialLineLength) { - this.maxInitialLineLength = maxInitialLineLength; - } - - public int getMaxHeaderSize() { - return maxHeaderSize; - } - - public void setMaxHeaderSize(int maxHeaderSize) { - this.maxHeaderSize = maxHeaderSize; - } - - public int getMaxChunkSize() { - return maxChunkSize; - } - - public void setMaxChunkSize(int maxChunkSize) { - this.maxChunkSize = maxChunkSize; - } - - public AdditionalChannelInitializer getHttpAdditionalChannelInitializer() { - return httpAdditionalChannelInitializer; - } - - public void setHttpAdditionalChannelInitializer(AdditionalChannelInitializer httpAdditionalChannelInitializer) { - this.httpAdditionalChannelInitializer = httpAdditionalChannelInitializer; - } - - public AdditionalChannelInitializer getWsAdditionalChannelInitializer() { - return wsAdditionalChannelInitializer; - } - - public void setWsAdditionalChannelInitializer(AdditionalChannelInitializer wsAdditionalChannelInitializer) { - this.wsAdditionalChannelInitializer = wsAdditionalChannelInitializer; - } - - public AdditionalChannelInitializer getHttpsAdditionalChannelInitializer() { - return httpsAdditionalChannelInitializer; - } - - public void setHttpsAdditionalChannelInitializer(AdditionalChannelInitializer httpsAdditionalChannelInitializer) { - this.httpsAdditionalChannelInitializer = httpsAdditionalChannelInitializer; - } - - public AdditionalChannelInitializer getWssAdditionalChannelInitializer() { - return wssAdditionalChannelInitializer; - } - - public void setWssAdditionalChannelInitializer(AdditionalChannelInitializer wssAdditionalChannelInitializer) { - this.wssAdditionalChannelInitializer = wssAdditionalChannelInitializer; - } - - public static interface AdditionalChannelInitializer { - - void initChannel(Channel ch) throws Exception; - } -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java deleted file mode 100644 index 484a8b694b..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java +++ /dev/null @@ -1,873 +0,0 @@ -package org.asynchttpclient.providers.netty4; - -import static io.netty.handler.codec.http.HttpResponseStatus.*; -import static org.asynchttpclient.providers.netty4.util.HttpUtil.*; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandler.Sharable; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.handler.codec.PrematureChannelClosureException; -import io.netty.handler.codec.http.HttpClientCodec; -import io.netty.handler.codec.http.HttpContent; -import io.netty.handler.codec.http.HttpHeaders; -import io.netty.handler.codec.http.HttpMethod; -import io.netty.handler.codec.http.HttpRequest; -import io.netty.handler.codec.http.HttpResponse; -import io.netty.handler.codec.http.LastHttpContent; -import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; -import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import io.netty.handler.codec.http.websocketx.WebSocketFrame; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URI; -import java.nio.channels.ClosedChannelException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map.Entry; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicReference; - -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHandler.STATE; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.MaxRedirectException; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Realm; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; -import org.asynchttpclient.filter.IOExceptionFilter; -import org.asynchttpclient.filter.ResponseFilter; -import org.asynchttpclient.ntlm.NTLMEngine; -import org.asynchttpclient.ntlm.NTLMEngineException; -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; -import org.asynchttpclient.providers.netty4.spnego.SpnegoEngine; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.websocket.WebSocketUpgradeHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Sharable -public class NettyChannelHandler extends ChannelInboundHandlerAdapter { - - private static final Logger LOGGER = LoggerFactory.getLogger(NettyChannelHandler.class); - - private final AsyncHttpClientConfig config; - private final NettyRequestSender requestSender; - private final Channels channels; - private final AtomicBoolean closed; - private final Protocol httpProtocol = new HttpProtocol(); - private final Protocol webSocketProtocol = new WebSocketProtocol(); - - public NettyChannelHandler(AsyncHttpClientConfig config, NettyRequestSender requestSender, Channels channels, AtomicBoolean isClose) { - this.config = config; - this.requestSender = requestSender; - this.channels = channels; - this.closed = isClose; - } - - @Override - public void channelRead(final ChannelHandlerContext ctx, Object e) throws Exception { - - Object attribute = Channels.getDefaultAttribute(ctx); - - if (attribute instanceof Callback) { - Callback ac = (Callback) attribute; - if (e instanceof LastHttpContent || !(e instanceof HttpContent)) { - ac.call(); - Channels.setDefaultAttribute(ctx, DiscardEvent.INSTANCE); - } - - } else if (attribute instanceof NettyResponseFuture) { - Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); - NettyResponseFuture future = (NettyResponseFuture) attribute; - - p.handle(ctx, future, e); - - } else if (attribute != DiscardEvent.INSTANCE) { - try { - LOGGER.trace("Closing an orphan channel {}", ctx.channel()); - ctx.channel().close(); - } catch (Throwable t) { - } - } - } - - public void channelInactive(ChannelHandlerContext ctx) throws Exception { - - if (closed.get()) { - return; - } - - try { - super.channelInactive(ctx); - } catch (Exception ex) { - LOGGER.trace("super.channelClosed", ex); - } - - channels.removeFromPool(ctx); - Object attachment = Channels.getDefaultAttribute(ctx); - LOGGER.debug("Channel Closed: {} with attachment {}", ctx.channel(), attachment); - - if (attachment instanceof Callback) { - Callback callback = (Callback) attachment; - Channels.setDefaultAttribute(ctx, callback.future()); - callback.call(); - - } else if (attachment instanceof NettyResponseFuture) { - NettyResponseFuture future = NettyResponseFuture.class.cast(attachment); - future.touch(); - - if (!config.getIOExceptionFilters().isEmpty() && applyIoExceptionFiltersAndReplayRequest(ctx, future, new IOException("Channel Closed"))) { - return; - } - - Protocol p = (ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol); - p.onClose(ctx); - - if (future != null && !future.isDone() && !future.isCancelled()) { - if (!requestSender.retry(ctx.channel(), future)) { - channels.abort(future, new IOException("Remotely Closed")); - } - } else { - channels.closeChannel(ctx); - } - } - } - - @Override - public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Exception { - Channel channel = ctx.channel(); - Throwable cause = e.getCause() != null ? e.getCause() : e; - NettyResponseFuture future = null; - - if (cause instanceof PrematureChannelClosureException) { - return; - } - - LOGGER.debug("Unexpected I/O exception on channel {}", channel, cause); - - try { - if (cause instanceof ClosedChannelException) { - return; - } - - Object attribute = Channels.getDefaultAttribute(ctx); - if (attribute instanceof NettyResponseFuture) { - future = (NettyResponseFuture) attribute; - future.attachChannel(null, false); - future.touch(); - - if (cause instanceof IOException) { - - // FIXME why drop the original exception and create a new - // one? - if (!config.getIOExceptionFilters().isEmpty()) { - if (applyIoExceptionFiltersAndReplayRequest(ctx, future, new IOException("Channel Closed"))) { - return; - } - } else { - // Close the channel so the recovering can occurs. - try { - ctx.channel().close(); - } catch (Throwable t) { - // Swallow. - } - return; - } - } - - if (NettyResponseFutures.abortOnReadCloseException(cause) || NettyResponseFutures.abortOnWriteCloseException(cause)) { - LOGGER.debug("Trying to recover from dead Channel: {}", channel); - return; - } - } else if (attribute instanceof Callback) { - future = Callback.class.cast(attribute).future(); - } - } catch (Throwable t) { - cause = t; - } - - if (future != null) { - try { - LOGGER.debug("Was unable to recover Future: {}", future); - channels.abort(future, cause); - } catch (Throwable t) { - LOGGER.error(t.getMessage(), t); - } - } - - Protocol protocol = ctx.pipeline().get(HttpClientCodec.class) != null ? httpProtocol : webSocketProtocol; - protocol.onError(ctx, e); - - channels.closeChannel(ctx); - // FIXME not really sure - // ctx.fireChannelRead(e); - ctx.close(); - } - - private boolean applyIoExceptionFiltersAndReplayRequest(ChannelHandlerContext ctx, NettyResponseFuture future, IOException e) throws IOException { - - boolean replayed = false; - - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()).request(future.getRequest()).ioException(e).build(); - for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { - try { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - channels.abort(future, efe); - } - } - - if (fc.replayRequest()) { - requestSender.replayRequest(future, fc, ctx); - replayed = true; - } - return replayed; - } - - private boolean redirect(Request request, NettyResponseFuture future, HttpResponse response, final ChannelHandlerContext ctx) throws Exception { - - io.netty.handler.codec.http.HttpResponseStatus status = response.getStatus(); - boolean redirectEnabled = request.isRedirectOverrideSet() ? request.isRedirectEnabled() : config.isRedirectEnabled(); - boolean isRedirectStatus = status.equals(MOVED_PERMANENTLY) || status.equals(FOUND) || status.equals(SEE_OTHER) || status.equals(TEMPORARY_REDIRECT); - if (redirectEnabled && isRedirectStatus) { - - if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) { - // We must allow 401 handling again. - future.getAndSetAuth(false); - - String location = response.headers().get(HttpHeaders.Names.LOCATION); - URI uri = AsyncHttpProviderUtils.getRedirectUri(future.getURI(), location); - - if (!uri.toString().equals(future.getURI().toString())) { - final RequestBuilder nBuilder = new RequestBuilder(future.getRequest()); - if (config.isRemoveQueryParamOnRedirect()) { - nBuilder.setQueryParameters(null); - } - - // FIXME why not do that for 301 and 307 too? - if ((status.equals(FOUND) || status.equals(SEE_OTHER)) && !(status.equals(FOUND) && config.isStrict302Handling())) { - nBuilder.setMethod(HttpMethod.GET.name()); - } - - // in case of a redirect from HTTP to HTTPS, future attributes might change - final boolean initialConnectionKeepAlive = future.isKeepAlive(); - final String initialPoolKey = channels.getPoolKey(future); - - future.setURI(uri); - String newUrl = uri.toString(); - if (request.getUrl().startsWith(WEBSOCKET)) { - newUrl = newUrl.replace(HTTP, WEBSOCKET); - } - LOGGER.debug("Redirecting to {}", newUrl); - - for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE)) { - for (Cookie c : CookieDecoder.decode(cookieStr)) { - nBuilder.addOrReplaceCookie(c); - } - } - - for (String cookieStr : future.getHttpResponse().headers().getAll(HttpHeaders.Names.SET_COOKIE2)) { - for (Cookie c : CookieDecoder.decode(cookieStr)) { - nBuilder.addOrReplaceCookie(c); - } - } - - Callback callback = new Callback(future) { - public void call() throws Exception { - if (!(initialConnectionKeepAlive && ctx.channel().isActive() && channels.offerToPool(initialPoolKey, ctx.channel()))) { - channels.finishChannel(ctx); - } - } - }; - - if (HttpHeaders.isTransferEncodingChunked(response)) { - // We must make sure there is no bytes left before - // executing the next request. - // FIXME investigate this - Channels.setDefaultAttribute(ctx, callback); - } else { - // FIXME don't understand: this offers the connection to the pool, or even closes it, while the request has not been sent, right? - callback.call(); - } - - Request target = nBuilder.setUrl(newUrl).build(); - future.setRequest(target); - requestSender.execute(target, future); - return true; - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } - return false; - } - - private final class HttpProtocol implements Protocol { - - private Realm kerberosChallenge(List proxyAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, - NettyResponseFuture future) throws NTLMEngineException { - - URI uri = request.getURI(); - String host = request.getVirtualHost() == null ? AsyncHttpProviderUtils.getHost(uri) : request.getVirtualHost(); - String server = proxyServer == null ? host : proxyServer.getHost(); - try { - String challengeHeader = SpnegoEngine.instance().generateToken(server); - headers.remove(HttpHeaders.Names.AUTHORIZATION); - headers.add(HttpHeaders.Names.AUTHORIZATION, "Negotiate " + challengeHeader); - - Realm.RealmBuilder realmBuilder; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm); - } else { - realmBuilder = new Realm.RealmBuilder(); - } - return realmBuilder.setUri(uri.getRawPath()).setMethodName(request.getMethod()).setScheme(Realm.AuthScheme.KERBEROS).build(); - } catch (Throwable throwable) { - if (isNTLM(proxyAuth)) { - return ntlmChallenge(proxyAuth, request, proxyServer, headers, realm, future); - } - channels.abort(future, throwable); - return null; - } - } - - private Realm ntlmChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, - NettyResponseFuture future) throws NTLMEngineException { - - boolean useRealm = (proxyServer == null && realm != null); - - String ntlmDomain = useRealm ? realm.getNtlmDomain() : proxyServer.getNtlmDomain(); - String ntlmHost = useRealm ? realm.getNtlmHost() : proxyServer.getHost(); - String principal = useRealm ? realm.getPrincipal() : proxyServer.getPrincipal(); - String password = useRealm ? realm.getPassword() : proxyServer.getPassword(); - - Realm newRealm; - if (realm != null && !realm.isNtlmMessageType2Received()) { - String challengeHeader = NTLMEngine.INSTANCE.generateType1Msg(ntlmDomain, ntlmHost); - - URI uri = request.getURI(); - headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(uri.getRawPath()).setMethodName(request.getMethod()) - .setNtlmMessageType2Received(true).build(); - future.getAndSetAuth(false); - } else { - addType3NTLMAuthorizationHeader(wwwAuth, headers, principal, password, ntlmDomain, ntlmHost); - - Realm.RealmBuilder realmBuilder; - Realm.AuthScheme authScheme; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm); - authScheme = realm.getAuthScheme(); - } else { - realmBuilder = new Realm.RealmBuilder(); - authScheme = Realm.AuthScheme.NTLM; - } - newRealm = realmBuilder.setScheme(authScheme).setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); - } - - return newRealm; - } - - private Realm ntlmProxyChallenge(List wwwAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, - NettyResponseFuture future) throws NTLMEngineException { - future.getAndSetAuth(false); - headers.remove(HttpHeaders.Names.PROXY_AUTHORIZATION); - - addType3NTLMAuthorizationHeader(wwwAuth, headers, proxyServer.getPrincipal(), proxyServer.getPassword(), proxyServer.getNtlmDomain(), proxyServer.getHost()); - - Realm newRealm; - Realm.RealmBuilder realmBuilder; - if (realm != null) { - realmBuilder = new Realm.RealmBuilder().clone(realm); - } else { - realmBuilder = new Realm.RealmBuilder(); - } - newRealm = realmBuilder// .setScheme(realm.getAuthScheme()) - .setUri(request.getURI().getPath()).setMethodName(request.getMethod()).build(); - - return newRealm; - } - - private void addType3NTLMAuthorizationHeader(List auth, FluentCaseInsensitiveStringsMap headers, String username, String password, String domain, String workstation) - throws NTLMEngineException { - headers.remove(HttpHeaders.Names.AUTHORIZATION); - - if (isNTLM(auth)) { - String serverChallenge = auth.get(0).trim().substring("NTLM ".length()); - String challengeHeader = NTLMEngine.INSTANCE.generateType3Msg(username, password, domain, workstation, serverChallenge); - - headers.add(HttpHeaders.Names.AUTHORIZATION, "NTLM " + challengeHeader); - } - } - - private List getAuthorizationToken(Iterable> list, String headerAuth) { - ArrayList l = new ArrayList(); - for (Entry e : list) { - if (e.getKey().equalsIgnoreCase(headerAuth)) { - l.add(e.getValue().trim()); - } - } - return l; - } - - private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { - if (lastValidChunk && future.isKeepAlive()) { - channels.drainChannel(ctx, future); - } else { - if (future.isKeepAlive() && ctx.channel().isActive() && channels.offerToPool(channels.getPoolKey(future), ctx.channel())) { - markAsDone(future, ctx); - return; - } - channels.finishChannel(ctx); - } - markAsDone(future, ctx); - } - - private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { - boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; - if (c.closeUnderlyingConnection()) { - future.setKeepAlive(false); - } - return state; - } - - private void markAsDone(final NettyResponseFuture future, final ChannelHandlerContext ctx) throws MalformedURLException { - // We need to make sure everything is OK before adding the - // connection back to the pool. - try { - future.done(); - } catch (Throwable t) { - // Never propagate exception once we know we are done. - LOGGER.debug(t.getMessage(), t); - } - - if (!future.isKeepAlive() || !ctx.channel().isActive()) { - channels.closeChannel(ctx); - } - } - - private boolean applyResponseFiltersAndReplayRequest(ChannelHandlerContext ctx, NettyResponseFuture future, HttpResponseStatus status, HttpResponseHeaders responseHeaders) - throws IOException { - - boolean replayed = false; - - AsyncHandler handler = future.getAsyncHandler(); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(future.getRequest()).responseStatus(status).responseHeaders(responseHeaders) - .build(); - - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - try { - fc = asyncFilter.filter(fc); - // FIXME Is it work protecting against this? - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - channels.abort(future, efe); - } - } - - // The handler may have been wrapped. - handler = fc.getAsyncHandler(); - future.setAsyncHandler(handler); - - // The request has changed - if (fc.replayRequest()) { - requestSender.replayRequest(future, fc, ctx); - replayed = true; - } - return replayed; - } - - private boolean handleResponseAndExit(final ChannelHandlerContext ctx, final NettyResponseFuture future, AsyncHandler handler, HttpRequest nettyRequest, - ProxyServer proxyServer, HttpResponse response) throws Exception { - Request request = future.getRequest(); - int statusCode = response.getStatus().code(); - HttpResponseStatus status = new ResponseStatus(future.getURI(), response); - HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); - final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); - final RequestBuilder builder = new RequestBuilder(future.getRequest()); - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - - // store the original headers so we can re-send all them to - // the handler in case of trailing headers - future.setHttpResponse(response); - - future.setKeepAlive(!HttpHeaders.Values.CLOSE.equalsIgnoreCase(response.headers().get(HttpHeaders.Names.CONNECTION))); - - if (!config.getResponseFilters().isEmpty() && applyResponseFiltersAndReplayRequest(ctx, future, status, responseHeaders)) { - return true; - } - - // FIXME handle without returns - if (statusCode == UNAUTHORIZED.code() && realm != null) { - List wwwAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.WWW_AUTHENTICATE); - if (!wwwAuth.isEmpty() && !future.getAndSetAuth(true)) { - future.setState(NettyResponseFuture.STATE.NEW); - Realm newRealm = null; - // NTLM - boolean negociate = wwwAuth.contains("Negotiate"); - if (!wwwAuth.contains("Kerberos") && (isNTLM(wwwAuth) || negociate)) { - newRealm = ntlmChallenge(wwwAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (negociate) { - newRealm = kerberosChallenge(wwwAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) { - return true; - } - } else { - newRealm = new Realm.RealmBuilder().clone(realm).setScheme(realm.getAuthScheme()).setUri(request.getURI().getPath()).setMethodName(request.getMethod()) - .setUsePreemptiveAuth(true).parseWWWAuthenticateHeader(wwwAuth.get(0)).build(); - } - - final Realm nr = new Realm.RealmBuilder().clone(newRealm).setUri(URI.create(request.getUrl()).getPath()).build(); - - LOGGER.debug("Sending authentication to {}", request.getUrl()); - Callback callback = new Callback(future) { - public void call() throws Exception { - channels.drainChannel(ctx, future); - requestSender.execute(builder.setHeaders(headers).setRealm(nr).build(), future); - } - }; - - if (future.isKeepAlive() && HttpHeaders.isTransferEncodingChunked(response)) { - // We must make sure there is no bytes left - // before executing the next request. - Channels.setDefaultAttribute(ctx, callback); - } else { - callback.call(); - } - - return true; - } - - } else if (statusCode == CONTINUE.code()) { - future.getAndSetWriteHeaders(false); - future.getAndSetWriteBody(true); - // FIXME is this necessary - requestSender.writeRequest(ctx.channel(), config, future); - return true; - - } else if (statusCode == PROXY_AUTHENTICATION_REQUIRED.code()) { - List proxyAuth = getAuthorizationToken(response.headers(), HttpHeaders.Names.PROXY_AUTHENTICATE); - if (realm != null && !proxyAuth.isEmpty() && !future.getAndSetAuth(true)) { - LOGGER.debug("Sending proxy authentication to {}", request.getUrl()); - - future.setState(NettyResponseFuture.STATE.NEW); - Realm newRealm = null; - - boolean negociate = proxyAuth.contains("Negotiate"); - if (!proxyAuth.contains("Kerberos") && (isNTLM(proxyAuth) || negociate)) { - newRealm = ntlmProxyChallenge(proxyAuth, request, proxyServer, headers, realm, future); - // SPNEGO KERBEROS - } else if (negociate) { - newRealm = kerberosChallenge(proxyAuth, request, proxyServer, headers, realm, future); - if (newRealm == null) { - return true; - } - } else { - newRealm = future.getRequest().getRealm(); - } - - future.setReuseChannel(true); - future.setConnectAllowed(true); - requestSender.execute(builder.setHeaders(headers).setRealm(newRealm).build(), future); - return true; - } - - } else if (statusCode == OK.code() && nettyRequest.getMethod() == HttpMethod.CONNECT) { - - LOGGER.debug("Connected to {}:{}", proxyServer.getHost(), proxyServer.getPort()); - - if (future.isKeepAlive()) { - future.attachChannel(ctx.channel(), true); - } - - try { - LOGGER.debug("Connecting to proxy {} for scheme {}", proxyServer, request.getUrl()); - channels.upgradeProtocol(ctx.channel().pipeline(), request.getURI().getScheme()); - } catch (Throwable ex) { - channels.abort(future, ex); - } - future.setReuseChannel(true); - future.setConnectAllowed(false); - requestSender.execute(builder.build(), future); - return true; - - } - - if (redirect(request, future, response, ctx)) { - return true; - } - - if (!future.getAndSetStatusReceived(true) && (handler.onStatusReceived(status) != STATE.CONTINUE || handler.onHeadersReceived(responseHeaders) != STATE.CONTINUE)) { - finishUpdate(future, ctx, HttpHeaders.isTransferEncodingChunked(response)); - return true; - } - - return false; - } - - @Override - public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture future, final Object e) throws Exception { - future.touch(); - - // The connect timeout occurred. - if (future.isCancelled() || future.isDone()) { - channels.finishChannel(ctx); - return; - } - - HttpRequest nettyRequest = future.getNettyRequest(); - AsyncHandler handler = future.getAsyncHandler(); - Request request = future.getRequest(); - ProxyServer proxyServer = future.getProxyServer(); - try { - if (e instanceof HttpResponse) { - HttpResponse response = (HttpResponse) e; - LOGGER.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); - future.getPendingResponse().set(response); - return; - } - - if (e instanceof HttpContent) { - - AtomicReference responseRef = future.getPendingResponse(); - HttpResponse response = responseRef.getAndSet(null); - if (handler != null) { - if (response != null && handleResponseAndExit(ctx, future, handler, nettyRequest, proxyServer, response)) { - return; - } - - HttpContent chunk = (HttpContent) e; - - boolean interrupt = false; - boolean last = chunk instanceof LastHttpContent; - - // FIXME - // Netty 3 provider is broken: in case of trailing headers, - // onHeadersReceived should be called before - // updateBodyAndInterrupt - if (last) { - LastHttpContent lastChunk = (LastHttpContent) chunk; - HttpHeaders trailingHeaders = lastChunk.trailingHeaders(); - if (!trailingHeaders.isEmpty()) { - interrupt = handler.onHeadersReceived(new ResponseHeaders(future.getURI(), future.getHttpResponse().headers(), trailingHeaders)) != STATE.CONTINUE; - } - } - - if (!interrupt && chunk.content().readableBytes() > 0) { - // FIXME why - interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk.content(), last)); - } - - if (interrupt || last) { - finishUpdate(future, ctx, !last); - } - } - } - } catch (Exception t) { - if (t instanceof IOException && !config.getIOExceptionFilters().isEmpty() && applyIoExceptionFiltersAndReplayRequest(ctx, future, IOException.class.cast(t))) { - return; - } - - try { - channels.abort(future, t); - } finally { - finishUpdate(future, ctx, false); - throw t; - } - } - } - - @Override - public void onError(ChannelHandlerContext ctx, Throwable error) { - } - - @Override - public void onClose(ChannelHandlerContext ctx) { - } - } - - private final class WebSocketProtocol implements Protocol { - - private static final byte OPCODE_TEXT = 0x1; - private static final byte OPCODE_BINARY = 0x2; - private static final byte OPCODE_UNKNOWN = -1; - protected byte pendingOpcode = OPCODE_UNKNOWN; - - // We don't need to synchronize as replacing the "ws-decoder" will - // process using the same thread. - private void invokeOnSucces(ChannelHandlerContext ctx, WebSocketUpgradeHandler h) { - if (!h.touchSuccess()) { - try { - h.onSuccess(new NettyWebSocket(ctx.channel())); - } catch (Exception ex) { - LOGGER.warn("onSuccess unexpected exception", ex); - } - } - } - - @Override - public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object e) throws Exception { - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(future.getAsyncHandler()); - Request request = future.getRequest(); - - if (e instanceof HttpResponse) { - HttpResponse response = (HttpResponse) e; - - HttpResponseStatus s = new ResponseStatus(future.getURI(), response); - HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); - - // FIXME there's a method for that IIRC - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(h).request(request).responseStatus(s).responseHeaders(responseHeaders).build(); - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - try { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } catch (FilterException efe) { - channels.abort(future, efe); - } - } - - // The handler may have been wrapped. - future.setAsyncHandler(fc.getAsyncHandler()); - - // The request has changed - if (fc.replayRequest()) { - requestSender.replayRequest(future, fc, ctx); - return; - } - - future.setHttpResponse(response); - if (redirect(request, future, response, ctx)) - return; - - boolean validStatus = response.getStatus().equals(SWITCHING_PROTOCOLS); - boolean validUpgrade = response.headers().get(HttpHeaders.Names.UPGRADE) != null; - String c = response.headers().get(HttpHeaders.Names.CONNECTION); - if (c == null) { - c = response.headers().get(HttpHeaders.Names.CONNECTION.toLowerCase()); - } - - boolean validConnection = c == null ? false : c.equalsIgnoreCase(HttpHeaders.Values.UPGRADE); - - s = new ResponseStatus(future.getURI(), response); - final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; - - final boolean headerOK = h.onHeadersReceived(responseHeaders) == STATE.CONTINUE; - if (!headerOK || !validStatus || !validUpgrade || !validConnection || !statusReceived) { - channels.abort(future, new IOException("Invalid handshake response")); - return; - } - - String accept = response.headers().get(HttpHeaders.Names.SEC_WEBSOCKET_ACCEPT); - String key = WebSocketUtil.getAcceptKey(future.getNettyRequest().headers().get(HttpHeaders.Names.SEC_WEBSOCKET_KEY)); - if (accept == null || !accept.equals(key)) { - throw new IOException(String.format("Invalid challenge. Actual: %s. Expected: %s", accept, key)); - } - - Channels.upgradePipelineForWebSockets(ctx); - - invokeOnSucces(ctx, h); - future.done(); - - } else if (e instanceof WebSocketFrame) { - - final WebSocketFrame frame = (WebSocketFrame) e; - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - invokeOnSucces(ctx, h); - - if (webSocket != null) { - if (frame instanceof CloseWebSocketFrame) { - Channels.setDefaultAttribute(ctx, DiscardEvent.INSTANCE); - CloseWebSocketFrame closeFrame = CloseWebSocketFrame.class.cast(frame); - webSocket.onClose(closeFrame.statusCode(), closeFrame.reasonText()); - } else { - if (frame instanceof TextWebSocketFrame) { - pendingOpcode = OPCODE_TEXT; - } else if (frame instanceof BinaryWebSocketFrame) { - pendingOpcode = OPCODE_BINARY; - } - - if (frame.content() != null && frame.content().readableBytes() > 0) { - ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), frame.content(), frame.isFinalFragment()); - h.onBodyPartReceived(rp); - - if (pendingOpcode == OPCODE_BINARY) { - webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); - } else { - webSocket.onTextFragment(frame.content().toString(Constants.UTF8), frame.isFinalFragment()); - } - } - } - } else { - LOGGER.debug("UpgradeHandler returned a null NettyWebSocket "); - } - } else if (e instanceof LastHttpContent) { - // FIXME what to do with this kind of messages? - } else { - LOGGER.error("Invalid message {}", e); - } - } - - @Override - public void onError(ChannelHandlerContext ctx, Throwable e) { - try { - Object attribute = Channels.getDefaultAttribute(ctx); - LOGGER.warn("onError {}", e); - if (!(attribute instanceof NettyResponseFuture)) { - return; - } - - NettyResponseFuture nettyResponse = (NettyResponseFuture) attribute; - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); - - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - if (webSocket != null) { - webSocket.onError(e.getCause()); - webSocket.close(); - } - } catch (Throwable t) { - LOGGER.error("onError", t); - } - } - - @Override - public void onClose(ChannelHandlerContext ctx) { - LOGGER.trace("onClose {}"); - Object attribute = Channels.getDefaultAttribute(ctx); - if (!(attribute instanceof NettyResponseFuture)) { - return; - } - - try { - NettyResponseFuture nettyResponse = NettyResponseFuture.class.cast(attribute); - WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); - NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); - - // FIXME How could this test not succeed, attachment is a - // NettyResponseFuture???? - if (attribute != DiscardEvent.INSTANCE) - webSocket.close(1006, "Connection was closed abnormally (that is, with no close frame being sent)."); - } catch (Throwable t) { - LOGGER.error("onError", t); - } - } - } -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/OptimizedFileRegion.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/OptimizedFileRegion.java deleted file mode 100644 index ee7f9f98fb..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/OptimizedFileRegion.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.asynchttpclient.providers.netty4; - -import io.netty.channel.FileRegion; -import io.netty.util.AbstractReferenceCounted; - -import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.channels.FileChannel; -import java.nio.channels.WritableByteChannel; - -public class OptimizedFileRegion extends AbstractReferenceCounted implements FileRegion { - - private final FileChannel file; - private final RandomAccessFile raf; - private final long position; - private final long count; - private long byteWritten; - - public OptimizedFileRegion(RandomAccessFile raf, long position, long count) { - this.raf = raf; - this.file = raf.getChannel(); - this.position = position; - this.count = count; - } - - public long position() { - return position; - } - - public long count() { - return count; - } - - public long transfered() { - return byteWritten; - } - - public long transferTo(WritableByteChannel target, long position) throws IOException { - long count = this.count - position; - if (count < 0 || position < 0) { - throw new IllegalArgumentException("position out of range: " + position + " (expected: 0 - " + (this.count - 1) + ")"); - } - if (count == 0) { - return 0L; - } - - long bw = file.transferTo(this.position + position, count, target); - byteWritten += bw; - if (byteWritten == raf.length()) { - deallocate(); - } - return bw; - } - - public void deallocate() { - try { - file.close(); - } catch (IOException e) { - NettyAsyncHttpProvider.LOGGER.warn("Failed to close a file.", e); - } - - try { - raf.close(); - } catch (IOException e) { - NettyAsyncHttpProvider.LOGGER.warn("Failed to close a file.", e); - } - } -} \ No newline at end of file diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java deleted file mode 100644 index 57445877e8..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Protocol.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import io.netty.channel.ChannelHandlerContext; - -public interface Protocol{ - - void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object message) throws Exception; - - void onError(ChannelHandlerContext ctx, Throwable error); - - void onClose(ChannelHandlerContext ctx); -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ThreadLocalBoolean.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ThreadLocalBoolean.java deleted file mode 100644 index 90b67893ee..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/ThreadLocalBoolean.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.asynchttpclient.providers.netty4; - -public class ThreadLocalBoolean extends ThreadLocal { - - private final boolean defaultValue; - - public ThreadLocalBoolean() { - this(false); - } - - public ThreadLocalBoolean(boolean defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - protected Boolean initialValue() { - return defaultValue ? Boolean.TRUE : Boolean.FALSE; - } -} \ No newline at end of file diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoTokenGenerator.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoTokenGenerator.java deleted file mode 100644 index be2d720842..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/spnego/SpnegoTokenGenerator.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * ==================================================================== - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.asynchttpclient.providers.netty4.spnego; - -import java.io.IOException; - -/** - * Abstract SPNEGO token generator. Implementations should take an Kerberos ticket and transform - * into a SPNEGO token. - *

- * Implementations of this interface are expected to be thread-safe. - * - * @since 4.1 - */ -public interface SpnegoTokenGenerator { - - byte[] generateSpnegoDERObject(byte[] kerberosTicket) throws IOException; - -} diff --git a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/CleanupChannelGroup.java b/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/CleanupChannelGroup.java deleted file mode 100644 index 2de4e4d7aa..0000000000 --- a/providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/util/CleanupChannelGroup.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -/* - * Copyright 2010 Bruno de Carvalho - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.asynchttpclient.providers.netty4.util; - -import io.netty.channel.Channel; -//import io.netty.channel.ChannelFuture; -//import io.netty.channel.group.ChannelGroup; -import io.netty.channel.group.ChannelGroupFuture; -import io.netty.channel.group.DefaultChannelGroup; -import io.netty.util.concurrent.GlobalEventExecutor; - -//import java.util.ArrayList; -//import java.util.Collection; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.locks.ReentrantReadWriteLock; - -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; - -/** - * Extension of {@link DefaultChannelGroup} that's used mainly as a cleanup container, where {@link #close()} is only - * supposed to be called once. - * - * @author Bruno de Carvalho - */ -public class CleanupChannelGroup extends DefaultChannelGroup { - -// private final static Logger logger = LoggerFactory.getLogger(CleanupChannelGroup.class); - - // internal vars -------------------------------------------------------------------------------------------------- - - private final AtomicBoolean closed = new AtomicBoolean(false); - private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); - - // constructors --------------------------------------------------------------------------------------------------- - - public CleanupChannelGroup() { - super(GlobalEventExecutor.INSTANCE); - } - - public CleanupChannelGroup(String name) { - super(name, GlobalEventExecutor.INSTANCE); - } - - // DefaultChannelGroup -------------------------------------------------------------------------------------------- - - @Override - public ChannelGroupFuture close() { - this.lock.writeLock().lock(); - try { - if (!this.closed.getAndSet(true)) { - // First time close() is called. - return super.close(); - } else { - // FIXME DefaultChannelGroupFuture is package protected -// Collection futures = new ArrayList(); -// logger.debug("CleanupChannelGroup already closed"); -// return new DefaultChannelGroupFuture(ChannelGroup.class.cast(this), futures, GlobalEventExecutor.INSTANCE); - throw new UnsupportedOperationException("CleanupChannelGroup already closed"); - } - } finally { - this.lock.writeLock().unlock(); - } - } - - @Override - public boolean add(Channel channel) { - // Synchronization must occur to avoid add() and close() overlap (thus potentially leaving one channel open). - // This could also be done by synchronizing the method itself but using a read lock here (rather than a - // synchronized() block) allows multiple concurrent calls to add(). - this.lock.readLock().lock(); - try { - if (this.closed.get()) { - // Immediately close channel, as close() was already called. - channel.close(); - return false; - } - - return super.add(channel); - } finally { - this.lock.readLock().unlock(); - } - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java deleted file mode 100644 index 177e28611a..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncHttpProviderTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.AbstractBasicTest; - -public class NettyAsyncHttpProviderTest extends AbstractBasicTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderBasicTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderBasicTest.java deleted file mode 100644 index 113366e944..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderBasicTest.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig; -import org.testng.annotations.Test; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProviderConfig; -import org.asynchttpclient.async.AsyncProvidersBasicTest; - -@Test -public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - @Override - protected AsyncHttpProviderConfig getProviderConfig() { - final NettyAsyncHttpProviderConfig config = new NettyAsyncHttpProviderConfig(); - config.addProperty("TCP_NODELAY", true); - return config; - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java deleted file mode 100644 index c670f5dfa6..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncProviderPipelineTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.netty4; - -import static org.testng.Assert.*; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.handler.codec.http.HttpMessage; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.async.AbstractBasicTest; -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProviderConfig.AdditionalChannelInitializer; -import org.testng.annotations.Test; - -public class NettyAsyncProviderPipelineTest extends AbstractBasicTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - @Test(groups = { "standalone", "netty_provider" }) - public void asyncPipelineTest() throws Exception { - - NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); - nettyConfig.setHttpAdditionalChannelInitializer(new AdditionalChannelInitializer() { - public void initChannel(Channel ch) throws Exception { - // super.initPlainChannel(ch); - ch.pipeline().addBefore("inflater", "copyEncodingHeader", new CopyEncodingHandler()); - } - }); - AsyncHttpClient p = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAsyncHttpClientProviderConfig(nettyConfig).build()); - - try { - final CountDownLatch l = new CountDownLatch(1); - Request request = new RequestBuilder("GET").setUrl(getTargetUrl()).build(); - p.executeRequest(request, new AsyncCompletionHandlerAdapter() { - @Override - public Response onCompleted(Response response) throws Exception { - try { - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getHeader("X-Original-Content-Encoding"), ""); - } finally { - l.countDown(); - } - return response; - } - }).get(); - if (!l.await(TIMEOUT, TimeUnit.SECONDS)) { - fail("Timeout out"); - } - } finally { - p.close(); - } - } - - private static class CopyEncodingHandler extends ChannelInboundHandlerAdapter { - @Override - public void channelRead(ChannelHandlerContext ctx, Object e) { - if (e instanceof HttpMessage) { - HttpMessage m = (HttpMessage) e; - // for test there is no Content-Encoding header so just hard - // coding value - // for verification - m.headers().set("X-Original-Content-Encoding", ""); - } - ctx.fireChannelRead(e); - } - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncResponseTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncResponseTest.java deleted file mode 100644 index 653a89ceef..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncResponseTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.Cookie; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.providers.netty4.NettyResponse; -import org.asynchttpclient.providers.netty4.ResponseStatus; -import org.testng.annotations.Test; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.Locale; -import java.util.TimeZone; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - -/** - * @author Benjamin Hanzelmann - */ -public class NettyAsyncResponseTest { - - @Test(groups = "standalone") - public void testCookieParseExpires() { - // e.g. "Sun, 06-Feb-2012 03:45:24 GMT"; - SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US); - sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - - Date date = new Date(System.currentTimeMillis() + 60000); // sdf.parse( dateString ); - final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); - - NettyResponse - response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { - @Override - public FluentCaseInsensitiveStringsMap getHeaders() { - return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); - } - }, null); - - List cookies = response.getCookies(); - assertEquals(cookies.size(), 1); - - Cookie cookie = cookies.get(0); - assertTrue(cookie.getMaxAge() > 55 && cookie.getMaxAge() < 61, ""); - } - - @Test(groups = "standalone") - public void testCookieParseMaxAge() { - final String cookieDef = "efmembercheck=true; max-age=60; path=/; domain=.eclipse.org"; - NettyResponse response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { - @Override - public FluentCaseInsensitiveStringsMap getHeaders() { - return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); - } - }, null); - List cookies = response.getCookies(); - assertEquals(cookies.size(), 1); - - Cookie cookie = cookies.get(0); - assertEquals(cookie.getMaxAge(), 60); - } - - @Test(groups = "standalone") - public void testCookieParseWeirdExpiresValue() { - final String cookieDef = "efmembercheck=true; expires=60; path=/; domain=.eclipse.org"; - NettyResponse response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { - @Override - public FluentCaseInsensitiveStringsMap getHeaders() { - return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); - } - }, null); - - List cookies = response.getCookies(); - assertEquals(cookies.size(), 1); - - Cookie cookie = cookies.get(0); - assertEquals(cookie.getMaxAge(), 60); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamHandlerTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamHandlerTest.java deleted file mode 100644 index cd292b06c1..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamHandlerTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.AsyncStreamHandlerTest; - -public class NettyAsyncStreamHandlerTest extends AsyncStreamHandlerTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamLifecycleTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamLifecycleTest.java deleted file mode 100644 index acba9b815f..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAsyncStreamLifecycleTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.AsyncStreamLifecycleTest; - -public class NettyAsyncStreamLifecycleTest extends AsyncStreamLifecycleTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java deleted file mode 100644 index d49325760f..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyAuthTimeoutTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.AuthTimeoutTest; -import org.testng.annotations.Test; - -@Test -public class NettyAuthTimeoutTest extends AuthTimeoutTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java deleted file mode 100644 index 971fe6b107..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicAuthTest.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.BasicAuthTest; -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProvider; - -public class NettyBasicAuthTest extends BasicAuthTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - @Override - public String getProviderClass() { - return NettyAsyncHttpProvider.class.getName(); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicHttpsTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicHttpsTest.java deleted file mode 100644 index 31a20c5278..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBasicHttpsTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.BasicHttpsTest; - -public class NettyBasicHttpsTest extends BasicHttpsTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyChunkTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyChunkTest.java deleted file mode 100644 index 4cd124390f..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyChunkTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.BodyChunkTest; - -public class NettyBodyChunkTest extends BodyChunkTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyDeferringAsyncHandlerTest.java deleted file mode 100644 index 0a8e231014..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyBodyDeferringAsyncHandlerTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.BodyDeferringAsyncHandlerTest; - -public class NettyBodyDeferringAsyncHandlerTest extends BodyDeferringAsyncHandlerTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyByteBufferCapacityTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyByteBufferCapacityTest.java deleted file mode 100644 index b87ff9d130..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyByteBufferCapacityTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ByteBufferCapacityTest; - -public class NettyByteBufferCapacityTest extends ByteBufferCapacityTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyChunkingTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyChunkingTest.java deleted file mode 100644 index bc36fc0546..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyChunkingTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ChunkingTest; - -public class NettyChunkingTest extends ChunkingTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyComplexClientTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyComplexClientTest.java deleted file mode 100644 index f36fa3f814..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyComplexClientTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ComplexClientTest; - -public class NettyComplexClientTest extends ComplexClientTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyConnectionPoolTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyConnectionPoolTest.java deleted file mode 100644 index 1db87da20b..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyConnectionPoolTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertNull; - -import java.util.concurrent.TimeUnit; - -import io.netty.channel.Channel; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ConnectionsPool; -import org.asynchttpclient.async.ConnectionPoolTest; - -public class NettyConnectionPoolTest extends ConnectionPoolTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - @Override - public void testInvalidConnectionsPool() { - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return false; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return false; - } - - public void destroy() { - - } - }; - - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); - try { - Exception exception = null; - try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; - } - assertNotNull(exception); - assertEquals(exception.getMessage(), "Too many connections -1"); - } finally { - client.close(); - } - } - - @Override - public void testValidConnectionsPool() { - ConnectionsPool cp = new ConnectionsPool() { - - public boolean offer(String key, Channel connection) { - return true; - } - - public Channel poll(String connection) { - return null; - } - - public boolean removeAll(Channel connection) { - return false; - } - - public boolean canCacheConnection() { - return true; - } - - public void destroy() { - - } - }; - - AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setConnectionsPool(cp).build()); - try { - Exception exception = null; - try { - client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); - } catch (Exception ex) { - ex.printStackTrace(); - exception = ex; - } - assertNull(exception); - } finally { - client.close(); - } - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyDigestAuthTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyDigestAuthTest.java deleted file mode 100644 index 25d0771169..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyDigestAuthTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.DigestAuthTest; - -public class NettyDigestAuthTest extends DigestAuthTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyEmptyBodyTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyEmptyBodyTest.java deleted file mode 100644 index 5c7f89ef2e..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyEmptyBodyTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.EmptyBodyTest; - -public class NettyEmptyBodyTest extends EmptyBodyTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyErrorResponseTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyErrorResponseTest.java deleted file mode 100644 index ed3a02549b..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyErrorResponseTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ErrorResponseTest; - -public class NettyErrorResponseTest extends ErrorResponseTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyExpect100ContinueTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyExpect100ContinueTest.java deleted file mode 100644 index 62d52429e8..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyExpect100ContinueTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.Expect100ContinueTest; - -public class NettyExpect100ContinueTest extends Expect100ContinueTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilePartLargeFileTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilePartLargeFileTest.java deleted file mode 100644 index 02c459157e..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilePartLargeFileTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.FilePartLargeFileTest; - -public class NettyFilePartLargeFileTest extends FilePartLargeFileTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilterTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilterTest.java deleted file mode 100644 index bb0ea1fed4..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFilterTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.FilterTest; - -public class NettyFilterTest extends FilterTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFollowingThreadTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFollowingThreadTest.java deleted file mode 100644 index 4461d5ef06..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyFollowingThreadTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.FollowingThreadTest; - -public class NettyFollowingThreadTest extends FollowingThreadTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHead302Test.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHead302Test.java deleted file mode 100644 index d4c13d3206..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHead302Test.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.Head302Test; - -public class NettyHead302Test extends Head302Test { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHostnameVerifierTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHostnameVerifierTest.java deleted file mode 100644 index f5051ec05c..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHostnameVerifierTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.HostnameVerifierTest; - -public class NettyHostnameVerifierTest extends HostnameVerifierTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHttpToHttpsRedirectTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHttpToHttpsRedirectTest.java deleted file mode 100644 index 89cf0d322a..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyHttpToHttpsRedirectTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.HttpToHttpsRedirectTest; - -public class NettyHttpToHttpsRedirectTest extends HttpToHttpsRedirectTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyIdleStateHandlerTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyIdleStateHandlerTest.java deleted file mode 100644 index 107cb8b0d5..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyIdleStateHandlerTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.IdleStateHandlerTest; - -public class NettyIdleStateHandlerTest extends IdleStateHandlerTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyInputStreamTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyInputStreamTest.java deleted file mode 100644 index 1d271ee4ff..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyInputStreamTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.InputStreamTest; - -public class NettyInputStreamTest extends InputStreamTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyListenableFutureTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyListenableFutureTest.java deleted file mode 100644 index cce436950d..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyListenableFutureTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ListenableFutureTest; - -public class NettyListenableFutureTest extends ListenableFutureTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxConnectionsInThreads.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxConnectionsInThreads.java deleted file mode 100644 index 593bb71bb8..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxConnectionsInThreads.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2010-2012 Sonatype, Inc. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * and Apache License v2.0 which accompanies this distribution. - * The Eclipse Public License is available at - * http://www.eclipse.org/legal/epl-v10.html - * The Apache License v2.0 is available at - * http://www.apache.org/licenses/LICENSE-2.0.html - * You may elect to redistribute this code under either of these licenses. - *******************************************************************************/ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.MaxConnectionsInThreads; - -public class NettyMaxConnectionsInThreads extends MaxConnectionsInThreads { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxTotalConnectionTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxTotalConnectionTest.java deleted file mode 100644 index 5aef28ba4c..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMaxTotalConnectionTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.MaxTotalConnectionTest; - -public class NettyMaxTotalConnectionTest extends MaxTotalConnectionTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipartUploadTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipartUploadTest.java deleted file mode 100644 index ff5a2028bb..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipartUploadTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.MultipartUploadTest; - -/** - * @author dominict - */ -public class NettyMultipartUploadTest extends MultipartUploadTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipleHeaderTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipleHeaderTest.java deleted file mode 100644 index 8cb91eae98..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyMultipleHeaderTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.MultipleHeaderTest; - -public class NettyMultipleHeaderTest extends MultipleHeaderTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNoNullResponseTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNoNullResponseTest.java deleted file mode 100644 index d74dc2d284..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNoNullResponseTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.NoNullResponseTest; - -public class NettyNoNullResponseTest extends NoNullResponseTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNonAsciiContentLengthTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNonAsciiContentLengthTest.java deleted file mode 100644 index 098f63c3cb..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyNonAsciiContentLengthTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.NonAsciiContentLengthTest; - -public class NettyNonAsciiContentLengthTest extends NonAsciiContentLengthTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyParamEncodingTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyParamEncodingTest.java deleted file mode 100644 index 380dbeb710..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyParamEncodingTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ParamEncodingTest; - -public class NettyParamEncodingTest extends ParamEncodingTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestRelative302Test.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestRelative302Test.java deleted file mode 100644 index c8a45f3c34..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestRelative302Test.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.PerRequestRelative302Test; - -public class NettyPerRequestRelative302Test extends PerRequestRelative302Test { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestTimeoutTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestTimeoutTest.java deleted file mode 100644 index 4b669e81f9..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPerRequestTimeoutTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import static org.testng.Assert.assertTrue; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.PerRequestTimeoutTest; - -public class NettyPerRequestTimeoutTest extends PerRequestTimeoutTest { - - @Override - protected void checkTimeoutMessage(String message) { - assertTrue(message - .startsWith("Request reached time out of 100 ms after ")); - } - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostRedirectGetTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostRedirectGetTest.java deleted file mode 100644 index 6c434178b4..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostRedirectGetTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.PostRedirectGetTest; - -public class NettyPostRedirectGetTest extends PostRedirectGetTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostWithQSTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostWithQSTest.java deleted file mode 100644 index 44850262f6..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPostWithQSTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.PostWithQSTest; - -public class NettyPostWithQSTest extends PostWithQSTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTest.java deleted file mode 100644 index b5cae8cefa..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ProxyTest; - -public class NettyProxyTest extends ProxyTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java deleted file mode 100644 index 736b9d3699..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyProxyTunnellingTest.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ProxyTunnellingTest; -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProvider; - -public class NettyProxyTunnellingTest extends ProxyTunnellingTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - public String getProviderClass() { - return NettyAsyncHttpProvider.class.getName(); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPutLargeFileTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPutLargeFileTest.java deleted file mode 100644 index f71d57cea5..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyPutLargeFileTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.PutLargeFileTest; - -public class NettyPutLargeFileTest extends PutLargeFileTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyQueryParametersTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyQueryParametersTest.java deleted file mode 100644 index cc7fe3628a..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyQueryParametersTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.QueryParametersTest; - -public class NettyQueryParametersTest extends QueryParametersTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRC10KTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRC10KTest.java deleted file mode 100644 index 2c63c75b9d..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRC10KTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.RC10KTest; - -public class NettyRC10KTest extends RC10KTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java deleted file mode 100644 index 91d782bd20..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRedirectConnectionUsageTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.RedirectConnectionUsageTest; - -public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRelative302Test.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRelative302Test.java deleted file mode 100644 index b9880e79c5..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRelative302Test.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.Relative302Test; - -public class NettyRelative302Test extends Relative302Test { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRemoteSiteTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRemoteSiteTest.java deleted file mode 100644 index 7a65ad5bca..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRemoteSiteTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.RemoteSiteTest; - -public class NettyRemoteSiteTest extends RemoteSiteTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java deleted file mode 100644 index 766a8f1d97..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRequestThrottleTimeoutTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import static org.testng.Assert.*; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Future; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.asynchttpclient.AsyncCompletionHandler; -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Response; -import org.asynchttpclient.async.AbstractBasicTest; -import org.eclipse.jetty.continuation.Continuation; -import org.eclipse.jetty.continuation.ContinuationSupport; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; - -public class NettyRequestThrottleTimeoutTest extends AbstractBasicTest { - private static final String MSG = "Enough is enough."; - private static final int SLEEPTIME_MS = 1000; - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - @Override - public AbstractHandler configureHandler() throws Exception { - return new SlowHandler(); - } - - private class SlowHandler extends AbstractHandler { - public void handle(String target, Request baseRequest, HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { - response.setStatus(HttpServletResponse.SC_OK); - final Continuation continuation = ContinuationSupport.getContinuation(request); - continuation.suspend(); - new Thread(new Runnable() { - public void run() { - try { - Thread.sleep(SLEEPTIME_MS); - response.getOutputStream().print(MSG); - response.getOutputStream().flush(); - continuation.complete(); - } catch (InterruptedException e) { - logger.error(e.getMessage(), e); - } catch (IOException e) { - logger.error(e.getMessage(), e); - } - } - }).start(); - baseRequest.setHandled(true); - } - } - - @Test(groups = { "standalone", "netty_provider" }) - public void testRequestTimeout() throws IOException { - final Semaphore requestThrottle = new Semaphore(1); - - final AsyncHttpClient client = getAsyncHttpClient(new AsyncHttpClientConfig.Builder().setCompressionEnabled(true).setAllowPoolingConnection(true) - .setMaximumConnectionsTotal(1).build()); - try { - final CountDownLatch latch = new CountDownLatch(2); - final List tooManyConnections = Collections.synchronizedList(new ArrayList(2)); - - for (int i = 0; i < 2; i++) { - new Thread(new Runnable() { - - public void run() { - try { - requestThrottle.acquire(); - Future responseFuture = null; - try { - responseFuture = client.prepareGet(getTargetUrl()).setRequestTimeoutInMs(SLEEPTIME_MS / 2).execute(new AsyncCompletionHandler() { - - @Override - public Response onCompleted(Response response) throws Exception { - requestThrottle.release(); - return response; - } - - @Override - public void onThrowable(Throwable t) { - requestThrottle.release(); - } - }); - } catch (Exception e) { - tooManyConnections.add(e); - } - - if (responseFuture != null) - responseFuture.get(); - } catch (Exception e) { - } finally { - latch.countDown(); - } - - } - }).start(); - } - - try { - latch.await(30, TimeUnit.SECONDS); - } catch (Exception e) { - fail("failed to wait for requests to complete"); - } - - assertTrue(tooManyConnections.isEmpty(), "Should not have any connection errors where too many connections have been attempted"); - } finally { - client.close(); - } - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRetryRequestTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRetryRequestTest.java deleted file mode 100644 index ed148663e6..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyRetryRequestTest.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.RetryRequestTest; - -public class NettyRetryRequestTest extends RetryRequestTest{ - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettySimpleAsyncHttpClientTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettySimpleAsyncHttpClientTest.java deleted file mode 100644 index ad60dd6125..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettySimpleAsyncHttpClientTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.SimpleAsyncHttpClientTest; -import org.asynchttpclient.providers.netty4.NettyAsyncHttpProvider; - -public class NettySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { - - /** - * Not Used with {@link org.asynchttpclient.SimpleAsyncHttpClient} - * @param config - * @return - */ - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return null; - } - - public String getProviderClass() { - return NettyAsyncHttpProvider.class.getName(); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyTransferListenerTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyTransferListenerTest.java deleted file mode 100644 index deeb92e9c1..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyTransferListenerTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.TransferListenerTest; - -public class NettyTransferListenerTest extends TransferListenerTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyWebDavBasicTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyWebDavBasicTest.java deleted file mode 100644 index 5a26dbeac3..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyWebDavBasicTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.WebDavBasicTest; - -public class NettyWebDavBasicTest extends WebDavBasicTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyZeroCopyFileTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyZeroCopyFileTest.java deleted file mode 100644 index 04ee3c7a22..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/NettyZeroCopyFileTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.async.ZeroCopyFileTest; - -public class NettyZeroCopyFileTest extends ZeroCopyFileTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java deleted file mode 100644 index d1b2dc45ed..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/RetryNonBlockingIssue.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4; - -import static org.asynchttpclient.async.util.TestUtils.*; -import static org.testng.Assert.*; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutionException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.async.AbstractBasicTest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -//FIXME there's no retry actually -public class RetryNonBlockingIssue extends AbstractBasicTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } - - @BeforeClass(alwaysRun = true) - public void setUpGlobal() throws Exception { - port1 = findFreePort(); - server = newJettyHttpServer(port1); - - ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); - context.setContextPath("/"); - context.addServlet(new ServletHolder(new MockExceptionServlet()), "/*"); - - server.setHandler(context); - server.start(); - } - - protected String getTargetUrl() { - return String.format("http://127.0.0.1:%d/", port1); - } - - private ListenableFuture testMethodRequest(AsyncHttpClient client, int requests, String action, String id) throws IOException { - Request r = new RequestBuilder("GET")// - .setUrl(getTargetUrl())// - .addQueryParameter(action, "1")// - .addQueryParameter("maxRequests", "" + requests)// - .addQueryParameter("id", id)// - .build(); - return client.executeRequest(r); - } - - /** - * Tests that a head request can be made - * - * @throws IOException - * @throws ExecutionException - * @throws InterruptedException - */ - @Test - public void testRetryNonBlocking() throws IOException, InterruptedException, ExecutionException { - - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// - .setAllowPoolingConnection(true)// - .setMaximumConnectionsTotal(100)// - .setConnectionTimeoutInMs(60000)// - .setRequestTimeoutInMs(30000)// - .build(); - - AsyncHttpClient client = getAsyncHttpClient(config); - try { - List> res = new ArrayList>(); - for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); - } - - StringBuilder b = new StringBuilder(); - for (ListenableFuture r : res) { - Response theres = r.get(); - assertEquals(200, theres.getStatusCode()); - b.append("==============\r\n"); - b.append("Response Headers\r\n"); - Map> heads = theres.getHeaders(); - b.append(heads + "\r\n"); - b.append("==============\r\n"); - assertTrue(heads.size() > 0); - } - System.out.println(b.toString()); - System.out.flush(); - - } finally { - client.close(); - } - } - - @Test - public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedException, ExecutionException { - - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// - .setAllowPoolingConnection(true)// - .setMaximumConnectionsTotal(100)// - .setConnectionTimeoutInMs(60000)// - .setRequestTimeoutInMs(30000)// - .setAsyncConnectMode(true) // - .build(); - - AsyncHttpClient client = getAsyncHttpClient(config); - - try { - List> res = new ArrayList>(); - for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); - } - - StringBuilder b = new StringBuilder(); - for (ListenableFuture r : res) { - Response theres = r.get(); - assertEquals(theres.getStatusCode(), 200); - b.append("==============\r\n"); - b.append("Response Headers\r\n"); - Map> heads = theres.getHeaders(); - b.append(heads + "\r\n"); - b.append("==============\r\n"); - assertTrue(heads.size() > 0); - } - System.out.println(b.toString()); - System.out.flush(); - - } finally { - client.close(); - } - } - - @Test - public void testRetryBlocking() throws IOException, InterruptedException, ExecutionException { - - NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); - nettyConfig.setUseBlockingIO(true); - - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// - .setAllowPoolingConnection(true)// - .setMaximumConnectionsTotal(100)// - .setConnectionTimeoutInMs(60000)// - .setRequestTimeoutInMs(30000)// - .setAsyncHttpClientProviderConfig(nettyConfig)// - .build(); - - AsyncHttpClient client = getAsyncHttpClient(config); - - try { - List> res = new ArrayList>(); - for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); - } - - StringBuilder b = new StringBuilder(); - for (ListenableFuture r : res) { - Response theres = r.get(); - assertEquals(theres.getStatusCode(), 200); - b.append("==============\r\n"); - b.append("Response Headers\r\n"); - Map> heads = theres.getHeaders(); - b.append(heads + "\r\n"); - b.append("==============\r\n"); - assertTrue(heads.size() > 0); - - } - System.out.println(b.toString()); - System.out.flush(); - - } finally { - client.close(); - } - } - - @SuppressWarnings("serial") - public class MockExceptionServlet extends HttpServlet { - - private Map requests = new ConcurrentHashMap(); - - private synchronized int increment(String id) { - int val = 0; - if (requests.containsKey(id)) { - Integer i = requests.get(id); - val = i + 1; - requests.put(id, val); - } else { - requests.put(id, 1); - val = 1; - } - System.out.println("REQUESTS: " + requests); - return val; - } - - public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { - String maxRequests = req.getParameter("maxRequests"); - int max = 0; - try { - max = Integer.parseInt(maxRequests); - } catch (NumberFormatException e) { - max = 3; - } - String id = req.getParameter("id"); - int requestNo = increment(id); - String servlet = req.getParameter("servlet"); - String io = req.getParameter("io"); - String error = req.getParameter("500"); - - if (requestNo >= max) { - res.setHeader("Success-On-Attempt", "" + requestNo); - res.setHeader("id", id); - if (servlet != null && servlet.trim().length() > 0) - res.setHeader("type", "servlet"); - if (error != null && error.trim().length() > 0) - res.setHeader("type", "500"); - if (io != null && io.trim().length() > 0) - res.setHeader("type", "io"); - res.setStatus(200); - res.setContentLength(0); - res.flushBuffer(); - return; - } - - res.setStatus(200); - res.setContentLength(100); - res.setContentType("application/octet-stream"); - res.flushBuffer(); - - // error after flushing the status - if (servlet != null && servlet.trim().length() > 0) - throw new ServletException("Servlet Exception"); - - if (io != null && io.trim().length() > 0) - throw new IOException("IO Exception"); - - if (error != null && error.trim().length() > 0) { - res.sendError(500, "servlet process was 500"); - } - } - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyByteMessageTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyByteMessageTest.java deleted file mode 100644 index 5474f7f9f2..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyByteMessageTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4.websocket; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.providers.netty4.NettyProviderUtil; -import org.asynchttpclient.websocket.ByteMessageTest; - -public class NettyByteMessageTest extends ByteMessageTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java deleted file mode 100644 index f44962885b..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyCloseCodeReasonMsgTest.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ - -package org.asynchttpclient.providers.netty4.websocket; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.providers.netty4.NettyProviderUtil; -import org.asynchttpclient.websocket.CloseCodeReasonMessageTest; - -public class NettyCloseCodeReasonMsgTest extends CloseCodeReasonMessageTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java deleted file mode 100644 index a5e9d8cec7..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyRedirectTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4.websocket; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.providers.netty4.NettyProviderUtil; -import org.asynchttpclient.websocket.RedirectTest; - -public class NettyRedirectTest extends RedirectTest { - - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyTextMessageTest.java b/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyTextMessageTest.java deleted file mode 100644 index 10832e370b..0000000000 --- a/providers/netty4/src/test/java/org/asynchttpclient/providers/netty4/websocket/NettyTextMessageTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.netty4.websocket; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.providers.netty4.NettyProviderUtil; -import org.asynchttpclient.websocket.TextMessageTest; - -public class NettyTextMessageTest extends TextMessageTest { - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - return NettyProviderUtil.nettyProvider(config); - } -} diff --git a/providers/netty4/src/test/resources/300k.png b/providers/netty4/src/test/resources/300k.png deleted file mode 100644 index bff4a8598918ed4945bc27db894230d8b5b7cc80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265495 zcmV)wK$O3UP)4Tx0C)k_S!Y-jOSA6TybDWOa?Uv;S#r)f3c`|eT%s5Vq5=jGkfbOeQNVzJ zh$0}MqDW9c0mXoTprU{v@eX><`M&#n_x`(oZtt@_?^ab;_fFMxSJeQ(wn&bM2tm*R z5E@2_vNh7>b#`&(#ZCYu{J{b>AWZg-j?l5THV6M}`#B1rJ?4nip058@?0;s^`}jtC z0{~gWY%iZ^?@$;w0f5l;j)^gK?Ay7^5D+m@x`oAdDyXu>T*tw1>TZV>Ifw zjJ>TM0BBYKaMWaSls^DOL72`P>+KKgA?gEwVF>dH3@SLKmISf(2yATe*JC?a8Df; zV!3AE#SN|_M0^t{EX!1t}!4OC>*_(?IwmE-rxY^zs;JFY=zzl={Ul0SL z;64mU0dt@S^#AImfFB^koLHC_4T8ZZ7>B|m!r?LDFy{SBPVYY`hQG)8!{h$DMqc0z z%f|dO=bzbl;W_`-83=q}{5PEp&#}kbTV1qAV9LMd{99sA-|yAP*2&JxZvDL`lrTyj zrHIl+X`nPws(=^8jA92;sC_6ElnzP@r4I8{fg$(^Yxe(pjeGh-Z~Da+geRyu2Eg3C z|L*lS7dZZw4*ci$f2;rm4lK4T{=EVKD8BLVa{z!|ctk=}pnm{`R|kG_eILq#?`Z&9z5{^&^e>uFH0;hv z0Q4?+$3(^c(TCc*paB8U!XC;7xPbr=h3~UGPy*^e8yEmnUipdECAUeFH)!Amd!rojwY088K}*n}Vm3lSj_#0K#| zLXZR`52-+!kO5>4*+MRmC*%)>K`~GglnP}+IZzRF1*(B=KzE={=rJ?|y@K9B^Ux1y z1A#<1*wO$Lb@XTkWt7Z$P8pYvJBaPY(w@TN08IVMdU9O21P>gqNHFyHAXq0 zyit*;Bd9D?5vm&1jCzO~LA^sQp?1(jG$&dDt%f#1JEQ&4ap-h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a/providers/netty4/src/test/resources/gzip.txt.gz b/providers/netty4/src/test/resources/gzip.txt.gz deleted file mode 100644 index 80aeb98d2b03a00c13d7c2725d3e281f47a57d81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47 zcmb2|=HR#?o9WBIoL-e#pjT2+!r;CBl#a)_^V*(gwKoQx@Hl(&Bs)Xnt@zJE3=9ka Do?Q|u diff --git a/providers/netty4/src/test/resources/logback-test.xml b/providers/netty4/src/test/resources/logback-test.xml deleted file mode 100644 index 4acf278710..0000000000 --- a/providers/netty4/src/test/resources/logback-test.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - %d [%thread] %level %logger - %m%n - - - - - - - - - \ No newline at end of file diff --git a/providers/netty4/src/test/resources/realm.properties b/providers/netty4/src/test/resources/realm.properties deleted file mode 100644 index bc9faad66a..0000000000 --- a/providers/netty4/src/test/resources/realm.properties +++ /dev/null @@ -1 +0,0 @@ -user=admin, admin \ No newline at end of file diff --git a/providers/netty4/src/test/resources/ssltest-cacerts.jks b/providers/netty4/src/test/resources/ssltest-cacerts.jks deleted file mode 100644 index 9c1ffbe49a7b27a250fc7d00fedd45405744fc38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29888 zcmdsg1zZ*R`aa!#=sbXQokN3kih^`XH_|DkbSf!GBM1V5NGRPR5|Rp10!j-aAxfz5 zpL0OPSa;5{yC#2}VXjB1E`)!BZzxD-0W9piKBoe?>k7 z7Y&m={7m=`E+Qf-Dgq>^2Z{~BL_^j_K?5OaYeLB&B(M!E5S|WjB~9Q;oM0s<3vMVK zga)<)8$|kL2UyF^)7=An-pb>Wvzt9s6e4_d0F>2&4Ga|#5dnWW^5_&`F0g{L8`#X# z!`9i&&ezHk?CEX=c6M^`fyzT0&36^I9zHj~prAV9()g$lccMl+vTkQ>1f!WBS1{sf%1> z?LdZHXJ%emiNO0jqL+XLk>HedBO;1mp0@4CEkVq?CG^Z%Xr+=p#4qpml%mlj&+cYz zz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J{_?Q#?sKe-+Kpl%+>rqn~tL63ucc$=2VLkA%>! zEXzD54_V8;pn2gfD!D02i%j6>!J;Bs#M3)@hGls#7MTMX#cJg|cChX#T{ZLWJ=GE! zU5K~hP9gnS1$iTKXu&(?HoNMF6kM`PJ!9O|sN22V0yYKe@03qG# A2><{9 diff --git a/providers/netty4/src/test/resources/ssltest-keystore.jks b/providers/netty4/src/test/resources/ssltest-keystore.jks deleted file mode 100644 index a95b7c5f4fbe9f9cba881475b3854861cb182263..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1445 zcmezO_TO6u1_mY|W&~rFV#CB@AV=73#>MqOiCqRwOxq0j*toRW7+Dy#m;@OaSs7TG zm==Ahum1KTDl}5e`kqee9lk>GwJCjfCp7D~ov*(x`E$+b6=xjpnr%q9^|4>@`!@E+ zi}uIu{+!!*!-C=Vp@lxxA&;l{Nk*7CEQ|PTX1Z`q#lHsu!v5(6#vw9KEZxO~bf#Zb zE?Il~dGkX>A=cv6>qSIP+-5VqZyGyUOVDFdgS=Z}_JfL#JMP&==)6<6Sh2b9`t5ry zzPG<5v@n$N`kc{=4oZz#{&v|`N2`6xPN7puSbB3j=P~RMOPb*@xlF*s=gqB!uVbHl z2<4ScJw8W+`&G{xr?Pq@ONfRqihy3>ye<~BGoZ+h#{_(N>D|Fs2ur2%ps7pF>I zDyq!Qu>EItI4*4OBcD3qb*tuHm9|&fwWayCaOz5XseaVX$*ge1Rv~TixJ>9JFm50^r<=XRnFV)>E5XyX* z`20}6VuG$_v3GNlivo}JLPd+C-52%4{>}87eQM$FyR%#4dd~lTX}Zdhn78D zytSvNb1s=yot+rkvqPAJ?zzMvo@KDD8@ayqLK67Bw^~d=)8$1RIHVRV%M2zL;>ym3BqC9{cp0q5C^#N!jg;Oqrb#c%Au7>88ae?(Y>*m{+_%clwSNmXJJ#2fue( zuJwJi@zm*L*}2hczl+}&I(v&Z{!e{~)NHj6dxQ**W%OyC*S>kOC&pB3PjK_JM&HO^ zRTfe!{SI<_w7t5|Kk+(W=VGl)mKCeLEB4tu{LIA6$iRr~JYXVV2D)pqdW7|<3-SD= zw~jv1mb8iy&d&Q#`!qf`dG>O9pQr~tnf__VzSRmDJ@rmb-s#wH?mS~d;Zu_jv8;Q9 z_!+M@r%rmY%EEvlj5C;{;O@<$*r}E~J@OlQHe8oaPUyCHC1O(4B!1-dme<8*cPnpb uEt|hX&w*2cNrXr4-_Nv(?*ugF{&{FJ?S$IdRLMmwGq0yv95LW9JOTidn?aWV diff --git a/providers/netty4/src/test/resources/textfile.txt b/providers/netty4/src/test/resources/textfile.txt deleted file mode 100644 index 87daee60a9..0000000000 --- a/providers/netty4/src/test/resources/textfile.txt +++ /dev/null @@ -1 +0,0 @@ -filecontent: hello \ No newline at end of file diff --git a/providers/netty4/src/test/resources/textfile2.txt b/providers/netty4/src/test/resources/textfile2.txt deleted file mode 100644 index 6a91fe609c..0000000000 --- a/providers/netty4/src/test/resources/textfile2.txt +++ /dev/null @@ -1 +0,0 @@ -filecontent: hello2 \ No newline at end of file diff --git a/providers/pom.xml b/providers/pom.xml index 9a7178b576..72af625a7f 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -46,7 +46,6 @@ grizzly netty - netty4 From 290dd6643dfe9a996fcb9a0933d1cd31b99b68dd Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 13:31:49 +0200 Subject: [PATCH 0578/2844] Remove HttpContent and clean up Status, Headers and BodyParts --- .../asynchttpclient/AsyncHttpProvider.java | 17 +-- .../java/org/asynchttpclient/HttpContent.java | 49 -------- .../asynchttpclient/HttpResponseBodyPart.java | 7 +- .../asynchttpclient/HttpResponseHeaders.java | 9 +- .../asynchttpclient/HttpResponseStatus.java | 54 ++++++--- .../java/org/asynchttpclient/Response.java | 109 +++++++++--------- .../providers/ResponseBase.java | 2 +- .../providers/jdk/JDKAsyncHttpProvider.java | 76 ++++++------ .../providers/jdk/ResponseBodyPart.java | 1 - .../providers/jdk/ResponseHeaders.java | 1 - .../providers/jdk/ResponseStatus.java | 15 ++- .../resumable/ResumableAsyncHandler.java | 2 +- .../webdav/WebDavCompletionHandlerBase.java | 28 +++-- .../asynchttpclient/async/PostWithQSTest.java | 8 +- .../providers/grizzly/EventHandler.java | 16 ++- .../grizzly/GrizzlyAsyncHttpProvider.java | 20 +--- .../grizzly/GrizzlyResponseBodyPart.java | 4 +- .../grizzly/GrizzlyResponseHeaders.java | 8 +- .../grizzly/GrizzlyResponseStatus.java | 24 ++-- .../netty/NettyAsyncHttpProvider.java | 10 -- .../providers/netty/handler/HttpProtocol.java | 2 +- .../netty/handler/WebSocketProtocol.java | 4 +- .../netty/response/ResponseBodyPart.java | 2 - .../netty/response/ResponseHeaders.java | 3 +- .../netty/response/ResponseStatus.java | 43 +++---- .../netty/NettyAsyncResponseTest.java | 6 +- 26 files changed, 214 insertions(+), 306 deletions(-) delete mode 100644 api/src/main/java/org/asynchttpclient/HttpContent.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java index da96a0497e..c8f910b8fb 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java @@ -17,7 +17,6 @@ import java.io.Closeable; import java.io.IOException; -import java.util.List; /** * Interface to be used when implementing custom asynchronous I/O HTTP client. @@ -33,22 +32,10 @@ public interface AsyncHttpProvider extends Closeable { * @return a {@link ListenableFuture} of Type T. * @throws IOException */ - public ListenableFuture execute(Request request, AsyncHandler handler) throws IOException; + ListenableFuture execute(Request request, AsyncHandler handler) throws IOException; /** * Close the current underlying TCP/HTTP connection. */ - public void close(); - - /** - * Prepare a {@link Response} - * - * @param status {@link HttpResponseStatus} - * @param headers {@link HttpResponseHeaders} - * @param bodyParts list of {@link HttpResponseBodyPart} - * @return a {@link Response} - */ - public Response prepareResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts); + void close(); } diff --git a/api/src/main/java/org/asynchttpclient/HttpContent.java b/api/src/main/java/org/asynchttpclient/HttpContent.java deleted file mode 100644 index 219e2411cc..0000000000 --- a/api/src/main/java/org/asynchttpclient/HttpContent.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2010 Ning, Inc. - * - * Ning licenses this file to you under the Apache License, version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package org.asynchttpclient; - -import java.net.URI; - -/** - * Base class for callback class used by {@link AsyncHandler} - */ -public class HttpContent { - protected final AsyncHttpProvider provider; - protected final URI uri; - - protected HttpContent(URI url, AsyncHttpProvider provider) { - this.provider = provider; - this.uri = url; - } - - /** - * Return the current {@link AsyncHttpProvider} - * - * @return the current {@link AsyncHttpProvider} - */ - public final AsyncHttpProvider provider() { - return provider; - } - - /** - * Return the request {@link URI} - * - * @return the request {@link URI} - */ - public final URI getUrl() { - return uri; - } -} diff --git a/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java index e7f350e439..42bb8c8158 100644 --- a/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java @@ -18,17 +18,12 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.URI; import java.nio.ByteBuffer; /** * A callback class used when an HTTP response body is received. */ -public abstract class HttpResponseBodyPart extends HttpContent { - - public HttpResponseBodyPart(URI uri, AsyncHttpProvider provider) { - super(uri, provider); - } +public abstract class HttpResponseBodyPart { /** * Return length of this part in bytes. diff --git a/api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java b/api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java index 54c894f712..5ecc6898c3 100644 --- a/api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseHeaders.java @@ -15,22 +15,19 @@ */ package org.asynchttpclient; -import java.net.URI; /** * A class that represent the HTTP headers. */ -public abstract class HttpResponseHeaders extends HttpContent { +public abstract class HttpResponseHeaders { private final boolean traillingHeaders; - public HttpResponseHeaders(URI uri, AsyncHttpProvider provider) { - super(uri, provider); + public HttpResponseHeaders() { this.traillingHeaders = false; } - public HttpResponseHeaders(URI uri, AsyncHttpProvider provider, boolean traillingHeaders) { - super(uri, provider); + public HttpResponseHeaders(boolean traillingHeaders) { this.traillingHeaders = traillingHeaders; } diff --git a/api/src/main/java/org/asynchttpclient/HttpResponseStatus.java b/api/src/main/java/org/asynchttpclient/HttpResponseStatus.java index 3581e46582..b2e5b0d7ab 100644 --- a/api/src/main/java/org/asynchttpclient/HttpResponseStatus.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseStatus.java @@ -17,55 +17,79 @@ package org.asynchttpclient; import java.net.URI; +import java.util.List; /** * A class that represent the HTTP response' status line (code + text) */ -public abstract class HttpResponseStatus extends HttpContent { +public abstract class HttpResponseStatus { - public HttpResponseStatus(URI uri, AsyncHttpProvider provider) { - super(uri, provider); + private final URI uri; + protected final AsyncHttpClientConfig config; + + public HttpResponseStatus(URI uri, AsyncHttpClientConfig config) { + this.uri = uri; + this.config = config; } /** - * Return the response status code + * Return the request {@link URI} + * + * @return the request {@link URI} + */ + public final URI getUri() { + return uri; + } + + /** + * Prepare a {@link Response} * + * @param headers {@link HttpResponseHeaders} + * @param bodyParts list of {@link HttpResponseBodyPart} + * @param config the client config + * @return a {@link Response} + */ + public abstract Response prepareResponse(HttpResponseHeaders headers, List bodyParts); + + /** + * Return the response status code + * * @return the response status code */ - abstract public int getStatusCode(); + public abstract int getStatusCode(); /** * Return the response status text - * + * * @return the response status text */ - abstract public String getStatusText(); + public abstract String getStatusText(); /** * Protocol name from status line. - * + * * @return Protocol name. */ - abstract public String getProtocolName(); + public abstract String getProtocolName(); /** * Protocol major version. - * + * * @return Major version. */ - abstract public int getProtocolMajorVersion(); + public abstract int getProtocolMajorVersion(); /** * Protocol minor version. - * + * * @return Minor version. */ - abstract public int getProtocolMinorVersion(); + public abstract int getProtocolMinorVersion(); /** * Full protocol name + version - * + * * @return protocol name + version */ - abstract public String getProtocolText(); + public abstract String getProtocolText(); } diff --git a/api/src/main/java/org/asynchttpclient/Response.java b/api/src/main/java/org/asynchttpclient/Response.java index 3db376606d..e8598013f4 100644 --- a/api/src/main/java/org/asynchttpclient/Response.java +++ b/api/src/main/java/org/asynchttpclient/Response.java @@ -31,50 +31,50 @@ public interface Response { /** * Returns the status code for the request. - * + * * @return The status code */ int getStatusCode(); /** * Returns the status text for the request. - * + * * @return The status text */ String getStatusText(); /** * Return the entire response body as a byte[]. - * + * * @return the entire response body as a byte[]. * @throws IOException */ byte[] getResponseBodyAsBytes() throws IOException; - + /** * Return the entire response body as a ByteBuffer. - * + * * @return the entire response body as a ByteBuffer. * @throws IOException */ ByteBuffer getResponseBodyAsByteBuffer() throws IOException; /** - * Returns an input stream for the response body. Note that you should not try to get this more than once, - * and that you should not close the stream. - * + * Returns an input stream for the response body. Note that you should not try to get this more than once, and that you should not close the stream. + * * @return The input stream * @throws java.io.IOException */ InputStream getResponseBodyAsStream() throws IOException; /** - * Returns the first maxLength bytes of the response body as a string. Note that this does not check - * whether the content type is actually a textual one, but it will use the charset if present in the content - * type header. - * - * @param maxLength The maximum number of bytes to read - * @param charset the charset to use when decoding the stream + * Returns the first maxLength bytes of the response body as a string. Note that this does not check whether the content type is actually a textual one, but it will use the + * charset if present in the content type header. + * + * @param maxLength + * The maximum number of bytes to read + * @param charset + * the charset to use when decoding the stream * @return The response body * @throws java.io.IOException */ @@ -82,19 +82,20 @@ public interface Response { /** * Return the entire response body as a String. - * - * @param charset the charset to use when decoding the stream + * + * @param charset + * the charset to use when decoding the stream * @return the entire response body as a String. * @throws IOException */ String getResponseBody(String charset) throws IOException; /** - * Returns the first maxLength bytes of the response body as a string. Note that this does not check - * whether the content type is actually a textual one, but it will use the charset if present in the content - * type header. - * - * @param maxLength The maximum number of bytes to read + * Returns the first maxLength bytes of the response body as a string. Note that this does not check whether the content type is actually a textual one, but it will use the + * charset if present in the content type header. + * + * @param maxLength + * The maximum number of bytes to read * @return The response body * @throws java.io.IOException */ @@ -102,16 +103,15 @@ public interface Response { /** * Return the entire response body as a String. - * + * * @return the entire response body as a String. * @throws IOException */ String getResponseBody() throws IOException; /** - * Return the request {@link URI}. Note that if the request got redirected, the value of the {@link URI} will be - * the last valid redirect url. - * + * Return the request {@link URI}. Note that if the request got redirected, the value of the {@link URI} will be the last valid redirect url. + * * @return the request {@link URI}. * @throws MalformedURLException */ @@ -119,21 +119,21 @@ public interface Response { /** * Return the content-type header value. - * + * * @return the content-type header value. */ String getContentType(); /** * Return the response header - * + * * @return the response header */ String getHeader(String name); /** * Return a {@link List} of the response header value. - * + * * @return the response header */ List getHeaders(String name); @@ -142,14 +142,14 @@ public interface Response { /** * Return true if the response redirects to another object. - * + * * @return True if the response redirects to another object. */ boolean isRedirected(); /** * Subclasses SHOULD implement toString() in a way that identifies the request for logging. - * + * * @return The textual representation */ String toString(); @@ -161,66 +161,61 @@ public interface Response { /** * Return true if the response's status has been computed by an {@link AsyncHandler} - * + * * @return true if the response's status has been computed by an {@link AsyncHandler} */ boolean hasResponseStatus(); /** - * Return true if the response's headers has been computed by an {@link AsyncHandler} It will return false if the - * either {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} - * or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link AsyncHandler.STATE#ABORT} - * + * Return true if the response's headers has been computed by an {@link AsyncHandler} It will return false if the either + * {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link AsyncHandler.STATE#ABORT} + * * @return true if the response's headers has been computed by an {@link AsyncHandler} */ boolean hasResponseHeaders(); /** - * Return true if the response's body has been computed by an {@link AsyncHandler}. It will return false if the - * either {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} + * Return true if the response's body has been computed by an {@link AsyncHandler}. It will return false if the either {@link AsyncHandler#onStatusReceived(HttpResponseStatus)} * or {@link AsyncHandler#onHeadersReceived(HttpResponseHeaders)} returned {@link AsyncHandler.STATE#ABORT} - * + * * @return true if the response's body has been computed by an {@link AsyncHandler} */ boolean hasResponseBody(); public static class ResponseBuilder { - private final List bodies = - Collections.synchronizedList(new ArrayList()); + private final List bodyParts = Collections.synchronizedList(new ArrayList()); private HttpResponseStatus status; private HttpResponseHeaders headers; - /** - * Accumulate {@link HttpContent} in order to build a {@link Response} - * - * @param httpContent {@link HttpContent} - * @return this - */ - public ResponseBuilder accumulate(HttpContent httpContent) { - if (httpContent instanceof HttpResponseStatus) { - status = (HttpResponseStatus) httpContent; - } else if (httpContent instanceof HttpResponseHeaders) { - headers = (HttpResponseHeaders) httpContent; - } else if (httpContent instanceof HttpResponseBodyPart) { - bodies.add((HttpResponseBodyPart) httpContent); - } + public ResponseBuilder accumulate(HttpResponseStatus status) { + this.status = status; + return this; + } + + public ResponseBuilder accumulate(HttpResponseHeaders headers) { + this.headers = headers; + return this; + } + + public ResponseBuilder accumulate(HttpResponseBodyPart bodyPart) { + bodyParts.add(bodyPart); return this; } /** * Build a {@link Response} instance - * + * * @return a {@link Response} instance */ public Response build() { - return status == null ? null : status.provider().prepareResponse(status, headers, bodies); + return status == null ? null : status.prepareResponse(headers, bodyParts); } /** * Reset the internal state of this builder. */ public void reset() { - bodies.clear(); + bodyParts.clear(); status = null; headers = null; } diff --git a/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java index 9718c3302c..b7f4dfd410 100644 --- a/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java +++ b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java @@ -47,7 +47,7 @@ public final String getStatusText() { /* @Override */ public final URI getUri() { - return status.getUrl(); + return status.getUri(); } /* @Override */ diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java index 9268f67cc9..061dcd191e 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java @@ -12,43 +12,9 @@ */ package org.asynchttpclient.providers.jdk; -import static org.asynchttpclient.util.MiscUtil.isNonEmpty; +import static org.asynchttpclient.util.AsyncHttpProviderUtils.*; +import static org.asynchttpclient.util.MiscUtil.*; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.AsyncHttpProviderConfig; -import org.asynchttpclient.Body; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.MaxRedirectException; -import org.asynchttpclient.ProgressAsyncHandler; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Realm; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; -import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; -import org.asynchttpclient.filter.IOExceptionFilter; -import org.asynchttpclient.filter.ResponseFilter; -import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.multipart.MultipartRequestEntity; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.util.AuthenticatorUtils; -import org.asynchttpclient.util.ProxyUtils; -import org.asynchttpclient.util.SslUtils; -import org.asynchttpclient.util.UTF8UrlEncoder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.naming.AuthenticationException; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLHandshakeException; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; @@ -78,7 +44,37 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.zip.GZIPInputStream; -import static org.asynchttpclient.util.AsyncHttpProviderUtils.DEFAULT_CHARSET; +import javax.naming.AuthenticationException; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLHandshakeException; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.Body; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; +import org.asynchttpclient.ListenableFuture; +import org.asynchttpclient.MaxRedirectException; +import org.asynchttpclient.ProgressAsyncHandler; +import org.asynchttpclient.ProxyServer; +import org.asynchttpclient.Realm; +import org.asynchttpclient.Request; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.filter.FilterContext; +import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.filter.IOExceptionFilter; +import org.asynchttpclient.filter.ResponseFilter; +import org.asynchttpclient.listener.TransferCompletionHandler; +import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.asynchttpclient.util.AuthenticatorUtils; +import org.asynchttpclient.util.ProxyUtils; +import org.asynchttpclient.util.SslUtils; +import org.asynchttpclient.util.UTF8UrlEncoder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JDKAsyncHttpProvider implements AsyncHttpProvider { private final static Logger logger = LoggerFactory.getLogger(JDKAsyncHttpProvider.class); @@ -208,10 +204,6 @@ public void close() { } } - public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { - return new JDKResponse(status, headers, bodyParts); - } - private final class AsyncHttpUrlConnection implements Callable { private HttpURLConnection urlConnection; @@ -254,7 +246,7 @@ public T call() throws Exception { logger.debug("\n\nRequest {}\n\nResponse {}\n", request, statusCode); - ResponseStatus status = new ResponseStatus(uri, urlConnection, JDKAsyncHttpProvider.this); + ResponseStatus status = new ResponseStatus(uri, urlConnection, config); FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { fc = asyncFilter.filter(fc); diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java index 3081baee6f..b80ced8345 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java @@ -32,7 +32,6 @@ public class ResponseBodyPart extends HttpResponseBodyPart { private boolean closeConnection; public ResponseBodyPart(URI uri, byte[] chunk, AsyncHttpProvider provider, boolean last) { - super(uri, provider); this.chunk = chunk; isLast = last; } diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java index 1a07b53c0e..ed71a96aa7 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java @@ -30,7 +30,6 @@ public class ResponseHeaders extends HttpResponseHeaders { private final FluentCaseInsensitiveStringsMap headers; public ResponseHeaders(URI uri, HttpURLConnection urlConnection, AsyncHttpProvider provider) { - super(uri, provider, false); this.urlConnection = urlConnection; headers = computerHeaders(); } diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java index d88d211683..b5cbc7094a 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java @@ -12,12 +12,16 @@ */ package org.asynchttpclient.providers.jdk; -import org.asynchttpclient.AsyncHttpProvider; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URI; +import java.util.List; /** * A class that represent the HTTP response' status line (code + text) @@ -26,10 +30,15 @@ public class ResponseStatus extends HttpResponseStatus { private final HttpURLConnection urlConnection; - public ResponseStatus(URI uri, HttpURLConnection urlConnection, AsyncHttpProvider provider) { - super(uri, provider); + public ResponseStatus(URI uri, HttpURLConnection urlConnection, AsyncHttpClientConfig config) { + super(uri, config); this.urlConnection = urlConnection; } + + @Override + public Response prepareResponse(HttpResponseHeaders headers, List bodyParts) { + return new JDKResponse(this, headers, bodyParts); + } /** * Return the response status code diff --git a/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java index 6991d05383..297ed0a0f4 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java @@ -106,7 +106,7 @@ public ResumableAsyncHandler(ResumableProcessor resumableProcessor, boolean accu public AsyncHandler.STATE onStatusReceived(final HttpResponseStatus status) throws Exception { responseBuilder.accumulate(status); if (status.getStatusCode() == 200 || status.getStatusCode() == 206) { - url = status.getUrl().toURL().toString(); + url = status.getUri().toURL().toString(); } else { return AsyncHandler.STATE.ABORT; } diff --git a/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java index 74ac5ab684..6781d561cd 100644 --- a/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java +++ b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java @@ -29,6 +29,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; + import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; @@ -81,12 +82,12 @@ public final STATE onHeadersReceived(final HttpResponseHeaders headers) throws E /* @Override */ public final T onCompleted() throws Exception { if (status != null) { - Response response = status.provider().prepareResponse(status, headers, bodies); + Response response = status.prepareResponse(headers, bodies); Document document = null; if (status.getStatusCode() == 207) { document = readXMLResponse(response.getResponseBodyAsStream()); } - return onCompleted(new WebDavResponse(status.provider().prepareResponse(status, headers, bodies), document)); + return onCompleted(new WebDavResponse(status.prepareResponse(headers, bodies), document)); } else { throw new IllegalStateException("Status is null"); } @@ -111,47 +112,52 @@ public void onThrowable(Throwable t) { private class HttpStatusWrapper extends HttpResponseStatus { - private final HttpResponseStatus wrapper; + private final HttpResponseStatus wrapped; private final String statusText; private final int statusCode; public HttpStatusWrapper(HttpResponseStatus wrapper, String statusText, int statusCode) { - super(wrapper.getUrl(), wrapper.provider()); - this.wrapper = wrapper; + super(wrapper.getUri(), null); + this.wrapped = wrapper; this.statusText = statusText; this.statusCode = statusCode; } + + @Override + public Response prepareResponse(HttpResponseHeaders headers, List bodyParts) { + return wrapped.prepareResponse(headers, bodyParts); + } @Override public int getStatusCode() { - return (statusText == null ? wrapper.getStatusCode() : statusCode); + return (statusText == null ? wrapped.getStatusCode() : statusCode); } @Override public String getStatusText() { - return (statusText == null ? wrapper.getStatusText() : statusText); + return (statusText == null ? wrapped.getStatusText() : statusText); } @Override public String getProtocolName() { - return wrapper.getProtocolName(); + return wrapped.getProtocolName(); } @Override public int getProtocolMajorVersion() { - return wrapper.getProtocolMajorVersion(); + return wrapped.getProtocolMajorVersion(); } @Override public int getProtocolMinorVersion() { - return wrapper.getProtocolMinorVersion(); + return wrapped.getProtocolMinorVersion(); } @Override public String getProtocolText() { - return wrapper.getStatusText(); + return wrapped.getStatusText(); } } diff --git a/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java index 442f389082..26d85587ac 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java @@ -91,8 +91,8 @@ public void postWithNulParamQS() throws IOException, ExecutionException, Timeout /* @Override */ public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=")) { - throw new IOException(status.getUrl().toURL().toString()); + if (!status.getUri().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=")) { + throw new IOException(status.getUri().toURL().toString()); } return super.onStatusReceived(status); } @@ -114,7 +114,7 @@ public void postWithNulParamsQS() throws IOException, ExecutionException, Timeou /* @Override */ public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c&d=e")) { + if (!status.getUri().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c&d=e")) { throw new IOException("failed to parse the query properly"); } return super.onStatusReceived(status); @@ -137,7 +137,7 @@ public void postWithEmptyParamsQS() throws IOException, ExecutionException, Time /* @Override */ public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { - if (!status.getUrl().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { + if (!status.getUri().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { throw new IOException("failed to parse the query properly"); } return super.onStatusReceived(status); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index c0e28d05c1..732697e3b5 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -14,6 +14,7 @@ package org.asynchttpclient.providers.grizzly; import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProviderConfig; import org.asynchttpclient.Cookie; import org.asynchttpclient.MaxRedirectException; @@ -74,15 +75,15 @@ public final class EventHandler { } - private final GrizzlyAsyncHttpProvider provider; + private final AsyncHttpClientConfig config; GrizzlyAsyncHttpProvider.Cleanup cleanup; // -------------------------------------------------------- Constructors - EventHandler(final GrizzlyAsyncHttpProvider provider) { - this.provider = provider; + EventHandler(final AsyncHttpClientConfig config) { + this.config = config; } @@ -107,8 +108,7 @@ public void onHttpContentParsed(HttpContent content, context.setCurrentState(handler.onBodyPartReceived( new GrizzlyResponseBodyPart(content, context.getRequest().getURI(), - ctx.getConnection(), - provider))); + ctx.getConnection()))); } catch (Exception e) { handler.onThrowable(e); } @@ -188,7 +188,7 @@ public void onInitialLineParsed(HttpHeader httpHeader, final GrizzlyResponseStatus responseStatus = new GrizzlyResponseStatus((HttpResponsePacket) httpHeader, context.getRequest().getURI(), - provider); + config); context.setResponseStatus(responseStatus); if (context.getStatusHandler() != null) { return; @@ -238,9 +238,7 @@ public void onHttpHeadersParsed(HttpHeader httpHeader, final AsyncHandler handler = context.getHandler(); final GrizzlyResponseHeaders responseHeaders = - new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader, - context.getRequest().getURI(), - provider); + new GrizzlyResponseHeaders((HttpResponsePacket) httpHeader); if (context.getProvider().getClientConfig().hasResponseFilters()) { final List filters = context.getProvider() .getClientConfig().getResponseFilters(); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index a375d815de..9ef48ad96b 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -189,22 +189,6 @@ public void close() { } - - /** - * {@inheritDoc} - */ - public Response prepareResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) { - - return new GrizzlyResponse(status, - headers, - bodyParts, - clientConfig.isRfc6265CookieEncoding()); - - } - - // ---------------------------------------------------------- Public Methods @@ -321,7 +305,7 @@ public void onTimeout(Connection connection) { } final AsyncHttpClientEventFilter eventFilter; - final EventHandler handler = new EventHandler(this); + final EventHandler handler = new EventHandler(clientConfig); if (providerConfig != null) { eventFilter = new AsyncHttpClientEventFilter(handler, @@ -434,7 +418,7 @@ private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb, spdyFcb.set(idx, new SpdyFramingFilter()); final SpdyMode spdyMode = ((npnEnabled) ? SpdyMode.NPN : SpdyMode.PLAIN); AsyncSpdyClientEventFilter spdyFilter = - new AsyncSpdyClientEventFilter(new EventHandler(this), + new AsyncSpdyClientEventFilter(new EventHandler(clientConfig), spdyMode, clientConfig.executorService()); spdyFilter.setInitialWindowSize(clientConfig.getSpdyInitialWindowSize()); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java index e0a2931ac9..4f2236e321 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java @@ -48,9 +48,7 @@ class GrizzlyResponseBodyPart extends HttpResponseBodyPart { public GrizzlyResponseBodyPart(final HttpContent content, final URI uri, - final Connection connection, - final AsyncHttpProvider provider) { - super(uri, provider); + final Connection connection) { this.content = content; this.connection = connection; diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java index 588c33ca50..babd1af641 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseHeaders.java @@ -13,15 +13,12 @@ package org.asynchttpclient.providers.grizzly; -import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseHeaders; import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.util.MimeHeaders; -import java.net.URI; - /** * {@link HttpResponseHeaders} implementation using the Grizzly 2.0 HTTP client @@ -39,11 +36,8 @@ class GrizzlyResponseHeaders extends HttpResponseHeaders { // ------------------------------------------------------------ Constructors - public GrizzlyResponseHeaders(final HttpResponsePacket response, - final URI uri, - final AsyncHttpProvider provider) { + public GrizzlyResponseHeaders(final HttpResponsePacket response) { - super(uri, provider); grizzlyHeaders = new MimeHeaders(); grizzlyHeaders.copyFrom(response.getHeaders()); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java index e4e74e3c91..9bafb37be4 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java @@ -13,13 +13,16 @@ package org.asynchttpclient.providers.grizzly; -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseStatus; +import java.net.URI; +import java.util.List; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; import org.glassfish.grizzly.http.HttpResponsePacket; -import java.net.URI; - /** * {@link HttpResponseStatus} implementation using the Grizzly 2.0 HTTP client * codec. @@ -43,9 +46,9 @@ public class GrizzlyResponseStatus extends HttpResponseStatus { public GrizzlyResponseStatus(final HttpResponsePacket response, final URI uri, - final AsyncHttpProvider provider) { + AsyncHttpClientConfig config) { - super(uri, provider); + super(uri, config); statusCode = response.getStatus(); statusText = response.getReasonPhrase(); majorVersion = response.getProtocol().getMajorVersion(); @@ -57,7 +60,14 @@ public GrizzlyResponseStatus(final HttpResponsePacket response, // ----------------------------------------- Methods from HttpResponseStatus - + @Override + public Response prepareResponse(HttpResponseHeaders headers, List bodyParts) { + return new GrizzlyResponse(this, + headers, + bodyParts, + config.isRfc6265CookieEncoding()); + }; + /** * {@inheritDoc} */ diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index 60656ffad2..f8348abde6 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -16,18 +16,13 @@ package org.asynchttpclient.providers.netty; import java.io.IOException; -import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.Request; -import org.asynchttpclient.Response; import org.asynchttpclient.providers.netty.channel.Channels; import org.asynchttpclient.providers.netty.handler.NettyChannelHandler; import org.asynchttpclient.providers.netty.request.NettyRequestSender; @@ -75,11 +70,6 @@ public void close() { } } - @Override - public Response prepareResponse(final HttpResponseStatus status, final HttpResponseHeaders headers, final List bodyParts) { - throw new UnsupportedOperationException("Mocked, should be refactored"); - } - @Override public ListenableFuture execute(Request request, final AsyncHandler asyncHandler) throws IOException { return requestSender.sendRequest(request, asyncHandler, null, asyncHttpProviderConfig.isAsyncConnect(), false); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java index a5d689ac91..0b871daf61 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java @@ -242,7 +242,7 @@ private boolean handleResponseAndExit(final ChannelHandlerContext ctx, final Net ProxyServer proxyServer, HttpResponse response) throws Exception { Request request = future.getRequest(); int statusCode = response.getStatus().code(); - HttpResponseStatus status = new ResponseStatus(future.getURI(), response); + HttpResponseStatus status = new ResponseStatus(future.getURI(), response, config); HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); final FluentCaseInsensitiveStringsMap headers = request.getHeaders(); final RequestBuilder builder = new RequestBuilder(future.getRequest()); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java index eee8b91515..d29c3a85b0 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java @@ -78,7 +78,7 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object if (e instanceof HttpResponse) { HttpResponse response = (HttpResponse) e; - HttpResponseStatus s = new ResponseStatus(future.getURI(), response); + HttpResponseStatus s = new ResponseStatus(future.getURI(), response, config); HttpResponseHeaders responseHeaders = new ResponseHeaders(future.getURI(), response.headers()); // FIXME there's a method for that IIRC @@ -116,7 +116,7 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object boolean validConnection = c == null ? false : c.equalsIgnoreCase(HttpHeaders.Values.UPGRADE); - s = new ResponseStatus(future.getURI(), response); + s = new ResponseStatus(future.getURI(), response, config); final boolean statusReceived = h.onStatusReceived(s) == STATE.UPGRADE; final boolean headerOK = h.onHeadersReceived(responseHeaders) == STATE.CONTINUE; diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java index 86289d146d..e50d36faa8 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java @@ -36,9 +36,7 @@ public class ResponseBodyPart extends HttpResponseBodyPart { private final boolean last; private boolean closeConnection = false; - // FIXME unused AsyncHttpProvider provider public ResponseBodyPart(URI uri, ByteBuf buf, boolean last) { - super(uri, null); bytes = ByteBufUtil.byteBuf2bytes(buf); this.last = last; } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java index a024e8a624..c48aad3394 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseHeaders.java @@ -37,9 +37,8 @@ public ResponseHeaders(URI uri, HttpHeaders responseHeaders) { this(uri, responseHeaders, null); } - // FIXME unused AsyncHttpProvider provider public ResponseHeaders(URI uri,HttpHeaders responseHeaders, HttpHeaders traillingHeaders) { - super(uri, null, traillingHeaders != null); + super(traillingHeaders != null); this.responseHeaders = responseHeaders; this.trailingHeaders = traillingHeaders; headers = computerHeaders(); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java index 45c7274245..79acf80565 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseStatus.java @@ -16,49 +16,33 @@ */ package org.asynchttpclient.providers.netty.response; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.Request; -import org.asynchttpclient.Response; - import io.netty.handler.codec.http.HttpResponse; -import java.io.IOException; import java.net.URI; import java.util.List; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.HttpResponseBodyPart; +import org.asynchttpclient.HttpResponseHeaders; +import org.asynchttpclient.HttpResponseStatus; +import org.asynchttpclient.Response; + /** * A class that represent the HTTP response' status line (code + text) */ public class ResponseStatus extends HttpResponseStatus { - private static final AsyncHttpProvider fakeProvider = new AsyncHttpProvider() { - public ListenableFuture execute(Request request, AsyncHandler handler) throws IOException { - throw new UnsupportedOperationException("Mocked, should be refactored"); - } - - public void close() { - throw new UnsupportedOperationException("Mocked, should be refactored"); - } - - public Response prepareResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) { - return new NettyResponse(status, headers, bodyParts); - } - }; - private final HttpResponse response; - // FIXME ResponseStatus should have an abstract prepareResponse(headers, bodyParts) method instead of being passed the provider! - public ResponseStatus(URI uri, HttpResponse response) { - super(uri, fakeProvider); + public ResponseStatus(URI uri, HttpResponse response, AsyncHttpClientConfig config) { + super(uri, config); this.response = response; } + + @Override + public Response prepareResponse(HttpResponseHeaders headers, List bodyParts) { + return new NettyResponse(this, headers, bodyParts); + } /** * Return the response status code @@ -97,5 +81,4 @@ public int getProtocolMinorVersion() { public String getProtocolText() { return response.getProtocolVersion().text(); } - } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java index e679303540..e20854bba7 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettyAsyncResponseTest.java @@ -43,7 +43,7 @@ public void testCookieParseExpires() { final String cookieDef = String.format("efmembercheck=true; expires=%s; path=/; domain=.eclipse.org", sdf.format(date)); NettyResponse - response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { + response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders() { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); @@ -60,7 +60,7 @@ public FluentCaseInsensitiveStringsMap getHeaders() { @Test(groups = "standalone") public void testCookieParseMaxAge() { final String cookieDef = "efmembercheck=true; max-age=60; path=/; domain=.eclipse.org"; - NettyResponse response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { + NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders() { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); @@ -76,7 +76,7 @@ public FluentCaseInsensitiveStringsMap getHeaders() { @Test(groups = "standalone") public void testCookieParseWeirdExpiresValue() { final String cookieDef = "efmembercheck=true; expires=60; path=/; domain=.eclipse.org"; - NettyResponse response = new NettyResponse(new ResponseStatus(null, null), new HttpResponseHeaders(null, null, false) { + NettyResponse response = new NettyResponse(new ResponseStatus(null, null, null), new HttpResponseHeaders() { @Override public FluentCaseInsensitiveStringsMap getHeaders() { return new FluentCaseInsensitiveStringsMap().add("Set-Cookie", cookieDef); From 23a101121459dbdcf641f9a05ec6a8c64cde128b Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 13:47:23 +0200 Subject: [PATCH 0579/2844] Minor clean up --- .../BodyDeferringAsyncHandler.java | 2 -- .../providers/jdk/JDKAsyncHttpProvider.java | 32 +++++++++++++++++-- .../PropertiesBasedResumableProcessor.java | 8 +++-- .../resumable/ResumableIOExceptionFilter.java | 8 ++--- .../util/AsyncHttpProviderUtils.java | 30 ----------------- .../asynchttpclient/async/RemoteSiteTest.java | 10 ++---- .../netty/handler/WebSocketProtocol.java | 2 +- 7 files changed, 43 insertions(+), 49 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java b/api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java index 1bf49bbb03..3114dcf2e1 100644 --- a/api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/BodyDeferringAsyncHandler.java @@ -12,8 +12,6 @@ */ package org.asynchttpclient; -import org.asynchttpclient.Response.ResponseBuilder; - import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java index 061dcd191e..7dfefa7af6 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java @@ -322,7 +322,7 @@ public T call() throws Exception { InputStream stream = is; if (bufferResponseInMemory || byteToRead <= 0) { int[] lengthWrapper = new int[1]; - byte[] bytes = AsyncHttpProviderUtils.readFully(is, lengthWrapper); + byte[] bytes = readFully(is, lengthWrapper); stream = new ByteArrayInputStream(bytes, 0, lengthWrapper[0]); byteToRead = lengthWrapper[0]; } @@ -410,6 +410,34 @@ public T call() throws Exception { } return null; } + + // FIXME Streams should be streamed, not turned into byte arrays + private final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException { + // just in case available() returns bogus (or -1), allocate non-trivial chunk + byte[] b = new byte[Math.max(512, in.available())]; + int offset = 0; + while (true) { + int left = b.length - offset; + int count = in.read(b, offset, left); + if (count < 0) { // EOF + break; + } + offset += count; + if (count == left) { // full buffer, need to expand + b = doubleUp(b); + } + } + // wish Java had Tuple return type... + lengthWrapper[0] = offset; + return b; + } + + private final byte[] doubleUp(byte[] b) { + int len = b.length; + byte[] b2 = new byte[len + len]; + System.arraycopy(b, 0, b2, 0, len); + return b2; + } private FilterContext handleIoException(FilterContext fc) throws FilterException { for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { @@ -571,7 +599,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request urlConnection.getOutputStream().write(b); } else if (request.getStreamData() != null) { int[] lengthWrapper = new int[1]; - cachedBytes = AsyncHttpProviderUtils.readFully(request.getStreamData(), lengthWrapper); + cachedBytes = readFully(request.getStreamData(), lengthWrapper); cachedBytesLenght = lengthWrapper[0]; urlConnection.setRequestProperty("Content-Length", String.valueOf(cachedBytesLenght)); urlConnection.setFixedLengthStreamingMode(cachedBytesLenght); diff --git a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java index 85ebb2bde6..980869a5ad 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java +++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java @@ -96,10 +96,11 @@ private static String append(Map.Entry e) { /** * {@inheritDoc} */ - /* @Override */ + @Override public Map load() { + Scanner scan = null; try { - Scanner scan = new Scanner(new File(TMP, storeName), "UTF-8"); + scan = new Scanner(new File(TMP, storeName), "UTF-8"); scan.useDelimiter("[=\n]"); String key; @@ -115,6 +116,9 @@ public Map load() { } catch (Throwable ex) { // Survive any exceptions log.warn(ex.getMessage(), ex); + } finally { + if (scan != null) + scan.close(); } return properties; } diff --git a/api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java index 456360ae15..87868e35de 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java +++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableIOExceptionFilter.java @@ -18,18 +18,16 @@ import org.asynchttpclient.filter.IOExceptionFilter; /** - * Simple {@link org.asynchttpclient.filter.IOExceptionFilter} that replay the current {@link org.asynchttpclient.Request} using - * a {@link ResumableAsyncHandler} + * Simple {@link org.asynchttpclient.filter.IOExceptionFilter} that replay the current {@link org.asynchttpclient.Request} using a {@link ResumableAsyncHandler} */ public class ResumableIOExceptionFilter implements IOExceptionFilter { - public FilterContext filter(FilterContext ctx) throws FilterException { + public FilterContext filter(FilterContext ctx) throws FilterException { if (ctx.getIOException() != null && ctx.getAsyncHandler() instanceof ResumableAsyncHandler) { Request request = ResumableAsyncHandler.class.cast(ctx.getAsyncHandler()).adjustRequestRange(ctx.getRequest()); - return new FilterContext.FilterContextBuilder(ctx).request(request).replayRequest(true).build(); + return new FilterContext.FilterContextBuilder(ctx).request(request).replayRequest(true).build(); } return ctx; } } - \ No newline at end of file diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index a98cd8a33b..500ed4a290 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -14,7 +14,6 @@ import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStream; import java.io.SequenceInputStream; import java.io.UnsupportedEncodingException; @@ -379,35 +378,6 @@ public final static MultipartRequestEntity createMultipartRequestEntity(List cookies) { StringBuilder sb = new StringBuilder(); diff --git a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java index a5025ffb17..e5b7c85d43 100644 --- a/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RemoteSiteTest.java @@ -23,6 +23,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.apache.commons.io.IOUtils; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -33,7 +34,6 @@ import org.asynchttpclient.Request; import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; -import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.testng.annotations.Test; /** @@ -173,13 +173,9 @@ public void asyncFullBodyProperlyRead() throws Exception { Response r = client.prepareGet("http://www.cyberpresse.ca/").execute().get(); InputStream stream = r.getResponseBodyAsStream(); - // FIXME available is an ESTIMATE!!! - int available = stream.available(); - int[] lengthWrapper = new int[1]; - AsyncHttpProviderUtils.readFully(stream, lengthWrapper); - int byteToRead = lengthWrapper[0]; + int contentLength = Integer.valueOf(r.getHeader("Content-Length")); - assertEquals(available, byteToRead); + assertEquals(contentLength, IOUtils.toByteArray(stream).length); } finally { client.close(); } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java index d29c3a85b0..49bdadc313 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java @@ -184,7 +184,7 @@ public void onError(ChannelHandlerContext ctx, Throwable e) { return; } - NettyResponseFuture nettyResponse = (NettyResponseFuture) attribute; + NettyResponseFuture nettyResponse = (NettyResponseFuture) attribute; WebSocketUpgradeHandler h = WebSocketUpgradeHandler.class.cast(nettyResponse.getAsyncHandler()); NettyWebSocket webSocket = NettyWebSocket.class.cast(h.onCompleted()); From 86605899a1a59a0d19b64feebe6bfdcdca72776e Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 14:26:23 +0200 Subject: [PATCH 0580/2844] Fix webdav test --- .../webdav/WebDavCompletionHandlerBase.java | 105 +++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java index 6781d561cd..1386adb160 100644 --- a/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java +++ b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java @@ -15,6 +15,8 @@ import org.asynchttpclient.AsyncCompletionHandlerBase; import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.Cookie; +import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; @@ -32,6 +34,9 @@ import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URI; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -127,7 +132,105 @@ public HttpStatusWrapper(HttpResponseStatus wrapper, String statusText, int stat @Override public Response prepareResponse(HttpResponseHeaders headers, List bodyParts) { - return wrapped.prepareResponse(headers, bodyParts); + final Response wrappedResponse = wrapped.prepareResponse(headers, bodyParts); + + return new Response() { + + @Override + public int getStatusCode() { + return statusCode; + } + + @Override + public String getStatusText() { + return statusText; + } + + @Override + public byte[] getResponseBodyAsBytes() throws IOException { + return wrappedResponse.getResponseBodyAsBytes(); + } + + @Override + public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { + return wrappedResponse.getResponseBodyAsByteBuffer(); + } + + @Override + public InputStream getResponseBodyAsStream() throws IOException { + return wrappedResponse.getResponseBodyAsStream(); + } + + @Override + public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { + return wrappedResponse.getResponseBodyExcerpt(maxLength, charset); + } + + @Override + public String getResponseBody(String charset) throws IOException { + return wrappedResponse.getResponseBody(charset); + } + + @Override + public String getResponseBodyExcerpt(int maxLength) throws IOException { + return wrappedResponse.getResponseBodyExcerpt(maxLength); + } + + @Override + public String getResponseBody() throws IOException { + return wrappedResponse.getResponseBody(); + } + + @Override + public URI getUri() throws MalformedURLException { + return wrappedResponse.getUri(); + } + + @Override + public String getContentType() { + return wrappedResponse.getContentType(); + } + + @Override + public String getHeader(String name) { + return wrappedResponse.getHeader(name); + } + + @Override + public List getHeaders(String name) { + return wrappedResponse.getHeaders(name); + } + + @Override + public FluentCaseInsensitiveStringsMap getHeaders() { + return wrappedResponse.getHeaders(); + } + + @Override + public boolean isRedirected() { + return wrappedResponse.isRedirected(); + } + + @Override + public List getCookies() { + return wrappedResponse.getCookies(); + } + + @Override + public boolean hasResponseStatus() { + return wrappedResponse.hasResponseStatus(); + } + + @Override + public boolean hasResponseHeaders() { + return wrappedResponse.hasResponseHeaders(); + } + + @Override + public boolean hasResponseBody() { + return wrappedResponse.hasResponseBody(); + } + }; } @Override From 41460f4f6f501b918c7f23ab57c3f30456582cb8 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 14:46:29 +0200 Subject: [PATCH 0581/2844] Removed deprecated APIs --- .../AsyncHttpClientConfig.java | 22 ------- .../java/org/asynchttpclient/ProxyServer.java | 12 ---- .../main/java/org/asynchttpclient/Realm.java | 22 ------- .../java/org/asynchttpclient/Request.java | 8 --- .../asynchttpclient/RequestBuilderBase.java | 61 +++++++++---------- .../SimpleAsyncHttpClient.java | 4 +- .../org/asynchttpclient/multipart/Part.java | 11 ---- .../providers/jdk/JDKAsyncHttpProvider.java | 2 +- 8 files changed, 33 insertions(+), 109 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 104137ea0b..3ce08af1ad 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -296,16 +296,6 @@ public boolean getAllowPoolingConnection() { return allowPoolingConnection; } - /** - * Is the {@link ConnectionsPool} support enabled. - * - * @return true if keep-alive is enabled - * @deprecated - Use {@link AsyncHttpClientConfig#getAllowPoolingConnection()} - */ - public boolean getKeepAlive() { - return allowPoolingConnection; - } - /** * Return the USER_AGENT header value * @@ -777,18 +767,6 @@ public Builder setAllowPoolingConnection(boolean allowPoolingConnection) { return this; } - /** - * Set true if connection can be pooled by a {@link ConnectionsPool}. Default is true. - * - * @param allowPoolingConnection true if connection can be pooled by a {@link ConnectionsPool} - * @return a {@link Builder} - * @deprecated - Use {@link AsyncHttpClientConfig.Builder#setAllowPoolingConnection(boolean)} - */ - public Builder setKeepAlive(boolean allowPoolingConnection) { - this.allowPoolingConnection = allowPoolingConnection; - return this; - } - /** * Set the{@link ScheduledExecutorService} used to expire idle connections. * diff --git a/api/src/main/java/org/asynchttpclient/ProxyServer.java b/api/src/main/java/org/asynchttpclient/ProxyServer.java index d7d841c3fc..9cd3ecc70a 100644 --- a/api/src/main/java/org/asynchttpclient/ProxyServer.java +++ b/api/src/main/java/org/asynchttpclient/ProxyServer.java @@ -57,18 +57,6 @@ public String toString() { private String encoding = "UTF-8"; private String ntlmDomain = System.getProperty("http.auth.ntlm.domain", ""); - private boolean isBasic = true; - - @Deprecated - public boolean isBasic() { - return isBasic; - } - - @Deprecated - public void setBasic(boolean isBasic) { - this.isBasic = isBasic; - } - public ProxyServer(final Protocol protocol, final String host, final int port, String principal, String password) { this.protocol = protocol; this.host = host; diff --git a/api/src/main/java/org/asynchttpclient/Realm.java b/api/src/main/java/org/asynchttpclient/Realm.java index de213f74c0..9c09faaedb 100644 --- a/api/src/main/java/org/asynchttpclient/Realm.java +++ b/api/src/main/java/org/asynchttpclient/Realm.java @@ -164,16 +164,6 @@ public boolean getUsePreemptiveAuth() { return usePreemptiveAuth; } - /** - * Return the NTLM domain to use. This value should map the JDK - * - * @return the NTLM domain - * @deprecated - use getNtlmDomain() - */ - public String getDomain() { - return domain; - } - /** * Return the NTLM domain to use. This value should map the JDK * @@ -280,17 +270,6 @@ public static class RealmBuilder { private String host = "localhost"; private boolean messageType2Received = false; - @Deprecated - public String getDomain() { - return domain; - } - - @Deprecated - public RealmBuilder setDomain(String domain) { - this.domain = domain; - return this; - } - public String getNtlmDomain() { return domain; } @@ -630,5 +609,4 @@ public Realm build() { opaque); } } - } diff --git a/api/src/main/java/org/asynchttpclient/Request.java b/api/src/main/java/org/asynchttpclient/Request.java index 2c68f6df5b..48cabc6a76 100644 --- a/api/src/main/java/org/asynchttpclient/Request.java +++ b/api/src/main/java/org/asynchttpclient/Request.java @@ -120,14 +120,6 @@ public interface Request { */ public BodyGenerator getBodyGenerator(); - /** - * Return the current size of the content-lenght header based on the body's size. - * - * @return the current size of the content-lenght header based on the body's size. - * @deprecated - */ - public long getLength(); - /** * Return the current size of the content-lenght header based on the body's size. * diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java index c1bbc4b289..0a0001f8bc 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -98,7 +98,7 @@ public RequestImpl(Request prototype) { this.proxyServer = prototype.getProxyServer(); this.realm = prototype.getRealm(); this.file = prototype.getFile(); - this.followRedirects = prototype.isRedirectOverrideSet()? prototype.isRedirectEnabled() : null; + this.followRedirects = prototype.isRedirectOverrideSet() ? prototype.isRedirectEnabled() : null; this.requestTimeoutInMs = prototype.getRequestTimeoutInMs(); this.rangeOffset = prototype.getRangeOffset(); this.charset = prototype.getBodyEncoding(); @@ -107,16 +107,17 @@ public RequestImpl(Request prototype) { } } - /* @Override */ - + @Override public String getMethod() { return method; } + @Override public InetAddress getInetAddress() { return address; } + @Override public InetAddress getLocalAddress() { return localAddress; } @@ -130,12 +131,12 @@ private String removeTrailingSlash(URI uri) { } } - /* @Override */ + @Override public String getUrl() { return removeTrailingSlash(getURI()); } - /* @Override */ + @Override public String getRawUrl() { return removeTrailingSlash(getRawURI()); } @@ -208,7 +209,7 @@ private URI toURI(boolean encode) { return URI.create(builder.toString()); } - /* @Override */ + @Override public FluentCaseInsensitiveStringsMap getHeaders() { if (headers == null) { headers = new FluentCaseInsensitiveStringsMap(); @@ -221,87 +222,85 @@ public boolean hasHeaders() { return headers != null && !headers.isEmpty(); } - /* @Override */ + @Override public Collection getCookies() { if (cookies == null) { - cookies = Collections.unmodifiableCollection(Collections.emptyList()); + cookies = Collections.unmodifiableCollection(Collections. emptyList()); } return cookies; } - /* @Override */ + @Override public byte[] getByteData() { return byteData; } - /* @Override */ + @Override public String getStringData() { return stringData; } - /* @Override */ + @Override public InputStream getStreamData() { return streamData; } - /* @Override */ + @Override public BodyGenerator getBodyGenerator() { return bodyGenerator; } - /* @Override */ - - /** - * @return - * @deprecated - */ - public long getLength() { - return length; - } - + @Override public long getContentLength() { return length; } - /* @Override */ + @Override public FluentStringsMap getParams() { return params; } - /* @Override */ + @Override public List getParts() { return parts; } - /* @Override */ + @Override public String getVirtualHost() { return virtualHost; } + @Override public FluentStringsMap getQueryParams() { return queryParams; } + @Override public ProxyServer getProxyServer() { return proxyServer; } + @Override public Realm getRealm() { return realm; } + @Override public File getFile() { return file; } + @Override public boolean isRedirectEnabled() { - return (followRedirects != null && followRedirects); + return followRedirects != null && followRedirects; } - public boolean isRedirectOverrideSet(){ + @Override + public boolean isRedirectOverrideSet() { return followRedirects != null; } + @Override public int getRequestTimeoutInMs() { return requestTimeoutInMs; } @@ -377,10 +376,10 @@ public T setUrl(String url) { } public T setInetAddress(InetAddress address) { - request.address = address; - return derived.cast(this); + request.address = address; + return derived.cast(this); } - + public T setLocalInetAddress(InetAddress address) { request.localAddress = address; return derived.cast(this); @@ -407,7 +406,7 @@ private URI buildURI(String url) { url = s + url.substring(uri.getScheme().length() + 1); return buildURI(url); } else { - throw new IllegalArgumentException("Invalid url " + uri.toString()); + throw new IllegalArgumentException("Invalid url " + uri.toString()); } } diff --git a/api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java index e4cd81b893..8f38f7ef44 100644 --- a/api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/SimpleAsyncHttpClient.java @@ -557,8 +557,8 @@ public Builder setRequestCompressionLevel(int requestCompressionLevel) { return this; } - public Builder setRealmDomain(String domain) { - realm().setDomain(domain); + public Builder setRealmNtlmDomain(String domain) { + realm().setNtlmDomain(domain); return this; } diff --git a/api/src/main/java/org/asynchttpclient/multipart/Part.java b/api/src/main/java/org/asynchttpclient/multipart/Part.java index 3d71bf5240..40d8b90382 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/Part.java +++ b/api/src/main/java/org/asynchttpclient/multipart/Part.java @@ -116,16 +116,6 @@ public abstract class Part implements org.asynchttpclient.Part { */ static final byte[] CONTENT_ID_BYTES = MultipartEncodingUtil.getAsciiBytes(CONTENT_ID); - /** - * Return the boundary string. - * - * @return the boundary string - * @deprecated uses a constant string. Rather use {@link #getPartBoundary} - */ - public static String getBoundary() { - return BOUNDARY; - } - /** * The ASCII bytes to use as the multipart boundary. */ @@ -165,7 +155,6 @@ public static String getBoundary() { * Gets the part boundary to be used. * * @return the part boundary as an array of bytes. - * @since 3.0 */ protected byte[] getPartBoundary() { if (boundaryBytes == null) { diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java index 7dfefa7af6..d6cec0a5b5 100644 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java @@ -544,7 +544,7 @@ private void configure(URI uri, HttpURLConnection urlConnection, Request request break; case NTLM: jdkNtlmDomain = System.getProperty(NTLM_DOMAIN); - System.setProperty(NTLM_DOMAIN, realm.getDomain()); + System.setProperty(NTLM_DOMAIN, realm.getNtlmDomain()); break; case NONE: break; From 20392262064c5ec1ac89b039d4ef8ed6d3ab709a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 14:50:06 +0200 Subject: [PATCH 0582/2844] Port 169051cb72ff8487696cd7e19a20e3654f50fc49 on master --- .../org/asynchttpclient/multipart/MultipartBody.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java index 9f5ec1d756..70d15e21e2 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java +++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java @@ -579,18 +579,20 @@ private long writeToTarget(WritableByteChannel target, ByteArrayOutputStream byt final SocketChannel channel = (SocketChannel) target; channel.register(selector, SelectionKey.OP_WRITE); - while (written < byteWriter.size() && selector.select() != 0) { + while (written < byteWriter.size()) { + selector.select(1000); + maxSpin++; final Set selectedKeys = selector.selectedKeys(); for (SelectionKey key : selectedKeys) { if (key.isWritable()) { written += target.write(message); + maxSpin = 0; } } - } - - if (written < byteWriter.size()) { - throw new IOException("Unable to write on channel " + target); + if (maxSpin >= 10) { + throw new IOException("Unable to write on channel " + target); + } } } finally { selector.close(); From 0db5154bb4e010bf4c9b6cc6d69323860e18b066 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 14:50:23 +0200 Subject: [PATCH 0583/2844] Port fb2daaca6441d9846db25ffccc194f9921b5a3c8 on master --- api/src/main/java/org/asynchttpclient/multipart/FilePart.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/multipart/FilePart.java b/api/src/main/java/org/asynchttpclient/multipart/FilePart.java index 6cbab86a56..1d06806710 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/FilePart.java +++ b/api/src/main/java/org/asynchttpclient/multipart/FilePart.java @@ -148,9 +148,9 @@ public FilePart(String name, String fileName, File file, String contentType, Str * @throws java.io.IOException If an IO problem occurs */ protected void sendDispositionHeader(OutputStream out) throws IOException { + super.sendDispositionHeader(out); String filename = this.source.getFileName(); if (filename != null) { - super.sendDispositionHeader(out); out.write(FILE_NAME_BYTES); out.write(QUOTE_BYTES); out.write(MultipartEncodingUtil.getAsciiBytes(filename)); From 91fc8269c3e17320a7c8015186b697a754458048 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 15:19:34 +0200 Subject: [PATCH 0584/2844] Drop JDK provider, close #392 --- .../org/asynchttpclient/AsyncHttpClient.java | 11 +- .../asynchttpclient/AsyncHttpProvider.java | 2 - .../providers/jdk/JDKAsyncHttpProvider.java | 759 ------------------ .../jdk/JDKAsyncHttpProviderConfig.java | 44 - .../providers/jdk/JDKDelegateFuture.java | 84 -- .../providers/jdk/JDKFuture.java | 182 ----- .../providers/jdk/JDKResponse.java | 63 -- .../providers/jdk/ResponseBodyPart.java | 92 --- .../providers/jdk/ResponseHeaders.java | 59 -- .../providers/jdk/ResponseStatus.java | 89 -- 10 files changed, 3 insertions(+), 1382 deletions(-) delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java delete mode 100644 api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java index 7097322940..18ddaa77fe 100755 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -147,8 +147,7 @@ public class AsyncHttpClient implements Closeable { */ private static final String[] DEFAULT_PROVIDERS = { "org.asynchttpclient.providers.netty.NettyAsyncHttpProvider", - "org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider", - "org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider" + "org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider" }; private final AsyncHttpProvider httpProvider; @@ -174,8 +173,7 @@ public class AsyncHttpClient implements Closeable { *

  • JDK
  • * * - * If none of those providers are found, then the runtime will default to - * the {@link org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider}. + * If none of those providers are found, then the engine will throw an IllegalStateException. */ public AsyncHttpClient() { this(new AsyncHttpClientConfig.Builder().build()); @@ -200,11 +198,9 @@ public AsyncHttpClient(AsyncHttpProvider provider) { *
      *
    • netty
    • *
    • grizzly
    • - *
    • JDK
    • *
    * - * If none of those providers are found, then the runtime will default to - * the {@link org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider}. + * If none of those providers are found, then the engine will throw an IllegalStateException. * * @param config a {@link AsyncHttpClientConfig} */ @@ -642,7 +638,6 @@ private static AsyncHttpProvider loadProvider(final String className, return null; } - @SuppressWarnings("unchecked") private static AsyncHttpProvider loadDefaultProvider(String[] providerClassNames, AsyncHttpClientConfig config) { AsyncHttpProvider provider; diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java index c8f910b8fb..848249a6d1 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpProvider.java @@ -20,8 +20,6 @@ /** * Interface to be used when implementing custom asynchronous I/O HTTP client. - * By default, the {@link org.asynchttpclient.providers.jdk.JDKAsyncHttpProvider} is used if - * none of the other provider modules are found on the classpath. */ public interface AsyncHttpProvider extends Closeable { diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java deleted file mode 100644 index d6cec0a5b5..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProvider.java +++ /dev/null @@ -1,759 +0,0 @@ -/* - * Copyright (c) 2010-2013 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import static org.asynchttpclient.util.AsyncHttpProviderUtils.*; -import static org.asynchttpclient.util.MiscUtil.*; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.Field; -import java.net.Authenticator; -import java.net.ConnectException; -import java.net.HttpURLConnection; -import java.net.InetSocketAddress; -import java.net.PasswordAuthentication; -import java.net.Proxy; -import java.net.SocketAddress; -import java.net.SocketTimeoutException; -import java.net.URI; -import java.net.UnknownHostException; -import java.nio.ByteBuffer; -import java.security.GeneralSecurityException; -import java.security.NoSuchAlgorithmException; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.zip.GZIPInputStream; - -import javax.naming.AuthenticationException; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLHandshakeException; - -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.AsyncHttpProviderConfig; -import org.asynchttpclient.Body; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.ListenableFuture; -import org.asynchttpclient.MaxRedirectException; -import org.asynchttpclient.ProgressAsyncHandler; -import org.asynchttpclient.ProxyServer; -import org.asynchttpclient.Realm; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; -import org.asynchttpclient.filter.IOExceptionFilter; -import org.asynchttpclient.filter.ResponseFilter; -import org.asynchttpclient.listener.TransferCompletionHandler; -import org.asynchttpclient.multipart.MultipartRequestEntity; -import org.asynchttpclient.util.AsyncHttpProviderUtils; -import org.asynchttpclient.util.AuthenticatorUtils; -import org.asynchttpclient.util.ProxyUtils; -import org.asynchttpclient.util.SslUtils; -import org.asynchttpclient.util.UTF8UrlEncoder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class JDKAsyncHttpProvider implements AsyncHttpProvider { - private final static Logger logger = LoggerFactory.getLogger(JDKAsyncHttpProvider.class); - - private final static String NTLM_DOMAIN = "http.auth.ntlm.domain"; - - private final AsyncHttpClientConfig config; - - private final AtomicBoolean isClose = new AtomicBoolean(false); - - private final static int MAX_BUFFERED_BYTES = 8192; - - private final AtomicInteger maxConnections = new AtomicInteger(); - - private String jdkNtlmDomain; - - private Authenticator jdkAuthenticator; - - private boolean bufferResponseInMemory = false; - - private ExecutorService service; - - private boolean managedExecutorService; - - public JDKAsyncHttpProvider(AsyncHttpClientConfig config) { - - this.config = config; - service = config.executorService(); - managedExecutorService = (service == null); - if (service == null) { - service = AsyncHttpProviderUtils.createDefaultExecutorService(); - } - AsyncHttpProviderConfig providerConfig = config.getAsyncHttpProviderConfig(); - if (providerConfig instanceof JDKAsyncHttpProviderConfig) { - configure(JDKAsyncHttpProviderConfig.class.cast(providerConfig)); - } - } - - private void configure(JDKAsyncHttpProviderConfig config) { - for (Map.Entry e : config.propertiesSet()) { - System.setProperty(e.getKey(), e.getValue()); - } - - if (config.getProperty(JDKAsyncHttpProviderConfig.FORCE_RESPONSE_BUFFERING) != null) { - bufferResponseInMemory = true; - } - } - - public ListenableFuture execute(Request request, AsyncHandler handler) throws IOException { - return execute(request, handler, null); - } - - public ListenableFuture execute(Request request, AsyncHandler handler, ListenableFuture future) throws IOException { - if (isClose.get()) { - throw new IOException("Closed"); - } - - if (config.getMaxTotalConnections() > -1 && (maxConnections.get() + 1) > config.getMaxTotalConnections()) { - throw new IOException(String.format("Too many connections %s", config.getMaxTotalConnections())); - } - - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - if (proxyServer != null || realm != null) { - try { - configureProxyAndAuth(proxyServer, realm); - } catch (AuthenticationException e) { - throw new IOException(e.getMessage()); - } - } - - HttpURLConnection urlConnection = createUrlConnection(request); - - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - - JDKDelegateFuture delegate = null; - if (future != null) { - delegate = new JDKDelegateFuture(handler, requestTimeout, future, urlConnection); - } - - JDKFuture f = (delegate == null) ? new JDKFuture(handler, requestTimeout, urlConnection) : delegate; - f.touch(); - - f.setInnerFuture(service.submit(new AsyncHttpUrlConnection(urlConnection, request, handler, f))); - maxConnections.incrementAndGet(); - - return f; - } - - private HttpURLConnection createUrlConnection(Request request) throws IOException { - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - Proxy proxy = null; - if (proxyServer != null || realm != null) { - try { - proxy = configureProxyAndAuth(proxyServer, realm); - } catch (AuthenticationException e) { - throw new IOException(e.getMessage()); - } - } - - HttpURLConnection urlConnection = (HttpURLConnection) - request.getURI().toURL().openConnection(proxy == null ? Proxy.NO_PROXY : proxy); - - if (request.getUrl().startsWith("https")) { - HttpsURLConnection secure = (HttpsURLConnection) urlConnection; - SSLContext sslContext = config.getSSLContext(); - if (sslContext == null) { - try { - sslContext = SslUtils.getSSLContext(); - } catch (NoSuchAlgorithmException e) { - throw new IOException(e.getMessage()); - } catch (GeneralSecurityException e) { - throw new IOException(e.getMessage()); - } - } - secure.setSSLSocketFactory(sslContext.getSocketFactory()); - secure.setHostnameVerifier(config.getHostnameVerifier()); - } - return urlConnection; - } - - public void close() { - isClose.set(true); - if (managedExecutorService) { - service.shutdownNow(); - } - } - - private final class AsyncHttpUrlConnection implements Callable { - - private HttpURLConnection urlConnection; - private Request request; - private final AsyncHandler asyncHandler; - private final ListenableFuture future; - private int currentRedirectCount; - private AtomicBoolean isAuth = new AtomicBoolean(false); - private byte[] cachedBytes; - private int cachedBytesLenght; - private boolean terminate = true; - - public AsyncHttpUrlConnection(HttpURLConnection urlConnection, Request request, AsyncHandler asyncHandler, ListenableFuture future) { - this.urlConnection = urlConnection; - this.request = request; - this.asyncHandler = asyncHandler; - this.future = future; - this.request = request; - } - - public T call() throws Exception { - AsyncHandler.STATE state = AsyncHandler.STATE.ABORT; - try { - URI uri = null; - // Encoding with URLConnection is a bit bogus so we need to try both way before setting it - try { - uri = AsyncHttpProviderUtils.createUri(request.getRawUrl()); - } catch (IllegalArgumentException u) { - uri = AsyncHttpProviderUtils.createUri(request.getUrl()); - } - - configure(uri, urlConnection, request); - urlConnection.connect(); - - if (asyncHandler instanceof TransferCompletionHandler) { - throw new IllegalStateException(TransferCompletionHandler.class.getName() + "not supported by this provider"); - } - - int statusCode = urlConnection.getResponseCode(); - - logger.debug("\n\nRequest {}\n\nResponse {}\n", request, statusCode); - - ResponseStatus status = new ResponseStatus(uri, urlConnection, config); - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler).request(request).responseStatus(status).build(); - for (ResponseFilter asyncFilter : config.getResponseFilters()) { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } - - // The request has changed - if (fc.replayRequest()) { - request = fc.getRequest(); - urlConnection = createUrlConnection(request); - terminate = false; - return call(); - } - - boolean redirectEnabled = (request.isRedirectEnabled() || config.isRedirectEnabled()); - if (redirectEnabled && (statusCode == 302 || statusCode == 301)) { - - if (currentRedirectCount++ < config.getMaxRedirects()) { - String location = urlConnection.getHeaderField("Location"); - URI redirUri = AsyncHttpProviderUtils.getRedirectUri(uri, location); - String newUrl = redirUri.toString(); - - if (!newUrl.equals(uri.toString())) { - RequestBuilder builder = new RequestBuilder(request); - - logger.debug("Redirecting to {}", newUrl); - - request = builder.setUrl(newUrl).build(); - urlConnection = createUrlConnection(request); - terminate = false; - return call(); - } - } else { - throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()); - } - } - - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - if (statusCode == 401 && !isAuth.getAndSet(true) && realm != null) { - String wwwAuth = urlConnection.getHeaderField("WWW-Authenticate"); - - logger.debug("Sending authentication to {}", request.getUrl()); - - Realm nr = new Realm.RealmBuilder().clone(realm) - .parseWWWAuthenticateHeader(wwwAuth) - .setUri(URI.create(request.getUrl()).getPath()) - .setMethodName(request.getMethod()) - .setUsePreemptiveAuth(true) - .build(); - RequestBuilder builder = new RequestBuilder(request); - request = builder.setRealm(nr).build(); - urlConnection = createUrlConnection(request); - terminate = false; - return call(); - } - - state = asyncHandler.onStatusReceived(status); - if (state == AsyncHandler.STATE.CONTINUE) { - state = asyncHandler.onHeadersReceived(new ResponseHeaders(uri, urlConnection, JDKAsyncHttpProvider.this)); - } - - if (state == AsyncHandler.STATE.CONTINUE) { - InputStream is = getInputStream(urlConnection); - String contentEncoding = urlConnection.getHeaderField("Content-Encoding"); - boolean isGZipped = contentEncoding == null ? false : "gzip".equalsIgnoreCase(contentEncoding); - if (isGZipped) { - is = new GZIPInputStream(is); - } - - int byteToRead = urlConnection.getContentLength(); - InputStream stream = is; - if (bufferResponseInMemory || byteToRead <= 0) { - int[] lengthWrapper = new int[1]; - byte[] bytes = readFully(is, lengthWrapper); - stream = new ByteArrayInputStream(bytes, 0, lengthWrapper[0]); - byteToRead = lengthWrapper[0]; - } - - if (byteToRead > 0) { - int minBytes = Math.min(8192, byteToRead); - byte[] bytes = new byte[minBytes]; - int leftBytes = minBytes < 8192 ? minBytes : byteToRead; - int read = 0; - while (leftBytes > -1) { - - read = stream.read(bytes); - if (read == -1) { - break; - } - - future.touch(); - - byte[] b = new byte[read]; - System.arraycopy(bytes, 0, b, 0, read); - leftBytes -= read; - asyncHandler.onBodyPartReceived(new ResponseBodyPart(uri, b, JDKAsyncHttpProvider.this, leftBytes > -1)); - } - } - - if (request.getMethod().equalsIgnoreCase("HEAD")) { - asyncHandler.onBodyPartReceived(new ResponseBodyPart(uri, "".getBytes(), JDKAsyncHttpProvider.this, true)); - } - } - - if (asyncHandler instanceof ProgressAsyncHandler) { - ProgressAsyncHandler progressAsyncHandler = ProgressAsyncHandler.class.cast(asyncHandler); - progressAsyncHandler.onHeaderWriteCompleted(); - progressAsyncHandler.onContentWriteCompleted(); - } - try { - T t = asyncHandler.onCompleted(); - future.content(t); - future.done(); - return t; - } catch (Throwable t) { - RuntimeException ex = new RuntimeException(); - ex.initCause(t); - throw ex; - } - } catch (Throwable t) { - logger.debug(t.getMessage(), t); - - if (t instanceof IOException && !config.getIOExceptionFilters().isEmpty()) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(asyncHandler) - .request(request).ioException(IOException.class.cast(t)).build(); - - try { - fc = handleIoException(fc); - } catch (FilterException e) { - if (config.getMaxTotalConnections() != -1) { - maxConnections.decrementAndGet(); - } - future.done(); - } - - if (fc.replayRequest()) { - request = fc.getRequest(); - urlConnection = createUrlConnection(request); - return call(); - } - } - - try { - future.abort(filterException(t)); - } catch (Throwable t2) { - logger.error(t2.getMessage(), t2); - } - } finally { - if (terminate) { - if (config.getMaxTotalConnections() != -1) { - maxConnections.decrementAndGet(); - } - urlConnection.disconnect(); - if (jdkNtlmDomain != null) { - System.setProperty(NTLM_DOMAIN, jdkNtlmDomain); - } - Authenticator.setDefault(jdkAuthenticator); - } - } - return null; - } - - // FIXME Streams should be streamed, not turned into byte arrays - private final byte[] readFully(InputStream in, int[] lengthWrapper) throws IOException { - // just in case available() returns bogus (or -1), allocate non-trivial chunk - byte[] b = new byte[Math.max(512, in.available())]; - int offset = 0; - while (true) { - int left = b.length - offset; - int count = in.read(b, offset, left); - if (count < 0) { // EOF - break; - } - offset += count; - if (count == left) { // full buffer, need to expand - b = doubleUp(b); - } - } - // wish Java had Tuple return type... - lengthWrapper[0] = offset; - return b; - } - - private final byte[] doubleUp(byte[] b) { - int len = b.length; - byte[] b2 = new byte[len + len]; - System.arraycopy(b, 0, b2, 0, len); - return b2; - } - - private FilterContext handleIoException(FilterContext fc) throws FilterException { - for (IOExceptionFilter asyncFilter : config.getIOExceptionFilters()) { - fc = asyncFilter.filter(fc); - if (fc == null) { - throw new NullPointerException("FilterContext is null"); - } - } - return fc; - } - - private Throwable filterException(Throwable t) { - if (t instanceof UnknownHostException) { - t = new ConnectException(t.getMessage()); - - } else if (t instanceof SocketTimeoutException) { - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - t = new TimeoutException("No response received after " + requestTimeout); - - } else if (t instanceof SSLHandshakeException) { - Throwable t2 = new ConnectException(); - t2.initCause(t); - t = t2; - } - - return t; - } - - private void configure(URI uri, HttpURLConnection urlConnection, Request request) throws IOException, AuthenticationException { - - int requestTimeout = AsyncHttpProviderUtils.requestTimeout(config, request); - - if (requestTimeout != 0) { - urlConnection.setConnectTimeout(requestTimeout); - urlConnection.setReadTimeout(requestTimeout); - } - - urlConnection.setInstanceFollowRedirects(false); - String host = uri.getHost(); - String method = request.getMethod(); - - if (request.getVirtualHost() != null) { - host = request.getVirtualHost(); - } - - if (uri.getPort() == -1 || request.getVirtualHost() != null) { - urlConnection.setRequestProperty("Host", host); - } else { - urlConnection.setRequestProperty("Host", host + ":" + uri.getPort()); - } - - - if (config.isCompressionEnabled()) { - urlConnection.setRequestProperty("Accept-Encoding", "gzip"); - } - - if (!method.equalsIgnoreCase("CONNECT")) { - FluentCaseInsensitiveStringsMap h = request.getHeaders(); - if (h != null) { - for (String name : h.keySet()) { - if (!"host".equalsIgnoreCase(name)) { - for (String value : h.get(name)) { - urlConnection.setRequestProperty(name, value); - if (name.equalsIgnoreCase("Expect")) { - throw new IllegalStateException("Expect: 100-Continue not supported"); - } - } - } - } - } - } - - String ka = AsyncHttpProviderUtils.keepAliveHeaderValue(config); - urlConnection.setRequestProperty("Connection", ka); - ProxyServer proxyServer = ProxyUtils.getProxyServer(config, request); - if (proxyServer != null) { - urlConnection.setRequestProperty("Proxy-Connection", ka); - if (proxyServer.getPrincipal() != null) { - urlConnection.setRequestProperty("Proxy-Authorization", AuthenticatorUtils.computeBasicAuthentication(proxyServer)); - } - - if (proxyServer.getProtocol().equals(ProxyServer.Protocol.NTLM)) { - jdkNtlmDomain = System.getProperty(NTLM_DOMAIN); - System.setProperty(NTLM_DOMAIN, proxyServer.getNtlmDomain()); - } - } - - Realm realm = request.getRealm() != null ? request.getRealm() : config.getRealm(); - if (realm != null && realm.getUsePreemptiveAuth()) { - switch (realm.getAuthScheme()) { - case BASIC: - urlConnection.setRequestProperty("Authorization", - AuthenticatorUtils.computeBasicAuthentication(realm)); - break; - case DIGEST: - if (isNonEmpty(realm.getNonce())) { - try { - urlConnection.setRequestProperty("Authorization", - AuthenticatorUtils.computeDigestAuthentication(realm)); - } catch (NoSuchAlgorithmException e) { - throw new SecurityException(e); - } - } - break; - case NTLM: - jdkNtlmDomain = System.getProperty(NTLM_DOMAIN); - System.setProperty(NTLM_DOMAIN, realm.getNtlmDomain()); - break; - case NONE: - break; - default: - throw new IllegalStateException(String.format("Invalid Authentication %s", realm.toString())); - } - - } - - // Add default accept headers. - if (request.getHeaders().getFirstValue("Accept") == null) { - urlConnection.setRequestProperty("Accept", "*/*"); - } - - if (request.getHeaders().getFirstValue("User-Agent") != null) { - urlConnection.setRequestProperty("User-Agent", request.getHeaders().getFirstValue("User-Agent")); - } else if (config.getUserAgent() != null) { - urlConnection.setRequestProperty("User-Agent", config.getUserAgent()); - } else { - urlConnection.setRequestProperty("User-Agent", - AsyncHttpProviderUtils.constructUserAgent(JDKAsyncHttpProvider.class, - config)); - } - - if (isNonEmpty(request.getCookies())) { - urlConnection.setRequestProperty("Cookie", AsyncHttpProviderUtils.encodeCookies(request.getCookies())); - } - - String reqType = request.getMethod(); - urlConnection.setRequestMethod(reqType); - - if ("POST".equals(reqType) || "PUT".equals(reqType)) { - urlConnection.setRequestProperty("Content-Length", "0"); - urlConnection.setDoOutput(true); - String bodyCharset = request.getBodyEncoding() == null ? DEFAULT_CHARSET : request.getBodyEncoding(); - - if (cachedBytes != null) { - urlConnection.setRequestProperty("Content-Length", String.valueOf(cachedBytesLenght)); - urlConnection.setFixedLengthStreamingMode(cachedBytesLenght); - urlConnection.getOutputStream().write(cachedBytes, 0, cachedBytesLenght); - } else if (request.getByteData() != null) { - urlConnection.setRequestProperty("Content-Length", String.valueOf(request.getByteData().length)); - urlConnection.setFixedLengthStreamingMode(request.getByteData().length); - - urlConnection.getOutputStream().write(request.getByteData()); - } else if (request.getStringData() != null) { - if (!request.getHeaders().containsKey("Content-Type")) { - urlConnection.setRequestProperty("Content-Type", "text/html;" + bodyCharset); - } - byte[] b = request.getStringData().getBytes(bodyCharset); - urlConnection.setRequestProperty("Content-Length", String.valueOf(b.length)); - urlConnection.getOutputStream().write(b); - } else if (request.getStreamData() != null) { - int[] lengthWrapper = new int[1]; - cachedBytes = readFully(request.getStreamData(), lengthWrapper); - cachedBytesLenght = lengthWrapper[0]; - urlConnection.setRequestProperty("Content-Length", String.valueOf(cachedBytesLenght)); - urlConnection.setFixedLengthStreamingMode(cachedBytesLenght); - - urlConnection.getOutputStream().write(cachedBytes, 0, cachedBytesLenght); - } else if (request.getParams() != null) { - StringBuilder sb = new StringBuilder(); - for (final Map.Entry> paramEntry : request.getParams()) { - final String key = paramEntry.getKey(); - for (final String value : paramEntry.getValue()) { - if (sb.length() > 0) { - sb.append("&"); - } - UTF8UrlEncoder.appendEncoded(sb, key); - sb.append("="); - UTF8UrlEncoder.appendEncoded(sb, value); - } - } - urlConnection.setRequestProperty("Content-Length", String.valueOf(sb.length())); - urlConnection.setFixedLengthStreamingMode(sb.length()); - - if (!request.getHeaders().containsKey("Content-Type")) { - urlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - } - urlConnection.getOutputStream().write(sb.toString().getBytes(bodyCharset)); - } else if (request.getParts() != null) { - int lenght = (int) request.getContentLength(); - if (lenght != -1) { - urlConnection.setRequestProperty("Content-Length", String.valueOf(lenght)); - urlConnection.setFixedLengthStreamingMode(lenght); - } - - if (lenght == -1) { - lenght = MAX_BUFFERED_BYTES; - } - - MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getHeaders()); - - urlConnection.setRequestProperty("Content-Type", mre.getContentType()); - urlConnection.setRequestProperty("Content-Length", String.valueOf(mre.getContentLength())); - - mre.writeRequest(urlConnection.getOutputStream()); - } else if (request.getFile() != null) { - File file = request.getFile(); - if (!file.isFile()) { - throw new IOException(String.format(Thread.currentThread() - + "File %s is not a file or doesn't exist", file.getAbsolutePath())); - } - urlConnection.setRequestProperty("Content-Length", String.valueOf(file.length())); - urlConnection.setFixedLengthStreamingMode((int) file.length()); - - FileInputStream fis = new FileInputStream(file); - try { - OutputStream os = urlConnection.getOutputStream(); - for (final byte[] buffer = new byte[1024 * 16]; ; ) { - int read = fis.read(buffer); - if (read < 0) { - break; - } - os.write(buffer, 0, read); - } - } finally { - fis.close(); - } - } else if (request.getBodyGenerator() != null) { - Body body = request.getBodyGenerator().createBody(); - try { - int length = (int) body.getContentLength(); - if (length < 0) { - length = (int) request.getContentLength(); - } - if (length >= 0) { - urlConnection.setRequestProperty("Content-Length", String.valueOf(length)); - urlConnection.setFixedLengthStreamingMode(length); - } - OutputStream os = urlConnection.getOutputStream(); - for (ByteBuffer buffer = ByteBuffer.allocate(1024 * 8); ; ) { - buffer.clear(); - if (body.read(buffer) < 0) { - break; - } - os.write(buffer.array(), buffer.arrayOffset(), buffer.position()); - } - } finally { - try { - body.close(); - } catch (IOException e) { - logger.warn("Failed to close request body: {}", e.getMessage(), e); - } - } - } - } - } - } - - private Proxy configureProxyAndAuth(final ProxyServer proxyServer, final Realm realm) throws AuthenticationException { - - Proxy proxy = null; - if (proxyServer != null) { - - String proxyHost = proxyServer.getHost().startsWith("http://") - ? proxyServer.getHost().substring("http://".length()) : proxyServer.getHost(); - - SocketAddress addr = new InetSocketAddress(proxyHost, proxyServer.getPort()); - proxy = new Proxy(Proxy.Type.HTTP, addr); - } - - final boolean hasProxy = (proxyServer != null && proxyServer.getPrincipal() != null); - final boolean hasAuthentication = (realm != null && realm.getPrincipal() != null); - if (hasProxy || hasAuthentication) { - - Field f = null; - try { - f = Authenticator.class.getDeclaredField("theAuthenticator"); - - f.setAccessible(true); - jdkAuthenticator = (Authenticator) f.get(Authenticator.class); - } catch (NoSuchFieldException e) { - } catch (IllegalAccessException e) { - } - - - Authenticator.setDefault(new Authenticator() { - protected PasswordAuthentication getPasswordAuthentication() { - if (hasProxy && getRequestingHost().equals(proxyServer.getHost()) - && getRequestingPort() == proxyServer.getPort()) { - String password = ""; - if (proxyServer.getPassword() != null) { - password = proxyServer.getPassword(); - } - return new PasswordAuthentication(proxyServer.getPrincipal(), password.toCharArray()); - } - - if (hasAuthentication) { - return new PasswordAuthentication(realm.getPrincipal(), realm.getPassword().toCharArray()); - } - - return super.getPasswordAuthentication(); - } - }); - } else { - Authenticator.setDefault(null); - } - return proxy; - } - - private InputStream getInputStream(HttpURLConnection urlConnection) throws IOException { - if (urlConnection.getResponseCode() < 400) { - return urlConnection.getInputStream(); - } else { - InputStream ein = urlConnection.getErrorStream(); - return (ein != null) - ? ein : new ByteArrayInputStream(new byte[0]); - } - } - -} diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java deleted file mode 100644 index 8d743a21a5..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKAsyncHttpProviderConfig.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import org.asynchttpclient.AsyncHttpProviderConfig; - -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; - -public class JDKAsyncHttpProviderConfig implements AsyncHttpProviderConfig { - - public static final String FORCE_RESPONSE_BUFFERING = "bufferResponseInMemory"; - - private final ConcurrentHashMap properties = new ConcurrentHashMap(); - - @Override - public JDKAsyncHttpProviderConfig addProperty(String name, String value) { - properties.put(name, value); - return this; - } - - public String getProperty(String name) { - return properties.get(name); - } - - public String removeProperty(String name) { - return properties.remove(name); - } - - public Set> propertiesSet() { - return properties.entrySet(); - } -} diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java deleted file mode 100644 index 1b4dd34ea0..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKDelegateFuture.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import static org.asynchttpclient.util.DateUtil.millisTime; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.ListenableFuture; - -import java.net.HttpURLConnection; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -public class JDKDelegateFuture extends JDKFuture { - - private final ListenableFuture delegateFuture; - - public JDKDelegateFuture(AsyncHandler asyncHandler, int responseTimeoutInMs, - ListenableFuture delegateFuture, HttpURLConnection urlConnection) { - super(asyncHandler, responseTimeoutInMs, urlConnection); - this.delegateFuture = delegateFuture; - } - - public void done() { - delegateFuture.done(); - runListeners(); - } - - public void abort(Throwable t) { - if (innerFuture != null) { - innerFuture.cancel(true); - } - delegateFuture.abort(t); - } - - public boolean cancel(boolean mayInterruptIfRunning) { - delegateFuture.cancel(mayInterruptIfRunning); - if (innerFuture != null) { - return innerFuture.cancel(mayInterruptIfRunning); - } else { - return false; - } - } - - public boolean isCancelled() { - if (innerFuture != null) { - return innerFuture.isCancelled(); - } else { - return false; - } - } - - public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { - V content = null; - try { - if (innerFuture != null) { - content = innerFuture.get(timeout, unit); - } - } catch (Throwable t) { - if (!contentProcessed.get() && timeout != -1 && ((millisTime() - touch.get()) <= responseTimeoutInMs)) { - return get(timeout, unit); - } - timedOut.set(true); - delegateFuture.abort(t); - } - - if (exception.get() != null) { - delegateFuture.abort(new ExecutionException(exception.get())); - } - delegateFuture.content(content); - delegateFuture.done(); - return content; - } -} diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java deleted file mode 100644 index 893312cfcb..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKFuture.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import static org.asynchttpclient.util.DateUtil.millisTime; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.listenable.AbstractListenableFuture; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.net.HttpURLConnection; -import java.util.concurrent.CancellationException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; - - -public class JDKFuture extends AbstractListenableFuture { - - private final static Logger logger = LoggerFactory.getLogger(JDKFuture.class); - - protected Future innerFuture; - protected final AsyncHandler asyncHandler; - protected final int responseTimeoutInMs; - protected final AtomicBoolean cancelled = new AtomicBoolean(false); - protected final AtomicBoolean timedOut = new AtomicBoolean(false); - protected final AtomicBoolean isDone = new AtomicBoolean(false); - protected final AtomicReference exception = new AtomicReference(); - protected final AtomicLong touch = new AtomicLong(millisTime()); - protected final AtomicBoolean contentProcessed = new AtomicBoolean(false); - protected final HttpURLConnection urlConnection; - private boolean writeHeaders; - private boolean writeBody; - - public JDKFuture(AsyncHandler asyncHandler, int responseTimeoutInMs, HttpURLConnection urlConnection) { - this.asyncHandler = asyncHandler; - this.responseTimeoutInMs = responseTimeoutInMs; - this.urlConnection = urlConnection; - writeHeaders = true; - writeBody = true; - } - - protected void setInnerFuture(Future innerFuture) { - this.innerFuture = innerFuture; - } - - public void done() { - isDone.set(true); - runListeners(); - } - - public void abort(Throwable t) { - exception.set(t); - if (innerFuture != null) { - innerFuture.cancel(true); - } - if (!timedOut.get() && !cancelled.get()) { - try { - asyncHandler.onThrowable(t); - } catch (Throwable te) { - logger.debug("asyncHandler.onThrowable", te); - } - } - runListeners(); - } - - public void content(V v) { - } - - public boolean cancel(boolean mayInterruptIfRunning) { - if (!cancelled.get() && innerFuture != null) { - urlConnection.disconnect(); - try { - asyncHandler.onThrowable(new CancellationException()); - } catch (Throwable te) { - logger.debug("asyncHandler.onThrowable", te); - } - cancelled.set(true); - runListeners(); - return innerFuture.cancel(mayInterruptIfRunning); - } else { - runListeners(); - return false; - } - } - - public boolean isCancelled() { - if (innerFuture != null) { - return innerFuture.isCancelled(); - } else { - return false; - } - } - - public boolean isDone() { - contentProcessed.set(true); - return innerFuture.isDone(); - } - - public V get() throws InterruptedException, ExecutionException { - try { - return get(responseTimeoutInMs, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { - throw new ExecutionException(e); - } - } - - public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { - V content = null; - try { - if (innerFuture != null) { - content = innerFuture.get(timeout, unit); - } - } catch (TimeoutException t) { - if (!contentProcessed.get() && timeout != -1 && ((millisTime() - touch.get()) <= responseTimeoutInMs)) { - return get(timeout, unit); - } - - if (exception.get() == null) { - timedOut.set(true); - throw new ExecutionException(new TimeoutException(String.format("No response received after %s", responseTimeoutInMs))); - } - } catch (CancellationException ce) { - } - - if (exception.get() != null) { - throw new ExecutionException(exception.get()); - } - return content; - } - - /** - * Is the Future still valid - * - * @return true if response has expired and should be terminated. - */ - public boolean hasExpired() { - return responseTimeoutInMs != -1 && ((millisTime() - touch.get()) > responseTimeoutInMs); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public void touch() { - touch.set(millisTime()); - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean getAndSetWriteHeaders(boolean writeHeaders) { - boolean b = this.writeHeaders; - this.writeHeaders = writeHeaders; - return b; - } - - /** - * {@inheritDoc} - */ - /* @Override */ - public boolean getAndSetWriteBody(boolean writeBody) { - boolean b = this.writeBody; - this.writeBody = writeBody; - return b; - } -} diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java b/api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java deleted file mode 100644 index c3b536e971..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/JDKResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; -import org.asynchttpclient.Cookie; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.providers.ResponseBase; -import org.asynchttpclient.util.AsyncHttpProviderUtils; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class JDKResponse extends ResponseBase { - - public JDKResponse(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) { - super(status, headers, bodyParts); - } - - /* @Override */ - - public String getResponseBodyExcerpt(int maxLength) throws IOException { - return getResponseBodyExcerpt(maxLength, DEFAULT_CHARSET); - } - - public String getResponseBodyExcerpt(int maxLength, String charset) throws IOException { - // should be fine; except that it may split multi-byte chars (last char may become '?') - byte[] b = AsyncHttpProviderUtils.contentToBytes(bodyParts, maxLength); - return new String(b, charset); - } - - /* @Override */ - public List buildCookies() { - List cookies = new ArrayList(); - for (Map.Entry> header : headers.getHeaders().entrySet()) { - if (header.getKey().equalsIgnoreCase("Set-Cookie")) { - // TODO: ask for parsed header - List v = header.getValue(); - for (String value : v) { - cookies.addAll(CookieDecoder.decode(value)); - } - } - } - return Collections.unmodifiableList(cookies); - } -} diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java deleted file mode 100644 index b80ced8345..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseBodyPart.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.nio.ByteBuffer; - -/** - * A callback class used when an HTTP response body is received. - */ -public class ResponseBodyPart extends HttpResponseBodyPart { - - private final byte[] chunk; - private final boolean isLast; - private boolean closeConnection; - - public ResponseBodyPart(URI uri, byte[] chunk, AsyncHttpProvider provider, boolean last) { - this.chunk = chunk; - isLast = last; - } - - /** - * Return the response body's part bytes received. - * - * @return the response body's part bytes received. - */ - public byte[] getBodyPartBytes() { - return chunk; - } - - @Override - public InputStream readBodyPartBytes() { - return new ByteArrayInputStream(chunk); - } - - @Override - public int length() { - return chunk.length; - } - - @Override - public int writeTo(OutputStream outputStream) throws IOException { - outputStream.write(chunk); - return chunk.length; - } - - @Override - public ByteBuffer getBodyByteBuffer() { - return ByteBuffer.wrap(chunk); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isLast() { - return isLast; - } - - /** - * {@inheritDoc} - */ - @Override - public void markUnderlyingConnectionAsClosed() { - closeConnection = true; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean closeUnderlyingConnection() { - return closeConnection; - } -} \ No newline at end of file diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java deleted file mode 100644 index ed71a96aa7..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseHeaders.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; -import org.asynchttpclient.HttpResponseHeaders; - -import java.net.HttpURLConnection; -import java.net.URI; -import java.util.List; -import java.util.Map; - -/** - * A class that represent the HTTP headers. - */ -public class ResponseHeaders extends HttpResponseHeaders { - - private final HttpURLConnection urlConnection; - private final FluentCaseInsensitiveStringsMap headers; - - public ResponseHeaders(URI uri, HttpURLConnection urlConnection, AsyncHttpProvider provider) { - this.urlConnection = urlConnection; - headers = computerHeaders(); - } - - private FluentCaseInsensitiveStringsMap computerHeaders() { - FluentCaseInsensitiveStringsMap h = new FluentCaseInsensitiveStringsMap(); - - Map> uh = urlConnection.getHeaderFields(); - - for (Map.Entry> e : uh.entrySet()) { - if (e.getKey() != null) { - h.add(e.getKey(), e.getValue()); - } - } - return h; - } - - /** - * Return the HTTP header - * - * @return an {@link org.asynchttpclient.FluentCaseInsensitiveStringsMap} - */ - @Override - public FluentCaseInsensitiveStringsMap getHeaders() { - return headers; - } -} \ No newline at end of file diff --git a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java b/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java deleted file mode 100644 index b5cbc7094a..0000000000 --- a/api/src/main/java/org/asynchttpclient/providers/jdk/ResponseStatus.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.providers.jdk; - -import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.Response; - -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URI; -import java.util.List; - -/** - * A class that represent the HTTP response' status line (code + text) - */ -public class ResponseStatus extends HttpResponseStatus { - - private final HttpURLConnection urlConnection; - - public ResponseStatus(URI uri, HttpURLConnection urlConnection, AsyncHttpClientConfig config) { - super(uri, config); - this.urlConnection = urlConnection; - } - - @Override - public Response prepareResponse(HttpResponseHeaders headers, List bodyParts) { - return new JDKResponse(this, headers, bodyParts); - } - - /** - * Return the response status code - * - * @return the response status code - */ - public int getStatusCode() { - try { - return urlConnection.getResponseCode(); - } catch (IOException e) { - return 500; - } - } - - /** - * Return the response status text - * - * @return the response status text - */ - public String getStatusText() { - try { - return urlConnection.getResponseMessage(); - } catch (IOException e) { - return "Internal Error"; - } - } - - @Override - public String getProtocolName() { - return "http"; - } - - @Override - public int getProtocolMajorVersion() { - return 1; - } - - @Override - public int getProtocolMinorVersion() { - return 1; //TODO - } - - @Override - public String getProtocolText() { - return ""; //TODO - } - -} \ No newline at end of file From 5a636c71913c901fc3952da427062e420b669893 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 15:29:12 +0200 Subject: [PATCH 0585/2844] Remove useless URI parameter --- .../asynchttpclient/providers/netty/handler/HttpProtocol.java | 2 +- .../providers/netty/handler/WebSocketProtocol.java | 2 +- .../providers/netty/response/ResponseBodyPart.java | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java index 0b871daf61..e768c2f576 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java @@ -417,7 +417,7 @@ public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture fu if (!interrupt && chunk.content().readableBytes() > 0) { // FIXME why - interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(future.getURI(), chunk.content(), last)); + interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(chunk.content(), last)); } if (interrupt || last) { diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java index 49bdadc313..103a677abd 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java @@ -155,7 +155,7 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object } if (frame.content() != null && frame.content().readableBytes() > 0) { - ResponseBodyPart rp = new ResponseBodyPart(future.getURI(), frame.content(), frame.isFinalFragment()); + ResponseBodyPart rp = new ResponseBodyPart(frame.content(), frame.isFinalFragment()); h.onBodyPartReceived(rp); if (pendingOpcode == OPCODE_BINARY) { diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java index e50d36faa8..5248c64d7d 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.URI; import java.nio.ByteBuffer; import org.asynchttpclient.HttpResponseBodyPart; @@ -36,7 +35,7 @@ public class ResponseBodyPart extends HttpResponseBodyPart { private final boolean last; private boolean closeConnection = false; - public ResponseBodyPart(URI uri, ByteBuf buf, boolean last) { + public ResponseBodyPart(ByteBuf buf, boolean last) { bytes = ByteBufUtil.byteBuf2bytes(buf); this.last = last; } From f2e8218e96a0f7e29b57ab79d49b7848a407c12f Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 15:57:57 +0200 Subject: [PATCH 0586/2844] Minor clean up --- .../netty/future/NettyResponseFuture.java | 62 +++++++++++-------- .../providers/netty/handler/HttpProtocol.java | 15 ++--- .../netty/request/NettyRequestSender.java | 4 +- 3 files changed, 44 insertions(+), 37 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java index ff5790ca3a..9e15cc652f 100755 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java @@ -57,39 +57,43 @@ public enum STATE { NEW, POOLED, RECONNECTED, CLOSED, } + private final int requestTimeoutInMs; + private final AsyncHttpClientConfig config; + private final long start = millisTime(); + private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; + private final ProxyServer proxyServer; + private final int maxRetry; private final CountDownLatch latch = new CountDownLatch(1); + + // state mutated from outside the event loop private final AtomicBoolean isDone = new AtomicBoolean(false); private final AtomicBoolean isCancelled = new AtomicBoolean(false); - private AsyncHandler asyncHandler; - private final int requestTimeoutInMs; - private final AsyncHttpClientConfig config; - private Request request; - private HttpRequest nettyRequest; - private final AtomicReference content = new AtomicReference(); - private URI uri; - private boolean keepAlive = true; - private HttpResponse httpResponse; - private final AtomicReference exEx = new AtomicReference(); private final AtomicInteger redirectCount = new AtomicInteger(); - private volatile FutureReaper reaperFuture; private final AtomicBoolean inAuth = new AtomicBoolean(false); private final AtomicBoolean statusReceived = new AtomicBoolean(false); private final AtomicLong touch = new AtomicLong(millisTime()); - private final long start = millisTime(); private final AtomicReference state = new AtomicReference(STATE.NEW); private final AtomicBoolean contentProcessed = new AtomicBoolean(false); - private Channel channel; - private boolean reuseChannel = false; private final AtomicInteger currentRetry = new AtomicInteger(0); - private final int maxRetry; + private final AtomicBoolean throwableCalled = new AtomicBoolean(false); + private final AtomicReference content = new AtomicReference(); + private final AtomicReference exEx = new AtomicReference(); + private volatile FutureReaper reaperFuture; + + // state mutated only inside the event loop + private Channel channel; + private URI uri; + private boolean keepAlive = true; + private Request request; + private HttpRequest nettyRequest; + private HttpResponse httpResponse; + private AsyncHandler asyncHandler; + private HttpResponse pendingResponse; + private boolean streamWasAlreadyConsumed; + private boolean reuseChannel; private boolean writeHeaders; private boolean writeBody; - private final AtomicBoolean throwableCalled = new AtomicBoolean(false); - private boolean allowConnect = false; - private final ConnectionPoolKeyStrategy connectionPoolKeyStrategy; - private final ProxyServer proxyServer; - private final AtomicReference pendingResponse = new AtomicReference(); - private final AtomicBoolean streamWasAlreadyConsumed = new AtomicBoolean(false); + private boolean allowConnect; public NettyResponseFuture(URI uri,// Request request,// @@ -247,7 +251,7 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, return getContent(); } - public V getContent() throws ExecutionException { + private V getContent() throws ExecutionException { ExecutionException e = exEx.getAndSet(null); if (e != null) { throw e; @@ -383,12 +387,20 @@ public boolean getAndSetStatusReceived(boolean sr) { return statusReceived.getAndSet(sr); } - public AtomicReference getPendingResponse() { + public HttpResponse getPendingResponse() { return pendingResponse; } - public boolean getAndSetStreamWasAlreadyConsumed() { - return streamWasAlreadyConsumed.getAndSet(true); + public void setPendingResponse(HttpResponse pendingResponse) { + this.pendingResponse = pendingResponse; + } + + public boolean isStreamWasAlreadyConsumed() { + return streamWasAlreadyConsumed; + } + + public void setStreamWasAlreadyConsumed(boolean streamWasAlreadyConsumed) { + this.streamWasAlreadyConsumed = streamWasAlreadyConsumed; } @Override diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java index e768c2f576..6aa436f40a 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java @@ -31,7 +31,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map.Entry; -import java.util.concurrent.atomic.AtomicReference; import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; @@ -227,8 +226,7 @@ private boolean applyResponseFiltersAndReplayRequest(ChannelHandlerContext ctx, } // The handler may have been wrapped. - handler = fc.getAsyncHandler(); - future.setAsyncHandler(handler); + future.setAsyncHandler(fc.getAsyncHandler()); // The request has changed if (fc.replayRequest()) { @@ -379,20 +377,19 @@ public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture fu HttpRequest nettyRequest = future.getNettyRequest(); AsyncHandler handler = future.getAsyncHandler(); - Request request = future.getRequest(); ProxyServer proxyServer = future.getProxyServer(); try { if (e instanceof HttpResponse) { HttpResponse response = (HttpResponse) e; NettyChannelHandler.LOGGER.debug("\n\nRequest {}\n\nResponse {}\n", nettyRequest, response); - future.getPendingResponse().set(response); + future.setPendingResponse(response); return; } if (e instanceof HttpContent) { - AtomicReference responseRef = future.getPendingResponse(); - HttpResponse response = responseRef.getAndSet(null); + HttpResponse response = future.getPendingResponse(); + future.setPendingResponse(null); if (handler != null) { if (response != null && handleResponseAndExit(ctx, future, handler, nettyRequest, proxyServer, response)) { return; @@ -403,10 +400,6 @@ public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture fu boolean interrupt = false; boolean last = chunk instanceof LastHttpContent; - // FIXME - // Netty 3 provider is broken: in case of trailing headers, - // onHeadersReceived should be called before - // updateBodyAndInterrupt if (last) { LastHttpContent lastChunk = (LastHttpContent) chunk; HttpHeaders trailingHeaders = lastChunk.trailingHeaders(); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java index 8dd47cbae2..5c049d70ba 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java @@ -358,13 +358,15 @@ public void operationComplete(ChannelProgressiveFuture cf) { private boolean sendStreamAndExit(Channel channel, final InputStream is, NettyResponseFuture future) throws IOException { - if (future.getAndSetStreamWasAlreadyConsumed()) { + if (future.isStreamWasAlreadyConsumed()) { if (is.markSupported()) is.reset(); else { LOGGER.warn("Stream has already been consumed and cannot be reset"); return true; } + } else { + future.setStreamWasAlreadyConsumed(true); } channel.write(new ChunkedStream(is), channel.newProgressivePromise()).addListener(new ProgressListener(config, false, future.getAsyncHandler(), future) { From deb72bdfb9e463adf9da991ce7490dbe4f9dcb81 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 16:05:33 +0200 Subject: [PATCH 0587/2844] Minor clean up --- .../providers/netty/future/NettyResponseFuture.java | 1 + .../providers/netty/handler/HttpProtocol.java | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java index 9e15cc652f..73e3027bc0 100755 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java @@ -66,6 +66,7 @@ public enum STATE { private final CountDownLatch latch = new CountDownLatch(1); // state mutated from outside the event loop + // TODO check if they are indeed mutated outside the event loop private final AtomicBoolean isDone = new AtomicBoolean(false); private final AtomicBoolean isCancelled = new AtomicBoolean(false); private final AtomicInteger redirectCount = new AtomicInteger(); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java index 6aa436f40a..a16e2d061a 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java @@ -170,7 +170,7 @@ private List getAuthorizationToken(Iterable> list, return l; } - private void finishUpdate(final NettyResponseFuture future, final ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { + private void finishUpdate(final NettyResponseFuture future, ChannelHandlerContext ctx, boolean lastValidChunk) throws IOException { if (lastValidChunk && future.isKeepAlive()) { channels.drainChannel(ctx, future); } else { @@ -183,7 +183,7 @@ private void finishUpdate(final NettyResponseFuture future, final ChannelHand markAsDone(future, ctx); } - private final boolean updateBodyAndInterrupt(final NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { + private final boolean updateBodyAndInterrupt(NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; if (c.closeUnderlyingConnection()) { future.setKeepAlive(false); @@ -191,7 +191,7 @@ private final boolean updateBodyAndInterrupt(final NettyResponseFuture future return state; } - private void markAsDone(final NettyResponseFuture future, final ChannelHandlerContext ctx) throws MalformedURLException { + private void markAsDone(NettyResponseFuture future, final ChannelHandlerContext ctx) throws MalformedURLException { // We need to make sure everything is OK before adding the // connection back to the pool. try { @@ -409,7 +409,6 @@ public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture fu } if (!interrupt && chunk.content().readableBytes() > 0) { - // FIXME why interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(chunk.content(), last)); } From 1cc86aea143a53dbbaafcd3f351fe933fad0ea60 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 16:39:38 +0200 Subject: [PATCH 0588/2844] Remove ListenableFuture.content, close #393 --- .../main/java/org/asynchttpclient/ListenableFuture.java | 7 ------- .../providers/grizzly/GrizzlyResponseFuture.java | 8 -------- .../providers/netty/future/NettyResponseFuture.java | 4 ---- 3 files changed, 19 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/ListenableFuture.java b/api/src/main/java/org/asynchttpclient/ListenableFuture.java index b7593b0e93..04a636229e 100755 --- a/api/src/main/java/org/asynchttpclient/ListenableFuture.java +++ b/api/src/main/java/org/asynchttpclient/ListenableFuture.java @@ -54,13 +54,6 @@ public interface ListenableFuture extends Future { */ void abort(Throwable t); - /** - * Set the content that will be returned by this instance - * - * @param v the content that will be returned by this instance - */ - void content(V v); - /** * Touch the current instance to prevent external service to times out. */ diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java index b53c55fe61..51fcd5c663 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseFuture.java @@ -92,14 +92,6 @@ public void abort(Throwable t) { } - - public void content(V v) { - - delegate.result(v); - - } - - public void touch() { provider.touchConnection(connection, request); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java index 73e3027bc0..2a7868a9ff 100755 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java @@ -323,10 +323,6 @@ public final void abort(final Throwable t) { runListeners(); } - public void content(V v) { - content.set(v); - } - public final Request getRequest() { return request; } From e67638f5cbd081952f1ebdd59d37823631f60c59 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 17:47:49 +0200 Subject: [PATCH 0589/2844] Extract HttpResponseBodyPart creation into a factory so one can chose to bypass auto bytes extraction --- .../asynchttpclient/HttpResponseBodyPart.java | 4 +- .../async/AsyncStreamHandlerTest.java | 2 +- .../grizzly/GrizzlyResponseBodyPart.java | 4 +- .../netty/NettyAsyncHttpProvider.java | 10 +-- .../netty/NettyAsyncHttpProviderConfig.java | 40 +++++++++- .../providers/netty/handler/HttpProtocol.java | 24 +++--- .../netty/handler/NettyChannelHandler.java | 7 +- .../providers/netty/handler/Protocol.java | 5 +- .../netty/handler/WebSocketProtocol.java | 17 +++-- .../response/DefaultResponseBodyPart.java | 66 +++++++++++++++++ .../netty/response/LazyResponseBodyPart.java | 73 +++++++++++++++++++ .../netty/response/ResponseBodyPart.java | 52 ++----------- .../providers/netty/util/ByteBufUtil.java | 43 +++++++++-- 13 files changed, 259 insertions(+), 88 deletions(-) create mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/DefaultResponseBodyPart.java create mode 100644 providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/LazyResponseBodyPart.java diff --git a/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java index 42bb8c8158..173f4d384a 100644 --- a/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java +++ b/api/src/main/java/org/asynchttpclient/HttpResponseBodyPart.java @@ -75,13 +75,13 @@ public abstract class HttpResponseBodyPart { * underlying TCP connection will be closed as soon as the processing of the response is completed. That * means the underlying connection will never get pooled. */ - public abstract void markUnderlyingConnectionAsClosed(); + public abstract void markUnderlyingConnectionAsToBeClosed(); /** * Return true of the underlying connection will be closed once the response has been fully processed. * * @return true of the underlying connection will be closed once the response has been fully processed. */ - public abstract boolean closeUnderlyingConnection(); + public abstract boolean isUnderlyingConnectionToBeClosed(); } diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index 1d31d21ac7..7147487156 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -546,7 +546,7 @@ public STATE onBodyPartReceived(HttpResponseBodyPart content) throws Exception { builder.accumulate(content); if (content.isLast()) { - content.markUnderlyingConnectionAsClosed(); + content.markUnderlyingConnectionAsToBeClosed(); } return STATE.CONTINUE; } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java index 4f2236e321..b010cd3c3d 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java @@ -122,7 +122,7 @@ public boolean isLast() { * {@inheritDoc} */ @Override - public void markUnderlyingConnectionAsClosed() { + public void markUnderlyingConnectionAsToBeClosed() { ConnectionManager.markConnectionAsDoNotCache(connection); } @@ -130,7 +130,7 @@ public void markUnderlyingConnectionAsClosed() { * {@inheritDoc} */ @Override - public boolean closeUnderlyingConnection() { + public boolean isUnderlyingConnectionToBeClosed() { return !ConnectionManager.isConnectionCacheable(connection); } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index f8348abde6..d67821c497 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -34,7 +34,7 @@ public class NettyAsyncHttpProvider implements AsyncHttpProvider { private static final Logger LOGGER = LoggerFactory.getLogger(NettyAsyncHttpProvider.class); private final AsyncHttpClientConfig config; - private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; + private final NettyAsyncHttpProviderConfig nettyConfig; private final AtomicBoolean closed = new AtomicBoolean(false); private final Channels channels; private final NettyRequestSender requestSender; @@ -43,13 +43,13 @@ public class NettyAsyncHttpProvider implements AsyncHttpProvider { public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { this.config = config; - asyncHttpProviderConfig = config.getAsyncHttpProviderConfig() instanceof NettyAsyncHttpProviderConfig ? // + nettyConfig = config.getAsyncHttpProviderConfig() instanceof NettyAsyncHttpProviderConfig ? // NettyAsyncHttpProviderConfig.class.cast(config.getAsyncHttpProviderConfig()) : new NettyAsyncHttpProviderConfig(); - channels = new Channels(config, asyncHttpProviderConfig); + channels = new Channels(config, nettyConfig); requestSender = new NettyRequestSender(closed, config, channels); - channelHandler = new NettyChannelHandler(config, requestSender, channels, closed); + channelHandler = new NettyChannelHandler(config, nettyConfig, requestSender, channels, closed); channels.configure(channelHandler); } @@ -72,6 +72,6 @@ public void close() { @Override public ListenableFuture execute(Request request, final AsyncHandler asyncHandler) throws IOException { - return requestSender.sendRequest(request, asyncHandler, null, asyncHttpProviderConfig.isAsyncConnect(), false); + return requestSender.sendRequest(request, asyncHandler, null, nettyConfig.isAsyncConnect(), false); } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java index 210f1dc8a9..da6af380e2 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java @@ -16,6 +16,7 @@ */ package org.asynchttpclient.providers.netty; +import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; @@ -25,6 +26,10 @@ import java.util.Set; import org.asynchttpclient.AsyncHttpProviderConfig; +import org.asynchttpclient.providers.netty.response.DefaultResponseBodyPart; +import org.asynchttpclient.providers.netty.response.LazyResponseBodyPart; +import org.asynchttpclient.providers.netty.response.ResponseBodyPart; +import org.asynchttpclient.providers.netty.util.ByteBufUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -44,7 +49,7 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig properties = new HashMap(); + private ResponseBodyPartFactory bodyPartFactory = new DefaultResponseBodyPartFactory(); + public NettyAsyncHttpProviderConfig() { properties.put(REUSE_ADDRESS, Boolean.FALSE); } @@ -219,9 +226,38 @@ public AdditionalChannelInitializer getWssAdditionalChannelInitializer() { public void setWssAdditionalChannelInitializer(AdditionalChannelInitializer wssAdditionalChannelInitializer) { this.wssAdditionalChannelInitializer = wssAdditionalChannelInitializer; } - + + public ResponseBodyPartFactory getBodyPartFactory() { + return bodyPartFactory; + } + + public void setBodyPartFactory(ResponseBodyPartFactory bodyPartFactory) { + this.bodyPartFactory = bodyPartFactory; + } + public static interface AdditionalChannelInitializer { void initChannel(Channel ch) throws Exception; } + + public static interface ResponseBodyPartFactory { + + ResponseBodyPart newResponseBodyPart(ByteBuf buf, boolean last); + } + + public static class DefaultResponseBodyPartFactory implements ResponseBodyPartFactory { + + @Override + public ResponseBodyPart newResponseBodyPart(ByteBuf buf, boolean last) { + return new DefaultResponseBodyPart(ByteBufUtil.byteBuf2Bytes(buf), last); + } + } + + public static class LazyResponseBodyPartFactory implements ResponseBodyPartFactory { + + @Override + public ResponseBodyPart newResponseBodyPart(ByteBuf buf, boolean last) { + return new LazyResponseBodyPart(buf, last); + } + } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java index a16e2d061a..a595e98cbb 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java @@ -16,7 +16,8 @@ package org.asynchttpclient.providers.netty.handler; import static io.netty.handler.codec.http.HttpResponseStatus.*; -import static org.asynchttpclient.providers.netty.util.HttpUtil.isNTLM; +import static org.asynchttpclient.providers.netty.util.HttpUtil.*; +import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.HttpContent; import io.netty.handler.codec.http.HttpHeaders; @@ -33,6 +34,7 @@ import java.util.Map.Entry; import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHandler.STATE; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.HttpResponseBodyPart; @@ -42,26 +44,25 @@ import org.asynchttpclient.Realm; import org.asynchttpclient.Request; import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.AsyncHandler.STATE; import org.asynchttpclient.filter.FilterContext; import org.asynchttpclient.filter.FilterException; import org.asynchttpclient.filter.ResponseFilter; import org.asynchttpclient.ntlm.NTLMEngine; import org.asynchttpclient.ntlm.NTLMEngineException; -import org.asynchttpclient.spnego.SpnegoEngine; import org.asynchttpclient.providers.netty.Callback; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.asynchttpclient.providers.netty.channel.Channels; import org.asynchttpclient.providers.netty.future.NettyResponseFuture; import org.asynchttpclient.providers.netty.request.NettyRequestSender; -import org.asynchttpclient.providers.netty.response.ResponseBodyPart; import org.asynchttpclient.providers.netty.response.ResponseHeaders; import org.asynchttpclient.providers.netty.response.ResponseStatus; +import org.asynchttpclient.spnego.SpnegoEngine; import org.asynchttpclient.util.AsyncHttpProviderUtils; final class HttpProtocol extends Protocol { - public HttpProtocol(Channels channels, AsyncHttpClientConfig config, NettyRequestSender requestSender) { - super(channels, config, requestSender); + public HttpProtocol(Channels channels, AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig nettyConfig, NettyRequestSender requestSender) { + super(channels, config, nettyConfig, requestSender); } private Realm kerberosChallenge(List proxyAuth, Request request, ProxyServer proxyServer, FluentCaseInsensitiveStringsMap headers, Realm realm, @@ -183,9 +184,9 @@ private void finishUpdate(final NettyResponseFuture future, ChannelHandlerCon markAsDone(future, ctx); } - private final boolean updateBodyAndInterrupt(NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart c) throws Exception { - boolean state = handler.onBodyPartReceived(c) != STATE.CONTINUE; - if (c.closeUnderlyingConnection()) { + private final boolean updateBodyAndInterrupt(NettyResponseFuture future, AsyncHandler handler, HttpResponseBodyPart bodyPart) throws Exception { + boolean state = handler.onBodyPartReceived(bodyPart) != STATE.CONTINUE; + if (bodyPart.isUnderlyingConnectionToBeClosed()) { future.setKeepAlive(false); } return state; @@ -408,8 +409,9 @@ public void handle(final ChannelHandlerContext ctx, final NettyResponseFuture fu } } - if (!interrupt && chunk.content().readableBytes() > 0) { - interrupt = updateBodyAndInterrupt(future, handler, new ResponseBodyPart(chunk.content(), last)); + ByteBuf buf = chunk.content(); + if (!interrupt && buf.readableBytes() > 0) { + interrupt = updateBodyAndInterrupt(future, handler, nettyConfig.getBodyPartFactory().newResponseBodyPart(buf, last)); } if (interrupt || last) { diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java index fb47346455..03f68ae246 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java @@ -30,6 +30,7 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.providers.netty.Callback; import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.asynchttpclient.providers.netty.channel.Channels; import org.asynchttpclient.providers.netty.future.NettyResponseFuture; import org.asynchttpclient.providers.netty.future.NettyResponseFutures; @@ -49,13 +50,13 @@ public class NettyChannelHandler extends ChannelInboundHandlerAdapter { private final Protocol httpProtocol; private final Protocol webSocketProtocol; - public NettyChannelHandler(AsyncHttpClientConfig config, NettyRequestSender requestSender, Channels channels, AtomicBoolean isClose) { + public NettyChannelHandler(AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig nettyConfig, NettyRequestSender requestSender, Channels channels, AtomicBoolean isClose) { this.config = config; this.requestSender = requestSender; this.channels = channels; this.closed = isClose; - httpProtocol = new HttpProtocol(channels, config, requestSender); - webSocketProtocol = new WebSocketProtocol(channels, config, requestSender); + httpProtocol = new HttpProtocol(channels, config, nettyConfig, requestSender); + webSocketProtocol = new WebSocketProtocol(channels, config, nettyConfig, requestSender); } @Override diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java index dcd456f41d..500a2bc729 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/Protocol.java @@ -28,6 +28,7 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.org.jboss.netty.handler.codec.http.CookieDecoder; import org.asynchttpclient.providers.netty.Callback; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.asynchttpclient.providers.netty.channel.Channels; import org.asynchttpclient.providers.netty.future.NettyResponseFuture; import org.asynchttpclient.providers.netty.request.NettyRequestSender; @@ -42,10 +43,12 @@ public abstract class Protocol { protected final Channels channels; protected final AsyncHttpClientConfig config; protected final NettyRequestSender requestSender; + protected final NettyAsyncHttpProviderConfig nettyConfig; - public Protocol(Channels channels, AsyncHttpClientConfig config, NettyRequestSender requestSender) { + public Protocol(Channels channels, AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig nettyConfig, NettyRequestSender requestSender) { this.channels = channels; this.config = config; + this.nettyConfig = nettyConfig; this.requestSender = requestSender; } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java index 103a677abd..07c59b9e64 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/WebSocketProtocol.java @@ -15,7 +15,8 @@ */ package org.asynchttpclient.providers.netty.handler; -import static io.netty.handler.codec.http.HttpResponseStatus.SWITCHING_PROTOCOLS; +import static io.netty.handler.codec.http.HttpResponseStatus.*; +import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpResponse; @@ -27,16 +28,17 @@ import java.io.IOException; +import org.asynchttpclient.AsyncHandler.STATE; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.HttpResponseHeaders; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.Request; -import org.asynchttpclient.AsyncHandler.STATE; import org.asynchttpclient.filter.FilterContext; import org.asynchttpclient.filter.FilterException; import org.asynchttpclient.filter.ResponseFilter; import org.asynchttpclient.providers.netty.Constants; import org.asynchttpclient.providers.netty.DiscardEvent; +import org.asynchttpclient.providers.netty.NettyAsyncHttpProviderConfig; import org.asynchttpclient.providers.netty.channel.Channels; import org.asynchttpclient.providers.netty.future.NettyResponseFuture; import org.asynchttpclient.providers.netty.request.NettyRequestSender; @@ -54,8 +56,8 @@ final class WebSocketProtocol extends Protocol { private static final byte OPCODE_UNKNOWN = -1; protected byte pendingOpcode = OPCODE_UNKNOWN; - public WebSocketProtocol(Channels channels, AsyncHttpClientConfig config, NettyRequestSender requestSender) { - super(channels, config, requestSender); + public WebSocketProtocol(Channels channels, AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig nettyConfig, NettyRequestSender requestSender) { + super(channels, config, nettyConfig, requestSender); } // We don't need to synchronize as replacing the "ws-decoder" will @@ -154,14 +156,15 @@ public void handle(ChannelHandlerContext ctx, NettyResponseFuture future, Object pendingOpcode = OPCODE_BINARY; } - if (frame.content() != null && frame.content().readableBytes() > 0) { - ResponseBodyPart rp = new ResponseBodyPart(frame.content(), frame.isFinalFragment()); + ByteBuf buf = frame.content(); + if (buf != null && buf.readableBytes() > 0) { + ResponseBodyPart rp = nettyConfig.getBodyPartFactory().newResponseBodyPart(buf, frame.isFinalFragment()); h.onBodyPartReceived(rp); if (pendingOpcode == OPCODE_BINARY) { webSocket.onBinaryFragment(rp.getBodyPartBytes(), frame.isFinalFragment()); } else { - webSocket.onTextFragment(frame.content().toString(Constants.UTF8), frame.isFinalFragment()); + webSocket.onTextFragment(buf.toString(Constants.UTF8), frame.isFinalFragment()); } } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/DefaultResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/DefaultResponseBodyPart.java new file mode 100644 index 0000000000..80cc12396b --- /dev/null +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/DefaultResponseBodyPart.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.response; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; + +/** + * A callback class used when an HTTP response body is received. + */ +public class DefaultResponseBodyPart extends ResponseBodyPart { + + private final byte[] bytes; + + public DefaultResponseBodyPart(byte[] bytes, boolean last) { + super(last); + this.bytes = bytes; + } + + /** + * Return the response body's part bytes received. + * + * @return the response body's part bytes received. + */ + @Override + public byte[] getBodyPartBytes() { + return bytes; + } + + @Override + public InputStream readBodyPartBytes() { + return new ByteArrayInputStream(bytes); + } + + @Override + public int length() { + return bytes.length; + } + + @Override + public int writeTo(OutputStream outputStream) throws IOException { + outputStream.write(bytes); + return length(); + } + + @Override + public ByteBuffer getBodyByteBuffer() { + return ByteBuffer.wrap(bytes); + } +} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/LazyResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/LazyResponseBodyPart.java new file mode 100644 index 0000000000..eae64b291a --- /dev/null +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/LazyResponseBodyPart.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 Ning, Inc. + * + * Ning licenses this file to you under the Apache License, version 2.0 + * (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package org.asynchttpclient.providers.netty.response; + +import io.netty.buffer.ByteBuf; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; + +/** + * A callback class used when an HTTP response body is received. + */ +public class LazyResponseBodyPart extends ResponseBodyPart { + + private static final String ERROR_MESSAGE = "This implementation is intended for one to directly read from the underlying ByteBuf and release after usage. Not for the fainted heart!"; + + private final ByteBuf buf; + + public LazyResponseBodyPart(ByteBuf buf, boolean last) { + super(last); + buf.retain(); + this.buf = buf; + } + + public ByteBuf getBuf() { + return buf; + } + + /** + * Return the response body's part bytes received. + * + * @return the response body's part bytes received. + */ + @Override + public byte[] getBodyPartBytes() { + throw new UnsupportedOperationException(ERROR_MESSAGE); + } + + @Override + public InputStream readBodyPartBytes() { + throw new UnsupportedOperationException(ERROR_MESSAGE); + } + + @Override + public int length() { + throw new UnsupportedOperationException(ERROR_MESSAGE); + } + + @Override + public int writeTo(OutputStream outputStream) throws IOException { + throw new UnsupportedOperationException(ERROR_MESSAGE); + } + + @Override + public ByteBuffer getBodyByteBuffer() { + throw new UnsupportedOperationException(ERROR_MESSAGE); + } +} diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java index 5248c64d7d..749433d5c6 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/ResponseBodyPart.java @@ -15,62 +15,20 @@ */ package org.asynchttpclient.providers.netty.response; -import io.netty.buffer.ByteBuf; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.ByteBuffer; - import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.providers.netty.util.ByteBufUtil; /** * A callback class used when an HTTP response body is received. */ -public class ResponseBodyPart extends HttpResponseBodyPart { +public abstract class ResponseBodyPart extends HttpResponseBodyPart { - private final byte[] bytes; private final boolean last; - private boolean closeConnection = false; + private boolean closeConnection; - public ResponseBodyPart(ByteBuf buf, boolean last) { - bytes = ByteBufUtil.byteBuf2bytes(buf); + public ResponseBodyPart(boolean last) { this.last = last; } - /** - * Return the response body's part bytes received. - * - * @return the response body's part bytes received. - */ - @Override - public byte[] getBodyPartBytes() { - return bytes; - } - - @Override - public InputStream readBodyPartBytes() { - return new ByteArrayInputStream(bytes); - } - - @Override - public int length() { - return bytes.length; - } - - @Override - public int writeTo(OutputStream outputStream) throws IOException { - outputStream.write(bytes); - return length(); - } - - @Override - public ByteBuffer getBodyByteBuffer() { - return ByteBuffer.wrap(bytes); - } - /** * {@inheritDoc} */ @@ -83,7 +41,7 @@ public boolean isLast() { * {@inheritDoc} */ @Override - public void markUnderlyingConnectionAsClosed() { + public void markUnderlyingConnectionAsToBeClosed() { closeConnection = true; } @@ -91,7 +49,7 @@ public void markUnderlyingConnectionAsClosed() { * {@inheritDoc} */ @Override - public boolean closeUnderlyingConnection() { + public boolean isUnderlyingConnectionToBeClosed() { return closeConnection; } } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java index fa64563e70..e6998fca21 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/util/ByteBufUtil.java @@ -17,19 +17,48 @@ import io.netty.buffer.ByteBuf; +import java.util.List; + public class ByteBufUtil { - public static byte[] byteBuf2bytes(ByteBuf b) { - int readable = b.readableBytes(); - int readerIndex = b.readerIndex(); - if (b.hasArray()) { - byte[] array = b.array(); - if (b.arrayOffset() == 0 && readerIndex == 0 && array.length == readable) { + public static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + + public static byte[] byteBuf2Bytes(ByteBuf buf) { + int readable = buf.readableBytes(); + int readerIndex = buf.readerIndex(); + if (buf.hasArray()) { + byte[] array = buf.array(); + if (buf.arrayOffset() == 0 && readerIndex == 0 && array.length == readable) { return array; } } byte[] array = new byte[readable]; - b.getBytes(readerIndex, array); + buf.getBytes(readerIndex, array); return array; } + + public static byte[] byteBufs2Bytes(List bufs) { + + if (bufs.isEmpty()) { + return EMPTY_BYTE_ARRAY; + + } else if (bufs.size() == 1) { + return byteBuf2Bytes(bufs.get(0)); + + } else { + int totalSize = 0; + for (ByteBuf buf : bufs) { + totalSize += buf.readableBytes(); + } + + byte[] bytes = new byte[totalSize]; + int offset = 0; + for (ByteBuf buf : bufs) { + int readable = buf.readableBytes(); + buf.getBytes(buf.readerIndex(), bytes, offset, readable); + offset += readable; + } + return bytes; + } + } } From 51f6ec2e213feee90d085cbb12e620c01934e053 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 17:56:57 +0200 Subject: [PATCH 0590/2844] Fix test: should define a provider --- .../SimpleAsyncClientErrorBehaviourTest.java | 21 +++++-------- ...lySimpleAsyncClientErrorBehaviourTest.java | 30 +++++++++++++++++++ .../GrizzlySimpleAsyncHttpClientTest.java | 9 ------ ...tySimpleAsyncClientErrorBehaviourTest.java | 30 +++++++++++++++++++ 4 files changed, 67 insertions(+), 23 deletions(-) create mode 100644 providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncClientErrorBehaviourTest.java create mode 100644 providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java diff --git a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java index 76dac21427..b359058ac0 100644 --- a/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java +++ b/api/src/test/java/org/asynchttpclient/async/SimpleAsyncClientErrorBehaviourTest.java @@ -22,25 +22,24 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.testng.annotations.Test; - -import org.asynchttpclient.AsyncHttpClient; -import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Response; import org.asynchttpclient.SimpleAsyncHttpClient; import org.asynchttpclient.SimpleAsyncHttpClient.ErrorDocumentBehaviour; import org.asynchttpclient.consumers.OutputStreamBodyConsumer; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.testng.annotations.Test; /** * @author Benjamin Hanzelmann * */ -public class SimpleAsyncClientErrorBehaviourTest extends AbstractBasicTest { +public abstract class SimpleAsyncClientErrorBehaviourTest extends AbstractBasicTest { + + public abstract String getProviderClass(); @Test(groups = { "standalone", "default_provider" }) public void testAccumulateErrorBody() throws Exception { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.ACCUMULATE).build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.ACCUMULATE).build(); try { ByteArrayOutputStream o = new ByteArrayOutputStream(10); Future future = client.get(new OutputStreamBodyConsumer(o)); @@ -57,7 +56,7 @@ public void testAccumulateErrorBody() throws Exception { @Test(groups = { "standalone", "default_provider" }) public void testOmitErrorBody() throws Exception { - SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.OMIT).build(); + SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setUrl(getTargetUrl() + "/nonexistent").setErrorDocumentBehaviour(ErrorDocumentBehaviour.OMIT).build(); try { ByteArrayOutputStream o = new ByteArrayOutputStream(10); Future future = client.get(new OutputStreamBodyConsumer(o)); @@ -72,12 +71,6 @@ public void testOmitErrorBody() throws Exception { } } - @Override - public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { - // disabled - return null; - } - @Override public AbstractHandler configureHandler() throws Exception { return new AbstractHandler() { diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncClientErrorBehaviourTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncClientErrorBehaviourTest.java new file mode 100644 index 0000000000..db9a6a1579 --- /dev/null +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncClientErrorBehaviourTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.grizzly; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.SimpleAsyncClientErrorBehaviourTest; + +public class GrizzlySimpleAsyncClientErrorBehaviourTest extends SimpleAsyncClientErrorBehaviourTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return GrizzlyProviderUtil.grizzlyProvider(config); + } + + public String getProviderClass() { + return GrizzlyAsyncHttpProvider.class.getName(); + } +} diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java index af99dd39fb..dbd541b93b 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlySimpleAsyncHttpClientTest.java @@ -13,18 +13,10 @@ package org.asynchttpclient.providers.grizzly; -import org.asynchttpclient.AsyncCompletionHandler; -import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.Response; import org.asynchttpclient.async.SimpleAsyncHttpClientTest; -import java.io.IOException; -import java.util.concurrent.Future; - public class GrizzlySimpleAsyncHttpClientTest extends SimpleAsyncHttpClientTest { @Override @@ -35,5 +27,4 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { public String getProviderClass() { return GrizzlyAsyncHttpProvider.class.getName(); } - } diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java new file mode 100644 index 0000000000..830e721d0d --- /dev/null +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ + +package org.asynchttpclient.providers.netty; + +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.async.SimpleAsyncClientErrorBehaviourTest; + +public class NettySimpleAsyncClientErrorBehaviourTest extends SimpleAsyncClientErrorBehaviourTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return NettyProviderUtil.nettyProvider(config); + } + + public String getProviderClass() { + return NettyProviderUtil.class.getName(); + } +} From 937bc35035dbdadda120e0dc3c1218f8faaf23bc Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 18:13:14 +0200 Subject: [PATCH 0591/2844] Doh! --- .../netty/NettySimpleAsyncClientErrorBehaviourTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java index 830e721d0d..c57b8b89d4 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/NettySimpleAsyncClientErrorBehaviourTest.java @@ -25,6 +25,6 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { } public String getProviderClass() { - return NettyProviderUtil.class.getName(); + return NettyAsyncHttpProvider.class.getName(); } } From 2deeffba2284bc362e0e1d0a973c6ee279823fb9 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 2 Oct 2013 22:51:25 +0200 Subject: [PATCH 0592/2844] No need to synchronize ResponseBuilder. bodyParts --- api/src/main/java/org/asynchttpclient/Response.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/Response.java b/api/src/main/java/org/asynchttpclient/Response.java index e8598013f4..bfb96bec5c 100644 --- a/api/src/main/java/org/asynchttpclient/Response.java +++ b/api/src/main/java/org/asynchttpclient/Response.java @@ -22,7 +22,6 @@ import java.net.URI; import java.nio.ByteBuffer; import java.util.ArrayList; -import java.util.Collections; import java.util.List; /** @@ -183,7 +182,7 @@ public interface Response { boolean hasResponseBody(); public static class ResponseBuilder { - private final List bodyParts = Collections.synchronizedList(new ArrayList()); + private final List bodyParts = new ArrayList(); private HttpResponseStatus status; private HttpResponseHeaders headers; From 3345697849c9265ecc311942e041f24b90388aed Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 3 Oct 2013 09:26:40 +0200 Subject: [PATCH 0593/2844] Uncomment @Override as AHC targets JDK6 --- .../AsyncCompletionHandlerBase.java | 2 +- .../org/asynchttpclient/ByteArrayPart.java | 2 +- .../FluentCaseInsensitiveStringsMap.java | 26 +++---- .../org/asynchttpclient/FluentStringsMap.java | 26 +++---- .../java/org/asynchttpclient/StringPart.java | 2 +- .../consumers/AppendableBodyConsumer.java | 4 +- .../consumers/ByteBufferBodyConsumer.java | 4 +- .../consumers/FileBodyConsumer.java | 8 +-- .../consumers/OutputStreamBodyConsumer.java | 4 +- .../extra/AsyncHandlerWrapper.java | 10 +-- .../extra/ThrottleRequestFilter.java | 2 +- .../generators/ByteArrayBodyGenerator.java | 2 +- .../generators/FileBodyGenerator.java | 2 +- .../generators/InputStreamBodyGenerator.java | 2 +- .../providers/ResponseBase.java | 70 +++++++++---------- .../PropertiesBasedResumableProcessor.java | 6 +- .../resumable/ResumableAsyncHandler.java | 10 +-- .../webdav/WebDavCompletionHandlerBase.java | 10 +-- .../webdav/WebDavResponse.java | 2 +- .../async/AsyncStreamHandlerTest.java | 10 +-- .../async/ByteBufferCapacityTest.java | 2 +- .../async/ConnectionPoolTest.java | 2 +- .../async/HostnameVerifierTest.java | 2 +- .../async/PostRedirectGetTest.java | 6 +- .../asynchttpclient/async/PostWithQSTest.java | 6 +- .../async/WebDavBasicTest.java | 2 +- .../netty/response/NettyResponse.java | 12 ++-- 27 files changed, 118 insertions(+), 118 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java index c98ee94507..cd5f0a6087 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java +++ b/api/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java @@ -36,7 +36,7 @@ public Response onCompleted(Response response) throws Exception { /** * {@inheritDoc} */ - /* @Override */ + @Override public void onThrowable(Throwable t) { log.debug(t.getMessage(), t); } diff --git a/api/src/main/java/org/asynchttpclient/ByteArrayPart.java b/api/src/main/java/org/asynchttpclient/ByteArrayPart.java index 87311f0f1b..3ed4d6e314 100644 --- a/api/src/main/java/org/asynchttpclient/ByteArrayPart.java +++ b/api/src/main/java/org/asynchttpclient/ByteArrayPart.java @@ -34,7 +34,7 @@ public ByteArrayPart(String name, String fileName, byte[] data, String mimeType, /** * {@inheritDoc} */ - /* @Override */ + @Override public String getName() { return name; } diff --git a/api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java b/api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java index 6e948c4d75..77a9e4e20f 100644 --- a/api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java +++ b/api/src/main/java/org/asynchttpclient/FluentCaseInsensitiveStringsMap.java @@ -232,7 +232,7 @@ public FluentCaseInsensitiveStringsMap replaceAll(Map put(String key, List value) { if (key == null) { throw new NullPointerException("Null keys are not allowed"); @@ -247,7 +247,7 @@ public List put(String key, List value) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void putAll(Map> values) { replaceAll(values); } @@ -303,7 +303,7 @@ public FluentCaseInsensitiveStringsMap deleteAll(Collection keys) { /** * {@inheritDoc} */ - /* @Override */ + @Override public List remove(Object key) { if (key == null) { return null; @@ -318,7 +318,7 @@ public List remove(Object key) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void clear() { keyLookup.clear(); values.clear(); @@ -327,7 +327,7 @@ public void clear() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Iterator>> iterator() { return Collections.unmodifiableSet(values.entrySet()).iterator(); } @@ -335,7 +335,7 @@ public Iterator>> iterator() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Set keySet() { return new LinkedHashSet(keyLookup.values()); } @@ -343,7 +343,7 @@ public Set keySet() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Set>> entrySet() { return values.entrySet(); } @@ -351,7 +351,7 @@ public Set>> entrySet() { /** * {@inheritDoc} */ - /* @Override */ + @Override public int size() { return values.size(); } @@ -359,7 +359,7 @@ public int size() { /** * {@inheritDoc} */ - /* @Override */ + @Override public boolean isEmpty() { return values.isEmpty(); } @@ -367,7 +367,7 @@ public boolean isEmpty() { /** * {@inheritDoc} */ - /* @Override */ + @Override public boolean containsKey(Object key) { return key == null ? false : keyLookup.containsKey(key.toString().toLowerCase(Locale.ENGLISH)); } @@ -375,7 +375,7 @@ public boolean containsKey(Object key) { /** * {@inheritDoc} */ - /* @Override */ + @Override public boolean containsValue(Object value) { return values.containsValue(value); } @@ -428,7 +428,7 @@ public String getJoinedValue(String key, String delimiter) { /** * {@inheritDoc} */ - /* @Override */ + @Override public List get(Object key) { if (key == null) { return null; @@ -447,7 +447,7 @@ public List get(Object key) { /** * {@inheritDoc} */ - /* @Override */ + @Override public Collection> values() { return values.values(); } diff --git a/api/src/main/java/org/asynchttpclient/FluentStringsMap.java b/api/src/main/java/org/asynchttpclient/FluentStringsMap.java index 2001413e18..336ffbbc97 100644 --- a/api/src/main/java/org/asynchttpclient/FluentStringsMap.java +++ b/api/src/main/java/org/asynchttpclient/FluentStringsMap.java @@ -184,7 +184,7 @@ public FluentStringsMap replaceAll(Map put(String key, List value) { if (key == null) { throw new NullPointerException("Null keys are not allowed"); @@ -199,7 +199,7 @@ public List put(String key, List value) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void putAll(Map> values) { replaceAll(values); } @@ -248,7 +248,7 @@ public FluentStringsMap deleteAll(Collection keys) { /** * {@inheritDoc} */ - /* @Override */ + @Override public List remove(Object key) { if (key == null) { return null; @@ -263,7 +263,7 @@ public List remove(Object key) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void clear() { values.clear(); } @@ -271,7 +271,7 @@ public void clear() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Iterator>> iterator() { return Collections.unmodifiableSet(values.entrySet()).iterator(); } @@ -279,7 +279,7 @@ public Iterator>> iterator() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Set keySet() { return Collections.unmodifiableSet(values.keySet()); } @@ -287,7 +287,7 @@ public Set keySet() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Set>> entrySet() { return values.entrySet(); } @@ -295,7 +295,7 @@ public Set>> entrySet() { /** * {@inheritDoc} */ - /* @Override */ + @Override public int size() { return values.size(); } @@ -303,7 +303,7 @@ public int size() { /** * {@inheritDoc} */ - /* @Override */ + @Override public boolean isEmpty() { return values.isEmpty(); } @@ -311,7 +311,7 @@ public boolean isEmpty() { /** * {@inheritDoc} */ - /* @Override */ + @Override public boolean containsKey(Object key) { return key == null ? false : values.containsKey(key.toString()); } @@ -319,7 +319,7 @@ public boolean containsKey(Object key) { /** * {@inheritDoc} */ - /* @Override */ + @Override public boolean containsValue(Object value) { return values.containsValue(value); } @@ -372,7 +372,7 @@ public String getJoinedValue(String key, String delimiter) { /** * {@inheritDoc} */ - /* @Override */ + @Override public List get(Object key) { if (key == null) { return null; @@ -384,7 +384,7 @@ public List get(Object key) { /** * {@inheritDoc} */ - /* @Override */ + @Override public Collection> values() { return values.values(); } diff --git a/api/src/main/java/org/asynchttpclient/StringPart.java b/api/src/main/java/org/asynchttpclient/StringPart.java index cd0c617c55..5323a67528 100644 --- a/api/src/main/java/org/asynchttpclient/StringPart.java +++ b/api/src/main/java/org/asynchttpclient/StringPart.java @@ -39,7 +39,7 @@ public StringPart(String name, String value) { /** * {@inheritDoc} */ - /* @Override */ + @Override public String getName() { return name; } diff --git a/api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java index 4ddbde6f84..2f80f3428e 100644 --- a/api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/AppendableBodyConsumer.java @@ -39,7 +39,7 @@ public AppendableBodyConsumer(Appendable appendable) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void consume(ByteBuffer byteBuffer) throws IOException { appendable.append(new String(byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(), @@ -50,7 +50,7 @@ public void consume(ByteBuffer byteBuffer) throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public void close() throws IOException { if (appendable instanceof Closeable) { Closeable.class.cast(appendable).close(); diff --git a/api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java index 8ab4641220..a8b4c748e9 100644 --- a/api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/ByteBufferBodyConsumer.java @@ -31,7 +31,7 @@ public ByteBufferBodyConsumer(ByteBuffer byteBuffer) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void consume(ByteBuffer byteBuffer) throws IOException { byteBuffer.put(byteBuffer); } @@ -39,7 +39,7 @@ public void consume(ByteBuffer byteBuffer) throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public void close() throws IOException { byteBuffer.flip(); } diff --git a/api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java index 531228bccb..8c5660b80b 100644 --- a/api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/FileBodyConsumer.java @@ -32,7 +32,7 @@ public FileBodyConsumer(RandomAccessFile file) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void consume(ByteBuffer byteBuffer) throws IOException { // TODO: Channel.transferFrom may be a good idea to investigate. file.write(byteBuffer.array(), @@ -43,7 +43,7 @@ public void consume(ByteBuffer byteBuffer) throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public void close() throws IOException { file.close(); } @@ -51,7 +51,7 @@ public void close() throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public long getTransferredBytes() throws IOException { return file.length(); } @@ -59,7 +59,7 @@ public long getTransferredBytes() throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public void resume() throws IOException { file.seek(getTransferredBytes()); } diff --git a/api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java b/api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java index 7ab4d1184b..15f18ca0cc 100644 --- a/api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java +++ b/api/src/main/java/org/asynchttpclient/consumers/OutputStreamBodyConsumer.java @@ -32,7 +32,7 @@ public OutputStreamBodyConsumer(OutputStream outputStream) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void consume(ByteBuffer byteBuffer) throws IOException { outputStream.write(byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(), @@ -42,7 +42,7 @@ public void consume(ByteBuffer byteBuffer) throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public void close() throws IOException { outputStream.close(); } diff --git a/api/src/main/java/org/asynchttpclient/extra/AsyncHandlerWrapper.java b/api/src/main/java/org/asynchttpclient/extra/AsyncHandlerWrapper.java index fcbce72bc4..a330dd00b2 100644 --- a/api/src/main/java/org/asynchttpclient/extra/AsyncHandlerWrapper.java +++ b/api/src/main/java/org/asynchttpclient/extra/AsyncHandlerWrapper.java @@ -23,7 +23,7 @@ public AsyncHandlerWrapper(AsyncHandler asyncHandler, Semaphore available) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void onThrowable(Throwable t) { try { asyncHandler.onThrowable(t); @@ -38,7 +38,7 @@ public void onThrowable(Throwable t) { /** * {@inheritDoc} */ - /* @Override */ + @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { return asyncHandler.onBodyPartReceived(bodyPart); } @@ -46,7 +46,7 @@ public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception /** * {@inheritDoc} */ - /* @Override */ + @Override public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { return asyncHandler.onStatusReceived(responseStatus); } @@ -54,7 +54,7 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio /** * {@inheritDoc} */ - /* @Override */ + @Override public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { return asyncHandler.onHeadersReceived(headers); } @@ -62,7 +62,7 @@ public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { /** * {@inheritDoc} */ - /* @Override */ + @Override public T onCompleted() throws Exception { available.release(); if (logger.isDebugEnabled()) { diff --git a/api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java b/api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java index 2dcb6087e2..186547b168 100644 --- a/api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java +++ b/api/src/main/java/org/asynchttpclient/extra/ThrottleRequestFilter.java @@ -42,7 +42,7 @@ public ThrottleRequestFilter(int maxConnections, int maxWait) { /** * {@inheritDoc} */ - /* @Override */ + @Override public FilterContext filter(FilterContext ctx) throws FilterException { try { diff --git a/api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java b/api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java index 0ff4a346e6..f1e0a97752 100644 --- a/api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/generators/ByteArrayBodyGenerator.java @@ -64,7 +64,7 @@ public void close() throws IOException { /** * {@inheritDoc} */ - /* @Override */ + @Override public Body createBody() throws IOException { return new ByteBody(); } diff --git a/api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java b/api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java index dd6e88dbf9..7f412be62a 100644 --- a/api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/generators/FileBodyGenerator.java @@ -53,7 +53,7 @@ public FileBodyGenerator(File file, long regionSeek, long regionLength) { /** * {@inheritDoc} */ - /* @Override */ + @Override public RandomAccessBody createBody() throws IOException { return new FileBody(file, regionSeek, regionLength); diff --git a/api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java b/api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java index fcb2176854..4a72f9a1ac 100644 --- a/api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java +++ b/api/src/main/java/org/asynchttpclient/generators/InputStreamBodyGenerator.java @@ -54,7 +54,7 @@ public InputStream getInputStream() { /** * {@inheritDoc} */ - /* @Override */ + @Override public Body createBody() throws IOException { return new ISBody(); } diff --git a/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java index b7f4dfd410..2a96b2880b 100644 --- a/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java +++ b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java @@ -17,8 +17,7 @@ import org.asynchttpclient.Response; import org.asynchttpclient.util.AsyncHttpProviderUtils; -public abstract class ResponseBase implements Response -{ +public abstract class ResponseBase implements Response { protected final static String DEFAULT_CHARSET = "ISO-8859-1"; protected final List bodyParts; @@ -26,56 +25,65 @@ public abstract class ResponseBase implements Response protected final HttpResponseStatus status; private List cookies; - protected ResponseBase(HttpResponseStatus status, - HttpResponseHeaders headers, - List bodyParts) - { + protected ResponseBase(HttpResponseStatus status, HttpResponseHeaders headers, List bodyParts) { this.bodyParts = bodyParts; this.headers = headers; this.status = status; } - /* @Override */ + protected abstract List buildCookies(); + + protected String calculateCharset(String charset) { + + if (charset == null) { + String contentType = getContentType(); + if (contentType != null) + charset = AsyncHttpProviderUtils.parseCharset(contentType); // parseCharset can return null + } + return charset != null ? charset : DEFAULT_CHARSET; + } + + @Override public final int getStatusCode() { return status.getStatusCode(); } - /* @Override */ + @Override public final String getStatusText() { return status.getStatusText(); } - /* @Override */ + @Override public final URI getUri() { return status.getUri(); } - /* @Override */ + @Override public final String getContentType() { - return headers != null? getHeader("Content-Type"): null; + return headers != null ? getHeader("Content-Type") : null; } - /* @Override */ + @Override public final String getHeader(String name) { - return headers != null? getHeaders().getFirstValue(name): null; + return headers != null ? getHeaders().getFirstValue(name) : null; } - /* @Override */ + @Override public final List getHeaders(String name) { - return headers != null? getHeaders().get(name): null; + return headers != null ? getHeaders().get(name) : null; } - /* @Override */ + @Override public final FluentCaseInsensitiveStringsMap getHeaders() { - return headers != null? headers.getHeaders(): new FluentCaseInsensitiveStringsMap(); + return headers != null ? headers.getHeaders() : new FluentCaseInsensitiveStringsMap(); } - /* @Override */ + @Override public final boolean isRedirected() { return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); } - - /* @Override */ + + @Override public byte[] getResponseBodyAsBytes() throws IOException { return AsyncHttpProviderUtils.contentToBytes(bodyParts); } @@ -84,7 +92,7 @@ public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { return ByteBuffer.wrap(getResponseBodyAsBytes()); } - /* @Override */ + @Override public String getResponseBody() throws IOException { return getResponseBody(DEFAULT_CHARSET); } @@ -93,13 +101,12 @@ public String getResponseBody(String charset) throws IOException { return AsyncHttpProviderUtils.contentToString(bodyParts, calculateCharset(charset)); } - /* @Override */ + @Override public InputStream getResponseBodyAsStream() throws IOException { return AsyncHttpProviderUtils.contentAsStream(bodyParts); } - - protected abstract List buildCookies(); - + + @Override public List getCookies() { if (headers == null) { @@ -113,24 +120,17 @@ public List getCookies() { } - protected String calculateCharset(String charset) { - - if (charset == null) { - String contentType = getContentType(); - if (contentType != null) - charset = AsyncHttpProviderUtils.parseCharset(contentType); // parseCharset can return null - } - return charset != null? charset: DEFAULT_CHARSET; - } - + @Override public boolean hasResponseStatus() { return status != null; } + @Override public boolean hasResponseHeaders() { return headers != null && isNonEmpty(headers.getHeaders()); } + @Override public boolean hasResponseBody() { return isNonEmpty(bodyParts); } diff --git a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java index 980869a5ad..85ebbeafdd 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java +++ b/api/src/main/java/org/asynchttpclient/resumable/PropertiesBasedResumableProcessor.java @@ -36,7 +36,7 @@ public class PropertiesBasedResumableProcessor implements ResumableAsyncHandler. /** * {@inheritDoc} */ - /* @Override */ + @Override public void put(String url, long transferredBytes) { properties.put(url, transferredBytes); } @@ -44,7 +44,7 @@ public void put(String url, long transferredBytes) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void remove(String uri) { if (uri != null) { properties.remove(uri); @@ -54,7 +54,7 @@ public void remove(String uri) { /** * {@inheritDoc} */ - /* @Override */ + @Override public void save(Map map) { log.debug("Saving current download state {}", properties.toString()); FileOutputStream os = null; diff --git a/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java index 297ed0a0f4..446bc2403f 100644 --- a/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java +++ b/api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java @@ -102,7 +102,7 @@ public ResumableAsyncHandler(ResumableProcessor resumableProcessor, boolean accu /** * {@inheritDoc} */ - /* @Override */ + @Override public AsyncHandler.STATE onStatusReceived(final HttpResponseStatus status) throws Exception { responseBuilder.accumulate(status); if (status.getStatusCode() == 200 || status.getStatusCode() == 206) { @@ -121,7 +121,7 @@ public AsyncHandler.STATE onStatusReceived(final HttpResponseStatus status) thro /** * {@inheritDoc} */ - /* @Override */ + @Override public void onThrowable(Throwable t) { if (decoratedAsyncHandler != null) { decoratedAsyncHandler.onThrowable(t); @@ -133,7 +133,7 @@ public void onThrowable(Throwable t) { /** * {@inheritDoc} */ - /* @Override */ + @Override public AsyncHandler.STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { if (accumulateBody) { @@ -160,7 +160,7 @@ public AsyncHandler.STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) thro /** * {@inheritDoc} */ - /* @Override */ + @Override public Response onCompleted() throws Exception { resumableProcessor.remove(url); resumableListener.onAllBytesReceived(); @@ -175,7 +175,7 @@ public Response onCompleted() throws Exception { /** * {@inheritDoc} */ - /* @Override */ + @Override public AsyncHandler.STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { responseBuilder.accumulate(headers); String contentLengthHeader = headers.getHeaders().getFirstValue("Content-Length"); diff --git a/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java index 1386adb160..fb99f6b63b 100644 --- a/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java +++ b/api/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java @@ -57,7 +57,7 @@ public abstract class WebDavCompletionHandlerBase implements AsyncHandler /** * {@inheritDoc} */ - /* @Override */ + @Override public final STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { bodies.add(content); return STATE.CONTINUE; @@ -66,7 +66,7 @@ public final STATE onBodyPartReceived(final HttpResponseBodyPart content) throws /** * {@inheritDoc} */ - /* @Override */ + @Override public final STATE onStatusReceived(final HttpResponseStatus status) throws Exception { this.status = status; return STATE.CONTINUE; @@ -75,7 +75,7 @@ public final STATE onStatusReceived(final HttpResponseStatus status) throws Exce /** * {@inheritDoc} */ - /* @Override */ + @Override public final STATE onHeadersReceived(final HttpResponseHeaders headers) throws Exception { this.headers = headers; return STATE.CONTINUE; @@ -84,7 +84,7 @@ public final STATE onHeadersReceived(final HttpResponseHeaders headers) throws E /** * {@inheritDoc} */ - /* @Override */ + @Override public final T onCompleted() throws Exception { if (status != null) { Response response = status.prepareResponse(headers, bodies); @@ -101,7 +101,7 @@ public final T onCompleted() throws Exception { /** * {@inheritDoc} */ - /* @Override */ + @Override public void onThrowable(Throwable t) { logger.debug(t.getMessage(), t); } diff --git a/api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java b/api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java index 340e4be2eb..2c39c43f6b 100644 --- a/api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java +++ b/api/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java @@ -45,7 +45,7 @@ public String getStatusText() { return response.getStatusText(); } - /* @Override */ + @Override public byte[] getResponseBodyAsBytes() throws IOException { return response.getResponseBodyAsBytes(); } diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java index 7147487156..20c36c5745 100644 --- a/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncStreamHandlerTest.java @@ -431,20 +431,20 @@ public void asyncStreamJustStatusLine() throws Exception { Future statusCode = client.prepareGet(getTargetUrl()).execute(new AsyncHandler() { private int status = -1; - /* @Override */ + @Override public void onThrowable(Throwable t) { whatCalled[OTHER] = true; latch.countDown(); } - /* @Override */ + @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { whatCalled[OTHER] = true; latch.countDown(); return STATE.ABORT; } - /* @Override */ + @Override public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exception { whatCalled[STATUS] = true; status = responseStatus.getStatusCode(); @@ -452,14 +452,14 @@ public STATE onStatusReceived(HttpResponseStatus responseStatus) throws Exceptio return STATE.ABORT; } - /* @Override */ + @Override public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception { whatCalled[OTHER] = true; latch.countDown(); return STATE.ABORT; } - /* @Override */ + @Override public Integer onCompleted() throws Exception { whatCalled[COMPLETED] = true; latch.countDown(); diff --git a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java index 47c453e886..d0ccfcee03 100644 --- a/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ByteBufferCapacityTest.java @@ -80,7 +80,7 @@ public void basicByteBufferTest() throws Exception { try { Response response = c.preparePut(getTargetUrl()).setBody(largeFile).execute(new AsyncCompletionHandlerAdapter() { - /* @Override */ + @Override public STATE onBodyPartReceived(final HttpResponseBodyPart content) throws Exception { byteReceived.addAndGet(content.getBodyByteBuffer().capacity()); return super.onBodyPartReceived(content); diff --git a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java index 8bce85b03f..107c8ed6a4 100644 --- a/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java +++ b/api/src/test/java/org/asynchttpclient/async/ConnectionPoolTest.java @@ -244,7 +244,7 @@ public Response onCompleted(Response response) throws Exception { }); client.prepareGet(getTargetUrl()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ + @Override public void onThrowable(Throwable t) { if (t.getMessage() != null && t.getMessage().equalsIgnoreCase(THIS_IS_NOT_FOR_YOU)) { count.incrementAndGet(); diff --git a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java index 0e2fb055b9..82fc7cd3c0 100644 --- a/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java +++ b/api/src/test/java/org/asynchttpclient/async/HostnameVerifierTest.java @@ -43,7 +43,7 @@ public abstract class HostnameVerifierTest extends AbstractBasicHttpsTest { public static class EchoHandler extends AbstractHandler { - /* @Override */ + @Override public void handle(String pathInContext, Request r, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { httpResponse.setContentType(TEXT_HTML_CONTENT_TYPE_WITH_UTF_8_CHARSET); diff --git a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java index e6a338cfc0..af02a4ad17 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostRedirectGetTest.java @@ -94,7 +94,7 @@ public Integer onCompleted(Response response) throws Exception { return response.getStatusCode(); } - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); fail("Unexpected exception: " + t.getMessage(), t); @@ -129,7 +129,7 @@ public Integer onCompleted(Response response) throws Exception { return response.getStatusCode(); } - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); fail("Unexpected exception: " + t.getMessage(), t); @@ -149,7 +149,7 @@ public static class PostRedirectGetHandler extends AbstractHandler { final AtomicInteger counter = new AtomicInteger(); - /* @Override */ + @Override public void handle(String pathInContext, org.eclipse.jetty.server.Request request, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { final boolean expectGet = (httpRequest.getHeader("x-expect-get") != null); diff --git a/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java index 26d85587ac..49e4b2b6ea 100644 --- a/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java +++ b/api/src/test/java/org/asynchttpclient/async/PostWithQSTest.java @@ -89,7 +89,7 @@ public void postWithNulParamQS() throws IOException, ExecutionException, Timeout try { Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ + @Override public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { if (!status.getUri().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=")) { throw new IOException(status.getUri().toURL().toString()); @@ -112,7 +112,7 @@ public void postWithNulParamsQS() throws IOException, ExecutionException, Timeou try { Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b&c&d=e").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ + @Override public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { if (!status.getUri().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c&d=e")) { throw new IOException("failed to parse the query properly"); @@ -135,7 +135,7 @@ public void postWithEmptyParamsQS() throws IOException, ExecutionException, Time try { Future f = client.preparePost("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e").setBody("abc".getBytes()).execute(new AsyncCompletionHandlerBase() { - /* @Override */ + @Override public STATE onStatusReceived(final HttpResponseStatus status) throws Exception { if (!status.getUri().toURL().toString().equals("http://127.0.0.1:" + port1 + "/?a=b&c=&d=e")) { throw new IOException("failed to parse the query properly"); diff --git a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java index 8959d7a8bc..ef16be723a 100644 --- a/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/WebDavBasicTest.java @@ -174,7 +174,7 @@ public void propFindCompletionHandlerWebDavTest() throws InterruptedException, I /** * {@inheritDoc} */ - /* @Override */ + @Override public void onThrowable(Throwable t) { t.printStackTrace(); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java index 61b5f13671..63abfcc5c9 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/response/NettyResponse.java @@ -43,7 +43,7 @@ public NettyResponse(HttpResponseStatus status, super(status, headers, bodyParts); } - /* @Override */ + @Override public String getResponseBodyExcerpt(int maxLength) throws IOException { return getResponseBodyExcerpt(maxLength, null); } @@ -69,12 +69,12 @@ protected List buildCookies() { return Collections.unmodifiableList(cookies); } - /* @Override */ + @Override public byte[] getResponseBodyAsBytes() throws IOException { return getResponseBodyAsByteBuffer().array(); } - /* @Override */ + @Override public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { int length = 0; @@ -88,17 +88,17 @@ public ByteBuffer getResponseBodyAsByteBuffer() throws IOException { return target; } - /* @Override */ + @Override public String getResponseBody() throws IOException { return getResponseBody(null); } - /* @Override */ + @Override public String getResponseBody(String charset) throws IOException { return new String(getResponseBodyAsBytes(), calculateCharset(charset)); } - /* @Override */ + @Override public InputStream getResponseBodyAsStream() throws IOException { return new ByteArrayInputStream(getResponseBodyAsBytes()); } From 6a2567e2b3dfc48425914bd3bb5b60de1bf59f93 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 3 Oct 2013 11:10:58 +0200 Subject: [PATCH 0594/2844] Drop Netty Provider OIO support, close #398 --- .../netty/NettyAsyncHttpProviderConfig.java | 13 ------- .../providers/netty/channel/Channels.java | 39 ++++++------------- 2 files changed, 12 insertions(+), 40 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java index da6af380e2..592c9ca582 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProviderConfig.java @@ -40,11 +40,6 @@ public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig> propertiesSet() { return properties.entrySet(); } - public boolean isUseBlockingIO() { - return useBlockingIO; - } - - public void setUseBlockingIO(boolean useBlockingIO) { - this.useBlockingIO = useBlockingIO; - } - public EventLoopGroup getEventLoopGroup() { return eventLoopGroup; } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java index 84e73efb71..bc1f091d02 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java @@ -25,10 +25,7 @@ import io.netty.channel.EventLoopGroup; import io.netty.channel.group.ChannelGroup; import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.oio.OioEventLoopGroup; -import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.channel.socket.oio.OioSocketChannel; import io.netty.handler.codec.http.HttpClientCodec; import io.netty.handler.codec.http.HttpContentCompressor; import io.netty.handler.codec.http.HttpContentDecompressor; @@ -112,34 +109,22 @@ public Channels(final AsyncHttpClientConfig config, NettyAsyncHttpProviderConfig this.config = config; this.asyncHttpProviderConfig = asyncHttpProviderConfig; - Class socketChannelClass = null; - if (asyncHttpProviderConfig.isUseBlockingIO()) { - socketChannelClass = OioSocketChannel.class; - eventLoopGroup = new OioEventLoopGroup(); - allowReleaseEventLoopGroup = true; + // check if external EventLoopGroup is defined + eventLoopGroup = asyncHttpProviderConfig.getEventLoopGroup(); + if (eventLoopGroup == null) { + eventLoopGroup = new NioEventLoopGroup(); + allowReleaseEventLoopGroup = true; } else { - // check if external EventLoopGroup is defined - eventLoopGroup = asyncHttpProviderConfig.getEventLoopGroup(); - if (eventLoopGroup instanceof OioEventLoopGroup) { - socketChannelClass = OioSocketChannel.class; - allowReleaseEventLoopGroup = false; - - } else if (eventLoopGroup instanceof NioEventLoopGroup) { - socketChannelClass = NioSocketChannel.class; - allowReleaseEventLoopGroup = false; - - } else { - socketChannelClass = NioSocketChannel.class; - eventLoopGroup = new NioEventLoopGroup(); - allowReleaseEventLoopGroup = true; - } + if (!(eventLoopGroup instanceof NioEventLoopGroup)) + throw new IllegalArgumentException("Only Nio is supported"); + allowReleaseEventLoopGroup = false; } - plainBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); - secureBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); - webSocketBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); - secureWebSocketBootstrap = new Bootstrap().channel(socketChannelClass).group(eventLoopGroup); + plainBootstrap = new Bootstrap().channel(NioSocketChannel.class).group(eventLoopGroup); + secureBootstrap = new Bootstrap().channel(NioSocketChannel.class).group(eventLoopGroup); + webSocketBootstrap = new Bootstrap().channel(NioSocketChannel.class).group(eventLoopGroup); + secureWebSocketBootstrap = new Bootstrap().channel(NioSocketChannel.class).group(eventLoopGroup); // This is dangerous as we can't catch a wrong typed ConnectionsPool ConnectionsPool cp = (ConnectionsPool) config.getConnectionsPool(); From 5eb0fd7828aa2c97b0ca69f5303879a94692eb40 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 3 Oct 2013 11:12:23 +0200 Subject: [PATCH 0595/2844] Fix previous commit --- .../netty/RetryNonBlockingIssue.java | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java index 09f89010cd..dd946b7bf1 100644 --- a/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/org/asynchttpclient/providers/netty/RetryNonBlockingIssue.java @@ -156,48 +156,6 @@ public void testRetryNonBlockingAsyncConnect() throws IOException, InterruptedEx } } - @Test - public void testRetryBlocking() throws IOException, InterruptedException, ExecutionException { - - NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig(); - nettyConfig.setUseBlockingIO(true); - - AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()// - .setAllowPoolingConnection(true)// - .setMaximumConnectionsTotal(100)// - .setConnectionTimeoutInMs(60000)// - .setRequestTimeoutInMs(30000)// - .setAsyncHttpClientProviderConfig(nettyConfig)// - .build(); - - AsyncHttpClient client = getAsyncHttpClient(config); - - try { - List> res = new ArrayList>(); - for (int i = 0; i < 32; i++) { - res.add(testMethodRequest(client, 3, "servlet", UUID.randomUUID().toString())); - } - - StringBuilder b = new StringBuilder(); - for (ListenableFuture r : res) { - Response theres = r.get(); - assertEquals(theres.getStatusCode(), 200); - b.append("==============\r\n"); - b.append("Response Headers\r\n"); - Map> heads = theres.getHeaders(); - b.append(heads + "\r\n"); - b.append("==============\r\n"); - assertTrue(heads.size() > 0); - - } - System.out.println(b.toString()); - System.out.flush(); - - } finally { - client.close(); - } - } - @SuppressWarnings("serial") public class MockExceptionServlet extends HttpServlet { From 51597a7ef1eda2f2b569d65616863324bf50de62 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 3 Oct 2013 09:52:56 -0700 Subject: [PATCH 0596/2844] Honor the thread multiplier when a custom ExecutorService hasn't been provided. --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 9ef48ad96b..2639aadad3 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -440,6 +440,12 @@ private void doDefaultTransportConfig() { clientTransport.setIOStrategy(WorkerThreadIOStrategy.getInstance()); if (service != null) { clientTransport.setWorkerThreadPool(service); + } else { + final int multiplier = clientConfig.getIoThreadMultiplier(); + final int threadCount = multiplier * Runtime.getRuntime().availableProcessors(); + clientTransport.getWorkerThreadPoolConfig() + .setCorePoolSize(threadCount) + .setMaxPoolSize(threadCount); } } From 71f72c168ad3180f7f9a69250d65548b6e9b836a Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 3 Oct 2013 10:58:42 -0700 Subject: [PATCH 0597/2844] Cleanup imports. --- .../providers/grizzly/GrizzlyAsyncHttpProvider.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java index 2639aadad3..efad63b22a 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java @@ -16,13 +16,9 @@ import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.AsyncHttpProvider; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseHeaders; -import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Request; -import org.asynchttpclient.Response; import org.asynchttpclient.ntlm.NTLMEngine; import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientEventFilter; import org.asynchttpclient.providers.grizzly.filters.AsyncHttpClientFilter; @@ -69,7 +65,6 @@ import javax.net.ssl.SSLEngine; import java.io.IOException; import java.util.LinkedHashSet; -import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; From 9bdc51fb37470bf1320ed95f364a9b6def2a26fd Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 3 Oct 2013 11:50:03 -0700 Subject: [PATCH 0598/2844] Use HTTP Method references vs raw string. --- .../org/asynchttpclient/providers/grizzly/EventHandler.java | 3 ++- .../grizzly/statushandler/ProxyAuthorizationHandler.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index 732697e3b5..a3f129cb5d 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -36,6 +36,7 @@ import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.http.HttpHeader; import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.ProcessingState; import org.glassfish.grizzly.http.Protocol; import org.glassfish.grizzly.http.util.Header; @@ -471,7 +472,7 @@ public static Request newRequest(final URI uri, final RequestBuilder builder = new RequestBuilder(ctx.getRequest()); if (asGet) { - builder.setMethod("GET"); + builder.setMethod(Method.GET.getMethodString()); } builder.setUrl(uri.toString()); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java index 4720763ca3..48d591566a 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -25,6 +25,7 @@ import org.glassfish.grizzly.filterchain.FilterChainContext; import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.http.HttpResponsePacket; +import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.util.Header; import org.glassfish.grizzly.http.util.HttpStatus; import org.ietf.jgss.GSSContext; @@ -74,7 +75,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, Realm realm = new Realm.RealmBuilder().setPrincipal(principal) .setPassword(password) .setUri("/") - .setMethodName("CONNECT") + .setMethodName(Method.CONNECT.getMethodString()) .setUsePreemptiveAuth(true) .parseProxyAuthenticateHeader(proxyAuth) .build(); From d67e626d2cad29192d1476c73bd183773cf2e569 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 3 Oct 2013 11:53:37 -0700 Subject: [PATCH 0599/2844] Remove unused import. --- .../grizzly/statushandler/ProxyAuthorizationHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java index 48d591566a..59708dcc55 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -23,7 +23,6 @@ import org.asynchttpclient.util.Base64; import org.glassfish.grizzly.Connection; import org.glassfish.grizzly.filterchain.FilterChainContext; -import org.glassfish.grizzly.http.HttpContext; import org.glassfish.grizzly.http.HttpResponsePacket; import org.glassfish.grizzly.http.Method; import org.glassfish.grizzly.http.util.Header; From 7a79d25ca914f3e40341c57505608ba69a657047 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 3 Oct 2013 12:04:59 -0700 Subject: [PATCH 0600/2844] More cleanup: - unused imports - removed legacy classes --- .../providers/grizzly/EventHandler.java | 1 - .../grizzly/GrizzlyResponseBodyPart.java | 3 -- .../grizzly/GrizzlyResponseStatus.java | 2 +- .../filters/AsyncHttpClientEventFilter.java | 3 -- .../filters/AsyncHttpClientFilter.java | 1 - .../grizzly/filters/SwitchingSSLFilter.java | 49 +------------------ 6 files changed, 2 insertions(+), 57 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java index a3f129cb5d..8389637833 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/EventHandler.java @@ -108,7 +108,6 @@ public void onHttpContentParsed(HttpContent content, try { context.setCurrentState(handler.onBodyPartReceived( new GrizzlyResponseBodyPart(content, - context.getRequest().getURI(), ctx.getConnection()))); } catch (Exception e) { handler.onThrowable(e); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java index b010cd3c3d..f5443ab868 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseBodyPart.java @@ -13,7 +13,6 @@ package org.asynchttpclient.providers.grizzly; -import org.asynchttpclient.AsyncHttpProvider; import org.asynchttpclient.HttpResponseBodyPart; import org.glassfish.grizzly.Buffer; @@ -24,7 +23,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.URI; import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicReference; @@ -47,7 +45,6 @@ class GrizzlyResponseBodyPart extends HttpResponseBodyPart { public GrizzlyResponseBodyPart(final HttpContent content, - final URI uri, final Connection connection) { this.content = content; this.connection = connection; diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java index 9bafb37be4..e24e9937f0 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyResponseStatus.java @@ -66,7 +66,7 @@ public Response prepareResponse(HttpResponseHeaders headers, List listeners = - new ConcurrentHashMap(); - - - // --------------------------------------- Method from HandshakeListener - - - @Override - public void onStart(Connection connection) { - // no-op - } - - @Override - public void onComplete(Connection connection) { - final HandshakeCompleteListener listener = listeners.get(connection); - if (listener != null) { - removeListener(connection); - listener.complete(); - } - } - - - // --------------------------------------------- Package Private Methods - - - public static void addListener(final Connection c, - final HandshakeCompleteListener listener) { - listeners.putIfAbsent(c, listener); - } - - static void removeListener(final Connection c) { - listeners.remove(c); - } - } - } From 71351fdbc528e3748a1e6d94c0e381af4f189305 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 3 Oct 2013 21:39:20 +0200 Subject: [PATCH 0601/2844] Upgrade Netty 4.0.10 --- providers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 8905736367..773dac96f4 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -39,7 +39,7 @@ io.netty netty-all - 4.0.10.Final-SNAPSHOT + 4.0.10.Final org.javassist From 9ee456fb7ff308b60e9565c4dba2531792ad6984 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 4 Oct 2013 01:06:18 +0200 Subject: [PATCH 0602/2844] Fix Response.isRedirected, close #391 --- .../org/asynchttpclient/providers/ResponseBase.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java index 2a96b2880b..3f010557b7 100644 --- a/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java +++ b/api/src/main/java/org/asynchttpclient/providers/ResponseBase.java @@ -80,7 +80,16 @@ public final FluentCaseInsensitiveStringsMap getHeaders() { @Override public final boolean isRedirected() { - return (status.getStatusCode() >= 300) && (status.getStatusCode() <= 399); + switch (status.getStatusCode()) { + case 301: + case 302: + case 303: + case 307: + case 308: + return true; + default: + return false; + } } @Override From 6e32eefd22688a6d1097b7f8194a51490be4a79a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 8 Oct 2013 23:13:23 +0200 Subject: [PATCH 0603/2844] Latest release is 1.7.20 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f258f4b1ac..82921e4652 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.19 + 1.7.20 ``` From 0da1f10df65d2a5b94e68cd705d94c1d9daf43d2 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 9 Oct 2013 13:29:00 -0700 Subject: [PATCH 0604/2844] Ensure onStatusReceived() is invoked when there is no realm. --- .../grizzly/statushandler/AuthorizationHandler.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java index d9bf914507..369a9b7b7f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java @@ -58,6 +58,14 @@ public boolean handleStatus(final HttpResponsePacket responsePacket, } if (realm == null) { httpTransactionContext.setInvocationStatus(STOP); + if (httpTransactionContext.getHandler() != null) { + try { + httpTransactionContext.getHandler().onStatusReceived( + httpTransactionContext.getResponseStatus()); + } catch (Exception e) { + httpTransactionContext.abort(e); + } + } return true; } From 221df62e719aa25e9bc800dd93f644b059b8fd05 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 10 Oct 2013 15:00:29 -0700 Subject: [PATCH 0605/2844] Workaround issue discovered by Stephane after upgrading to Jetty 9. --- .../statushandler/AuthorizationHandler.java | 5 +++-- .../statushandler/ProxyAuthorizationHandler.java | 14 +++++++------- .../providers/grizzly/GrizzlyBasicAuthTest.java | 11 ----------- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java index 369a9b7b7f..11b2a0c2df 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/AuthorizationHandler.java @@ -135,12 +135,13 @@ private Connection getConnectionForNextRequest(final FilterChainContext ctx, final HttpResponsePacket response, final HttpTxContext httpCtx) throws Exception { + /* if (response.getProcessingState().isKeepAlive()) { return ctx.getConnection(); - } else { + } else { */ final ConnectionManager m = httpCtx.getProvider().getConnectionManager(); return m.obtainConnection(request, httpCtx.getFuture()); - } + /* } */ } } // END AuthorizationHandler diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java index 59708dcc55..b8530f6014 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/statushandler/ProxyAuthorizationHandler.java @@ -224,13 +224,13 @@ private Connection getConnectionForNextRequest(final FilterChainContext ctx, final HttpResponsePacket response, final HttpTxContext httpCtx) throws Exception { - if (response.getProcessingState().isKeepAlive()) { - return ctx.getConnection(); - } else { - final ConnectionManager m = - httpCtx.getProvider().getConnectionManager(); - return m.obtainConnection(request, httpCtx.getFuture()); - } + /* + if (response.getProcessingState().isKeepAlive()) { + return ctx.getConnection(); + } else { */ + final ConnectionManager m = httpCtx.getProvider().getConnectionManager(); + return m.obtainConnection(request, httpCtx.getFuture()); + /* } */ } diff --git a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java index c7d077308f..b558e8cf61 100644 --- a/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java +++ b/providers/grizzly/src/test/java/org/asynchttpclient/providers/grizzly/GrizzlyBasicAuthTest.java @@ -29,16 +29,5 @@ public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { public String getProviderClass() { return GrizzlyAsyncHttpProvider.class.getName(); } - - @Test(groups = { "standalone", "default_provider" }, enabled = false) - @Override - public void basicAuthFileTest() throws Exception { - // FIXME - } - @Test(groups = { "standalone", "default_provider" }, enabled = false) - @Override - public void basicAuthFileNoKeepAliveTest() throws Exception { - // FIXME - } } From d6e5c1589bf1d0ecfd5301a056004c1f9357add7 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 14 Oct 2013 23:31:55 +0200 Subject: [PATCH 0606/2844] Support multi valued headers, close #403 --- .../netty/request/NettyRequests.java | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java index ad2436db13..d5821471eb 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java @@ -37,7 +37,6 @@ import java.util.Map.Entry; import org.asynchttpclient.AsyncHttpClientConfig; -import org.asynchttpclient.FluentCaseInsensitiveStringsMap; import org.asynchttpclient.ProxyServer; import org.asynchttpclient.Realm; import org.asynchttpclient.Request; @@ -61,7 +60,7 @@ public static HttpRequest newNettyRequest(AsyncHttpClientConfig config, Request method = HttpMethod.CONNECT; else method = HttpMethod.valueOf(request.getMethod()); - + String host = null; HttpVersion httpVersion; String requestUri; @@ -107,18 +106,6 @@ else if (uri.getRawQuery() != null) } if (method != HttpMethod.CONNECT) { - FluentCaseInsensitiveStringsMap h = request.getHeaders(); - if (h != null) { - for (Entry> header : h) { - String name = header.getKey(); - if (!HttpHeaders.Names.HOST.equalsIgnoreCase(name)) { - for (String value : header.getValue()) { - headers.put(name, value); - } - } - } - } - if (config.isCompressionEnabled()) { headers.put(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP); } @@ -186,6 +173,7 @@ else if (uri.getRawQuery() != null) } if (proxyServer != null) { + // FIXME Wikipedia says that Proxy-Connection was a misunderstanding of Connection http://en.wikipedia.org/wiki/List_of_HTTP_header_fields if (!request.getHeaders().containsKey("Proxy-Connection")) { headers.put("Proxy-Connection", AsyncHttpProviderUtils.keepAliveHeaderValue(config)); } @@ -297,6 +285,15 @@ else if (uri.getRawQuery() != null) } else { nettyRequest = new DefaultFullHttpRequest(httpVersion, method, requestUri); } + + // assign headers as configured on request + if (method != HttpMethod.CONNECT) { + for (Entry> header : request.getHeaders()) { + nettyRequest.headers().set(header.getKey(), header.getValue()); + } + } + + // override with computed ones for (Entry header : headers.entrySet()) { nettyRequest.headers().set(header.getKey(), header.getValue()); } From 48b75f5f7a703df4560835c82f49209903b4a131 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 14 Oct 2013 23:43:14 +0200 Subject: [PATCH 0607/2844] Add RequestBuilder.setURI, like setUrl, close #405 --- .../asynchttpclient/RequestBuilderBase.java | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java index 0a0001f8bc..9b8f14baac 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -369,7 +369,12 @@ protected RequestBuilderBase(Class derived, Request prototype) { } public T setUrl(String url) { - request.originalUri = buildURI(url); + return setURI(URI.create(url)); + } + + public T setURI(URI uri) { + request.originalUri = uri; + addQueryParameters(request.originalUri); request.uri = null; request.rawUri = null; return derived.cast(this); @@ -385,31 +390,7 @@ public T setLocalInetAddress(InetAddress address) { return derived.cast(this); } - private URI buildURI(String url) { - URI uri = URI.create(url); - - if (uri.getRawPath() == null) { - // AHC-96 - // Let's try to derive it - StringBuilder buildedUrl = new StringBuilder(); - - if (uri.getScheme() != null) { - buildedUrl.append(uri.getScheme()); - buildedUrl.append("://"); - } - - if (uri.getAuthority() != null) { - buildedUrl.append(uri.getAuthority()); - } - if (url.indexOf("://") == -1) { - String s = buildedUrl.toString(); - url = s + url.substring(uri.getScheme().length() + 1); - return buildURI(url); - } else { - throw new IllegalArgumentException("Invalid url " + uri.toString()); - } - } - + private void addQueryParameters(URI uri) { if (isNonEmpty(uri.getRawQuery())) { String[] queries = uri.getRawQuery().split("&"); int pos; @@ -430,7 +411,6 @@ private URI buildURI(String url) { } } } - return uri; } public T setVirtualHost(String virtualHost) { From d55c4e01dbb1fcb71161df4d28a9bf96ab15a558 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 15 Oct 2013 10:47:48 -0700 Subject: [PATCH 0608/2844] Port changes from #402 to master. --- .../AsyncHttpClientConfig.java | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 3ce08af1ad..7cd7d7b027 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -503,12 +503,20 @@ public boolean isRemoveQueryParamOnRedirect() { } /** - * Return true if one of the {@link java.util.concurrent.ExecutorService} has been shutdown. - * - * @return true if one of the {@link java.util.concurrent.ExecutorService} has been shutdown. + * @return true if both the application and reaper thread pools + * haven't yet been shutdown. + * @since 1.7.21 */ - public boolean isClosed() { - return applicationThreadPool.isShutdown() || reaper.isShutdown(); + public boolean isValid() { + boolean atpRunning = true; + try { + atpRunning = applicationThreadPool.isShutdown(); + } catch (Exception ignore) { + // isShutdown() will thrown an exception in an EE7 environment + // when using a ManagedExecutorService. + // When this is the case, we assume it's running. + } + return (atpRunning && !reaper.isShutdown()); } /** @@ -1227,23 +1235,6 @@ public Thread newThread(Runnable r) { }); } -// if (applicationThreadPool == null) { -// applicationThreadPool = -// Executors.newCachedThreadPool(new ThreadFactory() { -// final AtomicInteger counter = new AtomicInteger(); -// public Thread newThread(Runnable r) { -// Thread t = new Thread(r, -// "AsyncHttpClient-Callback-" + counter.incrementAndGet()); -// t.setDaemon(true); -// return t; -// } -// }); -// } -// -// if (applicationThreadPool.isShutdown()) { -// throw new IllegalStateException("ExecutorServices closed"); -// } - if (proxyServerSelector == null && useProxySelector) { proxyServerSelector = ProxyUtils.getJdkDefaultProxyServerSelector(); } From 20deaa8344c47713a7b35c1101873db6a4bc008f Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 16 Oct 2013 08:28:29 +0200 Subject: [PATCH 0609/2844] Fix invalidUri test, crappy url format should be supported --- .../main/java/org/asynchttpclient/RequestBuilderBase.java | 2 ++ .../org/asynchttpclient/async/AsyncProvidersBasicTest.java | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java index 9b8f14baac..d737158ade 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -373,6 +373,8 @@ public T setUrl(String url) { } public T setURI(URI uri) { + if (uri.getPath() == null) + throw new IllegalArgumentException("Unsupported uri format: " + uri); request.originalUri = uri; addQueryParameters(request.originalUri); request.uri = null; diff --git a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java index 0472ef6ba6..e865796391 100755 --- a/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AsyncProvidersBasicTest.java @@ -1556,12 +1556,11 @@ public void headShouldNotAllowBody() throws IllegalArgumentException, IOExceptio } } - @Test(groups = { "standalone", "default_provider" }) + @Test(groups = { "standalone", "default_provider" }, expectedExceptions = { IllegalArgumentException.class }) public void invalidUri() throws Exception { AsyncHttpClient client = getAsyncHttpClient(null); try { - Response response = client.executeRequest(client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build()).get(); - assertEquals(200, response.getStatusCode()); + client.prepareGet(String.format("http:127.0.0.1:%d/foo/test", port1)).build(); } finally { client.close(); } From 8add5878c241bddbf29bae6a5127abfb8f1cfc05 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 16 Oct 2013 12:55:05 +0200 Subject: [PATCH 0610/2844] Make sure a cancel exception won't hide the expected one --- .../netty/future/NettyResponseFuture.java | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java index 2a7868a9ff..7f0cb64a29 100755 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/future/NettyResponseFuture.java @@ -234,12 +234,15 @@ public V get(long l, TimeUnit tu) throws InterruptedException, TimeoutException, TimeoutException te = new TimeoutException(String.format("No response received after %s %s", l, tu.name().toLowerCase())); if (!throwableCalled.getAndSet(true)) { try { - asyncHandler.onThrowable(te); - } catch (Throwable t) { - logger.debug("asyncHandler.onThrowable", t); + try { + asyncHandler.onThrowable(te); + } catch (Throwable t) { + logger.debug("asyncHandler.onThrowable", t); + } + throw new ExecutionException(te); + } finally { + cancelReaper(); } - cancelReaper(); - throw new ExecutionException(te); } } isDone.set(true); @@ -267,12 +270,15 @@ private V getContent() throws ExecutionException { } catch (Throwable ex) { if (!throwableCalled.getAndSet(true)) { try { - asyncHandler.onThrowable(ex); - } catch (Throwable t) { - logger.debug("asyncHandler.onThrowable", t); + try { + asyncHandler.onThrowable(ex); + } catch (Throwable t) { + logger.debug("asyncHandler.onThrowable", t); + } + throw new RuntimeException(ex); + } finally { + cancelReaper(); } - cancelReaper(); - throw new RuntimeException(ex); } } content.compareAndSet(null, update); From ece093ae64e74a40c434e78991b367bb477d9458 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 16 Oct 2013 22:34:27 +0200 Subject: [PATCH 0611/2844] Minor removeQuotes optim --- .../util/AsyncHttpProviderUtils.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index 500ed4a290..e44b3a6c3c 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -46,6 +46,8 @@ import org.asynchttpclient.multipart.MultipartRequestEntity; import org.asynchttpclient.multipart.PartSource; +import com.ning.http.util.MiscUtil; + /** * {@link org.asynchttpclient.AsyncHttpProvider} common utilities. *

    @@ -530,13 +532,24 @@ public static int convertExpireField(String timestring) { throw new IllegalArgumentException("Not a valid expire field " + trimmedTimeString); } - private final static String removeQuote(String s) { + public final static String removeQuotes(String s) { if (MiscUtil.isNonEmpty(s)) { - if (s.charAt(0) == '"') - s = s.substring(1); + int start = 0; + int end = s.length(); + boolean changed = false; + + if (s.charAt(0) == '"') { + changed = true; + start++; + } + + if (s.charAt(s.length() - 1) == '"') { + changed = true; + end--; + } - if (s.charAt(s.length() - 1) == '"') - s = s.substring(0, s.length() - 1); + if (changed) + s = s.substring(start, end); } return s; } From 89410aa6c5cf375228fd85ab919d0d1497c99416 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 21 Oct 2013 10:38:19 +0200 Subject: [PATCH 0612/2844] Remove bad import --- .../java/org/asynchttpclient/util/AsyncHttpProviderUtils.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index e44b3a6c3c..4558844044 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -46,8 +46,6 @@ import org.asynchttpclient.multipart.MultipartRequestEntity; import org.asynchttpclient.multipart.PartSource; -import com.ning.http.util.MiscUtil; - /** * {@link org.asynchttpclient.AsyncHttpProvider} common utilities. *

    From 466bd55e92d40e7193aa1ffd28c823d66aeb0ab6 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 21 Oct 2013 10:44:32 +0200 Subject: [PATCH 0613/2844] Fix build --- .../java/org/asynchttpclient/util/AsyncHttpProviderUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index 4558844044..a0599eecf6 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -516,7 +516,7 @@ public static String parseCharset(String contentType) { } public static int convertExpireField(String timestring) { - String trimmedTimeString = removeQuote(timestring.trim()); + String trimmedTimeString = removeQuotes(timestring.trim()); for (SimpleDateFormat sdf : simpleDateFormat.get()) { Date date = sdf.parse(trimmedTimeString, new ParsePosition(0)); From 19cc544158cdb3f4c1fb98137ae40024f29939b6 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Mon, 21 Oct 2013 10:44:42 +0200 Subject: [PATCH 0614/2844] Upgrade Netty 4.0.11 --- providers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 773dac96f4..471355e0a0 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -39,7 +39,7 @@ io.netty netty-all - 4.0.10.Final + 4.0.11.Final org.javassist From b0249470340022918fcc2b412e2347c4ba4ac7c5 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 24 Oct 2013 18:50:26 -0700 Subject: [PATCH 0615/2844] Fix for #407. --- .../providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java | 2 +- .../providers/grizzly/filters/AsyncHttpClientFilter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java index b8f3437c56..287f309da1 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/BodyGeneratorBodyHandler.java @@ -44,7 +44,7 @@ public boolean doHandle(final FilterChainContext ctx, final BodyGenerator generator = request.getBodyGenerator(); final Body bodyLocal = generator.createBody(); final long len = bodyLocal.getContentLength(); - if (len > 0) { + if (len >= 0) { requestPacket.setContentLengthLong(len); } else { requestPacket.setChunked(true); diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java index 4589f12261..942dc4208e 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/filters/AsyncHttpClientFilter.java @@ -262,7 +262,7 @@ private boolean sendAsGrizzlyRequest(final RequestInfoHolder requestInfoHolder, if (Utils.requestHasEntityBody(request)) { final long contentLength = request.getContentLength(); - if (contentLength > 0) { + if (contentLength >= 0) { requestPacket.setContentLengthLong(contentLength); requestPacket.setChunked(false); } else { From d63637a844e4aa6d9141f6412885abbbdc5b6ed8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Fri, 25 Oct 2013 09:47:30 -0700 Subject: [PATCH 0616/2844] Leverage utility class for determining thread type. --- .../providers/grizzly/FeedableBodyGenerator.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java index e359626b0f..58dbc72099 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/FeedableBodyGenerator.java @@ -31,6 +31,7 @@ import org.glassfish.grizzly.impl.FutureImpl; import org.glassfish.grizzly.nio.NIOConnection; import org.glassfish.grizzly.nio.SelectorRunner; +import org.glassfish.grizzly.threadpool.Threads; import org.glassfish.grizzly.utils.Futures; import static java.lang.Boolean.TRUE; @@ -185,7 +186,7 @@ public void run() { // If the current thread is a selector thread, we need to execute // the remainder of the task on the worker thread to prevent // it from being blocked. - if (isCurrentThreadSelectorRunner()) { + if (isServiceThread()) { c.getTransport().getWorkerThreadPool().execute(r); } else { r.run(); @@ -196,10 +197,8 @@ public void run() { // --------------------------------------------------------- Private Methods - private boolean isCurrentThreadSelectorRunner() { - final NIOConnection c = (NIOConnection) context.getConnection(); - final SelectorRunner runner = c.getSelectorRunner(); - return (Thread.currentThread() == runner.getRunnerThread()); + private boolean isServiceThread() { + return Threads.isService(); } From edd600d162ff24b222d2a41c4397a3c712cad2cc Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Wed, 30 Oct 2013 10:38:07 -0700 Subject: [PATCH 0617/2844] Integrate 2.3.7. --- providers/grizzly/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/grizzly/pom.xml b/providers/grizzly/pom.xml index ab9d594d5b..097a903510 100644 --- a/providers/grizzly/pom.xml +++ b/providers/grizzly/pom.xml @@ -14,7 +14,7 @@ - 2.3.7-SNAPSHOT + 2.3.7 1.0 From e4c5c7793595ca58810100f90fe0596b227ff774 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 6 Nov 2013 21:36:58 +0100 Subject: [PATCH 0618/2844] Port 6f60a45d9ebe4ad0ebd6881746e1671f3a3a8317 on master --- .../multipart/MultipartBody.java | 16 ++- .../multipart/MultipartBodyTest.java | 109 ++++++++++++++++++ 2 files changed, 116 insertions(+), 9 deletions(-) create mode 100644 api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java diff --git a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java index 70d15e21e2..af9df966e2 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java +++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java @@ -78,7 +78,7 @@ public long read(ByteBuffer buffer) throws IOException { try { int overallLength = 0; - int maxLength = buffer.capacity(); + int maxLength = buffer.remaining(); if (startPart == parts.size() && endWritten) { return overallLength; @@ -132,6 +132,7 @@ public long read(ByteBuffer buffer) throws IOException { initializeFileEnd(currentFilePart); } else if (fileLocation == FileLocation.END) { startPart++; + fileLocation = FileLocation.NONE; if (startPart == parts.size() && currentStream.available() == 0) { doneWritingParts = true; } @@ -146,6 +147,7 @@ public long read(ByteBuffer buffer) throws IOException { initializeFileEnd(currentFilePart); } else if (fileLocation == FileLocation.END) { startPart++; + fileLocation = FileLocation.NONE; if (startPart == parts.size() && currentStream.available() == 0) { doneWritingParts = true; } @@ -165,6 +167,7 @@ public long read(ByteBuffer buffer) throws IOException { initializeFileEnd(currentFilePart); } else if (fileLocation == FileLocation.END) { startPart++; + fileLocation = FileLocation.NONE; if (startPart == parts.size() && currentStream.available() == 0) { doneWritingParts = true; } @@ -202,7 +205,8 @@ public long read(ByteBuffer buffer) throws IOException { private void initializeByteArrayBody(FilePart filePart) throws IOException { - ByteArrayOutputStream output = generateByteArrayBody(filePart); + ByteArrayOutputStream output = new ByteArrayOutputStream(); + filePart.sendData(output); initializeBuffer(output); @@ -388,15 +392,9 @@ private StringPart generateClientStringpart(org.asynchttpclient.Part part) { private long handleByteArrayPart(WritableByteChannel target, FilePart filePart, byte[] data) throws IOException { - ByteArrayOutputStream output = generateByteArrayBody(filePart); - return writeToTarget(target, output); - } - - private ByteArrayOutputStream generateByteArrayBody(FilePart filePart) - throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); Part.sendPart(output, filePart, boundary); - return output; + return writeToTarget(target, output); } private long handleFileEnd(WritableByteChannel target, FilePart filePart) diff --git a/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java b/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java new file mode 100644 index 0000000000..9cbccb9ac0 --- /dev/null +++ b/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2013 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package org.asynchttpclient.multipart; + +import org.asynchttpclient.*; +import org.asynchttpclient.Part; +import org.asynchttpclient.util.AsyncHttpProviderUtils; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +public class MultipartBodyTest { + + @Test(groups = "fast") + public void testBasics() { + final List parts = new ArrayList(); + + // add a file + final File testFile = getTestfile(); + try { + parts.add(new FilePart("filePart", testFile)); + } catch (FileNotFoundException fne) { + Assert.fail("file not found: " + testFile); + } + + // add a byte array + try { + parts.add(new ByteArrayPart("baPart", "fileName", "testMultiPart".getBytes("utf-8"), "application/test", "utf-8")); + } catch (UnsupportedEncodingException ignore) { + } + + // add a string + parts.add(new StringPart("stringPart", "testString", "utf-8")); + + compareContentLength(parts); + } + + private static File getTestfile() { + final ClassLoader cl = MultipartBodyTest.class.getClassLoader(); + final URL url = cl.getResource("textfile.txt"); + Assert.assertNotNull(url); + File file = null; + try { + file = new File(url.toURI()); + } catch (URISyntaxException use) { + Assert.fail("uri syntax error"); + } + return file; + } + + private static void compareContentLength(final List parts) { + Assert.assertNotNull(parts); + // get expected values + MultipartRequestEntity mre = null; + try { + mre = AsyncHttpProviderUtils.createMultipartRequestEntity(parts, new FluentCaseInsensitiveStringsMap()); + } catch (FileNotFoundException fne) { + Assert.fail("file not found: " + parts); + } + final long expectedContentLength = mre.getContentLength(); + + // get real bytes + final Body multipartBody = new MultipartBody(parts, mre.getContentType(), String.valueOf(expectedContentLength)); + try { + final ByteBuffer buffer = ByteBuffer.allocate(8192); + boolean last = false; + long totalBytes = 0; + while (!last) { + long readBytes = 0; + try { + readBytes = multipartBody.read(buffer); + } catch (IOException ie) { + Assert.fail("read failure"); + } + if (readBytes >= 0) { + totalBytes += readBytes; + } else { + last = true; + } + buffer.clear(); + } + Assert.assertEquals(totalBytes, expectedContentLength); + } finally { + try { + multipartBody.close(); + } catch (IOException ignore) { + } + } + } +} From a4f00a057f9f71c496c26a87ca45cb2166f2bbdc Mon Sep 17 00:00:00 2001 From: Bongjae Chang Date: Thu, 7 Nov 2013 11:43:09 +0900 Subject: [PATCH 0619/2844] Fixed infinite loop of MultipartBodyTest for master branch. --- .../java/org/asynchttpclient/multipart/MultipartBodyTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java b/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java index 9cbccb9ac0..1e8ba2860c 100644 --- a/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java +++ b/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java @@ -91,7 +91,7 @@ private static void compareContentLength(final List parts) { } catch (IOException ie) { Assert.fail("read failure"); } - if (readBytes >= 0) { + if (readBytes > 0) { totalBytes += readBytes; } else { last = true; From 0f7615655c85f925cb81c377bd4205e9d5ed8bfb Mon Sep 17 00:00:00 2001 From: Bongjae Chang Date: Thu, 7 Nov 2013 12:24:52 +0900 Subject: [PATCH 0620/2844] MultipartBody#read() returns -1 when it meets EOF. Current MultipartBody#read() returns only 0 when it meets both Exception and EOF(endWritten). Then caller can't know whether the value is EOF or Error. --- .../main/java/org/asynchttpclient/multipart/MultipartBody.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java index af9df966e2..f72aaf62c1 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java +++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java @@ -81,7 +81,7 @@ public long read(ByteBuffer buffer) throws IOException { int maxLength = buffer.remaining(); if (startPart == parts.size() && endWritten) { - return overallLength; + return -1; } boolean full = false; From 3df777f7e3230711570b30348c1cd09dcd15ad01 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 8 Nov 2013 09:33:18 +0100 Subject: [PATCH 0621/2844] Upgrade Netty 4.0.12 and javassist 3.18.1 --- providers/netty/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 471355e0a0..9b884d134d 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -39,12 +39,12 @@ io.netty netty-all - 4.0.11.Final + 4.0.12.Final org.javassist javassist - 3.18.0-GA + 3.18.1-GA From 3286d44d4a3682ad9230c8e9b21fb821eb51488c Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Mon, 11 Nov 2013 08:58:24 -0800 Subject: [PATCH 0622/2844] Port changes for #411 from 1.7 to master. --- .../grizzly/bodyhandler/PartsBodyHandler.java | 86 +++++++++++++++---- 1 file changed, 68 insertions(+), 18 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java index ba656d0d68..f4491f391f 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java @@ -13,17 +13,22 @@ package org.asynchttpclient.providers.grizzly.bodyhandler; +import org.asynchttpclient.Body; +import org.asynchttpclient.Part; import org.asynchttpclient.Request; +import org.asynchttpclient.multipart.MultipartBody; import org.asynchttpclient.multipart.MultipartRequestEntity; +import org.asynchttpclient.providers.grizzly.FeedableBodyGenerator; +import org.asynchttpclient.providers.grizzly.GrizzlyAsyncHttpProvider; import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.glassfish.grizzly.Buffer; import org.glassfish.grizzly.filterchain.FilterChainContext; -import org.glassfish.grizzly.http.HttpContent; import org.glassfish.grizzly.http.HttpRequestPacket; +import org.glassfish.grizzly.memory.Buffers; import org.glassfish.grizzly.memory.MemoryManager; -import org.glassfish.grizzly.utils.BufferOutputStream; import java.io.IOException; +import java.util.List; import static org.asynchttpclient.util.MiscUtil.isNonEmpty; @@ -42,25 +47,70 @@ public boolean doHandle(final FilterChainContext ctx, final HttpRequestPacket requestPacket) throws IOException { - MultipartRequestEntity mre = + final List parts = request.getParts(); + final MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity( - request.getParts(), - request.getHeaders()); - requestPacket.setContentLengthLong(mre.getContentLength()); - requestPacket.setContentType(mre.getContentType()); - final MemoryManager mm = ctx.getMemoryManager(); - Buffer b = mm.allocate(512); - BufferOutputStream o = new BufferOutputStream(mm, b, true); - mre.writeRequest(o); - b = o.getBuffer(); - b.trim(); - if (b.hasRemaining()) { - final HttpContent content = requestPacket.httpContentBuilder().content(b).build(); - content.setLast(true); - ctx.write(content, ((!requestPacket.isCommitted()) ? ctx.getTransportContext().getCompletionHandler() : null)); + parts, request.getHeaders()); + final long contentLength = mre.getContentLength(); + final String contentType = mre.getContentType(); + requestPacket.setContentLengthLong(contentLength); + requestPacket.setContentType(contentType); + if (GrizzlyAsyncHttpProvider.LOGGER.isDebugEnabled()) { + GrizzlyAsyncHttpProvider.LOGGER.debug( + "REQUEST(modified): contentLength={}, contentType={}", + new Object[]{ + requestPacket.getContentLength(), + requestPacket.getContentType() + }); } - return true; + final FeedableBodyGenerator generator = new FeedableBodyGenerator() { + @Override + public Body createBody() throws IOException { + return new MultipartBody(parts, contentType, + String.valueOf(contentLength)); + } + }; + generator.setFeeder(new FeedableBodyGenerator.BaseFeeder(generator) { + @Override + public void flush() throws IOException { + final Body bodyLocal = feedableBodyGenerator.createBody(); + try { + final MemoryManager mm = ctx.getMemoryManager(); + boolean last = false; + while (!last) { + Buffer buffer = mm.allocate(BodyHandler.MAX_CHUNK_SIZE); + buffer.allowBufferDispose(true); + final long readBytes = + bodyLocal.read(buffer.toByteBuffer()); + if (readBytes > 0) { + buffer.position((int) readBytes); + buffer.trim(); + } else { + buffer.dispose(); + if (readBytes < 0) { + last = true; + buffer = Buffers.EMPTY_BUFFER; + } else { + throw new IllegalStateException( + "MultipartBody unexpectedly returned 0 bytes available"); + } + } + feed(buffer, last); + } + } finally { + if (bodyLocal != null) { + try { + bodyLocal.close(); + } catch (IOException ignore) { + } + } + } + } + }); + generator.initializeAsynchronousTransfer(ctx, requestPacket); + return false; + } } // END PartsBodyHandler From 6530497ddb512477d72b91b2ae87b8bd369d0b56 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 12 Nov 2013 11:34:08 +0100 Subject: [PATCH 0623/2844] Introduce a constant exception for Remotely Closed --- .../main/java/org/asynchttpclient/AsyncHttpClient.java | 2 ++ .../org/asynchttpclient/util/AsyncHttpProviderUtils.java | 9 ++++++++- .../java/org/asynchttpclient/async/AuthTimeoutTest.java | 3 ++- .../asynchttpclient/providers/grizzly/HttpTxContext.java | 3 ++- .../providers/netty/handler/NettyChannelHandler.java | 3 ++- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java index 18ddaa77fe..85e19adc55 100755 --- a/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -20,7 +20,9 @@ import org.asynchttpclient.filter.FilterException; import org.asynchttpclient.filter.RequestFilter; import org.asynchttpclient.resumable.ResumableAsyncHandler; + import java.io.Closeable; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java index a0599eecf6..bca98acabb 100644 --- a/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java +++ b/api/src/main/java/org/asynchttpclient/util/AsyncHttpProviderUtils.java @@ -14,6 +14,7 @@ import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; +import java.io.IOException; import java.io.InputStream; import java.io.SequenceInputStream; import java.io.UnsupportedEncodingException; @@ -52,7 +53,13 @@ * The cookies's handling code is from the Netty framework. */ public class AsyncHttpProviderUtils { - + + public static final IOException REMOTELY_CLOSED_EXCEPTION = new IOException("Remotely Closed"); + + static { + REMOTELY_CLOSED_EXCEPTION.setStackTrace(new StackTraceElement[] {}); + } + private final static byte[] NO_BYTES = new byte[0]; public final static String DEFAULT_CHARSET = "ISO-8859-1"; diff --git a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java index 962e996cd2..9cb3d6026b 100644 --- a/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java +++ b/api/src/test/java/org/asynchttpclient/async/AuthTimeoutTest.java @@ -28,6 +28,7 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Realm; import org.asynchttpclient.Response; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; @@ -195,7 +196,7 @@ public void digestFuturePreemptiveAuthTimeoutTest() throws Exception { protected void inspectException(Throwable t) { assertNotNull(t.getCause()); assertEquals(t.getCause().getClass(), IOException.class); - if (!t.getCause().getMessage().startsWith("Remotely Closed")) { + if (t.getCause() != AsyncHttpProviderUtils.REMOTELY_CLOSED_EXCEPTION) { fail(); } } diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java index 3ea419bf67..ce4368dd97 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/HttpTxContext.java @@ -17,6 +17,7 @@ import org.asynchttpclient.Request; import org.asynchttpclient.providers.grizzly.bodyhandler.BodyHandler; import org.asynchttpclient.providers.grizzly.statushandler.StatusHandler; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.asynchttpclient.websocket.WebSocket; import org.glassfish.grizzly.CloseListener; import org.glassfish.grizzly.CloseType; @@ -67,7 +68,7 @@ public final class HttpTxContext { public void onClosed(Closeable closeable, CloseType type) throws IOException { if (CloseType.REMOTELY.equals(type)) { - abort(new IOException("Remotely Closed")); + abort(AsyncHttpProviderUtils.REMOTELY_CLOSED_EXCEPTION); } } }; diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java index 03f68ae246..e2cacfeae7 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/NettyChannelHandler.java @@ -35,6 +35,7 @@ import org.asynchttpclient.providers.netty.future.NettyResponseFuture; import org.asynchttpclient.providers.netty.future.NettyResponseFutures; import org.asynchttpclient.providers.netty.request.NettyRequestSender; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -119,7 +120,7 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception { if (future != null && !future.isDone() && !future.isCancelled()) { if (!requestSender.retry(ctx.channel(), future)) { - channels.abort(future, new IOException("Remotely Closed")); + channels.abort(future, AsyncHttpProviderUtils.REMOTELY_CLOSED_EXCEPTION); } } else { channels.closeChannel(ctx); From 55989012bc109d03d95d4e74091616bf88fd35b5 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 12 Nov 2013 11:37:23 +0100 Subject: [PATCH 0624/2844] append to previous commit --- .../test/java/org/asynchttpclient/async/RetryRequestTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java index 6c27502c6e..fdbc1af6dc 100644 --- a/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java +++ b/api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java @@ -14,6 +14,7 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.util.AsyncHttpProviderUtils; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import org.testng.annotations.Test; @@ -21,6 +22,7 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + import java.io.IOException; import java.io.OutputStream; @@ -76,7 +78,7 @@ public void testMaxRetry() throws Exception { } catch (Exception t) { assertNotNull(t.getCause()); assertEquals(t.getCause().getClass(), IOException.class); - if (!t.getCause().getMessage().startsWith("Remotely Closed")) { + if (t.getCause() != AsyncHttpProviderUtils.REMOTELY_CLOSED_EXCEPTION) { fail(); } } finally { From d673a45fe5bd4ce890e061417daf6d2a720153b3 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 14 Nov 2013 14:55:42 +0100 Subject: [PATCH 0625/2844] All HTTP methods allow passing a body, close #421 --- .../main/java/org/asynchttpclient/RequestBuilderBase.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java index d737158ade..0a5f6789b1 100644 --- a/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/api/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -614,7 +614,7 @@ public T setConnectionPoolKeyStrategy(ConnectionPoolKeyStrategy connectionPoolKe } public Request build() { - if ((request.length < 0) && (request.streamData == null) && allowBody(request.getMethod())) { + if (request.length < 0 && request.streamData == null) { // can't concatenate content-length String contentLength = null; if (request.headers != null && request.headers.isEmpty()) { @@ -635,10 +635,6 @@ public Request build() { return request; } - private boolean allowBody(String method) { - return !(method.equalsIgnoreCase("GET") || method.equalsIgnoreCase("OPTIONS") || method.equalsIgnoreCase("TRACE") || method.equalsIgnoreCase("HEAD")); - } - public T addOrReplaceCookie(Cookie cookie) { String cookieKey = cookie.getName(); boolean replace = false; From 40e2536d5336cd781c6dc59c36ccdeef87d70ad1 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Tue, 26 Nov 2013 09:43:15 +0100 Subject: [PATCH 0626/2844] Port #424 on master --- .../providers/netty/NettyAsyncHttpProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java index d67821c497..4b820aab87 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/NettyAsyncHttpProvider.java @@ -55,8 +55,9 @@ public NettyAsyncHttpProvider(AsyncHttpClientConfig config) { @Override public String toString() { + int availablePermits = channels.freeConnections != null ? channels.freeConnections.availablePermits() : 0; return String.format("NettyAsyncHttpProvider4:\n\t- maxConnections: %d\n\t- openChannels: %s\n\t- connectionPools: %s", config.getMaxTotalConnections() - - channels.freeConnections.availablePermits(), channels.openChannels.toString(), channels.connectionsPool.toString()); + - availablePermits, channels.openChannels.toString(), channels.connectionsPool.toString()); } @Override From aa42d85261c632049ed99747cd3705e5d6c842a4 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 28 Nov 2013 22:28:16 +0100 Subject: [PATCH 0627/2844] Upgrade Netty 4.0.13 --- providers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml index 9b884d134d..818df789ec 100644 --- a/providers/netty/pom.xml +++ b/providers/netty/pom.xml @@ -39,7 +39,7 @@ io.netty netty-all - 4.0.12.Final + 4.0.13.Final org.javassist From 19644726ce7f7fe10d14a1e560d0cdc325cf973f Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 29 Nov 2013 15:35:22 +0100 Subject: [PATCH 0628/2844] Allow Multipart with unknown content length, close #427 --- .../org/asynchttpclient/multipart/MultipartBody.java | 4 ++-- .../providers/netty/request/NettyRequestSender.java | 9 ++++++++- .../providers/netty/request/NettyRequests.java | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java index f72aaf62c1..99525d0a21 100644 --- a/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java +++ b/api/src/main/java/org/asynchttpclient/multipart/MultipartBody.java @@ -49,9 +49,9 @@ public class MultipartBody implements RandomAccessBody { enum FileLocation {NONE, START, MIDDLE, END} - public MultipartBody(List parts, String contentType, String contentLength) { + public MultipartBody(List parts, String contentType, long contentLength) { this.boundary = MultipartEncodingUtil.getAsciiBytes(contentType.substring(contentType.indexOf("boundary=") + "boundary=".length())); - this.contentLength = Long.parseLong(contentLength); + this.contentLength = contentLength; this.parts = parts; files = new ArrayList(); diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java index 5c049d70ba..3a83fcc695 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java @@ -439,7 +439,14 @@ private Body computeBody(HttpRequest nettyRequest, NettyResponseFuture future } } else if (future.getRequest().getParts() != null) { String contentType = headers.get(HttpHeaders.Names.CONTENT_TYPE); - String length = headers.get(HttpHeaders.Names.CONTENT_LENGTH); + String contentLength = nettyRequest.headers().get(HttpHeaders.Names.CONTENT_LENGTH); + + long length = -1; + if (contentLength != null) { + length = Long.parseLong(contentLength); + } else { + nettyRequest.headers().add(HttpHeaders.Names.TRANSFER_ENCODING, HttpHeaders.Values.CHUNKED); + } body = new MultipartBody(future.getRequest().getParts(), contentType, length); } diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java index d5821471eb..3827789185 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequests.java @@ -260,7 +260,9 @@ else if (uri.getRawQuery() != null) MultipartRequestEntity mre = AsyncHttpProviderUtils.createMultipartRequestEntity(request.getParts(), request.getHeaders()); headers.put(HttpHeaders.Names.CONTENT_TYPE, mre.getContentType()); - headers.put(HttpHeaders.Names.CONTENT_LENGTH, mre.getContentLength()); + if (mre.getContentLength() >= 0) { + headers.put(HttpHeaders.Names.CONTENT_LENGTH, mre.getContentLength()); + } hasDeferredContent = true; } else if (request.getFile() != null) { From 895adc259fd3b9ef2f1f63b7dd026a92b6e82b15 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Fri, 29 Nov 2013 15:38:33 +0100 Subject: [PATCH 0629/2844] dammit --- .../providers/grizzly/bodyhandler/PartsBodyHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java index f4491f391f..5dcc1bc710 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/PartsBodyHandler.java @@ -67,8 +67,7 @@ public boolean doHandle(final FilterChainContext ctx, final FeedableBodyGenerator generator = new FeedableBodyGenerator() { @Override public Body createBody() throws IOException { - return new MultipartBody(parts, contentType, - String.valueOf(contentLength)); + return new MultipartBody(parts, contentType, contentLength); } }; generator.setFeeder(new FeedableBodyGenerator.BaseFeeder(generator) { From 81d59c1dd45a51359913d0b907542f6fe40a37c0 Mon Sep 17 00:00:00 2001 From: Jeanfrancois Arcand Date: Tue, 3 Dec 2013 16:24:29 -0500 Subject: [PATCH 0630/2844] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82921e4652..1eb2503dad 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Async Http Client library purpose is to allow Java applications to easily execut com.ning async-http-client - 1.7.20 + 1.7.22 ``` From 01aa462959ef98e64f8019856d5009813fcb09d8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 3 Dec 2013 19:41:54 -0800 Subject: [PATCH 0631/2844] Fix compilation error. --- .../java/org/asynchttpclient/multipart/MultipartBodyTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java b/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java index 1e8ba2860c..ceb62a8dd0 100644 --- a/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java +++ b/api/src/test/java/org/asynchttpclient/multipart/MultipartBodyTest.java @@ -79,7 +79,7 @@ private static void compareContentLength(final List parts) { final long expectedContentLength = mre.getContentLength(); // get real bytes - final Body multipartBody = new MultipartBody(parts, mre.getContentType(), String.valueOf(expectedContentLength)); + final Body multipartBody = new MultipartBody(parts, mre.getContentType(), expectedContentLength); try { final ByteBuffer buffer = ByteBuffer.allocate(8192); boolean last = false; From 22cb35acf9f55526917a93c7bb5d37933d6e44da Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Tue, 3 Dec 2013 19:45:17 -0800 Subject: [PATCH 0632/2844] Fix for #429. --- .../providers/grizzly/bodyhandler/ByteArrayBodyHandler.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java index 9ed538e5fe..c995adef2c 100644 --- a/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java +++ b/providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/bodyhandler/ByteArrayBodyHandler.java @@ -46,11 +46,7 @@ public boolean doHandle(final FilterChainContext ctx, final HttpRequestPacket requestPacket) throws IOException { - String charset = request.getBodyEncoding(); - if (charset == null) { - charset = Charsets.ASCII_CHARSET.name(); - } - final byte[] data = new String(request.getByteData(), charset).getBytes(charset); + final byte[] data = request.getByteData(); final MemoryManager mm = ctx.getMemoryManager(); final Buffer gBuffer = Buffers.wrap(mm, data); if (requestPacket.getContentLength() == -1) { From ed9f9b3b2758ab6b545ff8f294f4eabb604bd338 Mon Sep 17 00:00:00 2001 From: Lukasz Kryger Date: Sun, 8 Dec 2013 22:32:07 +0000 Subject: [PATCH 0633/2844] Nitpicking: "it's" -> "its" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1eb2503dad..561933cd2f 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Future f = c.prepareGet("http://www.ning.com/").execute(new AsyncHandler String bodyResponse = f.get(); ``` -Finally, you can also configure the AsyncHttpClient via it's AsyncHttpClientConfig object: +Finally, you can also configure the AsyncHttpClient via its AsyncHttpClientConfig object: ```java AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() From 8373cc31ac81498c45a6471163df43c6a0db6029 Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 12 Dec 2013 12:14:26 +0100 Subject: [PATCH 0634/2844] Implement onRequestSent for Netty provider, close #434 --- .../AsyncHandlerExtensions.java | 38 +++++++++++++++++++ .../netty/request/NettyRequestSender.java | 4 ++ 2 files changed, 42 insertions(+) create mode 100644 api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java diff --git a/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java b/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java new file mode 100644 index 0000000000..858d14201f --- /dev/null +++ b/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package org.asynchttpclient; + +/** + * This interface hosts new low level callback methods on {@link AsyncHandler}. + * For now, those methods are in a dedicated interface in order not to break the existing API, + * but could be merged into one of the existing ones in AHC 2. + * + * More additional hooks might come, such as: + *

      + *
    • onRetry()
    • + *
    • onConnected()
    • + *
    • onConnectionClosed()
    • + *
    • onBytesSent(long numberOfBytes)
    • + *
    • onBytesReceived(long numberOfBytes)
    • + *
    + */ +public interface AsyncHandlerExtensions { + + /** + * Notify the callback when a request is being written on the wire. + * If the original request causes multiple requests to be sent, for example, because of authorization or retry, + * it will be notified multiple times. + * Currently only supported by the Netty provider. + */ + void onRequestSent(); +} \ No newline at end of file diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java index 3a83fcc695..364c36567a 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyRequestSender.java @@ -45,6 +45,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.AsyncHandlerExtensions; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.Body; import org.asynchttpclient.BodyGenerator; @@ -501,6 +502,9 @@ public final void writeRequest(final Channel channel, final AsyncHttpClientC // FIXME That doesn't just leave to true, the set is always done? and what's the point of not having a is/get? if (future.getAndSetWriteHeaders(true)) { try { + if (future.getAsyncHandler() instanceof AsyncHandlerExtensions) { + AsyncHandlerExtensions.class.cast(future.getAsyncHandler()).onRequestSent(); + } channel.writeAndFlush(nettyRequest, channel.newProgressivePromise()).addListener(new ProgressListener(config, true, future.getAsyncHandler(), future)); } catch (Throwable cause) { // FIXME why not notify? From 31b3f44079ff5cfa7be277d6e793e1c129e4189a Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 12 Dec 2013 12:17:07 +0100 Subject: [PATCH 0635/2844] Fix deprecation --- .../org/asynchttpclient/providers/netty/channel/Channels.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java index bc1f091d02..b5bbbb51dc 100644 --- a/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java +++ b/providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java @@ -77,7 +77,7 @@ public class Channels { public static final String WS_DECODER_HANDLER = "ws-decoder"; public static final String WS_ENCODER_HANDLER = "ws-encoder"; - private static final AttributeKey DEFAULT_ATTRIBUTE = new AttributeKey("default"); + private static final AttributeKey DEFAULT_ATTRIBUTE = AttributeKey.valueOf("default"); private final AsyncHttpClientConfig config; private final NettyAsyncHttpProviderConfig asyncHttpProviderConfig; From 18b73b7433977f6a58cd17b67599342e99bbb8cb Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Thu, 12 Dec 2013 12:20:41 +0100 Subject: [PATCH 0636/2844] Add new onRetry callback method for #435 --- .../java/org/asynchttpclient/AsyncHandlerExtensions.java | 8 ++++++-- .../providers/netty/request/NettyRequestSender.java | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java b/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java index 858d14201f..1991d0aba1 100644 --- a/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java +++ b/api/src/main/java/org/asynchttpclient/AsyncHandlerExtensions.java @@ -19,7 +19,6 @@ * * More additional hooks might come, such as: *

    PaQ)q~!Z}nw5+`R(>f%iv2-Q(|v{Kn?y zubxlTrEfdJwDFF`p}<~|GC|N)C#>l!SHYf-ZLrn35Q7^moo4LE`0JZn;4fA8RgtW9 zuBMQjR~X+0Ib(|Q|Ilx<)UgBE=$u5Lx?nrp zqEoAX5T@e|?(|>v`Ki_->gq`=GUgi>h-G}>CofES>S~du=4>l@*dBxxDKCVPeGx*b zkLR#Llu4Z_=jx&?y}`_aSpSkAS=guxwhIEgIYd?=6R|PrCD%wlVUn<2CGH?`Cwxea zGNk%4L#~CjP8=H>-n8^FL+C=8Xp2}Vm@!|jH^cGI0AND^swUjMtkCImTd#bC}+ zZ9h0=X#EM9!c7ed+L;QUvdyrOnH3;_(SyrLUF~S{XnO-cXT@L1cTj2>C5&`6Sr;1m zkNrcM=+ztbbLhJiKwh41ez3yjK!4_Pa!>yZ&+EzX?OR_T1ew3kABZWy^2fDV!YANV z-907M_|^jQip~(v{l67Q|7`QW?=c9<^)kuA$!z}Vh-D%Fs1RO%>g7)a#3+A6#6tzl*{g4%+A_KT+%xlY*z`&MtB_}A>pwys zgI|+DTz)>B9tLS6YIG{^o5|SLS3aV-!?vXT%Sb#51DtF#(U{qlFrYZyUo|;g_J=A0 z0-gT2?vNa`#yInTyY%4U;mrXv*#(^vua>Jxv7>Q{ey0emE@zJ+@1J`UFG#Bvh+m}$ zx@iEwFHybnOTdYl)n;45(eXAEha>pcuLLHTnur>r36bre$rRB#1qoKT@qCQ`vPJ{i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O+B92w!wh#|NKWxz^=|T`qCJkbBGpxg?9xA-vrW8om3MhUa?$C( Q>4ou<|EC`eTz_&S0BPL&!vFvP literal 0 HcmV?d00001 diff --git a/providers/grizzly/src/test/resources/gzip.txt.gz b/providers/grizzly/src/test/resources/gzip.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..80aeb98d2b03a00c13d7c2725d3e281f47a57d81 GIT binary patch literal 47 zcmb2|=HR#?o9WBIoL-e#pjT2+!r;CBl#a)_^V*(gwKoQx@Hl(&Bs)Xnt@zJE3=9ka Do?Q|u literal 0 HcmV?d00001 diff --git a/providers/grizzly/src/test/resources/logback-test.xml b/providers/grizzly/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..4acf278710 --- /dev/null +++ b/providers/grizzly/src/test/resources/logback-test.xml @@ -0,0 +1,13 @@ + + + + %d [%thread] %level %logger - %m%n + + + + + + + + + \ No newline at end of file diff --git a/providers/grizzly/src/test/resources/realm.properties b/providers/grizzly/src/test/resources/realm.properties new file mode 100644 index 0000000000..bc9faad66a --- /dev/null +++ b/providers/grizzly/src/test/resources/realm.properties @@ -0,0 +1 @@ +user=admin, admin \ No newline at end of file diff --git a/providers/grizzly/src/test/resources/ssltest-cacerts.jks b/providers/grizzly/src/test/resources/ssltest-cacerts.jks new file mode 100644 index 0000000000000000000000000000000000000000..9c1ffbe49a7b27a250fc7d00fedd45405744fc38 GIT binary patch literal 29888 zcmdsg1zZ*R`aa!#=sbXQokN3kih^`XH_|DkbSf!GBM1V5NGRPR5|Rp10!j-aAxfz5 zpL0OPSa;5{yC#2}VXjB1E`)!BZzxD-0W9piKBoe?>k7 z7Y&m={7m=`E+Qf-Dgq>^2Z{~BL_^j_K?5OaYeLB&B(M!E5S|WjB~9Q;oM0s<3vMVK zga)<)8$|kL2UyF^)7=An-pb>Wvzt9s6e4_d0F>2&4Ga|#5dnWW^5_&`F0g{L8`#X# z!`9i&&ezHk?CEX=c6M^`fyzT0&36^I9zHj~prAV9()g$lccMl+vTkQ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+UFyYfkd(N8_S4}x2gVV#U}iarSjKkO6^c`eDA}GZT?GhqaIO2{k-+j; z(NrA!B5fX{#$yzgxAe|(3BBY~#J{_?Q#?sKe-+Kpl%+>rqn~tL63ucc$=2VLkA%>! zEXzD54_V8;pn2gfD!D02i%j6>!J;Bs#M3)@hGls#7MTMX#cJg|cChX#T{ZLWJ=GE! zU5K~hP9gnS1$iTKXu&(?HoNMF6kM`PJ!9O|sN22V0yYKe@03qG# A2><{9 literal 0 HcmV?d00001 diff --git a/providers/grizzly/src/test/resources/ssltest-keystore.jks b/providers/grizzly/src/test/resources/ssltest-keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..a95b7c5f4fbe9f9cba881475b3854861cb182263 GIT binary patch literal 1445 zcmezO_TO6u1_mY|W&~rFV#CB@AV=73#>MqOiCqRwOxq0j*toRW7+Dy#m;@OaSs7TG zm==Ahum1KTDl}5e`kqee9lk>GwJCjfCp7D~ov*(x`E$+b6=xjpnr%q9^|4>@`!@E+ zi}uIu{+!!*!-C=Vp@lxxA&;l{Nk*7CEQ|PTX1Z`q#lHsu!v5(6#vw9KEZxO~bf#Zb zE?Il~dGkX>A=cv6>qSIP+-5VqZyGyUOVDFdgS=Z}_JfL#JMP&==)6<6Sh2b9`t5ry zzPG<5v@n$N`kc{=4oZz#{&v|`N2`6xPN7puSbB3j=P~RMOPb*@xlF*s=gqB!uVbHl z2<4ScJw8W+`&G{xr?Pq@ONfRqihy3>ye<~BGoZ+h#{_(N>D|Fs2ur2%ps7pF>I zDyq!Qu>EItI4*4OBcD3qb*tuHm9|&fwWayCaOz5XseaVX$*ge1Rv~TixJ>9JFm50^r<=XRnFV)>E5XyX* z`20}6VuG$_v3GNlivo}JLPd+C-52%4{>}87eQM$FyR%#4dd~lTX}Zdhn78D zytSvNb1s=yot+rkvqPAJ?zzMvo@KDD8@ayqLK67Bw^~d=)8$1RIHVRV%M2zL;>ym3BqC9{cp0q5C^#N!jg;Oqrb#c%Au7>88ae?(Y>*m{+_%clwSNmXJJ#2fue( zuJwJi@zm*L*}2hczl+}&I(v&Z{!e{~)NHj6dxQ**W%OyC*S>kOC&pB3PjK_JM&HO^ zRTfe!{SI<_w7t5|Kk+(W=VGl)mKCeLEB4tu{LIA6$iRr~JYXVV2D)pqdW7|<3-SD= zw~jv1mb8iy&d&Q#`!qf`dG>O9pQr~tnf__VzSRmDJ@rmb-s#wH?mS~d;Zu_jv8;Q9 z_!+M@r%rmY%EEvlj5C;{;O@<$*r}E~J@OlQHe8oaPUyCHC1O(4B!1-dme<8*cPnpb uEt|hX&w*2cNrXr4-_Nv(?*ugF{&{FJ?S$IdRLMmwGq0yv95LW9JOTidn?aWV literal 0 HcmV?d00001 diff --git a/providers/grizzly/src/test/resources/textfile.txt b/providers/grizzly/src/test/resources/textfile.txt new file mode 100644 index 0000000000..87daee60a9 --- /dev/null +++ b/providers/grizzly/src/test/resources/textfile.txt @@ -0,0 +1 @@ +filecontent: hello \ No newline at end of file diff --git a/providers/grizzly/src/test/resources/textfile2.txt b/providers/grizzly/src/test/resources/textfile2.txt new file mode 100644 index 0000000000..6a91fe609c --- /dev/null +++ b/providers/grizzly/src/test/resources/textfile2.txt @@ -0,0 +1 @@ +filecontent: hello2 \ No newline at end of file diff --git a/providers/netty/pom.xml b/providers/netty/pom.xml new file mode 100644 index 0000000000..eda60306e0 --- /dev/null +++ b/providers/netty/pom.xml @@ -0,0 +1,45 @@ + + + com.ning + async-http-client-providers-parent + 1.8.0-SNAPSHOT + + 4.0.0 + com.ning + async-http-client-netty-provider + Asynchronous Http Client Netty Provider + 1.8.0-SNAPSHOT + jar + + The Async Http Client Netty Provider. + + + + + io.netty + netty + 3.4.4.Final + + + javax.servlet + servlet-api + + + commons-logging + commons-logging + + + org.slf4j + slf4j-api + + + log4j + log4j + + + + + + \ No newline at end of file diff --git a/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java diff --git a/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/BodyFileRegion.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java similarity index 99% rename from src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java index be773ce69a..84d5c81581 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java @@ -51,7 +51,7 @@ import com.ning.http.multipart.MultipartRequestEntity; import com.ning.http.util.AsyncHttpProviderUtils; import com.ning.http.util.AuthenticatorUtils; -import com.ning.http.util.CleanupChannelGroup; +import com.ning.http.client.providers.netty.util.CleanupChannelGroup; import com.ning.http.util.ProxyUtils; import com.ning.http.util.SslUtils; import com.ning.http.util.UTF8UrlEncoder; diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderConfig.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java similarity index 98% rename from src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java index 68bb2b0c19..2c34c92978 100644 --- a/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectListener.java @@ -19,7 +19,6 @@ import com.ning.http.client.AsyncHandler; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.Request; -import com.ning.http.util.AllowAllHostnameVerifier; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; @@ -32,7 +31,6 @@ import javax.net.ssl.HostnameVerifier; import java.io.IOException; import java.net.ConnectException; -import java.net.InetSocketAddress; import java.net.URI; import java.nio.channels.ClosedChannelException; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyConnectionsPool.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyResponse.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponse.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyResponseFuture.java diff --git a/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/NettyWebSocket.java diff --git a/src/main/java/com/ning/http/client/providers/netty/Protocol.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/Protocol.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/Protocol.java diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseBodyPart.java diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseHeaders.java diff --git a/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/ResponseStatus.java diff --git a/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java similarity index 98% rename from src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java index c2a452e66f..5e20a499cf 100644 --- a/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/WebSocketUtil.java @@ -13,7 +13,6 @@ package com.ning.http.client.providers.netty; import com.ning.http.util.Base64; -import org.jboss.netty.util.CharsetUtil; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoEngine.java diff --git a/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java similarity index 100% rename from src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/spnego/SpnegoTokenGenerator.java diff --git a/src/main/java/com/ning/http/util/CleanupChannelGroup.java b/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/CleanupChannelGroup.java similarity index 98% rename from src/main/java/com/ning/http/util/CleanupChannelGroup.java rename to providers/netty/src/main/java/com/ning/http/client/providers/netty/util/CleanupChannelGroup.java index d0ea020cb0..c09f28084e 100644 --- a/src/main/java/com/ning/http/util/CleanupChannelGroup.java +++ b/providers/netty/src/main/java/com/ning/http/client/providers/netty/util/CleanupChannelGroup.java @@ -26,7 +26,7 @@ * limitations under the License. */ -package com.ning.http.util; +package com.ning.http.client.providers.netty.util; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFuture; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java similarity index 94% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java index 0ee45a5752..87d47a6634 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncHttpProviderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncHttpProviderTest.java @@ -10,14 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.Response; import com.ning.http.client.async.AbstractBasicTest; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; import org.testng.annotations.Test; import java.util.concurrent.Executors; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java similarity index 92% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java index 4292c85f6f..54cf25301c 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncProviderBasicTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncProviderBasicTest.java @@ -10,14 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; import com.ning.http.client.async.AsyncProvidersBasicTest; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; public class NettyAsyncProviderBasicTest extends AsyncProvidersBasicTest { diff --git a/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java similarity index 100% rename from src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncResponseTest.java diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java index 7319d3209d..284ca9bd9e 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java index fe1fc56293..169863f3f7 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAsyncStreamLifecycleTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAsyncStreamLifecycleTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java index e99c586fd1..567ee39dc4 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyAuthTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyAuthTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java similarity index 97% rename from src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java index 0dc441b15d..9f78d99d33 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBasicAuthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicAuthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java index 1b205a900e..665fa4601f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBasicHttpsTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBasicHttpsTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java index 7f06d611cb..cce596998e 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBodyChunkTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyChunkTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java index 8e71e559fb..91627853f2 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyBodyDeferringAsyncHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyBodyDeferringAsyncHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java similarity index 92% rename from src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java index 0d1d9ef43b..7f52d79555 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyByteBufferCapacityTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyByteBufferCapacityTest.java @@ -10,11 +10,10 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.async.AbstractBasicTest; import com.ning.http.client.async.ByteBufferCapacityTest; import com.ning.http.client.async.ProviderUtil; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java similarity index 89% rename from src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java index c41b876fc8..f52a7a45f9 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyChunkingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyChunkingTest.java @@ -1,4 +1,4 @@ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java index bc13266c08..934b825456 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyComplexClientTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyComplexClientTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java new file mode 100644 index 0000000000..97505a9123 --- /dev/null +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyConnectionPoolTest.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.ning.http.client.providers.netty; + +import com.ning.http.client.AsyncHttpClient; +import com.ning.http.client.AsyncHttpClientConfig; +import com.ning.http.client.ConnectionsPool; +import com.ning.http.client.async.ConnectionPoolTest; +import com.ning.http.client.async.ProviderUtil; +import org.jboss.netty.channel.Channel; + +import java.util.concurrent.TimeUnit; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; + +public class NettyConnectionPoolTest extends ConnectionPoolTest { + + @Override + public AsyncHttpClient getAsyncHttpClient(AsyncHttpClientConfig config) { + return ProviderUtil.nettyProvider(config); + } + + @Override + public void testInvalidConnectionsPool() { + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return false; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return false; + } + + public void destroy() { + + } + }; + + AsyncHttpClient client = getAsyncHttpClient( + new AsyncHttpClientConfig.Builder() + .setConnectionsPool(cp) + .build() + ); + + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNotNull(exception); + assertEquals(exception.getMessage(), "Too many connections -1"); + client.close(); + } + + @Override + public void testValidConnectionsPool() { + ConnectionsPool cp = new ConnectionsPool() { + + public boolean offer(String key, Channel connection) { + return true; + } + + public Channel poll(String connection) { + return null; + } + + public boolean removeAll(Channel connection) { + return false; + } + + public boolean canCacheConnection() { + return true; + } + + public void destroy() { + + } + }; + + AsyncHttpClient client = getAsyncHttpClient( + new AsyncHttpClientConfig.Builder() + .setConnectionsPool(cp) + .build() + ); + + Exception exception = null; + try { + client.prepareGet(getTargetUrl()).execute().get(TIMEOUT, TimeUnit.SECONDS); + } catch (Exception ex) { + ex.printStackTrace(); + exception = ex; + } + assertNull(exception); + client.close(); + } +} diff --git a/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java index 78f5b31da2..9cf9fa79d2 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyDigestAuthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyDigestAuthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java index d054056481..9e1cd09d49 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyEmptyBodyTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyEmptyBodyTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java index 80bcdc71ac..1836e8b5d1 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyErrorResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyErrorResponseTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java index 6da18e7800..9cb5485557 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyExpect100ContinueTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyExpect100ContinueTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java index 108c6ef4e5..aef426f8f2 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyFilePartLargeFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilePartLargeFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java index df3b65a952..515862db85 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyFilterTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFilterTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java index 0a8ee879e6..faa1d7cef2 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyFollowingThreadTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyFollowingThreadTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java index b6e319f9fe..4ab927e4f9 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyHead302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHead302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java index d3897390db..fa52d4e2bc 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyHostnameVerifierTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHostnameVerifierTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java index ca7d73917c..6ccfbc22ee 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyHttpToHttpsRedirectTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyHttpToHttpsRedirectTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java index 45d927879f..04480e9c6a 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyIdleStateHandlerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyIdleStateHandlerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java index 4d894bb6d5..ea8dc48acc 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyInputStreamTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyInputStreamTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java index 3d4208736b..4e078caf73 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyListenableFutureTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyListenableFutureTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java index c0caf08e8f..b9444c5b8f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMaxConnectionsInThreads.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxConnectionsInThreads.java @@ -9,7 +9,7 @@ * http://www.apache.org/licenses/LICENSE-2.0.html * You may elect to redistribute this code under either of these licenses. *******************************************************************************/ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java index 6ebfc78c37..0fc74fb3f1 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMaxTotalConnectionTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMaxTotalConnectionTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java index 1219230844..ae77c2d315 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMultipartUploadTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipartUploadTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java index 044b66c7e2..345ad73e0f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyMultipleHeaderTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyMultipleHeaderTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java index ae74b2a27d..b1766aa480 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyNoNullResponseTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNoNullResponseTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java index 227dc1b7e9..10f229522c 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyNonAsciiContentLengthTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyNonAsciiContentLengthTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java index 4af58fb989..6bda57840f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyParamEncodingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyParamEncodingTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java index 0c941b7cde..b9fbf68650 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestRelative302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestRelative302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java index 6b74df734b..236bb90027 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPerRequestTimeoutTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPerRequestTimeoutTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java index da85212abf..c414e5752c 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPostRedirectGetTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostRedirectGetTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java index 40ea0a09c6..caf7330c73 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPostWithQSTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPostWithQSTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java index 2a3326320a..3f17d942bc 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyProxyTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java index a07028b865..ebbf5a77cb 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyProxyTunnellingTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyProxyTunnellingTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java index e2deb01594..e452dbfe9e 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyPutLargeFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyPutLargeFileTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java index fcbf8e4708..c253dc0ee6 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyQueryParametersTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyQueryParametersTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java index e230b74d3d..fa16414f45 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRC10KTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRC10KTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java similarity index 93% rename from src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java index 201b13e28a..411669af82 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRedirectConnectionUsageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRedirectConnectionUsageTest.java @@ -10,14 +10,13 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.AsyncHttpProviderConfig; import com.ning.http.client.async.ProviderUtil; import com.ning.http.client.async.RedirectConnectionUsageTest; -import com.ning.http.client.providers.netty.NettyAsyncHttpProviderConfig; public class NettyRedirectConnectionUsageTest extends RedirectConnectionUsageTest { @Override diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java index ab0c059d55..e40a064acb 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRelative302Test.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRelative302Test.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java index 9e3d1292ce..f1c3928d32 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRemoteSiteTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRemoteSiteTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java similarity index 95% rename from src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java index 2adeb73fe0..4ce24d43b8 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyRetryRequestTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyRetryRequestTest.java @@ -14,7 +14,7 @@ * under the License. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java index 249e0ebbdf..2173bc046b 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettySimpleAsyncHttpClientTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettySimpleAsyncHttpClientTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java index 7a08f95eef..e1e0361a21 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyTransferListenerTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyTransferListenerTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java similarity index 96% rename from src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java index 73edd30f95..16825ffc0d 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyWebDavBasicTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyWebDavBasicTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java similarity index 91% rename from src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java index c1cc524802..bd7a593b8f 100644 --- a/src/test/java/com/ning/http/client/async/netty/NettyZeroCopyFileTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/NettyZeroCopyFileTest.java @@ -10,12 +10,11 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async.netty; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; import com.ning.http.client.async.ProviderUtil; -import com.ning.http.client.async.TransferListenerTest; import com.ning.http.client.async.ZeroCopyFileTest; public class NettyZeroCopyFileTest extends ZeroCopyFileTest { diff --git a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java similarity index 99% rename from src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java index c9dd69a42c..1f58881fbd 100644 --- a/src/test/java/com/ning/http/client/async/RetryNonBlockingIssue.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/RetryNonBlockingIssue.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.async; +package com.ning.http.client.providers.netty; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java index 23e01d43c3..7e00324497 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyByteMessageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyByteMessageTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.netty; +package com.ning.http.client.providers.netty.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java index 1f18760722..b67a880115 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyCloseCodeReasonMsgTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyCloseCodeReasonMsgTest.java @@ -11,7 +11,7 @@ * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.netty; +package com.ning.http.client.providers.netty.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java index 38963eb20c..16bde58189 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyRedirectTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyRedirectTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.netty; +package com.ning.http.client.providers.netty.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java similarity index 95% rename from src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java rename to providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java index 2a34358dfb..091eb703c1 100644 --- a/src/test/java/com/ning/http/client/websocket/netty/NettyTextMessageTest.java +++ b/providers/netty/src/test/java/com/ning/http/client/providers/netty/websocket/NettyTextMessageTest.java @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.ning.http.client.websocket.netty; +package com.ning.http.client.providers.netty.websocket; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; diff --git a/providers/netty/src/test/resources/300k.png b/providers/netty/src/test/resources/300k.png new file mode 100644 index 0000000000000000000000000000000000000000..bff4a8598918ed4945bc27db894230d8b5b7cc80 GIT binary patch literal 265495 zcmV)wK$O3UP)4Tx0C)k_S!Y-jOSA6TybDWOa?Uv;S#r)f3c`|eT%s5Vq5=jGkfbOeQNVzJ zh$0}MqDW9c0mXoTprU{v@eX><`M&#n_x`(oZtt@_?^ab;_fFMxSJeQ(wn&bM2tm*R z5E@2_vNh7>b#`&(#ZCYu{J{b>AWZg-j?l5THV6M}`#B1rJ?4nip058@?0;s^`}jtC z0{~gWY%iZ^?@$;w0f5l;j)^gK?Ay7^5D+m@x`oAdDyXu>T*tw1>TZV>Ifw zjJ>TM0BBYKaMWaSls^DOL72`P>+KKgA?gEwVF>dH3@SLKmISf(2yATe*JC?a8Df; zV!3AE#SN|_M0^t{EX!1t}!4OC>*_(?IwmE-rxY^zs;JFY=zzl={Ul0SL z;64mU0dt@S^#AImfFB^koLHC_4T8ZZ7>B|m!r?LDFy{SBPVYY`hQG)8!{h$DMqc0z z%f|dO=bzbl;W_`-83=q}{5PEp&#}kbTV1qAV9LMd{99sA-|yAP*2&JxZvDL`lrTyj zrHIl+X`nPws(=^8jA92;sC_6ElnzP@r4I8{fg$(^Yxe(pjeGh-Z~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