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

Cannot retrieve objects within "directories" #77

Open
bhagemeier opened this issue Feb 12, 2015 · 1 comment
Open

Cannot retrieve objects within "directories" #77

bhagemeier opened this issue Feb 12, 2015 · 1 comment

Comments

@bhagemeier
Copy link

Hi,

I am having trouble retrieving information about or content of files within (pseudo) directories. The URL sent to Swift is always encoded, including the separating slashes, which acc. to Swift documentation are parts of the object's name and must not be encoded. Even when retrieving the object through Container.listDirectory("directory/", '/', null, 1000) and then trying to use one of the objects from the list, I get a "HTTP Status code: 404 => ENTITY_DOES_NOT_EXIST". Swift is acting correctly here, as the path "directory%2Fobject.txt" does not exist, but "directory/object.txt" does.

I'd be happy to receive any hints or information about how to avoid this problem. Is it possible that it was introduced last summer by fixing #44 , or rather in commit a26aae0 ? Is it really correct to encode all URLs? Naturally, I could test this myself, but being a newby to this code, I don't want to break other stuff that I may not have though of.

Best regards,
Björn

bhagemeier added a commit to bhagemeier/joss that referenced this issue May 4, 2015
Unlike directory queries, which are sent in the query part of the
request, the access to objects is sent in the path part. Thus, we
must not encode slashes as they are an essential component of the full
path to an object.

This patch does the full encoding of the path, and then reverts all
occurrences of %2F to a plain '/'.
@berngp
Copy link

berngp commented Jul 1, 2016

Is there any intention to merge this fix? I am having the same issue.

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