Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 45 for Hijack (0.12 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go

    	if response != nil && response.StatusCode >= 300 || response.StatusCode < 200 {
    		return nil, fmt.Errorf("CONNECT request to %s returned response: %s", proxyURL.Redacted(), response.Status)
    	}
    
    	rwc, _ := proxyClientConn.Hijack()
    
    	if req.URL.Scheme == "https" {
    		return s.tlsConn(proxyReq.Context(), rwc, targetHost)
    	}
    	return rwc, nil
    }
    
    // dialWithSocks5Proxy dials the host specified by url through a socks5 proxy.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/scope.go

    // Lookup returns the object in scope s with the given name if such an
    // object exists; otherwise the result is nil.
    func (s *Scope) Lookup(name string) Object {
    	obj := resolve(name, s.elems[name])
    	// Hijack Lookup for "any": with gotypesalias=1, we want the Universe to
    	// return an Alias for "any", and with gotypesalias=0 we want to return
    	// the legacy representation of aliases.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  3. src/go/types/scope.go

    // Lookup returns the object in scope s with the given name if such an
    // object exists; otherwise the result is nil.
    func (s *Scope) Lookup(name string) Object {
    	obj := resolve(name, s.elems[name])
    	// Hijack Lookup for "any": with gotypesalias=1, we want the Universe to
    	// return an Alias for "any", and with gotypesalias=0 we want to return
    	// the legacy representation of aliases.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  4. src/net/http/server.go

    	w.WriteHeader(StatusExpectationFailed)
    	w.finishRequest()
    }
    
    // Hijack implements the [Hijacker.Hijack] method. Our response is both a [ResponseWriter]
    // and a [Hijacker].
    func (w *response) Hijack() (rwc net.Conn, buf *bufio.ReadWriter, err error) {
    	if w.handlerDone.Load() {
    		panic("net/http: Hijack called after ServeHTTP finished")
    	}
    	w.disableWriteContinue()
    	if w.wroteHeader {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  5. src/net/http/httputil/reverseproxy.go

    	if !ok {
    		p.getErrorHandler()(rw, req, fmt.Errorf("internal error: 101 switching protocols response with non-writable body"))
    		return
    	}
    
    	rc := http.NewResponseController(rw)
    	conn, brw, hijackErr := rc.Hijack()
    	if errors.Is(hijackErr, http.ErrNotSupported) {
    		p.getErrorHandler()(rw, req, fmt.Errorf("can't switch protocols using non-Hijacker ResponseWriter type %T", rw))
    		return
    	}
    
    	backConnCloseCh := make(chan bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  6. src/net/http/httputil/reverseproxy_test.go

    	const backendStatus = 404
    	backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		if r.Method == "GET" && r.FormValue("mode") == "hangup" {
    			c, _, _ := w.(http.Hijacker).Hijack()
    			c.Close()
    			return
    		}
    		if len(r.TransferEncoding) > 0 {
    			t.Errorf("backend got unexpected TransferEncoding: %v", r.TransferEncoding)
    		}
    		if r.Header.Get("X-Forwarded-For") == "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  7. src/net/rpc/server.go

    		w.Header().Set("Content-Type", "text/plain; charset=utf-8")
    		w.WriteHeader(http.StatusMethodNotAllowed)
    		io.WriteString(w, "405 must CONNECT\n")
    		return
    	}
    	conn, _, err := w.(http.Hijacker).Hijack()
    	if err != nil {
    		log.Print("rpc hijacking ", req.RemoteAddr, ": ", err.Error())
    		return
    	}
    	io.WriteString(conn, "HTTP/1.0 "+connected+"\n\n")
    	server.ServeConn(conn)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  8. pkg/controller/resourcequota/resource_quota_controller_test.go

    	if strings.Contains(request.URL.RawQuery, "watch=true") {
    		hijacker, ok := response.(http.Hijacker)
    		if !ok {
    			return
    		}
    		connection, _, err := hijacker.Hijack()
    		if err != nil {
    			return
    		}
    		defer connection.Close()
    		time.Sleep(30 * time.Second)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 12 16:29:33 UTC 2023
    - 42.6K bytes
    - Viewed (0)
  9. src/net/http/request.go

    	if err != nil {
    		return nil, err
    	}
    
    	if req.isH2Upgrade() {
    		// Because it's neither chunked, nor declared:
    		req.ContentLength = -1
    
    		// We want to give handlers a chance to hijack the
    		// connection, but we need to prevent the Server from
    		// dealing with the connection further if it's not
    		// hijacked. Set Close to ensure that:
    		req.Close = true
    	}
    	return req, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  10. pkg/controller/garbagecollector/garbagecollector_test.go

    	if strings.Contains(request.URL.RawQuery, "watch=true") {
    		hijacker, ok := response.(http.Hijacker)
    		if !ok {
    			return
    		}
    		connection, _, err := hijacker.Hijack()
    		if err != nil {
    			return
    		}
    		defer connection.Close()
    		time.Sleep(30 * time.Second)
    	}
    }
    
    // testServerAndClientConfig returns a server that listens and a config that can reference it
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.6K bytes
    - Viewed (0)
Back to top