Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 HeadObject response should include ContentLength #56

Closed
metadaddy opened this issue Dec 18, 2023 · 1 comment · Fixed by #57
Closed

S3 HeadObject response should include ContentLength #56

metadaddy opened this issue Dec 18, 2023 · 1 comment · Fixed by #57

Comments

@metadaddy
Copy link
Contributor

Currently, the response from HeadObject does not include ContentLength. For example,

{
  AcceptRanges: 'bytes',
  LastModified: 2023-12-11T21:00:23.000Z,
  ETag: 'f0b0de38617496a96511a3353781515e',
  VersionId: '4_z834de8717f3677488b980413_f40189138ebbcef16_d20231211_m210023_c004_v0402012_t0025_u01702328423101',
  ContentType: 'application/octet-stream'
}

ContentLength is in the response from S3, but it is ignored by parseHeadersToResults. The HeadObject API Response Elements doc lists Content-Length, so it should be included.

[PR to closely follow]

@ryanblock
Copy link
Member

Oh, I do so love how the content-length header is used contextually within the S3 API. 🫠

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants