Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 84 for body (0.15 sec)

  1. cmd/test-utils_test.go

    	// Seek back to beginning.
    	body.Seek(0, 0)
    
    	// Add body
    	req.Body = io.NopCloser(body)
    	req.ContentLength = contentLength
    
    	return req, nil
    }
    
    func assembleStreamingChunks(req *http.Request, body io.ReadSeeker, chunkSize int64,
    	secretKey, signature string, currTime time.Time) (*http.Request, error,
    ) {
    	regionStr := globalSite.Region
    	var stream []byte
    	var buffer []byte
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:06:57 GMT 2024
    - 75.7K bytes
    - Viewed (0)
  2. internal/http/response-recorder.go

    		lrw.headerBytesWritten += n
    	}
    }
    
    // blobBody returns a dummy body placeholder for blob (binary stream)
    var blobBody = []byte("<BLOB>")
    
    // gzippedBody returns a dummy body placeholder for gzipped content
    var gzippedBody = []byte("<GZIP>")
    
    // Body - Return response body.
    func (lrw *ResponseRecorder) Body() []byte {
    	if lrw.Header().Get("Content-Encoding") == "gzip" {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 02 00:13:19 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/cni-watcher.go

    		}
    	})
    	return nil
    }
    
    func (s *CniPluginServer) handleAddEvent(w http.ResponseWriter, req *http.Request) {
    	if req.Body == nil {
    		log.Error("empty request body")
    		http.Error(w, "empty request body", http.StatusBadRequest)
    		return
    	}
    	defer req.Body.Close()
    	data, err := io.ReadAll(req.Body)
    	if err != nil {
    		log.Errorf("Failed to read event report from cni plugin: %v", err)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  4. cmd/http-tracer.go

    		// Setup a http request response recorder - this is needed for
    		// http stats requests and audit if enabled.
    		respRecorder := xhttp.NewResponseRecorder(w)
    
    		// Setup a http request body recorder
    		reqRecorder := &xhttp.RequestRecorder{Reader: r.Body}
    		r.Body = reqRecorder
    
    		// Create tracing data structure and associate it to the request context
    		tc := mcontext.TraceCtxt{
    			AmzReqID:         w.Header().Get(xhttp.AmzRequestID),
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  5. 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  6. cmd/admin-handlers-site-replication.go

    	if err := parseJSONBody(ctx, r.Body, &sites, cred.SecretKey); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	opts := getSRAddOptions(r)
    	status, err := globalSiteReplicationSys.AddPeerClusters(ctx, sites, opts)
    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	body, err := json.Marshal(status)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 09:40:39 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  7. internal/event/target/elasticsearch.go

    	res, err := c.Indices.ResolveIndex([]string{args.Index})
    	if err != nil {
    		return err
    	}
    	defer res.Body.Close()
    
    	var v map[string]interface{}
    	found := false
    	if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
    		return fmt.Errorf("Error parsing response body: %v", err)
    	}
    
    	indices, ok := v["indices"].([]interface{})
    	if ok {
    		for _, index := range indices {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 15K bytes
    - Viewed (0)
  8. internal/grid/trace.go

    				Time:    start,
    				Proto:   "grid",
    				Method:  "REQ",
    				Client:  local,
    				Headers: nil,
    				Path:    t.Subroute,
    				Body:    []byte(body),
    			},
    			RespInfo: madmin.TraceResponseInfo{
    				Time:       end,
    				Headers:    nil,
    				StatusCode: status,
    				Body:       []byte(bytesOrLength(resp)),
    			},
    			CallStats: madmin.TraceCallStats{
    				InputBytes:      len(req),
    				OutputBytes:     len(resp),
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 22:54:54 GMT 2024
    - 4K bytes
    - Viewed (0)
  9. cmd/server_test.go

    	c.Assert(err, nil)
    	// assert the http response status code.
    	c.Assert(response.StatusCode, http.StatusOK)
    
    	var buffer bytes.Buffer
    	// extract the body of the response.
    	responseBody, err := io.ReadAll(response.Body)
    	c.Assert(err, nil)
    	// assert the http response body content.
    	c.Assert(true, bytes.Equal(responseBody, buffer.Bytes()))
    }
    
    func (s *TestSuiteCommon) TestBucket(c *check) {
    	// generate a random bucket name.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 108K bytes
    - Viewed (0)
  10. internal/config/cache/cache.go

    	}
    
    	resp, err := c.clnt.Do(req)
    	if err != nil {
    		return nil, err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	switch resp.StatusCode {
    	case http.StatusNotFound:
    		return nil, ErrKeyMissing
    	case http.StatusOK:
    		co := &ObjectInfo{}
    		return co, co.DecodeMsg(msgp.NewReader(resp.Body))
    	default:
    		return nil, ErrInvalidArgument
    	}
    }
    
    // Set sets the cache object info
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top