The following code works fine for GET:

            HttpResponse httpResponse =
httpClient.execute(httpRequest, localContext);
            HttpConnection conn = (HttpConnection)
localContext.getAttribute(ExecutionContext.HTTP_CONNECTION);
            HttpConnectionMetrics metrics = conn.getMetrics();

but fails on the getMetrics() call when the request is HEAD:

        org.apache.http.impl.conn.ConnectionShutdownException
        at 
org.apache.http.impl.conn.AbstractClientConnAdapter.assertValid(AbstractClientConnAdapter.java:154)
        at 
org.apache.http.impl.conn.AbstractClientConnAdapter.getMetrics(AbstractClientConnAdapter.java:190)

Is that intentional? Surely the metrics should still be valid?

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to