Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 812 for Req (0.02 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization.go

    		klog.Warning("Authorization is disabled")
    		return handler
    	}
    	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		ctx := req.Context()
    		authorizationStart := time.Now()
    
    		attributes, err := GetAuthorizerAttributes(ctx)
    		if err != nil {
    			responsewriters.InternalError(w, req, err)
    			return
    		}
    		authorized, reason, err := a.Authorize(ctx, attributes)
    
    		authorizationFinish := time.Now()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 20 13:35:55 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  2. src/net/http/readrequest_test.go

    		tt := &reqTests[i]
    		req, err := ReadRequest(bufio.NewReader(strings.NewReader(tt.Raw)))
    		if err != nil {
    			if err.Error() != tt.Error {
    				t.Errorf("#%d: error %q, want error %q", i, err.Error(), tt.Error)
    			}
    			continue
    		}
    		rbody := req.Body
    		req.Body = nil
    		testName := fmt.Sprintf("Test %d (%q)", i, tt.Raw)
    		diff(t, testName, req, tt.Req)
    		var bout strings.Builder
    		if rbody != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 14 22:23:32 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit_test.go

    			handler = WithAuditInit(handler)
    
    			req, _ := http.NewRequest(test.verb, test.path, nil)
    			req = withTestContext(req, &user.DefaultInfo{Name: "admin"}, nil)
    			if test.auditID != "" {
    				req.Header.Add("Audit-ID", test.auditID)
    			}
    			req.RemoteAddr = "127.0.0.1"
    
    			func() {
    				defer func() {
    					recover()
    				}()
    				handler.ServeHTTP(httptest.NewRecorder(), req)
    			}()
    
    			events := sink.Events()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 22.6K bytes
    - Viewed (0)
  4. pkg/test/echo/server/forwarder/websocket.go

    func (c *websocketProtocol) Close() error {
    	return nil
    }
    
    func (c *websocketProtocol) makeRequest(ctx context.Context, cfg *Config, requestID int) (string, error) {
    	req := cfg.Request
    	var outBuffer bytes.Buffer
    	echo.ForwarderURLField.WriteForRequest(&outBuffer, requestID, req.Url)
    
    	// Set the special header to trigger the upgrade to WebSocket.
    	wsReq := cfg.headers.Clone()
    	if len(cfg.hostHeader) > 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 11 16:27:16 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/proxy/translatinghandler_test.go

    			expectTranslator: false,
    		},
    	}
    	for name, test := range tests {
    		req, err := http.NewRequest("GET", "http://www.example.com/", nil)
    		require.NoError(t, err)
    		if test.upgrade != "" {
    			req.Header.Add("Connection", "Upgrade")
    			req.Header.Add("Upgrade", test.upgrade)
    		}
    		if len(test.version) > 0 {
    			req.Header.Add(wsstream.WebSocketProtocolHeader, test.version)
    		}
    		delegate := fakeHandler{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  6. pilot/pkg/xds/discovery.go

    	if !req.Full {
    		req.Push = s.globalPushContext()
    		s.dropCacheForRequest(req)
    		s.AdsPushAll(req)
    		return
    	}
    	// Reset the status during the push.
    	oldPushContext := s.globalPushContext()
    	if oldPushContext != nil {
    		oldPushContext.OnConfigChange()
    		// Push the previous push Envoy metrics.
    		envoyfilter.RecordMetrics()
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 20:21:09 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. pilot/pkg/xds/cds.go

    		}
    		// Otherwise, only handle full pushes (skip endpoint-only updates)
    		if !req.Full {
    			return false
    		}
    	default:
    		if !req.Full {
    			// CDS only handles full push
    			return false
    		}
    	}
    	// If none set, we will always push
    	if len(req.ConfigsUpdated) == 0 {
    		return true
    	}
    
    	checkGateway := false
    	for config := range req.ConfigsUpdated {
    		if proxy.Type == model.Router {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 21:27:52 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/filters/storageversion.go

    		return handler
    	}
    	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		if svm.Completed() {
    			handler.ServeHTTP(w, req)
    			return
    		}
    		ctx := req.Context()
    		requestInfo, found := request.RequestInfoFrom(ctx)
    		if !found {
    			responsewriters.InternalError(w, req, errors.New("no RequestInfo found in the context"))
    			return
    		}
    		// Allow non-resource requests
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 03 06:51:04 UTC 2023
    - 5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go

    func (req *request) MaxSeats() int {
    	return req.workEstimate.MaxSeats()
    }
    
    func (req *request) InitialSeats() int {
    	return int(req.workEstimate.InitialSeats)
    }
    
    func (req *request) NoteQueued(inQueue bool) {
    	if req.queueNoteFn != nil {
    		req.queueNoteFn(inQueue)
    	}
    }
    
    func (req *request) Finish(execFn func()) bool {
    	exec, idle := req.wait()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 04 16:59:21 UTC 2024
    - 42.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/httplog/httplog_test.go

    		}
    
    		handler.ServeHTTP(origWriter, req)
    	}
    }
    
    func TestLoggedStatus(t *testing.T) {
    	req, err := http.NewRequest("GET", "http://example.com", nil)
    	if err != nil {
    		t.Errorf("unexpected error: %v", err)
    	}
    
    	var tw http.ResponseWriter = new(responsewriter.FakeResponseWriter)
    	logger := newLogged(req, tw)
    	logger.Write(nil)
    
    	if logger.status != http.StatusOK {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 05 18:05:09 UTC 2021
    - 6.2K bytes
    - Viewed (0)
Back to top