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

Method Execute

handlers/stream/handler.go:73–91  ·  view source on GitHub ↗

Execute handles the image passthrough request, streaming the image directly to the response writer

(
	userRequest *http.Request,
	imageURL string,
	reqID string,
	o *options.Options,
	rw server.ResponseWriter,
)

Source from the content-addressed store, hash-verified

71
72// Execute handles the image passthrough request, streaming the image directly to the response writer
73func (s *Handler) Execute(
74 userRequest *http.Request,
75 imageURL string,
76 reqID string,
77 o *options.Options,
78 rw server.ResponseWriter,
79) *server.Error {
80 stream := &request{
81 HandlerContext: s.HandlerContext,
82 handler: s,
83 imageRequest: userRequest,
84 imageURL: imageURL,
85 reqID: reqID,
86 opts: o,
87 rw: rw,
88 }
89
90 return stream.execute()
91}
92
93// execute handles the actual streaming logic
94func (s *request) execute() *server.Error {

Callers 2

executeMethod · 0.45
generateErrorHTMLFunction · 0.45

Calls 1

executeMethod · 0.95

Tested by 1

executeMethod · 0.36