- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 47 for LimitReader (0.12 sec)
-
cmd/bucket-notification-handlers.go
if r.ContentLength <= 0 { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingContentLength), r.URL) return } config, err := event.ParseConfig(io.LimitReader(r.Body, r.ContentLength), globalSite.Region(), globalEventNotifier.targetList) if err != nil { apiErr := errorCodes.ToAPIErr(ErrMalformedXML) if event.IsEventError(err) { apiErr = toAPIError(ctx, err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.1K bytes - Viewed (0) -
internal/config/subnet/subnet.go
Timeout: 10 * time.Second, Transport: c.transport, } resp, err := client.Do(r) if err != nil { return "", err } defer xhttp.DrainBody(resp.Body) respBytes, err := io.ReadAll(io.LimitReader(resp.Body, respBodyLimit)) if err != nil { return "", err } respStr := string(respBytes) if resp.StatusCode == http.StatusOK { return respStr, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 27 16:35:36 UTC 2023 - 2.9K bytes - Viewed (0) -
internal/http/response-recorder.go
if lrw.body.Len() > 1<<20 { return gzippedBody } r, err := gzip.NewReader(&lrw.body) if err != nil { return gzippedBody } defer r.Close() b, _ := io.ReadAll(io.LimitReader(r, 10<<20)) return b } // If there was an error response or body logging is enabled // then we return the body contents if (lrw.LogErrBody && lrw.StatusCode >= http.StatusBadRequest) || lrw.LogAllBody {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 5.5K bytes - Viewed (0) -
cmd/admin-handlers-idp-config.go
if contentType != "application/octet-stream" { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrBadRequest), r.URL) return } 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 } idpCfgType := mux.Vars(r)["type"]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 12.7K bytes - Viewed (0) -
cmd/bucket-policy-handlers.go
if r.ContentLength > maxBucketPolicySize { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrPolicyTooLarge), r.URL) return } bucketPolicyBytes, err := io.ReadAll(io.LimitReader(r.Body, r.ContentLength)) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } bucketPolicy, err := policy.ParseBucketPolicyConfig(bytes.NewReader(bucketPolicyBytes), bucket)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 6.1K bytes - Viewed (0) -
internal/config/dns/operator_dns.go
return newError(bucket, derr) } return err } defer xhttp.DrainBody(resp.Body) if resp.StatusCode != http.StatusOK { var errorStringBuilder strings.Builder io.Copy(&errorStringBuilder, io.LimitReader(resp.Body, resp.ContentLength)) errorString := errorStringBuilder.String() if resp.StatusCode == http.StatusConflict { return ErrBucketConflict(Error{bucket, errors.New(errorString)}) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Mar 06 16:56:10 UTC 2023 - 6.6K bytes - Viewed (0) -
internal/crypto/key_test.go
package crypto import ( "bytes" "crypto/rand" "encoding/hex" "io" "testing" "github.com/minio/minio/internal/logger" ) var shortRandom = func(limit int64) io.Reader { return io.LimitReader(rand.Reader, limit) } func recoverTest(i int, shouldPass bool, t *testing.T) { if err := recover(); err == nil && !shouldPass { t.Errorf("Test %d should fail but passed successfully", i)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 6.7K bytes - Viewed (0) -
cmd/warm-backend-azure.go
azMeta := map[string]*string{} for k, v := range meta { azMeta[k] = to.Ptr(v) } resp, err := az.clnt.UploadStream(ctx, az.Bucket, az.getDest(object), io.LimitReader(r, length), &azblob.UploadStreamOptions{ Concurrency: 4, AccessTier: az.tier(), // set tier if specified Metadata: azMeta, }) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 7K bytes - Viewed (0) -
cmd/bucket-lifecycle-handlers.go
rcfg, err := globalBucketObjectLockSys.Get(bucket) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } bucketLifecycle, err := lifecycle.ParseLifecycleConfigWithID(io.LimitReader(r.Body, r.ContentLength)) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } // Validate the received bucket policy document
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 7K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
defer f.Close() defer os.Remove(f.Name()) r := strings.NewReader("hello world") bufp := ODirectPoolSmall.Get().(*[]byte) defer ODirectPoolSmall.Put(bufp) written, err := CopyAligned(f, io.LimitReader(r, 5), *bufp, r.Size(), f) if !errors.Is(err, io.ErrUnexpectedEOF) { t.Errorf("Expected io.ErrUnexpectedEOF, but got %v", err) } if written != 5 { t.Errorf("Expected written to be '5', but got %v", written)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0)