Various HTTP client fixes.