ASYNCWEB-37
Do not cache the connection if "Connection: close" is specified.
git-svn-id: https://svn.apache.org/repos/asf/mina/asyncweb/branches/1.0-mina1@817847 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/client/src/main/java/org/apache/asyncweb/client/codec/HttpIoHandler.java b/client/src/main/java/org/apache/asyncweb/client/codec/HttpIoHandler.java
index af7d4dc..868cdb1 100644
--- a/client/src/main/java/org/apache/asyncweb/client/codec/HttpIoHandler.java
+++ b/client/src/main/java/org/apache/asyncweb/client/codec/HttpIoHandler.java
@@ -178,7 +178,7 @@
// if we've been provided with a cache, put this session into
// the cache.
SessionCache cache = getSessionCache();
- if (cache != null) {
+ if (cache != null && !HttpDecoder.CLOSE.equals(response.getConnection())) {
// cache the session before we return
cache.cacheSession(ioSession);
}
@@ -207,7 +207,7 @@
// if we've been provided with a cache, put this session into
// the cache.
SessionCache cache = getSessionCache();
- if (cache != null) {
+ if (cache != null && !HttpDecoder.CLOSE.equals(response.getConnection())) {
// cache the session before we return
cache.cacheSession(ioSession);
}
@@ -234,7 +234,7 @@
// if we've been provided with a cache, put this session into
// the cache.
SessionCache cache = getSessionCache();
- if (cache != null) {
+ if (cache != null && !HttpDecoder.CLOSE.equals(response.getConnection())) {
// cache the session before we return
cache.cacheSession(ioSession);
}