Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GetContentChecksum (0.21 sec)

  1. internal/hash/checksum.go

    		if cksum == nil {
    			continue
    		}
    		if cksum.Valid() {
    			w.Header().Set(cksum.Type.Key(), v)
    		}
    	}
    }
    
    // GetContentChecksum returns content checksum.
    // Returns ErrInvalidChecksum if so.
    // Returns nil, nil if no checksum.
    func GetContentChecksum(h http.Header) (*Checksum, error) {
    	if trailing := h.Values(xhttp.AmzTrailer); len(trailing) > 0 {
    		var res *Checksum
    		for _, header := range trailing {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  2. internal/hash/reader.go

    // Returns ErrInvalidChecksum if a problem with the checksum is found.
    func (r *Reader) AddChecksum(req *http.Request, ignoreValue bool) error {
    	cs, err := GetContentChecksum(req.Header)
    	if err != nil {
    		return ErrInvalidChecksum
    	}
    	if cs == nil {
    		return nil
    	}
    	r.contentHash = *cs
    	if cs.Type.Trailing() {
    		r.trailer = req.Trailer
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
  3. cmd/object-api-options.go

    			return opts, fmt.Errorf("Unable to parse %s, failed with %w", xhttp.MinIOSourceTaggingTimestamp, err)
    		}
    	}
    
    	if metadata == nil {
    		metadata = make(map[string]string)
    	}
    
    	wantCRC, err := hash.GetContentChecksum(hdr)
    	if err != nil {
    		return opts, fmt.Errorf("invalid/unknown checksum sent: %v", err)
    	}
    	etag := strings.TrimSpace(hdr.Get(xhttp.MinIOSourceETag))
    
    	if crypto.S3KMS.IsRequested(hdr) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  4. cmd/bucket-handlers.go

    		apiErr.Description = fmt.Sprintf("%s (%v)", apiErr.Description, errors.New("The file or text content is missing"))
    		writeErrorResponse(ctx, w, apiErr, r.URL)
    		return
    	}
    	checksum, err := hash.GetContentChecksum(formValues)
    	if err != nil {
    		apiErr := errorCodes.ToAPIErr(ErrMalformedPOSTRequest)
    		apiErr.Description = fmt.Sprintf("%s (%v)", apiErr.Description, fmt.Errorf("Invalid checksum: %w", err))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 16:27:27 GMT 2024
    - 61.6K bytes
    - Viewed (0)
Back to top