-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Describe the bug
This is somewhere between a bug report and a feature request, as it seems to be a strange omission.
It appears that S3 handles the If-Range header correctly when responding to GetObject requests. However, aws.sdk.kotlin.services.s3.model.GetObjectRequest does not support setting it (it does support setting Range and If-Match).
Background: If-Range is similar to If-Match, except that it in case the ETag does not match, the entire object is returned rather than status 412.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected behavior
Ability to set If-Range header in aws.sdk.kotlin.services.s3.model.GetObjectRequest.
Current behavior
No such facility exists in aws.sdk.kotlin.services.s3.model.GetObjectRequest.
Steps to Reproduce
- Search for the strings
If-RangeandifRangeinaws.sdk.kotlin.services.s3.model.GetObjectRequest. - Find none.
Possible Solution
No response
Context
I have a backend component that proxies some requests to S3. The clients of my backend component use If-Range for partial downloads. It would be convenient to be able to just forward those headers to S3.
My current workaround is to translate client requests with If-Range into multiple GetObjectRequests:
- One with
If-MatchandRange. - In case that first request returns status 412, a second request without
RangeandIf-Match.
AWS SDK for Kotlin version
1.4.119
Platform (JVM/JS/Native)
JVM
Operating system and version
Ubuntu 25.04