- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 47 for LimitReader (0.08 sec)
-
cmd/bucket-encryption-handlers.go
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } // Parse bucket encryption xml encConfig, err := validateBucketSSEConfig(io.LimitReader(r.Body, maxBucketSSEConfigSize)) if err != nil { apiErr := APIError{ Code: "MalformedXML", Description: fmt.Sprintf("%s (%s)", errorCodes[ErrMalformedXML].Description, err),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 6.4K bytes - Viewed (0) -
internal/logger/logrotate.go
return err } } return nil } var stdErrEnc = json.NewEncoder(os.Stderr) func (w *Writer) listen() { for { var r io.Reader = w.pr if w.opts.MaximumFileSize > 0 { r = io.LimitReader(w.pr, w.opts.MaximumFileSize) } if _, err := io.Copy(w.f, r); err != nil { msg := fmt.Sprintf("unable to write to log file %v: %v", w.f.Name(), err) stdErrEnc.Encode(&log.Entry{ Level: ErrorKind,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.8K bytes - Viewed (0) -
cmd/perf-tests.go
Downloads uint64 UploadTimes madmin.TimeDurations DownloadTimes madmin.TimeDurations DownloadTTFB madmin.TimeDurations Error string } func newRandomReader(size int) io.Reader { return io.LimitReader(randreader.New(), int64(size)) } type firstByteRecorder struct { t *time.Time r io.Reader } func (f *firstByteRecorder) Read(p []byte) (n int, err error) { if f.t != nil || len(p) == 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.8K bytes - Viewed (0) -
cmd/signature-v4-utils.go
} return false } // Returns SHA256 for calculating canonical-request. func getContentSha256Cksum(r *http.Request, stype serviceType) string { if stype == serviceSTS { payload, err := io.ReadAll(io.LimitReader(r.Body, stsRequestBodyLimit)) if err != nil { logger.CriticalIf(GlobalContext, err) } sum256 := sha256.Sum256(payload) r.Body = io.NopCloser(bytes.NewReader(payload)) return hex.EncodeToString(sum256[:])
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jun 13 22:26:38 UTC 2024 - 9.1K bytes - Viewed (0) -
cmd/auth-handler_test.go
return len(b), nil } // Test get request auth type. func TestGetRequestAuthType(t *testing.T) { type testCase struct { req *http.Request authT authType } nopCloser := io.NopCloser(io.LimitReader(&nullReader{}, 1024)) testCases := []testCase{ // Test case - 1 // Check for generic signature v4 header. { req: &http.Request{ URL: &url.URL{ Host: "127.0.0.1:9000",
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 15.4K bytes - Viewed (0) -
cmd/admin-handlers-users.go
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigTooLarge), r.URL) return } password := cred.SecretKey configBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength)) if err != nil { adminLogIf(ctx, err) writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL) return } var ureq madmin.AddOrUpdateUserReq
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 03 23:11:02 UTC 2024 - 85.1K bytes - Viewed (0) -
internal/rest/client.go
c.MarkOffline(err) } defer xhttp.DrainBody(resp.Body) // Limit the ReadAll(), just in case, because of a bug, the server responds with large data. b, err := io.ReadAll(io.LimitReader(resp.Body, c.MaxErrResponseSize)) if err != nil { if xnet.IsNetworkOrHostDown(err, expectTimeouts) { if !c.NoMetrics { atomic.AddUint64(&globalStats.errs, 1) } if c.MarkOffline(err) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/erasure-server-pool-decom.go
parts := make([]CompletePart, len(objInfo.Parts)) for i, part := range objInfo.Parts { hr, err := hash.NewReader(ctx, io.LimitReader(gr, part.Size), part.Size, "", "", part.ActualSize) if err != nil { return fmt.Errorf("decommissionObject: hash.NewReader() %w", err) } pi, err := z.PutObjectPart(ctx, bucket, objInfo.Name, res.UploadID,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 13:20:19 UTC 2024 - 42.2K bytes - Viewed (0) -
cmd/object-api-utils.go
if err = s2Reader.Skip(decOff); err != nil { // Call the cleanup funcs for i := len(cFns) - 1; i >= 0; i-- { cFns[i]() } return nil, err } } decReader := io.LimitReader(s2Reader, decLength) if decLength > compReadAheadSize { rah, err := readahead.NewReaderSize(decReader, compReadAheadBuffers, compReadAheadBufSize) if err == nil { decReader = rah
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0) -
cmd/admin-handlers-idp-ldap.go
return } isAttach := operation == "attach" // Validate API arguments in body. password := cred.SecretKey reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength)) if err != nil { adminLogIf(ctx, err) writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL) return } var par madmin.PolicyAssociationReq
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Sep 21 11:35:40 UTC 2024 - 19.1K bytes - Viewed (0)