mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-13 02:38:27 -04:00
2a46f2a14e
fastcgi's ServeHTTP method originally returned the correct value (0) inb51e8bc191. Later, I mistakenly suggested we change that to return the status code because I forgot that status codes aren't logged by the return value. So fastcgi broke due in3966936bd6due to my error. We later had to try to make up for this with ugly Content-Length checks like inc37ad7f677. Turns out that all we had to do was fix the returned status here back to 0. The proxy middleware behaves the same way, and returning 0 is correct. We should only return a status code if the response has not been written, but with upstream servers, we do write a response; they do not know about our error handler. Also clarifed this in the middleware.Handler documentation.