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

Function NewObjectPartialContent

storage/reader.go:46–53  ·  view source on GitHub ↗

NewObjectPartialContent creates a new Reader with a 206 Partial Content status.

(headers http.Header, body io.ReadCloser)

Source from the content-addressed store, hash-verified

44
45// NewObjectPartialContent creates a new Reader with a 206 Partial Content status.
46func NewObjectPartialContent(headers http.Header, body io.ReadCloser) *ObjectReader {
47 return &ObjectReader{
48 Status: http.StatusPartialContent,
49 Headers: headers,
50 Body: body,
51 contentLength: -1, // is set in Response()
52 }
53}
54
55// NewObjectNotFound creates a new Reader with a 404 Not Found status.
56func NewObjectNotFound(message string) *ObjectReader {

Callers 4

tryRespondWithPartialMethod · 0.92
GetObjectMethod · 0.92
GetObjectMethod · 0.92
GetObjectMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected