MCPcopy Index your code
hub / github.com/willnorris/imageproxy / Write

Method Write

third_party/http/server.go:112–122  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

110func (tw *timeoutWriter) Header() http.Header { return tw.h }
111
112func (tw *timeoutWriter) Write(p []byte) (int, error) {
113 tw.mu.Lock()
114 defer tw.mu.Unlock()
115 if tw.timedOut {
116 return 0, ErrHandlerTimeout
117 }
118 if !tw.wroteHeader {
119 tw.writeHeader(http.StatusOK)
120 }
121 return tw.wbuf.Write(p)
122}
123
124func (tw *timeoutWriter) WriteHeader(code int) {
125 tw.mu.Lock()

Callers 5

validSignatureFunction · 0.80
RoundTripMethod · 0.80
SetMethod · 0.80
signFunction · 0.80
ServeHTTPMethod · 0.80

Calls 1

writeHeaderMethod · 0.95

Tested by

no test coverage detected