Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for body (0.14 sec)

  1. cmd/auth-handler.go

    	if action == policy.CreateBucketAction {
    		// To extract region from XML in request body, get copy of request body.
    		payload, err := io.ReadAll(io.LimitReader(r.Body, maxLocationConstraintSize))
    		if err != nil {
    			authZLogIf(ctx, err, logger.ErrorKind)
    			return ErrMalformedXML
    		}
    
    		// Populate payload to extract location constraint.
    		r.Body = io.NopCloser(bytes.NewReader(payload))
    		region, s3Err = parseLocationConstraint(r)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  2. cmd/update.go

    		}
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	if resp.StatusCode != http.StatusOK {
    		return content, AdminError{
    			Code:       AdminUpdateUnexpectedFailure,
    			Message:    fmt.Sprintf("Error downloading URL %s. Response: %v", u, resp.Status),
    			StatusCode: resp.StatusCode,
    		}
    	}
    
    	contentBytes, err := io.ReadAll(resp.Body)
    	if err != nil {
    		return content, AdminError{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  3. 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)
  4. internal/rest/client.go

    func (c *Client) newRequest(ctx context.Context, u url.URL, body io.Reader) (*http.Request, error) {
    	rc, ok := body.(io.ReadCloser)
    	if !ok && body != nil {
    		rc = io.NopCloser(body)
    	}
    	req := &http.Request{
    		Method:     http.MethodPost,
    		URL:        &u,
    		Proto:      "HTTP/1.1",
    		ProtoMajor: 1,
    		ProtoMinor: 1,
    		Header:     make(http.Header),
    		Body:       rc,
    		Host:       u.Host,
    	}
    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)
  5. cmd/object-multipart-handlers.go

    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidMaxParts), r.URL)
    		return
    	}
    
    	var (
    		md5hex              = clientETag.String()
    		sha256hex           = ""
    		reader    io.Reader = r.Body
    		s3Error   APIErrorCode
    	)
    	if s3Error = isPutActionAllowed(ctx, rAuthType, bucket, object, r, policy.PutObjectAction); s3Error != ErrNone {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Error), r.URL)
    		return
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  6. cmd/kms-handlers.go

    	}
    	manager, ok := GlobalKMS.(kms.KeyManager)
    	if !ok {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrNotImplemented), r.URL)
    		return
    	}
    	var request importKeyRequest
    	if err := json.NewDecoder(r.Body).Decode(&request); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    	if err := manager.ImportKey(ctx, r.Form.Get("key-id"), []byte(request.Bytes)); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  7. cmd/object-api-errors.go

    type IncompleteBody GenericError
    
    // Error returns string an error formatted as the given text.
    func (e IncompleteBody) Error() string {
    	return e.Bucket + "/" + e.Object + " has incomplete body"
    }
    
    // InvalidRange - invalid range typed error.
    type InvalidRange struct {
    	OffsetBegin  int64
    	OffsetEnd    int64
    	ResourceSize int64
    }
    
    func (e InvalidRange) Error() string {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  8. cmd/storage-rest-server.go

    	fileSize, err := strconv.Atoi(fileSizeStr)
    	if err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    
    	done, body := keepHTTPReqResponseAlive(w, r)
    	done(s.getStorage().CreateFile(r.Context(), origvolume, volume, filePath, int64(fileSize), body))
    }
    
    // DeleteVersionHandler delete updated metadata.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  9. cmd/storage-rest-client.go

    	defer xioutil.SafeClose(resp)
    	body, err := req.MarshalMsg(nil)
    	if err != nil {
    		return err
    	}
    	respBody, err := client.call(ctx, storageRESTMethodReadMultiple, nil, bytes.NewReader(body), int64(len(body)))
    	if err != nil {
    		return err
    	}
    	defer xhttp.DrainBody(respBody)
    
    	pr, pw := io.Pipe()
    	go func() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  10. cmd/post-policy_test.go

    		if perr != nil {
    			t.Fatalf("Test %d: %s: Failed to create HTTP request for PostPolicyHandler: <ERROR> %v", i+1, instanceType, perr)
    		}
    		if testCase.malformedBody {
    			// Change the request body.
    			req.Body = io.NopCloser(bytes.NewReader([]byte("Hello,")))
    		}
    		// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
    		// Call the ServeHTTP to execute the handler.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 29.6K bytes
    - Viewed (0)
Back to top