Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for readChunkLine (0.18 sec)

  1. cmd/streaming-signature-v4_test.go

    			nil,
    			[]byte("1000"),
    			[]byte("111123333333333333334444211"),
    		},
    	}
    	// Valid test cases for each chunk line.
    	for i, tt := range testCases {
    		chunkSize, chunkSignature, err := readChunkLine(tt.reader)
    		if err != tt.expectedErr {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, tt.expectedErr, err)
    		}
    		if !bytes.Equal(chunkSize, tt.chunkSize) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 5.7K bytes
    - Viewed (0)
  2. cmd/test-utils_test.go

    func truncateChunkByHalfSigv4(req *http.Request) (*http.Request, error) {
    	bufReader := bufio.NewReader(req.Body)
    	hexChunkSize, chunkSignature, err := readChunkLine(bufReader)
    	if err != nil {
    		return nil, err
    	}
    
    	newChunkHdr := []byte(fmt.Sprintf("%s"+s3ChunkSignatureStr+"%s\r\n",
    		hexChunkSize, chunkSignature))
    	newChunk, err := io.ReadAll(bufReader)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
  3. cmd/streaming-signature-v4.go

    }
    
    // Read a line of bytes (up to \n) from b.
    // Give up if the line exceeds maxLineLength.
    // The returned bytes are owned by the bufio.Reader
    // so they are only valid until the next bufio read.
    func readChunkLine(b *bufio.Reader) ([]byte, []byte, error) {
    	buf, err := b.ReadSlice('\n')
    	if err != nil {
    		// We always know when EOF is coming.
    		// If the caller asked for a line, there should be a line.
    		if err == io.EOF {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
Back to top