lib/cloudfiles/authentication.rb in cloudfiles-1.4.11 vs lib/cloudfiles/authentication.rb in cloudfiles-1.4.12

- old
+ new

@@ -23,10 +23,10 @@ server.start rescue raise CloudFiles::Exception::Connection, "Unable to connect to #{server}" end response = server.get(path, hdrhash) - if (response.code == "204") + if (response.code =~ /^20./) if response["x-cdn-management-url"] connection.cdnmgmthost = URI.parse(response["x-cdn-management-url"]).host connection.cdnmgmtpath = URI.parse(response["x-cdn-management-url"]).path connection.cdnmgmtport = URI.parse(response["x-cdn-management-url"]).port connection.cdnmgmtscheme = URI.parse(response["x-cdn-management-url"]).scheme