fix bugs in parsing http response in HttpClient.cxx