Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 299 for headers (0.14 sec)

  1. internal/handlers/proxy.go

    // Forwarded headers (in that order).
    func GetSourceScheme(r *http.Request) string {
    	var scheme string
    
    	// Retrieve the scheme from X-Forwarded-Proto.
    	if proto := r.Header.Get(xForwardedProto); proto != "" {
    		scheme = strings.ToLower(proto)
    	} else if proto = r.Header.Get(xForwardedScheme); proto != "" {
    		scheme = strings.ToLower(proto)
    	} else if proto := r.Header.Get(forwarded); proto != "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 22 00:56:55 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  2. cmd/encryption-v1.go

    			if crypto.SSEC.IsRequested(headers) || crypto.SSECopy.IsRequested(headers) {
    				return encrypted, errEncryptedObject
    			}
    		}
    
    		if crypto.S3KMS.IsEncrypted(info.UserDefined) && r.Header.Get(xhttp.AmzCopySource) == "" {
    			if crypto.SSEC.IsRequested(headers) || crypto.SSECopy.IsRequested(headers) {
    				return encrypted, errEncryptedObject
    			}
    		}
    
    		if _, err = info.DecryptedSize(); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 36.5K bytes
    - Viewed (0)
  3. internal/handlers/proxy_test.go

    		{forwarded, `for=192.0.2.60;proto=http;by=203.0.113.43`, "http"},    // Multiple params
    	}
    	for _, v := range headers {
    		req := &http.Request{
    			Header: http.Header{
    				v.key: []string{v.val},
    			},
    		}
    		res := GetSourceScheme(req)
    		if res != v.expected {
    			t.Errorf("wrong header for %s: got %s want %s", v.key, res,
    				v.expected)
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 22 00:56:55 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  4. cmd/handler-utils.go

    		return map[string]string{}
    	}
    	return map[string]string{
    		"requestId":      w.Header().Get(xhttp.AmzRequestID),
    		"nodeId":         w.Header().Get(xhttp.AmzRequestHostID),
    		"content-length": w.Header().Get(xhttp.ContentLength),
    		// Add more fields here.
    	}
    }
    
    // Trims away `aws-chunked` from the content-encoding header if present.
    // Streaming signature clients can have custom content-encoding such as
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.5K bytes
    - Viewed (3)
  5. cmd/api-errors.go

    	},
    	ErrUnsupportedMetadata: {
    		Code:           "InvalidArgument",
    		Description:    "Your metadata headers are not supported.",
    		HTTPStatusCode: http.StatusBadRequest,
    	},
    	ErrUnsupportedHostHeader: {
    		Code:           "InvalidArgument",
    		Description:    "Your Host header is malformed.",
    		HTTPStatusCode: http.StatusBadRequest,
    	},
    	ErrObjectTampered: {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 91.4K bytes
    - Viewed (6)
  6. cmd/signature-v4_test.go

    		if e != nil {
    			t.Errorf("(%d) failed to create http.Request, got %v", i, e)
    		}
    
    		// Do the same for the headers.
    		for key, value := range testCase.headers {
    			req.Header.Set(key, value)
    		}
    
    		// parse form.
    		req.ParseForm()
    
    		// Check if it matches!
    		err := doesPresignedSignatureMatch(payloadSHA256, req, testCase.region, serviceS3)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 10.4K bytes
    - Viewed (1)
  7. cmd/signature-v4-parser.go

    		return "", ErrMissingSignTag
    	}
    	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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  8. cmd/bucket-object-lock.go

    // enforceRetentionBypassForDelete enforces whether an existing object under governance can be deleted
    // with governance bypass headers set in the request.
    // Objects under site wide WORM can never be overwritten.
    // For objects in "Governance" mode, overwrite is allowed if a) object retention date is past OR
    // governance bypass headers are set and user has governance bypass permissions.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  9. cmd/signature-v4-utils_test.go

    }
    
    // TestExtractSignedHeaders - Tests validate extraction of signed headers using list of signed header keys.
    func TestExtractSignedHeaders(t *testing.T) {
    	signedHeaders := []string{"host", "x-amz-content-sha256", "x-amz-date", "transfer-encoding"}
    
    	// If the `expect` key exists in the signed headers then golang server would have stripped out the value, expecting the `expect` header set to `100-continue` in the result.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 05 21:26:41 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  10. internal/crypto/sse.go

    //   - SSE-KMS
    type Type interface {
    	fmt.Stringer
    
    	IsRequested(http.Header) bool
    	IsEncrypted(map[string]string) bool
    }
    
    // IsRequested returns true and the SSE Type if the HTTP headers
    // indicate that some form server-side encryption is requested.
    //
    // If no SSE headers are present then IsRequested returns false
    // and no Type.
    func IsRequested(h http.Header) (Type, bool) {
    	switch {
    	case S3.IsRequested(h):
    		return S3, true
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 4.4K bytes
    - Viewed (0)
Back to top