hdf5
hdf5 copied to clipboard
[BUG] ROS3 header search is case-sensitive
Describe the bug
Looking up the content length header in the ROS3 VFD is case-sensitive at H5FDs3comms.c:944. That means, ROS3 finds Content-Length: ...
, but fails to find content-length: ...
.
Expected behavior
Headers are supposed to be case-insensitive ASCII strings (RFC 7230, RFC 7540). So, both Content-Length: ...
and content-length: ...
should be matched.
Platform (please complete the following information)
- HDF5 version 1.12.2
- OS and version: Debian 11
- Compiler and version: gcc (Debian 10.2.1-6) 10.2.1 20210110
- Build system: Package: autotools-dev Version: 20180224.1+nmu1
- Any configure options you specified: --enable-ros3_vfd
Additional context
Opening files using ROS3 VFD from a Ceph implementation of S3 fails. Opening the same file/object from AWS works. The reported error is that the 'Content-Length' header cannot be found. Indeed, Ceph advertises content-length
while AWS advertises Content-Length
:
$ curl --head "https://cephs3.../hdf5/snp500.h5"
HTTP/1.1 200 OK
content-length: 113404160
...
$ curl --head "http://aws.../hdf5/snp500.h5"
HTTP/1.1 200 OK
Content-Length: 113404160
It is rather unfortunate that case-insensitive string search is non-standard.
Windows link fails when StrStrIA actually used in S3 code.
Already fixed in #2101/#2114