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

Problems deleting objects with URL-encoded names in Cloud Files #402

Open
smashwilson opened this issue Apr 18, 2016 · 1 comment
Open

Comments

@smashwilson
Copy link
Contributor

To delete an object with a URL-encoded name from Cloud Files, it looks like you need to double URL-encode the filename:

$ rack files object list --container deconst-drc-content --prefix https%3A%2F%2Fgithub.com%2Frackerlabs%2Fdocs-quickstart%2Fcloud-monitoring
Name                                                                Bytes   ContentType         LastModified
https%3A%2F%2Fgithub.com%2Frackerlabs%2Fdocs-quickstart%2Fcloud-monitoring%2Fgetting-started                    58773   application/octet-stream    2015-06-01T19:00:17.692060
~/ops/deconst-drc-playbook docker:dev (master=)
$ rack files object delete --container deconst-drc-content --name https%3A%2F%2Fgithub.com%2Frackerlabs%2Fdocs-quickstart%2Fcloud-monitoring%2Fgetting-started
error   I couldn't find object [https%3A%2F%2Fgithub.com%2Frackerlabs%2Fdocs-quickstart%2Fcloud-monitoring%2Fgetting-started] in container [deconst-drc-content]
~/ops/deconst-drc-playbook docker:dev (master=) 
$ rack files object delete --container deconst-drc-content --name https%253A%252F%252Fgithub.com%252Frackerlabs%252Fdocs-quickstart%252Fcloud-monitoring%252Fgetting-started
Successfully deleted object [https%253A%252F%252Fgithub.com%252Frackerlabs%252Fdocs-quickstart%252Fcloud-monitoring%252Fgetting-started] from container [deconst-drc-content]

Objects with URL-encoded names also cause rack files container empty to hang.

@jrperritt
Copy link
Contributor

To delete an object with a URL-encoded name from Cloud Files, it looks like you need to double URL-encode the filename

Yes, we ran into this during testing and discussed possible solutions prior to finalizing the implementation, though I can't remember the issues we came up with. I think it had something to do with how Go was auto-encoding the file name vs how another system might auto-encode it (or the users themselves), and then you wouldn't know whether to URL-decode the file name or not. @kenperkins might remember better than I have here. Regardless, that should probably be revisited.

Objects with URL-encoded names also cause rack files container empty to hang.

I'll do some testing. Can you post the output of your empty command with the --log debug flag (minus your credentials, of course)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants