git-annex/doc/bugs/versioned_S3_generates_invalid_encoded_url.mdwn
Joey Hess 708fc6567f
S3: Fix encoding when generating public urls of S3 objects.
This code feels worryingly stringily typed, but using URI does not help
because the uriPath still has to be constructed with the right
uri-encoding.
2019-08-15 12:56:46 -04:00

21 lines
938 B
Markdown

See https://github.com/OpenNeuroOrg/datalad-service/issues/99
where the url generated by a versioned S3 export remote did not url-encode
the "+" in the S3 object ID.
This breaks git-annex info's display of urls for a file.
It also breaks git-annex get from a public S3 remote. While the object
in that issue is versioned, other code paths for non-versioned objects
have the same problem.
https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
describes an URI encoding that appears non-standard;
Aws.S3.Core.s3UriEncode implements that. But is S3 using the same
non-standard URI encoding for URLs to objects?
https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
documents a need to url-encode a few punctuation characters, but is
frustratingly vague.
Experimentally, even url-encoding alphanumerics works in these urls.
So it would be ok to use a standard URI encoder.
> [[fixed|done]] --[[Joey]]