Skip to content

Commit e36c58a

Browse files
author
Lowell Vaughn
committed
Changing FilesResponse to accept all 2xx response codes and updaing user agent version string
1 parent e6d6c37 commit e36c58a

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/main/java/com/rackspacecloud/client/cloudfiles/FilesConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class FilesConstants
1212
{
1313
private static Logger logger = Logger.getLogger(FilesConstants.class);
1414

15-
public static final String USER_AGENT = "java-cloudfiles/1.6.2";
15+
public static final String USER_AGENT = "java-cloudfiles/1.7.3";
1616

1717
/** HTTP Header token that identifies the username to Cloud Files **/
1818
public static final String X_STORAGE_USER_DEFAULT = "x-auth-user";

src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ public FilesResponse (HttpResponse response)
4646
*/
4747
public boolean loginSuccess ()
4848
{
49-
if (getStatusCode() == HttpStatus.SC_UNAUTHORIZED )
50-
return false;
49+
int statusCode = getStatusCode();
5150

52-
if (getStatusCode() == HttpStatus.SC_NO_CONTENT)
51+
if (statusCode >= 200 && statusCode < 300)
5352
return true;
5453

5554
return false;

0 commit comments

Comments
 (0)