- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 42 for LimitReader (0.24 sec)
-
internal/bucket/object/lock/lock.go
const maxObjectLockConfigSize = 1 << 12 // ParseObjectLockConfig parses ObjectLockConfig from xml func ParseObjectLockConfig(reader io.Reader) (*Config, error) { config := Config{} if err := xml.NewDecoder(io.LimitReader(reader, maxObjectLockConfigSize)).Decode(&config); err != nil { return nil, err } return &config, nil } // NewObjectLockConfig returns a initialized lock.Config struct
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 17.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 }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Feb 27 16:35:36 GMT 2023 - 2.9K bytes - Viewed (0) -
cmd/admin-bucket-handlers.go
if s3Err != ErrNone { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL) return } password := cred.SecretKey reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength)) if err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL) return } var target madmin.BucketTarget
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 32.5K bytes - Viewed (0) -
cmd/tier-handlers.go
ctx := r.Context() objAPI, cred := validateAdminReq(ctx, w, r, policy.SetTierAction) if objAPI == nil { return } password := cred.SecretKey reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength)) if err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL) return } var cfg madmin.TierConfig
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Feb 15 19:52:44 GMT 2024 - 7.5K bytes - Viewed (0) -
cmd/bucket-versioning-handler.go
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Error), r.URL) return } v, err := versioning.ParseConfig(io.LimitReader(r.Body, maxBucketVersioningConfigSize)) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } if globalSiteReplicationSys.isEnabled() && !v.Enabled() {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 5K bytes - Viewed (0) -
cmd/admin-handlers-config-kv.go
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigTooLarge), r.URL) return } password := cred.SecretKey kvBytes, 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 }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 15.7K bytes - Viewed (0) -
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) }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Sep 04 19:57:37 GMT 2023 - 5.1K 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)
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Feb 02 11:02:31 GMT 2024 - 5.1K bytes - Viewed (0) -
cmd/bucket-lifecycle-handlers.go
if _, err := objAPI.GetBucketInfo(ctx, bucket, BucketOptions{}); 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 if err = bucketLifecycle.Validate(); err != nil {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Nov 21 17:48:06 GMT 2023 - 7K 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)
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Feb 02 00:13:57 GMT 2024 - 6.8K bytes - Viewed (0)