MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Response

Method Response

storage/reader.go:113–126  ·  view source on GitHub ↗

Response converts Reader to http.Response

(req *http.Request)

Source from the content-addressed store, hash-verified

111
112// Response converts Reader to http.Response
113func (r *ObjectReader) Response(req *http.Request) *http.Response {
114 return &http.Response{
115 Status: http.StatusText(r.Status),
116 StatusCode: r.Status,
117 Proto: "HTTP/1.0",
118 ProtoMajor: 1,
119 ProtoMinor: 0,
120 Header: r.Headers,
121 Body: r.Body,
122 Close: true,
123 Request: req,
124 ContentLength: r.ContentLength(),
125 }
126}

Callers 1

RoundTripMethod · 0.80

Calls 1

ContentLengthMethod · 0.95

Tested by

no test coverage detected