MCPcopy
hub / github.com/caddyserver/caddy / Read

Method Read

modules/caddyhttp/requestbody/requestbody.go:113–120  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

111}
112
113func (ew errorWrapper) Read(p []byte) (n int, err error) {
114 n, err = ew.ReadCloser.Read(p)
115 var mbe *http.MaxBytesError
116 if errors.As(err, &mbe) {
117 err = caddyhttp.Error(http.StatusRequestEntityTooLarge, err)
118 }
119 return n, err
120}
121
122// Interface guard
123var _ caddyhttp.MiddlewareHandler = (*RequestBody)(nil)

Callers

nothing calls this directly

Calls 1

ErrorFunction · 0.92

Tested by

no test coverage detected