Honor “Connection: close” setting from the response header

User handler can set "Connection: close" header to control closing of the connection after response is sent.
According to: https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/InvocationTargetException.html#getTargetException(), 
better use ex.getCause()