Closed daviesrob closed 3 months ago
To reproduce the problem, try:
HTS_S3_ADDRESS_STYLE=path AWS_DEFAULT_REGION=us-east-2 ./test/test_view -vvvvvvvvv -p /dev/null 's3://1000genomes/1000G_2504_high_coverage/data/ERR3243158/HG01785.final.cram' chr2:178523221-178523221
and look for Connected to .* port
in the debugging output.
When following a 3xx redirection from AWS,
redirect_endpoint_callback()
wasn't puttinghttps://
on the new URL. The redirection worked, but dropped back to http. Obviously, this is not desirable.Fix by prepending
https://
to ensure it uses TLS, and adding a bit of error checking to ensure all parts of the new url have been included.Fixes #1760