#1910·flysystem

Ceph RGW omits Content-Length for zero-byte objects causing fileSize() issues

Author: GerDnerCreated Jul 21, 2026Updated Aug 11, 2026

Question

Q A
Flysystem Version 3.29
Adapter Name league/flysystem-async-aws-s3
Adapter version 3.10.0

I reported a compatibility bug/behavior to Shopware: https://github.com/shopware/shopware/issues/18497

In short: a flysystem user might use storage providers like Ceph Rados for s3 compatible storage. If a 0 byte file is created checked for it's filesize via AsyncAwsS3Adapter->fileSIze user might get different outcomes for different providers. Ceph Rados will return no content-length header for 0 byte objects in headObject requests. Same bevavior is expected for other providers like minio but this is not easily confirmed.

The workaround ist to use listobjectv2 like described in the shopware issue because it provides correct content-length for all files.

One might also think of treating the missing content-length as 0 bytes but i don't now if this would be correct in every scenario (currently i think this is not the case).

Question is: is this something flysystem should take care of?

Also i found multiple post about similar problems suggesting proxies stripping the header?