Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata edition not working for swift #5472

Closed
cyberduck opened this issue Nov 24, 2010 · 6 comments
Closed

Metadata edition not working for swift #5472

cyberduck opened this issue Nov 24, 2010 · 6 comments

Comments

@cyberduck
Copy link
Collaborator

@cyberduck cyberduck commented Nov 24, 2010

e09940a created the issue

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

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 24, 2010

@dkocher commented

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 24, 2010

@dkocher commented

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;
                }

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 24, 2010

@dkocher commented

Filed issue in #11958

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 24, 2010

@dkocher commented

In e752d0a. Will use custom certificate trust validation.

Loading

@cyberduck cyberduck closed this Nov 24, 2010
@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 24, 2010

@dkocher commented

Replying to [5472 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.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 24, 2010

@dkocher commented

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

Loading

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants