contao/core — Issue #3754: Sending HTTP errors in better way
Author: DyaGa
Created: 2012-01-03 18:17:23+00:00
State: open

On servers with combination Apache + Nginx next bug can happen: "Random hex digits appearing at top of HTML on 404 and 403 pages" (more information here: http://community.webfaction.com/questions/1292/random-hex-digits-appearing-at-top-of-html-on-404-and-403-pages-in-drupal)

The solution from page above is to add the following lines to .htaccess file

```
SetEnv force-response-1.0 1
SetEnv downgrade-1.0 1
```
But, I think, the better solution would be to use next code:

```php
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
```

instead of using:

```php
header('HTTP/1.1 404 Not Found');
```