Extra lines added to error documents
Error documents have extra content added before and after:
telnet mkdoc.com 80
Trying 195.10.230.124...
Connected to mkdoc.com (195.10.230.124).
Escape character is '^]'.
GET /foo/ HTTP/1.1
Host: mkdoc.com
HTTP/1.1 404 Not Found
Date: Wed, 27 Apr 2005 14:05:19 GMT
Server: Apache/1.3.31 (Unix) mod_throttle/3.1.2 mod_gzip/1.3.26.1a mod_perl/1.29
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
108
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /foo/ was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.31 Server at mkdoc.com Port 80</ADDRESS>
</BODY></HTML>
0
The above example is serving the default apache error document, if a custom error document is specified, for example:
ErrorDocument 404 /.static/css/404.html
The there doesn't seem to be a problem on some servers:
telnet www.centre.public.org.uk 80
Trying 195.10.230.124...
Connected to www.centre.public.org.uk (195.10.230.124).
Escape character is '^]'.
GET /foo/ HTTP/1.1
Host: www.centre.public.org.uk
HTTP/1.1 404 Not Found
Date: Wed, 27 Apr 2005 14:10:50 GMT
Server: Apache/1.3.31 (Unix) mod_throttle/3.1.2 mod_gzip/1.3.26.1a mod_perl/1.29
Vary: *
Last-Modified: Tue, 06 Apr 2004 16:10:15 GMT
ETag: "fff7-d57-4072d667"
Accept-Ranges: bytes
Content-Length: 3415
Content-Type: text/html
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
But there is a problem on other servers:
telnet www.helpisathand.webarch.net 80
Trying 212.100.246.252...
Connected to www.helpisathand.webarch.net (212.100.246.252).
Escape character is '^]'.
GET /blah/ HTTP/1.1
Host: www.helpisathand.webarch.net
HTTP/1.1 404 Not Found
Date: Thu, 28 Apr 2005 12:54:01 GMT
Server: Apache/1.3.33 (Unix) mod_perl/1.29
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
1
15b2
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"