- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for closeNotify (0.21 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/responsewriter/wrapper_test.go
fw.counter.HijackInvoked++ } return fw.ResponseWriter.(http.Hijacker).Hijack() } func (fw *fakeResponseWriterDecorator) CloseNotify() <-chan bool { if fw.counter != nil { fw.counter.CloseNotifyInvoked++ } //nolint:staticcheck // SA1019 return fw.ResponseWriter.(http.CloseNotifier).CloseNotify()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 17 12:58:53 UTC 2021 - 8.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/responsewriter/wrapper.go
InnerCloseNotifierFlusher CloseNotifierFlusher } func (wr outerWithCloseNotifyAndFlush) CloseNotify() <-chan bool { if notifier, ok := wr.UserProvidedDecorator.(http.CloseNotifier); ok { return notifier.CloseNotify() } return wr.InnerCloseNotifierFlusher.CloseNotify() } func (wr outerWithCloseNotifyAndFlush) Flush() { if flusher, ok := wr.UserProvidedDecorator.(http.Flusher); ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/responsewriter/fake.go
type FakeResponseWriterFlusherCloseNotifier struct { *FakeResponseWriter } func (fw *FakeResponseWriterFlusherCloseNotifier) Flush() {} func (fw *FakeResponseWriterFlusherCloseNotifier) CloseNotify() <-chan bool { return nil } // For HTTP/1.x an http.ResponseWriter object implements // http.Flusher, http.CloseNotifier and http.Hijacker. // It is used for testing purpose only
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 01 19:58:11 UTC 2021 - 1.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/timeout.go
// // We are throwing http.ErrAbortHandler deliberately so that a client is notified and to suppress a not helpful stacktrace in the logs panic(http.ErrAbortHandler) } } func (tw *baseTimeoutWriter) CloseNotify() <-chan bool { tw.mu.Lock() defer tw.mu.Unlock() if tw.timedOut { done := make(chan bool) close(done) return done }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 26 16:28:45 UTC 2024 - 8.9K bytes - Viewed (0) -
internal/handlers/forwarder.go
outReq.Host = target.Host } // TODO: only supports HTTP 1.1 for now. outReq.Proto = "HTTP/1.1" outReq.ProtoMajor = 1 outReq.ProtoMinor = 1 f.rewriter.Rewrite(outReq) // Disable closeNotify when method GET for http pipelining if outReq.Method == http.MethodGet { quietReq := outReq.WithContext(context.Background()) *outReq = *quietReq } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Apr 07 05:42:10 UTC 2023 - 5.6K bytes - Viewed (0) -
src/crypto/tls/conn.go
// waiting on handshakeMutex or the c.out mutex. return c.conn.Close() } var alertErr error if c.isHandshakeComplete.Load() { if err := c.closeNotify(); err != nil { alertErr = fmt.Errorf("tls: failed to send closeNotify alert (but connection was closed anyway): %w", err) } } if err := c.conn.Close(); err != nil { return err } return alertErr }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 51.8K bytes - Viewed (0) -
src/net/http/server.go
// New code should use [Request.Context] instead. type CloseNotifier interface { // CloseNotify returns a channel that receives at most a // single value (true) when the client connection has gone // away. // // CloseNotify may wait to notify until Request.Body has been // fully read. // // After the Handler has returned, there is no guarantee
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.go
// CloseNotifier predates context.Context, and has been // entirely superseded by it. If the request contains // a Context that carries a cancellation signal, don't // bother spinning up a goroutine to watch the CloseNotify // channel (if any). // // If the request Context has a nil Done channel (which // means it is either context.Background, or a custom // Context implementation with no cancellation signal),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 23:37:42 UTC 2024 - 24.9K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy_test.go
select { case <-time.After(10 * time.Second): // Note: this should only happen in broken implementations, and the // closenotify case should be instantaneous. t.Error("Handler never saw CloseNotify") return case <-w.(http.CloseNotifier).CloseNotify(): } w.WriteHeader(http.StatusOK) w.Write([]byte(backendResponse)) })) defer backend.Close()
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/serve_test.go
script := make(chan string, 2) script <- "closenotify" script <- "hijack" close(script) ts := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { plan := <-script switch plan { default: panic("bogus plan; too many requests") case "closenotify": w.(CloseNotifier).CloseNotify() // discard result w.Header().Set("X-Addr", r.RemoteAddr)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0)