[TYPO3-core] Sending correct headers on errors

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Jun 13 12:12:31 CEST 2007


Andreas Otto schrieb:
> Hi,
> 
> in some situations TYPO3 generates nice little error pages. Most of these
> error pages are served with a HTTP status header 200 which is IMHO wrong.
> 
> If e. g. TYPO3 has a problem to connect to the database the error page might
> display "The current username, password or host was not accepted when the
> connection to the database was attempted to be established!".
> 
> In addition to this error message an entry should be generated in the syslog
> and an HTTP status header 503 should be sent, to indicate that the service
> is temporarily not available.

Is there a way to distinguish between possibly transient errors (503) like 
db connection problems and and other errors (500)?

BTW, should we check for the request method and return a 501 if it is not 
GET, POST or HEAD?

Masi


More information about the TYPO3-team-core mailing list