Lines Matching defs:handler
3751 http2errClosedBody = errors.New("body closed by handler")
3752 http2errHandlerComplete = errors.New("http2: request body closed due to handler exiting")
3774 // MaxHandlers limits the number of http.Handler ServeHTTP goroutines
3782 // time. This is unrelated to the number of http.Handler goroutines
3956 s.TLSNextProto = map[string]func(*Server, *tls.Conn, Handler){}
3958 protoHandler := func(hs *Server, c *tls.Conn, h Handler) {
3963 Handler: h,
3977 // Handler specifies which handler to use for processing
3978 // requests. If nil, BaseConfig.Handler is used. If BaseConfig
3979 // or BaseConfig.Handler is nil, http.DefaultServeMux is used.
3980 Handler Handler
3990 func (o *http2ServeConnOpts) handler() Handler {
3992 if o.Handler != nil {
3993 return o.Handler
3995 if o.BaseConfig != nil && o.BaseConfig.Handler != nil {
3996 return o.BaseConfig.Handler
4027 handler: opts.handler(),
4141 handler Handler
4211 // the http.Handler's goroutine in the responseWriter. Because the
4213 // handler, this struct intentionally has no pointer to the
4214 // *responseWriter{,State} itself, as the Handler ending nils out the
4228 flow http2flow // limits writing from Handler to client
4240 reqTrailer Header // handler's Request.Trailer
4439 // Note: this is for serverConn.serve panicking, not http.Handler code.
4636 // writeDataFromHandler writes DATA response frames from a handler on
4658 // happen on the final Write after an http.Handler
4716 // The serverConn might close an open stream while the stream's handler
4718 // receives bad data from the client. If this happens, the handler might
4720 // handler hasn't yet been notified of the close). In this case, we simply
4721 // ignore the frame. The handler will notice that the stream is closed when
4807 var http2errHandlerPanicked = errors.New("http2: handler panicked")
4829 // theory, but since our handler is done and
5168 st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc
5275 // the http.Handler returned, so it's done reading &
5373 // copyTrailersToHandlerRequest is run in the Handler's goroutine in
5475 handler := sc.handler.ServeHTTP
5478 handler = http2handleHeaderListTooLong
5480 handler = http2new400Handler(err)
5494 go sc.runHandler(rw, req, handler)
5739 func (sc *http2serverConn) runHandler(rw *http2responseWriter, req *Request, handler func(ResponseWriter, *Request)) {
5760 handler(rw, req)
5774 // called from handler goroutines.
5781 // waiting for this frame to be written, so an http.Flush mid-handler
5782 // writes out the correct value of keys, before a handler later potentially
5807 // called from handler goroutines.
5815 // A bodyReadMsg tells the server loop that the http.Handler read n
5822 // called from handler goroutines.
5823 // Notes that the handler for the given stream ID read n bytes of its body
5889 // requestBody is the Handler's Request.Body type.
5954 // mutated by http.Handler goroutine:
5961 handlerDone bool // handler has finished
5964 sentContentLen int64 // non-zero if handler set a Content-Length header
6119 // This method runs after the Handler is done and promotes any Header
6141 panic("Header called after Handler finished")
6160 panic("CloseNotify called after Handler finished")
6180 panic("Header called after Handler finished")
6209 panic("WriteHeader called after Handler finished")
6237 // * Handler calls w.Write or w.WriteString ->
6239 // * (Handler might call Flush)
6255 panic("Write called after Handler finished")
6266 return 0, errors.New("http2: handler wrote more than declared Content-Length")
6427 // is written. Once the ID is allocated, we start the request handler.
6463 header: http2cloneHeader(msg.header), // clone since handler runs concurrently with writing the PUSH_PROMISE
6470 go sc.runHandler(rw, req, sc.handler.ServeHTTP)
8954 // handlerPanicRST is the message sent from handler goroutines when
8955 // the handler panics.
9018 // for HTTP response headers or trailers from a server handler.