Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 28 for ErrUnexpectedEOF (0.3 sec)

  1. src/archive/tar/reader.go

    	clear(b)
    	return len(b), nil
    }
    
    // mustReadFull is like io.ReadFull except it returns
    // io.ErrUnexpectedEOF when io.EOF is hit before len(b) bytes are read.
    func mustReadFull(r io.Reader, b []byte) (int, error) {
    	n, err := tryReadFull(r, b)
    	if err == io.EOF {
    		err = io.ErrUnexpectedEOF
    	}
    	return n, err
    }
    
    // tryReadFull is like io.ReadFull except it returns
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  2. src/bufio/scan_test.go

    type alwaysError struct{}
    
    func (alwaysError) Read(p []byte) (int, error) {
    	return 0, io.ErrUnexpectedEOF
    }
    
    func TestNonEOFWithEmptyRead(t *testing.T) {
    	scanner := NewScanner(alwaysError{})
    	for scanner.Scan() {
    		t.Fatal("read should fail")
    	}
    	err := scanner.Err()
    	if err != io.ErrUnexpectedEOF {
    		t.Errorf("unexpected error: %v", err)
    	}
    }
    
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Sep 22 16:22:42 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  3. cmd/storage-rest-client.go

    		return errRPCAPIVersionUnsupported
    	case errServerTimeMismatch.Error():
    		return errServerTimeMismatch
    	case io.EOF.Error():
    		return io.EOF
    	case io.ErrUnexpectedEOF.Error():
    		return io.ErrUnexpectedEOF
    	case errDiskStale.Error():
    		return errDiskNotFound
    	case errDiskNotFound.Error():
    		return errDiskNotFound
    	case errMaxVersionsExceeded.Error():
    		return errMaxVersionsExceeded
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 08 02:38:41 UTC 2025
    - 30.4K bytes
    - Viewed (0)
  4. src/archive/zip/reader_test.go

    		r, err := f.Open()
    		if err != nil {
    			continue
    		}
    		if f.UncompressedSize64 < 1e6 {
    			n, err := io.Copy(io.Discard, r)
    			if i == 3 && err != io.ErrUnexpectedEOF {
    				t.Errorf("File[3] error = %v; want io.ErrUnexpectedEOF", err)
    			}
    			if err == nil && uint64(n) != f.UncompressedSize64 {
    				t.Errorf("file %d: bad size: copied=%d; want=%d", i, n, f.UncompressedSize64)
    			}
    		}
    		r.Close()
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Tue Mar 11 22:19:38 UTC 2025
    - 56.6K bytes
    - Viewed (0)
  5. cmd/admin-handlers-site-replication.go

    	connectTime := time.Now()
    	for {
    		n, err := io.CopyN(xioutil.Discard, r.Body, 128*humanize.KiByte)
    		atomic.AddUint64(&globalSiteNetPerfRX.RX, uint64(n))
    		if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {
    			// If there is a disconnection before globalNetPerfMinDuration (we give a margin of error of 1 sec)
    			// would mean the network is not stable. Logging here will help in debugging network issues.
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  6. cmd/xl-storage_test.go

    			volume, "myobject", 0, 16,
    			[]byte("hello, world"),
    			io.ErrUnexpectedEOF,
    		},
    		// Reading from an offset success. - 7
    		{
    			volume, "myobject", 7, 5,
    			[]byte("world"), nil,
    		},
    		// Reading from an object but buffer size greater. - 8
    		{
    			volume, "myobject",
    			7, 8,
    			[]byte("world"),
    			io.ErrUnexpectedEOF,
    		},
    		// Seeking ahead returns io.EOF. - 9
    		{
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 66K bytes
    - Viewed (0)
  7. cmd/object-api-errors.go

    		apiErr := InsufficientWriteQuorum{}
    		if len(params) >= 1 {
    			apiErr.Bucket = params[0]
    		}
    		if len(params) >= 2 {
    			apiErr.Object = decodeDirObject(params[1])
    		}
    		return apiErr
    	case io.ErrUnexpectedEOF.Error(), io.ErrShortWrite.Error(), context.Canceled.Error(), context.DeadlineExceeded.Error():
    		apiErr := IncompleteBody{}
    		if len(params) >= 1 {
    			apiErr.Bucket = params[0]
    		}
    		if len(params) >= 2 {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 09 02:05:14 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  8. src/archive/zip/zip_test.go

    			memset(p[n:n+repeat], part.b)
    			n += repeat
    			if n == len(p) {
    				return
    			}
    			skipBytes = 0
    		}
    	}
    	if n != len(p) {
    		err = io.ErrUnexpectedEOF
    	}
    	return
    }
    
    // Just testing the rleBuffer used in the Zip64 test above. Not used by the zip code.
    func TestRLEBuffer(t *testing.T) {
    	b := new(rleBuffer)
    	var all []byte
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  9. src/archive/tar/writer.go

    	if readLastByte && err == nil {
    		_, err = mustReadFull(rs, []byte{0})
    		sw.pos++
    	}
    
    	n = sw.pos - pos0
    	switch {
    	case err == io.EOF:
    		return n, io.ErrUnexpectedEOF
    	case err == ErrWriteTooLong:
    		return n, errMissData // Not possible; implies bug in validation logic
    	case err != nil:
    		return n, err
    	case sw.logicalRemaining() == 0 && sw.physicalRemaining() > 0:
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon Feb 03 16:38:43 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  10. src/archive/tar/writer_test.go

    			testRemaining{0, 0},
    		},
    	}, {
    		maker: makeSparse{makeReg{4, "abcd"}, sparseHoles{{2, 3}}, 8},
    		tests: []testFnc{
    			testReadFrom{fileOps{"ab", int64(3), "cd"}, 7, io.ErrUnexpectedEOF},
    			testRemaining{1, 0},
    		},
    	}, {
    		maker: makeSparse{makeReg{4, "abcd"}, sparseHoles{{2, 3}}, 8},
    		tests: []testFnc{
    			testReadFrom{fileOps{"ab", int64(3), "cde"}, 7, errMissData},
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon Feb 03 16:38:43 UTC 2025
    - 39.8K bytes
    - Viewed (0)
Back to top