Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseSignedHeader (0.18 sec)

  1. cmd/signature-v4-parser.go

    	}
    	if signFields[1] == "" {
    		return "", ErrMissingFields
    	}
    	signature := signFields[1]
    	return signature, ErrNone
    }
    
    // Parse slice of signed headers from signed headers tag.
    func parseSignedHeader(signedHdrElement string) ([]string, APIErrorCode) {
    	signedHdrFields := strings.Split(strings.TrimSpace(signedHdrElement), "=")
    	if len(signedHdrFields) != 2 {
    		return nil, ErrMissingFields
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. cmd/signature-v4-parser_test.go

    			expectedSignedHeaders: []string{"host", "x-amz-content-sha256", "x-amz-date"},
    			expectedErrCode:       ErrNone,
    		},
    	}
    
    	for i, testCase := range testCases {
    		actualSignedHeaders, actualErrCode := parseSignedHeader(testCase.inputSignElement)
    		if testCase.expectedErrCode != actualErrCode {
    			t.Errorf("Test %d: Expected the APIErrCode to be %d, got %d", i+1, testCase.expectedErrCode, actualErrCode)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 27.4K bytes
    - Viewed (0)
Back to top