You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2017/10/28 04:01:50 UTC
mina git commit: Applied the PR from Parijat Bansal (DIRMINA-844)
Repository: mina
Updated Branches:
refs/heads/2.0 fd5bc41ed -> 0d8e40389
Applied the PR from Parijat Bansal (DIRMINA-844)
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/0d8e4038
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/0d8e4038
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/0d8e4038
Branch: refs/heads/2.0
Commit: 0d8e40389651c7843057bc9bcc69650daca85186
Parents: fd5bc41
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Sat Oct 28 06:01:46 2017 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Sat Oct 28 06:01:46 2017 +0200
----------------------------------------------------------------------
.../handlers/http/AbstractHttpLogicHandler.java | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/0d8e4038/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractHttpLogicHandler.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractHttpLogicHandler.java b/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractHttpLogicHandler.java
index a314519..67e40cf 100644
--- a/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractHttpLogicHandler.java
+++ b/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractHttpLogicHandler.java
@@ -27,7 +27,6 @@ import java.util.Map;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.filterchain.IoFilter.NextFilter;
import org.apache.mina.core.future.ConnectFuture;
-import org.apache.mina.core.future.IoFutureListener;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.core.session.IoSessionInitializer;
import org.apache.mina.proxy.AbstractProxyLogicHandler;
@@ -341,15 +340,10 @@ public abstract class AbstractHttpLogicHandler extends AbstractProxyLogicHandler
session.setAttribute(ProxyIoSession.PROXY_SESSION, proxyIoSession);
proxyIoSession.setSession(session);
LOGGER.debug(" setting up proxyIoSession: {}", proxyIoSession);
- future.addListener(new IoFutureListener<ConnectFuture>() {
- @Override
- public void operationComplete(ConnectFuture future) {
- // Reconnection is done so we send the
- // request to the proxy
- proxyIoSession.setReconnectionNeeded(false);
- writeRequest0(nextFilter, request);
- }
- });
+ // Reconnection is done so we send the
+ // request to the proxy
+ proxyIoSession.setReconnectionNeeded(false);
+ writeRequest0(nextFilter, request);
}
});
}
@@ -376,8 +370,8 @@ public abstract class AbstractHttpLogicHandler extends AbstractProxyLogicHandler
throw new Exception("Invalid response status line (" + statusLine + "). Response: " + response);
}
- // Status code is 3 digits
- if (!statusLine[1].matches("^\\d\\d\\d")) {
+ // Status line [1] is 3 digits, space and optional error text
+ if (!statusLine[1].matches("^\\d\\d\\d.*")) {
throw new Exception("Invalid response code (" + statusLine[1] + "). Response: " + response);
}