rackspace/java-cloudfiles — Issue #34: FilesClient.getObjectMetaData(): "method is already aborted" after login()
Author: dimm0
Created: 2012-02-10 02:04:31+00:00
State: open

FilesClient.java, line 2634:

```java
if (response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
method.abort();
login();
```
Needs to recreate the method object like in other functions (this line is missing) :
```java
method = new HttpHead(storageURL+"/"+sanitizeForURI(container)+"/"+sanitizeForURI(objName));

method.getParams().setIntParameter("http.socket.timeout", connectionTimeOut);
method.setHeader(FilesConstants.X_AUTH_TOKEN, authToken);
response = new FilesResponse(client.execute(method));
}
```

Gives "method is already aborted" exception if not authorized.