Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseS3ChunkExtension (0.4 sec)

  1. cmd/streaming-signature-v4.go

    }
    
    // Constant s3 chunk encoding signature.
    const s3ChunkSignatureStr = ";chunk-signature="
    
    // parses3ChunkExtension removes any s3 specific chunk-extension from buf.
    // For example,
    //
    //	"10000;chunk-signature=..." => "10000", "chunk-signature=..."
    func parseS3ChunkExtension(buf []byte) ([]byte, []byte) {
    	buf = trimTrailingWhitespace(buf)
    	semi := bytes.Index(buf, []byte(s3ChunkSignatureStr))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 16 23:13:47 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. cmd/streaming-signature-v4_test.go

    		},
    	}
    	// Validate chunk extension removal.
    	for i, tt := range tests {
    		// Extract chunk size and chunk signature after parsing a standard chunk-extension format.
    		hexChunkSize, hexChunkSignature := parseS3ChunkExtension(tt.buf)
    		if !bytes.Equal(hexChunkSize, tt.chunkSize) {
    			t.Errorf("Test %d: Expected %s, got %s", i+1, string(tt.chunkSize), string(hexChunkSize))
    		}
    		if !bytes.Equal(hexChunkSignature, tt.chunkSign) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 5.7K bytes
    - Viewed (0)
Back to top