MCPcopy Create free account
hub / github.com/cortexproject/cortex / ServeHTTP

Method ServeHTTP

pkg/api/queryapi/compression.go:86–90  ·  view source on GitHub ↗

ServeHTTP adds compression to the original http.Handler's ServeHTTP() method.

(writer http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

84
85// ServeHTTP adds compression to the original http.Handler's ServeHTTP() method.
86func (c CompressionHandler) ServeHTTP(writer http.ResponseWriter, req *http.Request) {
87 compWriter := newCompressedResponseWriter(writer, req)
88 c.Handler.ServeHTTP(compWriter, req)
89 compWriter.Close()
90}

Callers 5

Test_CustomAPIFunction · 0.45
Test_InvalidCodecFunction · 0.45

Calls 2

CloseMethod · 0.65

Tested by 5

Test_CustomAPIFunction · 0.36
Test_InvalidCodecFunction · 0.36