MCPcopy Index your code
hub / github.com/ContentSquare/chproxy / getDecompressor

Function getDecompressor

utils.go:251–259  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

249}
250
251func getDecompressor(req *http.Request) decompressor {
252 if req.Header.Get("Content-Encoding") == "gzip" {
253 return gzipDecompressor{}
254 }
255 if req.URL.Query().Get("decompress") == "1" {
256 return chDecompressor{}
257 }
258 return nil
259}
260
261type decompressor interface {
262 decompress(r io.Reader) ([]byte, error)

Callers 2

getQuerySnippetFromBodyFunction · 0.85
getFullQueryFromBodyFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected