MCPcopy Index your code
hub / github.com/coder/coder / Hijack

Method Hijack

coderd/tracing/status_writer.go:99–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97}
98
99func (w *StatusWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
100 hijacker, ok := w.ResponseWriter.(http.Hijacker)
101 if !ok {
102 return nil, nil, xerrors.Errorf("%T is not a http.Hijacker", w.ResponseWriter)
103 }
104 w.Hijacked = true
105
106 return hijacker.Hijack()
107}
108
109func (w *StatusWriter) ResponseBody() []byte {
110 return w.responseBody

Callers 2

TestStatusWriterFunction · 0.95
TestUpstreamProxyFunction · 0.45

Calls 1

ErrorfMethod · 0.45

Tested by 2

TestStatusWriterFunction · 0.76
TestUpstreamProxyFunction · 0.36