Skip to content

SourceError: Request outside of bounds #1691

@kylebarron

Description

@kylebarron

We're getting errors of SourceError: Request outside of bounds. This is an apparent regression from #1666. It sounds like

  • feat: limits reads to the maximum size of the source #1666 checks for the Content-Range header to infer the size of a request, falling back to Content-Length
  • In a browser, Content-Range is only readable if the server whitelists it in CORS settings. Various sources, such as some upstream S3 buckets, do not. And I don't think we can always rely on it being able to be accessed.
  • So in the browser, metadata.size gets set to the size of one chunk instead of the entire size of the file.
  • SourceChunk.fetch then throws Request outside of bounds for any header-source read past byte ~1 MB

Ref developmentseed/stac-map#460 and developmentseed/deck.gl-raster#524

cc @gadomski

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions