mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
[BUG] merge IE11 signature fix
This commit is contained in:
@@ -361,11 +361,19 @@ Crypt.getStringToSign = function(config, parsed, date, mechanism) {
|
||||
// Sort the properties of the JSON object into canonical form
|
||||
var canonicalData = JSON.stringify(copyObjectWithSortedKeys(config.data));
|
||||
|
||||
// We're using URL parsing using browser functionality. Unfortunately the
|
||||
// parsing result slightly differs in IE - it is missing a leading slash.
|
||||
// XXX Proper fix would be to use a pure JS URL parser.
|
||||
var pathname = parsed.pathname;
|
||||
|
||||
// IE11 Workaround
|
||||
if (pathname[0] !== '/') pathname = '/' + pathname;
|
||||
|
||||
// Canonical request using Amazon's v4 signature format
|
||||
// See: http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
|
||||
var canonicalRequest = [
|
||||
config.method || 'GET',
|
||||
parsed.pathname || '',
|
||||
pathname || '',
|
||||
parsed.search || '',
|
||||
// XXX Headers signing not supported
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user