[GH-ISSUE #480] Content-Length is searched for in case sensitive manner #269

Closed
opened 2026-03-04 01:43:54 +03:00 by kerem · 1 comment
Owner

Originally created by @jdanders on GitHub (Oct 5, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/480

RFC 7230 states: "Each header field consists of a case-insensitive field name followed by a colon (":")"

If the HTTP header coming back from the S3 server has 'content-length:' in it instead of 'Content-Length:' then s3fs fails to find the size and reports the file has 0 length.

I believe the problem code is src/s3fs_util.cpp line 721, where a case-sensitive find is performed.

Originally created by @jdanders on GitHub (Oct 5, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/480 RFC 7230 states: "Each header field consists of a **case-insensitive** field name followed by a colon (":")" If the HTTP header coming back from the S3 server has 'content-length:' in it instead of 'Content-Length:' then s3fs fails to find the size and reports the file has 0 length. I believe the problem code is src/s3fs_util.cpp line [721](https://github.com/s3fs-fuse/s3fs-fuse/blob/1a93897e8510a618686510dd25bb8bf033fbfd69/src/s3fs_util.cpp#L721), where a case-sensitive find is performed.
kerem closed this issue 2026-03-04 01:43:55 +03:00
Author
Owner

@ggtakec commented on GitHub (Oct 23, 2016):

@jdanders Thanks for your help.
I fixed this issue by #488(#489), please try to check latest codes.
Regards,

<!-- gh-comment-id:255591632 --> @ggtakec commented on GitHub (Oct 23, 2016): @jdanders Thanks for your help. I fixed this issue by #488(#489), please try to check latest codes. Regards,
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#269
No description provided.