MCPcopy
hub / github.com/grafana/dskit / Write

Method Write

middleware/zero_response.go:89–100  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

87}
88
89func (zc *zeroResponseConn) Write(b []byte) (n int, err error) {
90 n, err = zc.Conn.Write(b)
91 if n > 0 {
92 zc.bufHolderMux.Lock()
93 if zc.bufHolder != nil {
94 zc.returnPool.Put(zc.bufHolder)
95 zc.bufHolder = nil
96 }
97 zc.bufHolderMux.Unlock()
98 }
99 return
100}
101
102var authRegexp = regexp.MustCompile(`((?i)\r\nauthorization:\s+)(\S+\s+)(\S+)`)
103

Callers

nothing calls this directly

Calls 1

PutMethod · 0.65

Tested by

no test coverage detected