Cyberduck Mountain Duck CLI

#5472 closed defect (fixed)

Metadata edition not working for swift

Reported by: pedroperez Owned by: dkocher
Priority: normal Milestone: 3.8
Component: openstack Version: 4.0b7
Severity: normal Keywords:
Cc: Architecture: Intel
Platform: Windows 7

Description

When trying to edit metadata information for a swift file a got "unable to find valid certification path to request target" for custom attributes.

Also when adding fixed attributes like Cache-Control, Expires, etc they are not saved and do not appears after refreshing the metadata.

Attachments (1)

metadata-screenshot.png (40.7 KB) - added by pedroperez on Nov 24, 2010 at 11:40:30 AM.
Metadata screenshot

Download all attachments as: .zip

Change History (7)

Changed on Nov 24, 2010 at 11:40:30 AM by pedroperez

Metadata screenshot

comment:1 Changed on Nov 24, 2010 at 12:26:07 PM by dkocher

  • Milestone set to 4.0
  • Version changed from 3.7 to 4.0b7

The update method does not take the custom trust manager into account. Bug in cloudfiles library.

comment:2 Changed on Nov 24, 2010 at 12:27:16 PM 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;
                }

comment:3 Changed on Nov 24, 2010 at 12:30:50 PM by dkocher

Filed issue in #6

comment:4 Changed on Nov 24, 2010 at 12:31:40 PM by dkocher

  • Resolution set to fixed
  • Status changed from new to closed

In r7745. Will use custom certificate trust validation.

comment:5 in reply to: ↑ description Changed on Nov 24, 2010 at 1:51:34 PM by dkocher

Replying to pedroperez:

Also when adding fixed attributes like Cache-Control, Expires, etc they are not saved and do not appears after refreshing the metadata.

This is an additional user interface issue. You have to change the default value set that the attribute is written to the server.

comment:6 Changed on Nov 24, 2010 at 5:31:10 PM by dkocher

You can test the fix in the latest build now available.

Note: See TracTickets for help on using tickets.
swiss made software