- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for Hijack (0.24 sec)
-
src/net/http/serve_test.go
w.Header().Set("Connection", "close") fmt.Fprintf(w, "Hello.") }, "/hijack": func(w ResponseWriter, r *Request) { c, _, _ := w.(Hijacker).Hijack() c.Write([]byte("HTTP/1.0 200 OK\r\nConnection: close\r\n\r\nHello.")) c.Close() }, "/hijack-panic": func(w ResponseWriter, r *Request) { c, _, _ := w.(Hijacker).Hijack() c.Write([]byte("HTTP/1.0 200 OK\r\nConnection: close\r\n\r\nHello.")) c.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K 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) -
src/net/http/transport_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K 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/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) -
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) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(*ClientConn).Do", Method, 0}, {"(*ClientConn).Hijack", Method, 0}, {"(*ClientConn).Pending", Method, 0}, {"(*ClientConn).Read", Method, 0}, {"(*ClientConn).Write", Method, 0}, {"(*ProxyRequest).SetURL", Method, 20}, {"(*ProxyRequest).SetXForwarded", Method, 20}, {"(*ReverseProxy).ServeHTTP", Method, 0}, {"(*ServerConn).Close", Method, 0}, {"(*ServerConn).Hijack", Method, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)