Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseSizeFromContentRange (0.1 sec)

  1. cmd/bucket-replication-utils.go

    		Version:    resyncMetaVersion,
    	}
    }
    
    var contentRangeRegexp = regexp.MustCompile(`bytes ([0-9]+)-([0-9]+)/([0-9]+|\\*)`)
    
    // parse size from content-range header
    func parseSizeFromContentRange(h http.Header) (sz int64, err error) {
    	cr := h.Get(xhttp.ContentRange)
    	if cr == "" {
    		return sz, fmt.Errorf("Content-Range not set")
    	}
    	parts := contentRangeRegexp.FindStringSubmatch(cr)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  2. cmd/bucket-replication.go

    	closeReader := func() { obj.Close() }
    	reader, err := fn(obj, h, closeReader)
    	if err != nil {
    		return nil, proxy, err
    	}
    	reader.ObjInfo = oi.Clone()
    	if rs != nil {
    		contentSize, err := parseSizeFromContentRange(h)
    		if err != nil {
    			return nil, proxy, err
    		}
    		reader.ObjInfo.Size = contentSize
    	}
    
    	return reader, proxyResult{Proxy: true}, nil
    }
    
    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