Fixes to JDK-based http client impl