method.setHeader(FilesConstants.X_OBJECT_META + key, sanitizeForURI(metadata.get(key)));
}
FilesResponse response = new FilesResponse(client.execute(method));
if (response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
method.abort();
if(login()) {
method = new HttpPut(getStorageURL()+"/"+sanitizeForURI(container)+"/"+sanitizeForURI(name));
method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
method.setHeader(FilesConstants.X_AUTH_TOKEN, authToken);
if (useETag) {