You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing a some code for uploading files to s3 buckets i encountered a bug where when building the canonicalRequest your code would use "request.RequestUri.AbsolutePath" but that would already escape part of the request uri example: "/Assets/Translations/General/Chinese (Simplified).json" would become "/Assets/Translations/General/Chinese%20(Simplified).json" when accessing AbsolutePath property, i fixed this by calling Uri.UnescapeDataString(request.RequestUri.AbsolutePath)
The final code looks like this for me:
var unescaped = Uri.UnescapeDataString(request.RequestUri.AbsolutePath);
canonicalRequest.Append(string.Join("/", unescaped.Split('/').Select(Uri.EscapeDataString)) + "\n");
Maybe this it was my bad somewhere but maybe this can help you.
The text was updated successfully, but these errors were encountered:
While writing a some code for uploading files to s3 buckets i encountered a bug where when building the canonicalRequest your code would use "request.RequestUri.AbsolutePath" but that would already escape part of the request uri example: "/Assets/Translations/General/Chinese (Simplified).json" would become "/Assets/Translations/General/Chinese%20(Simplified).json" when accessing AbsolutePath property, i fixed this by calling Uri.UnescapeDataString(request.RequestUri.AbsolutePath)
The final code looks like this for me:
var unescaped = Uri.UnescapeDataString(request.RequestUri.AbsolutePath);
canonicalRequest.Append(string.Join("/", unescaped.Split('/').Select(Uri.EscapeDataString)) + "\n");
Maybe this it was my bad somewhere but maybe this can help you.
The text was updated successfully, but these errors were encountered: