Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 98 for errorCodes (0.15 sec)

  1. cmd/signature-v4_test.go

    	"net/url"
    	"os"
    	"testing"
    	"time"
    )
    
    func niceError(code APIErrorCode) string {
    	// Special-handle ErrNone
    	if code == ErrNone {
    		return "ErrNone"
    	}
    
    	return fmt.Sprintf("%s (%s)", errorCodes[code].Code, errorCodes[code].Description)
    }
    
    func TestDoesPolicySignatureMatch(t *testing.T) {
    	_, fsDir, err := prepareFS(context.Background())
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer removeRoots([]string{fsDir})
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. cmd/object-api-options.go

    		argumentName = strings.ToLower(xhttp.AmzPartNumberMarker)
    		valid = false
    		return
    	}
    
    	opts.ObjectAttributes = parseObjectAttributes(r.Header)
    	if len(opts.ObjectAttributes) < 1 {
    		apiErr = errorCodes.ToAPIErr(ErrInvalidAttributeName)
    		argumentName = strings.ToLower(xhttp.AmzObjectAttributes)
    		valid = false
    		return
    	}
    
    	for tag := range opts.ObjectAttributes {
    		switch tag {
    		case xhttp.ETag:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 21:13:59 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. cmd/api-errors.go

    				Code:           "MalformedXML",
    				Description:    fmt.Sprintf("%s (%s)", errorCodes[ErrMalformedXML].Description, e),
    				HTTPStatusCode: errorCodes[ErrMalformedXML].HTTPStatusCode,
    			}
    		case url.EscapeError:
    			apiErr = APIError{
    				Code:           "XMinioInvalidObjectName",
    				Description:    fmt.Sprintf("%s (%s)", errorCodes[ErrInvalidObjectName].Description, e),
    				HTTPStatusCode: http.StatusBadRequest,
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 92.1K bytes
    - Viewed (0)
  4. cmd/signature-v4-utils_test.go

    		t.Fatal(err)
    	}
    
    	_, owner, s3Err := checkKeyValid(req, globalActiveCred.AccessKey)
    	if s3Err != ErrNone {
    		t.Fatalf("Unexpected failure with %v", errorCodes.ToAPIErr(s3Err))
    	}
    
    	if !owner {
    		t.Fatalf("Expected owner to be 'true', found %t", owner)
    	}
    
    	_, _, s3Err = checkKeyValid(req, "does-not-exist")
    	if s3Err != ErrInvalidAccessKeyID {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 05 21:26:41 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  5. cmd/auth-handler.go

    				// header, for all requests where Date header is not
    				// present we will reject such clients.
    				defer logger.AuditLog(r.Context(), w, r, mustGetClaimsFromToken(r))
    				writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(errCode), r.URL)
    				atomic.AddUint64(&globalHTTPStats.rejectedRequestsTime, 1)
    				return
    			}
    			// Verify if the request date header is shifted by less than globalMaxSkewTime parameter in the past
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 17 16:45:46 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  6. cmd/signature-v4-parser_test.go

    		// validating the credential fields.
    		if testCase.expectedErrCode != actualErrCode {
    			t.Fatalf("Test %d: Expected the APIErrCode to be %s, got %s", i+1, errorCodes[testCase.expectedErrCode].Code, errorCodes[actualErrCode].Code)
    		}
    		if actualErrCode == ErrNone {
    			validateCredentialfields(t, i+1, testCase.expectedCredentials, actualCredential)
    		}
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  7. cmd/handler-api.go

    		default:
    			globalHTTPStats.addRequestsInQueue(-1)
    			if contextCanceled(ctx) {
    				w.WriteHeader(499)
    				return
    			}
    			// Send a http timeout message
    			writeErrorResponse(ctx, w,
    				errorCodes.ToAPIErr(ErrTooManyRequests),
    				r.URL)
    
    		}
    	}
    }
    
    func (t *apiConfig) getReplicationOpts() replicationPoolOpts {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	if t.replicationPriority == "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 26 17:07:10 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. cmd/handler-utils.go

    		resource, err := getResource(r.URL.Path, r.Host, globalDomainNames)
    		if err != nil {
    			defer logger.AuditLog(r.Context(), w, r, mustGetClaimsFromToken(r))
    
    			apiErr := errorCodes.ToAPIErr(ErrUnsupportedHostHeader)
    			apiErr.Description = fmt.Sprintf("%s: %v", apiErr.Description, err)
    
    			writeErrorResponse(r.Context(), w, apiErr, r.URL)
    			return
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  9. cmd/admin-heal-ops.go

    				"(use force-start option to stop and start afresh). " +
    				fmt.Sprintf("The heal was started by IP %s at %s, token is %s",
    					h.clientAddress, h.startTime.Format(http.TimeFormat), h.clientToken)
    			return nil, errorCodes.ToAPIErr(ErrHealAlreadyRunning), errMsg
    		}
    	}
    
    	ahs.Lock()
    	defer ahs.Unlock()
    
    	// Check if new heal sequence to be started overlaps with any
    	// existing, running sequence
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  10. cmd/bucket-replication.go

    		}
    		if opts.CheckRemoteBucket { // validate remote bucket
    			found, err := clnt.BucketExists(ctx, arn.Bucket)
    			if err != nil {
    				return sameTarget, errorCodes.ToAPIErrWithErr(ErrRemoteDestinationNotFoundError, err)
    			}
    			if !found {
    				return sameTarget, errorCodes.ToAPIErrWithErr(ErrRemoteDestinationNotFoundError, BucketRemoteTargetNotFound{Bucket: arn.Bucket})
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 06:49:55 UTC 2024
    - 116.1K bytes
    - Viewed (0)
Back to top