Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for content_length (0.15 sec)

  1. cmd/test-utils_test.go

    	// Add Content-Length
    	req.ContentLength = contentLength
    
    	return req, nil
    }
    
    // Various signature types we are supporting, currently
    // two main signature types.
    type signerType int
    
    const (
    	signerV2 signerType = iota
    	signerV4
    )
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  2. cmd/handler-utils_test.go

    	}
    
    	// 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")),
    	}
    
    	// generates the input request with XML bucket configuration set to the request body.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  3. cmd/http-tracer.go

    		}
    
    		// Calculate input body size with headers
    		reqHeaders := r.Header.Clone()
    		reqHeaders.Set("Host", r.Host)
    		if len(r.TransferEncoding) == 0 {
    			reqHeaders.Set("Content-Length", strconv.Itoa(int(r.ContentLength)))
    		} else {
    			reqHeaders.Set("Transfer-Encoding", strings.Join(r.TransferEncoding, ","))
    		}
    		inputBytes := reqRecorder.Size()
    		for k, v := range reqHeaders {
    			inputBytes += len(k) + len(v)
    		}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  4. cmd/peer-rest-server.go

    	vars := mux.Vars(r)
    	bucketName := vars[peerRESTBucket]
    	if bucketName == "" {
    		s.writeErrorResponse(w, errors.New("Bucket name is missing"))
    		return
    	}
    
    	var rulesMap event.RulesMap
    	if r.ContentLength < 0 {
    		s.writeErrorResponse(w, errInvalidArgument)
    		return
    	}
    
    	err := gob.NewDecoder(r.Body).Decode(&rulesMap)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  5. cmd/api-router.go

    	commonS3Headers := []string{
    		xhttp.Date,
    		xhttp.ETag,
    		xhttp.ServerInfo,
    		xhttp.Connection,
    		xhttp.AcceptRanges,
    		xhttp.ContentRange,
    		xhttp.ContentEncoding,
    		xhttp.ContentLength,
    		xhttp.ContentType,
    		xhttp.ContentDisposition,
    		xhttp.LastModified,
    		xhttp.ContentLanguage,
    		xhttp.CacheControl,
    		xhttp.RetryAfter,
    		xhttp.AmzBucketRegion,
    		xhttp.Expires,
    		"X-Amz*",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 04 18:05:56 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  6. cmd/auth-handler_test.go

    		}
    	}
    }
    
    // Provides a fully populated http request instance, fails otherwise.
    func mustNewRequest(method string, urlStr string, contentLength int64, body io.ReadSeeker, t *testing.T) *http.Request {
    	req, err := newTestRequest(method, urlStr, contentLength, body)
    	if err != nil {
    		t.Fatalf("Unable to initialize new http request %s", err)
    	}
    	return req
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. cmd/admin-handlers-config-kv.go

    	if objectAPI == nil {
    		return
    	}
    
    	if r.ContentLength > maxEConfigJSONSize || r.ContentLength == -1 {
    		// More than maxConfigSize bytes were available
    		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)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  8. internal/rest/client.go

    	req = req.WithContext(ctx)
    	if body != nil {
    		switch v := body.(type) {
    		case *bytes.Buffer:
    			req.ContentLength = int64(v.Len())
    			buf := v.Bytes()
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := bytes.NewReader(buf)
    				return io.NopCloser(r), nil
    			}
    		case *bytes.Reader:
    			req.ContentLength = int64(v.Len())
    			snapshot := *v
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := snapshot
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  9. cmd/handler-utils.go

    	// we do not have to validate location constraint. Bucket will
    	// be created at default region.
    	locationConstraint := createBucketLocationConfiguration{}
    	err := xmlDecoder(r.Body, &locationConstraint, r.ContentLength)
    	if err != nil && r.ContentLength != 0 {
    		internalLogOnceIf(GlobalContext, err, "location-constraint-xml-parsing")
    		// Treat all other failures as XML parsing errors.
    		return "", ErrMalformedXML
    	} // else for both err as nil or io.EOF
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.5K bytes
    - Viewed (3)
  10. internal/s3select/select_test.go

    			w := &testResponseWriter{}
    			s3Select.Evaluate(w)
    			s3Select.Close()
    			resp := http.Response{
    				StatusCode:    http.StatusOK,
    				Body:          io.NopCloser(bytes.NewReader(w.response)),
    				ContentLength: int64(len(w.response)),
    			}
    			res, err := minio.NewSelectResults(&resp, "testbucket")
    			if err != nil {
    				t.Error(err)
    				return
    			}
    			got, err := io.ReadAll(res)
    			if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 76.2K bytes
    - Viewed (0)
Back to top