while (a.hasMoreMessages()) {
HttpRequestBase e = null;
try {
HttpAction ha = a.getNextMessage();
log.debug(path + ha.getRequest());
if (ha instanceof Get) {
if (path.length() > 1) {
e = new HttpGet(path + ha.getRequest());
} else {
e = new HttpGet(ha.getRequest());
}
e.getParams().setParameter(ClientPNames.DEFAULT_HOST, host);
// do get
out = get(e, a, ha);
} else if (ha instanceof Post) {
Post p = (Post) ha;
if (path.length() > 1) {
e = new HttpPost(path + ha.getRequest());
} else {
e = new HttpPost(ha.getRequest());
}
e.getParams().setParameter(ClientPNames.DEFAULT_HOST, host);
MultipartEntity entity = new MultipartEntity();
for (String key : p.getParams().keySet()) {