htslib
htslib copied to clipboard
Allowing S3 virtual paths and S3 aliases as data source
Related issue: https://github.com/samtools/samtools/issues/1984
The two main changes are:
- In
s3_open_v4
an additionalhopen
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 inredirect_endpoint_callback
- Replacing the hardcoded initial value
{0, 0, NULL}
byKS_INITIALIZE
for various variables.