public ContainerMetadata handleResponse(final HttpResponse response) throws ClientProtocolException, IOException {
if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT ||
response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
ContainerMetadata metadata = new ContainerMetadata(
this.getContentType(response),
this.getContentLength(response),
this.getETag(response),
this.getLastModified(response));
for(Header h : response.getAllHeaders()) {
if(h.getName().startsWith(Constants.X_CONTAINER_META)
|| Constants.HTTP_HEADER_EDITABLE_NAMES.contains(h.getName().toLowerCase(Locale.ENGLISH))) {
metadata.addMetaData(h.getName(), decode(h.getValue()));
}
}
return metadata;
}
else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {