scireum / s3ninja

S3 ninja emulates the Amazon S3 API for developement and test purposes
MIT License
493 stars 91 forks source link

Empty result using ListObjectsV2Command with Prefix containing special characters (`/`) #180

Closed Chocobozzz closed 3 years ago

Chocobozzz commented 3 years ago

Hello, and thanks for the really useful project!

I created an object storage key containing / (hls/toto/filename.mp4). Using ListObjectsV2Command with a Prefix only works if we don't specify /:

Unfortunately I could not debug it because of a dependency issue when compiling the project (mvn compile):

[ERROR] Failed to execute goal on project s3ninja: Could not resolve dependencies for project com.scireum:s3ninja:jar:DEVELOPMENT-SNAPSHOT: Failed to collect dependencies at com.scireum:sirius-web:jar:dev-35.0.0 -> com.scireum:sirius-kernel:jar:dev-23.0.0 -> com.palantir.docker.compose:docker-compose-rule-core:jar:1.3.0 -> com.palantir.conjure.java.runtime:conjure-java-jackson-serialization:jar:4.18.1: Failed to read artifact descriptor for com.palantir.conjure.java.runtime:conjure-java-jackson-serialization:jar:4.18.1: Could not transfer artifact com.palantir.conjure.java.runtime:conjure-java-jackson-serialization:pom:4.18.1 from/to bintray-palantir (https://dl.bintray.com/palantir/releases): authorization failed for https://dl.bintray.com/palantir/releases/com/palantir/conjure/java/runtime/conjure-java-jackson-serialization/4.18.1/conjure-java-jackson-serialization-4.18.1.pom, status: 403 Forbidden -> [Help 1]

Thanks!

jakobvogel commented 3 years ago

Hi @Chocobozzz 👋 Thanks for pointing this out. I am rather busy right now but try to have a more detailed look next week. I assume that this has to do with the new file name escaping introduced some versions ago in #158. In that case, the prefix would need to be escaped. Out of interest: Do manually escaped prefixes hls%2F or hls%2Ftoto work? (I will also have a look at the dependency.)

Chocobozzz commented 3 years ago

Hi @jakobvogel

Yes, manually escaping prefix works

jakobvogel commented 3 years ago

Thank you for trying this out for me @Chocobozzz — #182 should fix the problem.

Chocobozzz commented 3 years ago

Works like a charm, thanks @jakobvogel