Java Apache httpclient 4.x 302在keepalive关闭时重定向?

Java Apache httpclient 4.x 302在keepalive关闭时重定向?,java,http,apache-httpclient-4.x,Java,Http,Apache Httpclient 4.x,我一直在尝试使用HttpClient 4.4.1(GA)向服务器发出一个httpget请求,该请求返回一个302,带有重定向路径。我在不使用keepalive时遇到了一些问题,无法使其无缝工作 这是我的密码: HttpGet httpget = new HttpGet("http://10.104.107.22:1354/video/Manifest"); Header header = new BasicHeader(HttpHeaders.CONNECTION,

我一直在尝试使用HttpClient 4.4.1(GA)向服务器发出一个httpget请求,该请求返回一个302,带有重定向路径。我在不使用keepalive时遇到了一些问题,无法使其无缝工作

这是我的密码:

    HttpGet httpget = new HttpGet("http://10.104.107.22:1354/video/Manifest");
    Header header = new BasicHeader(HttpHeaders.CONNECTION,
            "close");
    ArrayList<Header> headers = new ArrayList<>();
    headers.add(header);
    CloseableHttpClient client = HttpClients.custom().setDefaultHeaders(headers).build();
    HttpEntity entity = null;
    CloseableHttpResponse response = client.execute(httpget);

    try{    
        entity = response.getEntity();  
            if (entity != null) {
                long len = entity.getContentLength();
                if (len != -1 && len < 2048) {
                    responseBody = EntityUtils.toString(entity);
                } 
                else {
                    InputStream instream = entity.getContent();
                    try {
                        StringWriter writer = new StringWriter();
                        IOUtils.copy(instream, writer, "UTF-8");
                        responseBody = writer.toString();
                    } finally {
                        instream.close();
                    }
                }
            }
    }
    finally{
        EntityUtils.consume(entity);
        response.close();
        client.close();
    }
酷,现在我们知道该去哪里了。问题是,httpclient随后会抱怨错误:

    Apr 08, 2015 2:39:29 PM org.apache.http.impl.execchain.RetryExec execute
    INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to /127.0.0.1->{}->http://10.104.107.22:1354:         The target server failed to respond
    Apr 08, 2015 2:39:29 PM org.apache.http.impl.execchain.RetryExec execute
    INFO: Retrying request to /127.0.0.1->{}->http://10.104.107.22:1354
果然如此,它然后重试从IOException恢复,并在同一个连接中发送另一个带有重定向URL的请求

    GET /video/Manifest?sessionID=250849653588053716653279720260905006780 HTTP/1.1
    Connection: close
    Host: 10.104.107.22:1354
    User-Agent: Apache-HttpClient/4.4.1 (Java 1.5 minimum; Java/1.7.0_55)
    Accept-Encoding: gzip,deflate
现在,因为我从一开始就指定了“Connection:close”作为头,所以服务器在这一点上会抓住这个机会,并关闭其一侧的套接字。然后我的客户收到RST信号。重新发送重定向Url的请求,这一次一切正常

我试图解决的问题是如何阻止客户端在同一连接中发送重定向请求。我通过在CloseableHttpClient对象上使用
disableRedirectHandling()
在第一次请求后禁用重定向,然后自己在单独的连接中处理302响应,成功地“解决”了这个问题。如果我使用keepAlive来处理这个问题,事情也会很顺利,不过在完成之后,我必须使用
ConnectionKeepAliveStrategy
策略来超时客户端套接字

HttpClient 4.4.1是否有办法自动处理单独请求中的302重定向处理

编辑:按要求发布GET请求的完整通信

    GET /video/Manifest HTTP/1.1
    Connection: close
    Host: 10.104.107.22:1354
    User-Agent: Apache-HttpClient/4.4.1 (Java 1.5 minimum; Java/1.7.0_55)
    Accept-Encoding: gzip,deflate

    HTTP/1.1 302 Moved Temporarily
    Content-Length: 0
    Location: http://10.104.107.22:1354/video/Manifest?sessionID=250849653588053716653279720260905006780
    Date: Wed, 08 Apr 2015 14:36:42 GMT

    GET /video/Manifest?sessionID=250849653588053716653279720260905006780 HTTP/1.1
    Connection: close
    Host: 10.104.107.22:1354
    User-Agent: Apache-HttpClient/4.4.1 (Java 1.5 minimum; Java/1.7.0_55)
    Accept-Encoding: gzip,deflate
然后我从服务器获取RST信号

标题连接+上下文记录

    2015/04/08 15:57:25:657 EDT [DEBUG] RequestAddCookies - CookieSpec selected: default
    2015/04/08 15:57:25:667 EDT [DEBUG] RequestAuthCache - Auth cache not set in the context
    2015/04/08 15:57:25:668 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
    2015/04/08 15:57:25:679 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:681 EDT [DEBUG] MainClientExec - Opening connection /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:683 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connecting to /10.104.107.22:1354
    2015/04/08 15:57:25:686 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:46323<->10.104.107.22:1354
    2015/04/08 15:57:25:686 EDT [DEBUG] MainClientExec - Executing request GET /video/Manifest HTTP/1.1
    2015/04/08 15:57:25:686 EDT [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
    2015/04/08 15:57:25:687 EDT [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> GET /video/Manifest HTTP/1.1
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> Connection: close
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> Host: 10.104.107.22:1354
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_55)
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
    2015/04/08 15:57:25:700 EDT [DEBUG] headers - http-outgoing-0 << HTTP/1.1 302 Moved Temporarily
    2015/04/08 15:57:25:700 EDT [DEBUG] headers - http-outgoing-0 << Content-Length: 0
    2015/04/08 15:57:25:701 EDT [DEBUG] headers - http-outgoing-0 << Location: http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850
    2015/04/08 15:57:25:701 EDT [DEBUG] headers - http-outgoing-0 << Date: Wed, 08 Apr 2015 19:57:25 GMT
    2015/04/08 15:57:25:707 EDT [DEBUG] MainClientExec - Connection can be kept alive indefinitely
    2015/04/08 15:57:25:707 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354] can be kept alive indefinitely
    2015/04/08 15:57:25:707 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:709 EDT [DEBUG] DefaultRedirectStrategy - Redirect requested to location 'http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850'
    2015/04/08 15:57:25:713 EDT [DEBUG] RedirectExec - Redirecting to 'http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850' via /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:714 EDT [DEBUG] RequestAddCookies - CookieSpec selected: default
    2015/04/08 15:57:25:714 EDT [DEBUG] RequestAuthCache - Auth cache not set in the context
    2015/04/08 15:57:25:714 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:715 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:715 EDT [DEBUG] MainClientExec - Executing request GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:715 EDT [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
    2015/04/08 15:57:25:716 EDT [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> Connection: close
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> Host: 10.104.107.22:1354
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_55)
    2015/04/08 15:57:25:717 EDT [DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
    2015/04/08 15:57:25:717 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
    2015/04/08 15:57:25:718 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
    2015/04/08 15:57:25:718 EDT [DEBUG] MainClientExec - Connection discarded
    2015/04/08 15:57:25:718 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
    2015/04/08 15:57:25:718 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
    2015/04/08 15:57:25:718 EDT [INFO] RetryExec - I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to /127.0.0.1->{}->http://10.104.107.22:1354: The target server failed to respond
    2015/04/08 15:57:25:718 EDT [DEBUG] RetryExec - The target server failed to respond <org.apache.http.NoHttpResponseException: The target server failed to respond>org.apache.http.NoHttpResponseException: The target server failed to respond
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
        at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
        at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
        at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
        at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
        at WorkingNonKeepAliveUseCase.requestWithoutKeepAlive(WorkingNonKeepAliveUseCase.java:109)
        at Runner.main(Runner.java:13)

    2015/04/08 15:57:25:720 EDT [INFO] RetryExec - Retrying request to /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:720 EDT [DEBUG] RequestAddCookies - CookieSpec selected: default
    2015/04/08 15:57:25:720 EDT [DEBUG] RequestAuthCache - Auth cache not set in the context
    2015/04/08 15:57:25:720 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
    2015/04/08 15:57:25:721 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Opening connection /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:721 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connecting to /10.104.107.22:1354
    2015/04/08 15:57:25:721 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:40753<->10.104.107.22:1354
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Executing request GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> Connection: close
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> Host: 10.104.107.22:1354
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_55)
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate
    2015/04/08 15:57:25:792 EDT [DEBUG] headers - http-outgoing-1 << HTTP/1.1 200 OK
    2015/04/08 15:57:25:792 EDT [DEBUG] headers - http-outgoing-1 << Content-Length: 17090
    2015/04/08 15:57:25:792 EDT [DEBUG] headers - http-outgoing-1 << Pragma: no-cache
    2015/04/08 15:57:25:793 EDT [DEBUG] headers - http-outgoing-1 << Cache-Control: max-age=0, no-cache, no-store
    2015/04/08 15:57:25:793 EDT [DEBUG] headers - http-outgoing-1 << Content-Type: application/vnd.ms-sstr+xml
    2015/04/08 15:57:25:793 EDT [DEBUG] headers - http-outgoing-1 << Date: Wed, 08 Apr 2015 19:57:25 GMT
    2015/04/08 15:57:25:794 EDT [DEBUG] MainClientExec - Connection can be kept alive indefinitely
    2015/04/08 15:57:26:795 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 1][route: /127.0.0.1->{}->http://10.104.107.22:1354] can be kept alive indefinitely
    2015/04/08 15:57:26:796 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 1][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:26:796 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection manager is shutting down
    2015/04/08 15:57:26:796 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-1: Close connection
    2015/04/08 15:57:26:797 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-1: Close connection
    2015/04/08 15:57:26:797 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection manager shut down
2015/04/08 15:57:25:657 EDT[DEBUG]RequestAddCookies-CookieSpec selected:default
2015/04/08 15:57:25:667 EDT[DEBUG]RequestAuthCache-未在上下文中设置验证缓存
2015/04/08 15:57:25:668 EDT[DEBUG]PoolighttpClientConnectionManager-连接请求:[路由:/127.0.0.1->{}->http://10.104.107.22:1354][保持活动状态的总数:0;分配的路由:0,共2条;分配的总数:0,共20条]
2015/04/08 15:57:25:679 EDT[DEBUG]PoolighttpClientConnectionManager-已租用连接:[id:0][路由:/127.0.0.1->{}->http://10.104.107.22:1354][保持活动状态的总数:0;分配的路由:1/2;分配的总数:1/20]
2015/04/08 15:57:25:681 EDT[DEBUG]MainClientExec-打开连接/127.0.0.1->{}->http://10.104.107.22:1354
2015/04/08 15:57:25:683 EDT[DEBUG]默认HttpClientConnectionOperator-连接到/10.104.107.22:1354
2015/04/08 15:57:25:686 EDT[DEBUG]DefaultHttpClientConnectionOperator-已建立连接127.0.0.1:4632310.104.107.22:1354
2015/04/08 15:57:25:686 EDT[DEBUG]MainClientExec-执行请求GET/video/Manifest HTTP/1.1
2015/04/08 15:57:25:686 EDT[DEBUG]MainClientExec-目标身份验证状态:未被质疑
2015/04/08 15:57:25:687 EDT[DEBUG]MainClientExec-代理身份验证状态:未被质疑
2015/04/08 15:57:25:688 EDT[DEBUG]头-http-outgoing-0>>获取/视频/清单http/1.1
2015/04/08 15:57:25:688 EDT[DEBUG]头-http-outgoing-0>>连接:关闭
2015/04/08 15:57:25:688 EDT[DEBUG]头文件-http-outgoing-0>>主机:10.104.107.22:1354
2015/04/08 15:57:25:688 EDT[DEBUG]头-http-outgoing-0>>用户代理:Apache HttpClient/4.4.1(Java/1.7.055)
2015/04/08 15:57:25:688 EDT[DEBUG]头-http-outgoing-0>>接受编码:gzip,deflate
2015/04/08 15:57:25:700 EDT[DEBUG]头文件-http-outgoing-0http://10.104.107.22:1354][保持活动状态的总数:1;分配的路由:1/2;分配的总数:1/20]
2015/04/08 15:57:25:709 EDT[DEBUG]DefaultRedirectStrategy-请求重定向到位置'http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850'
2015/04/08 15:57:25:713 EDT[DEBUG]RedirectExec-重定向到'http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850'via/127.0.0.1->{}->http://10.104.107.22:1354
2015/04/08 15:57:25:714 EDT[调试]请求添加Cookies-CookieSpec已选择:默认
2015/04/08 15:57:25:714 EDT[DEBUG]RequestAuthCache-未在上下文中设置验证缓存
2015/04/08 15:57:25:714 EDT[DEBUG]PoollightTPClientConnectionManager-连接请求:[路由:/127.0.0.1->{}->http://10.104.107.22:1354][保持活动状态的总数:1;分配的路由:1/2;分配的总数:1/20]
2015/04/08 15:57:25:715 EDT[DEBUG]PoolighttpClientConnectionManager-已租用连接:[id:0][路由:/127.0.0.1->{}->http://10.104.107.22:1354][保持活动状态的总数:0;分配的路由:1/2;分配的总数:1/20]
2015/04/08 15:57:25:715 EDT[DEBUG]MainClientExec-执行请求GET/video/Manifest?会话ID=162729772390321694625639849465722594850 HTTP/1.1
2015/04/08 15:57:25:715 EDT[DEBUG]MainClientExec-目标身份验证状态:未被质疑
2015/04/08 15:57:25:716 EDT[DEBUG]MainClientExec-代理身份验证状态:未被质疑
2015/04/08 15:57:25:716 EDT[DEBUG]头-http-outgoing-0>>获取/视频/清单?会话ID=162729772390321694625639849465722594850 http/1.1
2015/04/08 15:57:25:716 EDT[DEBUG]头-http-outgoing-0>>连接:关闭
2015/04/08 15:57:25:716 EDT[DEBUG]头-http-outgoing-0>>主机:10.104.107.22:1354
2015/04/08 15:57:25:716 EDT[DEBUG]头-http-outgoing-0>>用户代理:Apache HttpClient/4.4.1(Java/1.7.055)
2015/04/08 15:57:25:717 EDT[DEBUG]头-http-outgoing-0>>接受编码:gzip,deflate
2015/04/08 15:57:25:717 EDT[DEBUG]DefaultManagedHttpClient连接-http-outgoing-0:关闭连接
2015/04/08 15:57:25:718 EDT[DEBUG]DefaultManagedHttpClient连接-http-outgoing-0:关闭连接
2015/04/08 15:57:25:718 EDT[DEBUG]MainClientExec-已放弃连接
2015/04/08 15:57:25:718 EDT[DEBUG]DefaultManagedHttpClient连接-http-outgoing-0:关闭连接
2015/04/08 15:57:25:718 EDT[DEBUG]PoollightTPClientConnectionManager-连接版本
    2015/04/08 15:57:25:657 EDT [DEBUG] RequestAddCookies - CookieSpec selected: default
    2015/04/08 15:57:25:667 EDT [DEBUG] RequestAuthCache - Auth cache not set in the context
    2015/04/08 15:57:25:668 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
    2015/04/08 15:57:25:679 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:681 EDT [DEBUG] MainClientExec - Opening connection /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:683 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connecting to /10.104.107.22:1354
    2015/04/08 15:57:25:686 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:46323<->10.104.107.22:1354
    2015/04/08 15:57:25:686 EDT [DEBUG] MainClientExec - Executing request GET /video/Manifest HTTP/1.1
    2015/04/08 15:57:25:686 EDT [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
    2015/04/08 15:57:25:687 EDT [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> GET /video/Manifest HTTP/1.1
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> Connection: close
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> Host: 10.104.107.22:1354
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_55)
    2015/04/08 15:57:25:688 EDT [DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
    2015/04/08 15:57:25:700 EDT [DEBUG] headers - http-outgoing-0 << HTTP/1.1 302 Moved Temporarily
    2015/04/08 15:57:25:700 EDT [DEBUG] headers - http-outgoing-0 << Content-Length: 0
    2015/04/08 15:57:25:701 EDT [DEBUG] headers - http-outgoing-0 << Location: http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850
    2015/04/08 15:57:25:701 EDT [DEBUG] headers - http-outgoing-0 << Date: Wed, 08 Apr 2015 19:57:25 GMT
    2015/04/08 15:57:25:707 EDT [DEBUG] MainClientExec - Connection can be kept alive indefinitely
    2015/04/08 15:57:25:707 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354] can be kept alive indefinitely
    2015/04/08 15:57:25:707 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:709 EDT [DEBUG] DefaultRedirectStrategy - Redirect requested to location 'http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850'
    2015/04/08 15:57:25:713 EDT [DEBUG] RedirectExec - Redirecting to 'http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850' via /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:714 EDT [DEBUG] RequestAddCookies - CookieSpec selected: default
    2015/04/08 15:57:25:714 EDT [DEBUG] RequestAuthCache - Auth cache not set in the context
    2015/04/08 15:57:25:714 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:715 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:715 EDT [DEBUG] MainClientExec - Executing request GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:715 EDT [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
    2015/04/08 15:57:25:716 EDT [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> Connection: close
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> Host: 10.104.107.22:1354
    2015/04/08 15:57:25:716 EDT [DEBUG] headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_55)
    2015/04/08 15:57:25:717 EDT [DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
    2015/04/08 15:57:25:717 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
    2015/04/08 15:57:25:718 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
    2015/04/08 15:57:25:718 EDT [DEBUG] MainClientExec - Connection discarded
    2015/04/08 15:57:25:718 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
    2015/04/08 15:57:25:718 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
    2015/04/08 15:57:25:718 EDT [INFO] RetryExec - I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to /127.0.0.1->{}->http://10.104.107.22:1354: The target server failed to respond
    2015/04/08 15:57:25:718 EDT [DEBUG] RetryExec - The target server failed to respond <org.apache.http.NoHttpResponseException: The target server failed to respond>org.apache.http.NoHttpResponseException: The target server failed to respond
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
        at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
        at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
        at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
        at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
        at WorkingNonKeepAliveUseCase.requestWithoutKeepAlive(WorkingNonKeepAliveUseCase.java:109)
        at Runner.main(Runner.java:13)

    2015/04/08 15:57:25:720 EDT [INFO] RetryExec - Retrying request to /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:720 EDT [DEBUG] RequestAddCookies - CookieSpec selected: default
    2015/04/08 15:57:25:720 EDT [DEBUG] RequestAuthCache - Auth cache not set in the context
    2015/04/08 15:57:25:720 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection request: [route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
    2015/04/08 15:57:25:721 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Opening connection /127.0.0.1->{}->http://10.104.107.22:1354
    2015/04/08 15:57:25:721 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connecting to /10.104.107.22:1354
    2015/04/08 15:57:25:721 EDT [DEBUG] DefaultHttpClientConnectionOperator - Connection established 127.0.0.1:40753<->10.104.107.22:1354
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Executing request GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
    2015/04/08 15:57:25:721 EDT [DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> GET /video/Manifest?sessionID=162729772390321694625639849465722594850 HTTP/1.1
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> Connection: close
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> Host: 10.104.107.22:1354
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_55)
    2015/04/08 15:57:25:722 EDT [DEBUG] headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate
    2015/04/08 15:57:25:792 EDT [DEBUG] headers - http-outgoing-1 << HTTP/1.1 200 OK
    2015/04/08 15:57:25:792 EDT [DEBUG] headers - http-outgoing-1 << Content-Length: 17090
    2015/04/08 15:57:25:792 EDT [DEBUG] headers - http-outgoing-1 << Pragma: no-cache
    2015/04/08 15:57:25:793 EDT [DEBUG] headers - http-outgoing-1 << Cache-Control: max-age=0, no-cache, no-store
    2015/04/08 15:57:25:793 EDT [DEBUG] headers - http-outgoing-1 << Content-Type: application/vnd.ms-sstr+xml
    2015/04/08 15:57:25:793 EDT [DEBUG] headers - http-outgoing-1 << Date: Wed, 08 Apr 2015 19:57:25 GMT
    2015/04/08 15:57:25:794 EDT [DEBUG] MainClientExec - Connection can be kept alive indefinitely
    2015/04/08 15:57:26:795 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection [id: 1][route: /127.0.0.1->{}->http://10.104.107.22:1354] can be kept alive indefinitely
    2015/04/08 15:57:26:796 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 1][route: /127.0.0.1->{}->http://10.104.107.22:1354][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
    2015/04/08 15:57:26:796 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection manager is shutting down
    2015/04/08 15:57:26:796 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-1: Close connection
    2015/04/08 15:57:26:797 EDT [DEBUG] DefaultManagedHttpClientConnection - http-outgoing-1: Close connection
    2015/04/08 15:57:26:797 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection manager shut down
2015/04/08 15:57:25:700 EDT [DEBUG] headers - http-outgoing-0 << HTTP/1.1 302 Moved Temporarily
2015/04/08 15:57:25:700 EDT [DEBUG] headers - http-outgoing-0 << Content-Length: 0
2015/04/08 15:57:25:701 EDT [DEBUG] headers - http-outgoing-0 << Location: http://10.104.107.22:1354/video/Manifest?sessionID=162729772390321694625639849465722594850
2015/04/08 15:57:25:701 EDT [DEBUG] headers - http-outgoing-0 << Date: Wed, 08 Apr 2015 19:57:25 GMT