Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 208 for newHeader (0.09 sec)

  1. cmd/handler-utils_test.go

    		t.Fatal(err)
    	}
    
    	// Corrupted XML
    	malformedReq := &http.Request{
    		Body:          io.NopCloser(bytes.NewReader([]byte("<>"))),
    		ContentLength: int64(len("<>")),
    	}
    
    	// Not an XML
    	badRequest := &http.Request{
    		Body:          io.NopCloser(bytes.NewReader([]byte("garbage"))),
    		ContentLength: int64(len("garbage")),
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. internal/event/config_test.go

    			t.Fatalf("test %v: data: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    func TestParseConfig(t *testing.T) {
    	reader1 := strings.NewReader(`
    <NotificationConfiguration  xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
       <QueueConfiguration>
          <Id>1</Id>
          <Filter></Filter>
          <Queue>arn:minio:sqs:us-east-1:1:webhook</Queue>
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Dec 05 10:16:33 UTC 2023
    - 29K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/lex/lex_test.go

    			"A",
    			"B(THIS)",
    		),
    		"x.\n",
    	},
    	*/
    }
    
    func TestLex(t *testing.T) {
    	for _, test := range lexTests {
    		input := NewInput(test.name)
    		input.Push(NewTokenizer(test.name, strings.NewReader(test.input), nil))
    		result := drain(input)
    		if result != test.output {
    			t.Errorf("%s: got %q expected %q", test.name, result, test.output)
    		}
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Aug 29 07:48:38 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. internal/store/queuestore.go

    		decodedBytes, err := s2.Decode(nil, raw)
    		if err != nil {
    			return nil, err
    		}
    		decoder = jsoniter.ConfigCompatibleWithStandardLibrary.NewDecoder(bytes.NewReader(decodedBytes))
    	} else {
    		decoder = jsoniter.ConfigCompatibleWithStandardLibrary.NewDecoder(bytes.NewReader(raw))
    	}
    
    	for decoder.More() {
    		var item I
    		if err := decoder.Decode(&item); err != nil {
    			return nil, err
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  5. cmd/config-common.go

    		return errConfigNotFound
    	}
    	return err
    }
    
    func saveConfigWithOpts(ctx context.Context, store objectIO, configFile string, data []byte, opts ObjectOptions) error {
    	hashReader, err := hash.NewReader(ctx, bytes.NewReader(data), int64(len(data)), "", getSHA256Hash(data), int64(len(data)))
    	if err != nil {
    		return err
    	}
    
    	_, err = store.PutObject(ctx, minioMetaBucket, configFile, NewPutObjReader(hashReader), opts)
    	return err
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/bytes/reader.go

    		err = io.ErrShortWrite
    	}
    	return
    }
    
    // Reset resets the [Reader] to be reading from b.
    func (r *Reader) Reset(b []byte) { *r = Reader{b, 0, -1} }
    
    // NewReader returns a new [Reader] reading from b.
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Jul 16 18:17:37 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  7. src/archive/tar/example_test.go

    		if _, err := tw.Write([]byte(file.Body)); err != nil {
    			log.Fatal(err)
    		}
    	}
    	if err := tw.Close(); err != nil {
    		log.Fatal(err)
    	}
    
    	// Open and iterate through the files in the archive.
    	tr := tar.NewReader(&buf)
    	for {
    		hdr, err := tr.Next()
    		if err == io.EOF {
    			break // End of archive
    		}
    		if err != nil {
    			log.Fatal(err)
    		}
    		fmt.Printf("Contents of %s:\n", hdr.Name)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Nov 16 16:54:08 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  8. cmd/xl-storage-format-v2_test.go

    	f, err := os.Open("testdata/xl.meta-corrupt.gz")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer f.Close()
    
    	gz, err := gzip.NewReader(bufio.NewReader(f))
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	buf, err := io.ReadAll(gz)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	_, err = readXLMetaNoData(bytes.NewReader(buf), int64(len(buf)))
    	if err == nil {
    		t.Fatal("expected error but returned success")
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Mar 08 17:50:48 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  9. internal/s3select/simdj/reader.go

    				err = fmt.Errorf("unexpected root json type:%v", typ)
    				r.err = &err
    				return
    			}
    		}
    		if in.Error == io.EOF {
    			return
    		}
    	}
    }
    
    // NewReader - creates new JSON reader using readCloser.
    func NewReader(readCloser io.ReadCloser, args *json.ReaderArgs) *Reader {
    	r := Reader{
    		args:       args,
    		readCloser: &safeCloser{r: io.Reader(readCloser)},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 30 17:02:22 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  10. cmd/object-handlers-common_test.go

    			expectedCode:    304,
    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			recorder := httptest.NewRecorder()
    			request := httptest.NewRequest(http.MethodHead, "/bucket/a", bytes.NewReader([]byte{}))
    			request.Header.Set(xhttp.IfNoneMatch, tc.ifNoneMatch)
    			request.Header.Set(xhttp.IfModifiedSince, tc.ifModifiedSince)
    			request.Header.Set(xhttp.IfMatch, tc.ifMatch)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 06:33:53 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top