fixed wrong port handling in httpclient