final int status = httpClient.executeMethod(post);
if(status!=expected) {
throw new HttpStatusCodeException(expected, status, "POST", url, HttpTestBase.getResponseBodyAsStream(post, 0));
}
String location = post.getResponseHeader("Location").getValue();
post.releaseConnection();
// simple check if host is missing
if (!location.startsWith("http://")) {
String host = HttpTestBase.HTTP_BASE_URL;
int idx = host.indexOf('/', 8);
if (idx > 0) {