Skip to content

object-store: http shouldn't perform range requests unless accept-ranges: bytes header is present #134

Closed
apache/arrow-rs
#4841
@universalmind303

Description

@universalmind303

Describe the bug
if you have a remote file https://somewhere.com/file.parquet and your server does not support ranges as specified by the accept-ranges: bytes header, the object store should not try to perform range scans.
To Reproduce

#[tokio::main]
async fn main() {
    let http = HttpBuilder::new().with_url("https://not.arealwebsite.com/file.parquet");
    let store = http.build().unwrap();
    let path = Path::default();
    let mut options = GetOptions::default();
    let some_range = 100..2000;
    options.range = Some(some_range);
    let data = store.get_opts(&path, options).await.unwrap();
}

Expected behavior
the range is ignored as the server doesn't specify it can handle it.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions