htslib icon indicating copy to clipboard operation
htslib copied to clipboard

Allowing S3 virtual paths and S3 aliases as data source

Open mapk-amazon opened this issue 4 months ago • 0 comments

Related issue: https://github.com/samtools/samtools/issues/1984

The two main changes are:

  • In s3_open_v4 an additional hopen is called if a redirect (status code between 300 and 399) is detected.
  • In redirect_endpoint_callback the url is parsed and a new one constructed respecting the virtual path style in Amazon S3 links.

Some minor changes:

  • Saving the address style of S3 web links in s3_auth_data to allow the use in redirect_endpoint_callback
  • Replacing the hardcoded initial value {0, 0, NULL} by KS_INITIALIZE for various variables.

mapk-amazon avatar Feb 29 '24 15:02 mapk-amazon