You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 '/'.
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
The text was updated successfully, but these errors were encountered: