[Cyberduck-trac] [Cyberduck] #5472: Metadata edition not working for swift

Cyberduck trac at trac.cyberduck.ch
Wed Nov 24 13:27:17 CET 2010


#5472: Metadata edition not working for swift
---------------------------+------------------------------------------------
    Reporter:  pedroperez  |        Owner:  dkocher  
        Type:  defect      |       Status:  new      
    Priority:  normal      |    Milestone:  4.0      
   Component:  openstack   |      Version:  4.0b7    
    Severity:  normal      |   Resolution:           
    Keywords:              |     Platform:  Windows 7
Architecture:  Intel       |  
---------------------------+------------------------------------------------

Comment (by dkocher):

 Patch for java-cloudfiles.

 {{{
 diff --git
 a/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java
 b/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java
 index 753a79e..bfd9b5d 100644
 --- a/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java
 +++ b/src/main/java/com/rackspacecloud/client/cloudfiles/FilesClient.java
 @@ -2048,7 +2048,7 @@ public class FilesClient
      * @throws HttpException There was a protocol level error talking to
 CloudFiles
      * @throws FilesException There was an error talking to CloudFiles.
      */
 -public boolean storeObjectAs(String container, String name, RequestEntity
 entity, Map<String,String> metadata, String md5sum) throws IOException,
 HttpException, FilesException
 +public String storeObjectAs(String container, String name, RequestEntity
 entity, Map<String,String> metadata, String md5sum) throws IOException,
 HttpException, FilesException
      {
         if (this.isLoggedin())
         {
 @@ -2089,7 +2089,7 @@ public boolean storeObjectAs(String container,
 String name, RequestEntity entity
                                 if (response.getStatusCode() ==
 HttpStatus.SC_CREATED)
                                 {
                                         logger.debug ("Object stored : " +
 name);
 -                                       return true;
 +                                       return
 response.getResponseHeader(FilesConstants.E_TAG).getValue();
                                 }
                                 else {
 logger.debug(response.getStatusLine());
 @@ -2704,7 +2704,6 @@ public boolean storeObjectAs(String container,
 String name, RequestEntity entity
         private HttpMethod doUpdateObjectMetadata(String container,
                         String object, Map<String,String> metadata)
                         throws HttpException, IOException {
 -                       HttpClient httpClient;
                         PostMethod method;

                 method = new PostMethod(storageURL +
 @@ -2718,8 +2717,7 @@ public boolean storeObjectAs(String container,
 String name, RequestEntity entity
 FilesClient.sanitizeForURI(metadata.get(key)));
                         }

 -                       httpClient = new HttpClient();
 -                       httpClient.executeMethod(method);
 +                       client.executeMethod(method);

                         return method;
                 }

 }}}

-- 
Ticket URL: <http://trac.cyberduck.ch/ticket/5472#comment:2>
Cyberduck <http://cyberduck.ch>
Open source FTP, SFTP, WebDAV, Cloud Files, Google Docs & Amazon S3 Browser for Mac & Windows.


More information about the Cyberduck-trac mailing list