Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for HardLimitReader (0.07 seconds)

  1. internal/ioutil/hardlimitreader.go

    // by the standard library.
    package ioutil
    
    import (
    	"errors"
    	"io"
    )
    
    // ErrOverread is returned to the reader when the hard limit of HardLimitReader is exceeded.
    var ErrOverread = errors.New("input provided more bytes than specified")
    
    // HardLimitReader returns a Reader that reads from r
    // but returns an error if the source provides more data than allowed.
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 2K bytes
    - Click Count (0)
  2. internal/hash/reader.go

    		r.checksum = MD5
    		r.contentSHA256 = SHA256
    		if r.size < 0 && size >= 0 {
    			r.src = etag.Wrap(ioutil.HardLimitReader(r.src, size), r.src)
    			r.size = size
    		}
    		if r.actualSize <= 0 && actualSize >= 0 {
    			r.actualSize = actualSize
    		}
    		return r, nil
    	}
    
    	if size >= 0 {
    		r := ioutil.HardLimitReader(src, size)
    		if !disableMD5 {
    			if _, ok := src.(etag.Tagger); !ok {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Wed Jun 25 15:08:54 GMT 2025
    - 11.8K bytes
    - Click Count (0)
  3. cmd/batch-handlers.go

    	ctx := r.Context()
    
    	objectAPI, creds := validateAdminReq(ctx, w, r, policy.StartBatchJobAction)
    	if objectAPI == nil {
    		return
    	}
    
    	buf, err := io.ReadAll(xioutil.HardLimitReader(r.Body, humanize.MiByte*4))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	user := creds.AccessKey
    	if creds.ParentUser != "" {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 63.5K bytes
    - Click Count (1)
  4. cmd/bucket-handlers.go

    			bytebufferpool.Put(buf)
    		}()
    
    		md5w := md5.New()
    
    		// Maximum allowed fan-out object size.
    		const maxFanOutSize = 16 << 20
    
    		n, err := io.Copy(io.MultiWriter(buf, md5w), ioutil.HardLimitReader(pReader, maxFanOutSize))
    		if err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    
    		// Set the correct hex md5sum for the fan-out stream.
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 63.9K bytes
    - Click Count (0)
Back to Top