Remove trailing new line for cleaner log output.

Return correct status code.
This commit is contained in:
Abiola Ibrahim 2015-12-13 12:58:21 +01:00
parent b7fd1f4e9e
commit 3966936bd6

View file

@ -117,10 +117,11 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
// FastCGI stderr outputs // FastCGI stderr outputs
if fcgi.stderr.Len() != 0 { if fcgi.stderr.Len() != 0 {
err = LogError(fcgi.stderr.String()) // Remove trailing newline, error logger already does this.
err = LogError(strings.TrimSuffix(fcgi.stderr.String(), "\n"))
} }
return 0, err return resp.StatusCode, err
} }
} }