HTTP client fixes - ENG-2560 and ENG-5438

Also have a debug PrintStackTrace() (to be removed after system test debugging)