- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Hijack (0.1 sec)
-
src/net/http/httputil/persist.go
} // Hijack detaches the [ServerConn] and returns the underlying connection as well // as the read-side bufio which may have some left over data. Hijack may be // called before Read has signaled the end of the keep-alive logic. The user // should not call Hijack while [ServerConn.Read] or [ServerConn.Write] is in progress. func (sc *ServerConn) Hijack() (net.Conn, *bufio.Reader) { sc.mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/proxy/streamtunnel.go
// Once Write or WriteHeader is called, Hijack returns an error. // Once Hijack is called, Write, WriteHeader, and Hijack return errors. type tunnelingResponseWriter struct { // w is used to delegate Header(), WriteHeader(), and Write() calls w http.ResponseWriter // conn is returned from Hijack() conn net.Conn // mu guards writes mu sync.Mutex
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 04 19:10:30 UTC 2024 - 14.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/proxy/streamtunnel_test.go
assert.Nil(t, bufio, "bufio returned from Hijack() is always nil") assert.True(t, trw.hijacked, "hijacked field becomes true after Hijack()") assert.False(t, trw.written, "written field stays false after Hijack()") // Hijacking after writing to response writer is an error. trw = &tunnelingResponseWriter{written: true} _, _, err = trw.Hijack() assert.Error(t, err, "Hijack after writing to response writer is error")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 02:21:50 UTC 2024 - 22.7K bytes - Viewed (0) -
src/net/http/responsecontroller_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 19:20:31 UTC 2024 - 10.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go
requestHijacker, ok := w.(http.Hijacker) if !ok { klog.Errorf("Unable to hijack response writer: %T", w) h.Responder.Error(w, req, fmt.Errorf("request connection cannot be hijacked: %T", w)) return true } requestHijackedConn, _, err := requestHijacker.Hijack() if err != nil { klog.Errorf("Unable to hijack response: %v", err) h.Responder.Error(w, req, fmt.Errorf("error hijacking connection: %v", err))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 04 19:10:30 UTC 2024 - 19.6K bytes - Viewed (0) -
src/net/http/clientserver_test.go
testWriteHeaderAfterWrite(t, http1Mode, true) } func testWriteHeaderAfterWrite(t *testing.T, mode testMode, hijack bool) { var errorLog lockedBytesBuffer cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { if hijack { conn, _, _ := w.(Hijacker).Hijack() defer conn.Close() conn.Write([]byte("HTTP/1.1 200 OK\r\nContent-Length: 6\r\n\r\nfoo"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 46.6K bytes - Viewed (0) -
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) -
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) -
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) -
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)