Skip to content

Fix HTTP Range Requests not working on some S3 providers

Stan Hu requested to merge sh-fix-artifacts-http-range-requests into master

Prior to this merge request, CI job metadata would fail to extract if the file were stored in a Dell ECS server.

According to https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35:

Origin servers that accept byte-range requests MAY send Accept-Ranges: bytes, but are not required to do so. Clients MAY generate byte-range requests without having received this header for the resource involved.

Since some servers (e.g. Dell ECS) don't send an Accept-Ranges: bytes header and we are already checking that range requests are supported when we call HttpReadSeeker.rangeRequest, canSeek only becomes a problem and should be removed.

Since it's not clear whether https://github.com/jfbus/httprs is actively maintained, this commit applies https://github.com/jfbus/httprs/pull/6 to our vendored module.

Closes gitlab#223806 (closed)

Edited by Stan Hu

Merge request reports