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
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-Range and ifRange in aws.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-Match and Range.
- In case that first request returns status 412, a second request without
Range and If-Match.
AWS SDK for Kotlin version
1.4.119
Platform (JVM/JS/Native)
JVM
Operating system and version
Ubuntu 25.04
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-Rangeheader correctly when responding toGetObjectrequests. However,aws.sdk.kotlin.services.s3.model.GetObjectRequestdoes not support setting it (it does support settingRangeandIf-Match).Background:
If-Rangeis similar toIf-Match, except that it in case the ETag does not match, the entire object is returned rather than status 412.Regression Issue
Expected behavior
Ability to set
If-Rangeheader inaws.sdk.kotlin.services.s3.model.GetObjectRequest.Current behavior
No such facility exists in
aws.sdk.kotlin.services.s3.model.GetObjectRequest.Steps to Reproduce
If-RangeandifRangeinaws.sdk.kotlin.services.s3.model.GetObjectRequest.Possible Solution
No response
Context
I have a backend component that proxies some requests to S3. The clients of my backend component use
If-Rangefor 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-Rangeinto multipleGetObjectRequests:If-MatchandRange.RangeandIf-Match.AWS SDK for Kotlin version
1.4.119
Platform (JVM/JS/Native)
JVM
Operating system and version
Ubuntu 25.04