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
When using version 2.7.0 or later, calling listObjectsV2 throws this exception:
software.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 302, Request ID: null)
listObjects works if I don't provide a prefix, but if I specify one, I get the same error.
With version 2.6.5 it's working fine.
Expected Behavior
listObjectsV2 should list the objects and not throw an exception.
Current Behavior
The exception mentioned above is thrown. When looking at the HTTP requests sent, I see that the old version requests GET /?list-type=2 HTTP/1.1 while the new version requests GET ?list-type=2 HTTP/1.1, which is what triggers the 302 response from the API.
Steps to Reproduce (for bugs)
The issue can be reproduced with this code (which is in Kotlin):
val s3 = S3Client.builder().region(Region.EU_WEST_1).build()
s3.listObjectsV2 { it.bucket(bucketName).build() }
Your Environment
AWS Java SDK version used: I tried 2.9.2 and 2.7.0
JDK version used: 12, and using Kotlin
Operating System and version: Arch Linux. Also tested on macOS and got the same error.
The text was updated successfully, but these errors were encountered:
@trygveaa Judging from the change in the request line (GET /?list-type=2 vs GET ?list-type=2), this looks related to #1224, where we updated the Apache client to 4.5.9 because of a bug in 4.5.8 that chanted the way paths were normalized.
I was able to reproduce this by taking a direct dependency on 4.5.8 in my test project:
@dagnir: Ah, I did indeed have httpclient 4.5.8 in my classpath (not sure why though, I thought gradle should pick the highest version on conflicts, and my other dependencies depended on older versions of httpclient, not 4.5.8). After specifying 4.5.10 explicitly, the issue is fixed. Thanks so much!
When using version 2.7.0 or later, calling
listObjectsV2throws this exception:listObjectsworks if I don't provide a prefix, but if I specify one, I get the same error.With version 2.6.5 it's working fine.
Expected Behavior
listObjectsV2should list the objects and not throw an exception.Current Behavior
The exception mentioned above is thrown. When looking at the HTTP requests sent, I see that the old version requests
GET /?list-type=2 HTTP/1.1while the new version requestsGET ?list-type=2 HTTP/1.1, which is what triggers the 302 response from the API.Steps to Reproduce (for bugs)
The issue can be reproduced with this code (which is in Kotlin):
Your Environment
The text was updated successfully, but these errors were encountered: