Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for signV4TrimAll (0.19 sec)

  1. cmd/signature-v4-utils_test.go

    	}
    
    	// Tests generated values from url encoded name.
    	for i, testCase := range testCases {
    		result := signV4TrimAll(testCase.inputStr)
    		if testCase.result != result {
    			t.Errorf("Test %d: Expected signV4TrimAll result to be \"%s\", but found it to be \"%s\" instead", i+1, testCase.result, result)
    		}
    	}
    }
    
    // Test getContentSha256Cksum
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 05 21:26:41 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  2. cmd/signature-v4.go

    	var buf bytes.Buffer
    	for _, k := range headers {
    		buf.WriteString(k)
    		buf.WriteByte(':')
    		for idx, v := range vals[k] {
    			if idx > 0 {
    				buf.WriteByte(',')
    			}
    			buf.WriteString(signV4TrimAll(v))
    		}
    		buf.WriteByte('\n')
    	}
    	return buf.String()
    }
    
    // getSignedHeaders generate a string i.e alphabetically sorted, semicolon-separated list of lowercase request header names
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  3. cmd/signature-v4-utils.go

    }
    
    // Trim leading and trailing spaces and replace sequential spaces with one space, following Trimall()
    // in http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
    func signV4TrimAll(input string) string {
    	// Compress adjacent spaces (a space is determined by
    	// unicode.IsSpace() internally here) to one space and return
    	return strings.Join(strings.Fields(input), " ")
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jan 31 18:56:45 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top