MCPcopy Index your code
hub / github.com/subtrace/subtrace / HandleHijack

Method HandleHijack

devtools/devtools.go:214–222  ·  view source on GitHub ↗
(req *http.Request, conn net.Conn, brw *bufio.ReadWriter)

Source from the content-addressed store, hash-verified

212}
213
214func (s *Server) HandleHijack(req *http.Request, conn net.Conn, brw *bufio.ReadWriter) {
215 defer conn.Close()
216
217 prw := newPipeResponseWriter(conn, brw)
218 defer prw.finish()
219
220 s.ServeHTTP(prw, req)
221 slog.Debug("devtools server finished handling hijacked devtools endpoint request", "path", req.URL.Path, "upgrade", req.Header.Get("upgrade"))
222}
223
224type pipeResponseWriter struct {
225 conn net.Conn

Callers 2

ModifyRequestMethod · 0.80
ModifyRequestMethod · 0.80

Calls 5

ServeHTTPMethod · 0.95
newPipeResponseWriterFunction · 0.85
finishMethod · 0.80
CloseMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected