[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#366945: marked as done ("ErrorDocument 400" not working)



Your message dated Wed, 16 Sep 2009 21:32:49 +0100
with message-id <1253133169.402092.3705.nullmailer@kmos.homeip.net>
and subject line Package apache has been removed from Debian
has caused the Debian Bug report #366945,
regarding "ErrorDocument 400" not working
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
366945: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366945
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apache
Version: 1.3.26-0woody7

According to my error.log, I have received a couple of requests like this

[Mon May  8 18:06:47 2006] [error] [client 125.247.36.125] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)

for quite some time. The request (of course) results in a "400 Bad
Request"-response due to the missing "Host:"-header.

These requests was starting to annoy me, so I was planning to make a small
perl-script, that could insert an iptables DROP on the IP-address
requesting "/w00tw00t.at.ISC.SANS.DFind:)". I would then use

ErrorDocument 400 /cgi-bin/400.cgi

in my httpd.conf to forward the 400-errors to my script.

But it seems that ErrorDocument doesn't always work. The most simple case,
I could come up with, is a static text-file as the 400-error-page:

[- The config -]
www:~# grep 'ErrorDocument 400' /etc/apache/httpd.conf
ErrorDocument 400 /400.txt
[- The config -]

[- The 400-page -]
www:~# cat /var/www/400.txt
400 - Bad Request
[- The 400-page -]

[- The test -]
www:~# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Fri, 12 May 2006 09:23:43 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

185
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23):
/w00tw00t.at.ISC.SANS.DFind:)<P>
<HR>
<ADDRESS>Apache/1.3.26 Server at stderr.dk Port 80</ADDRESS>
</BODY></HTML>

0

Connection closed by foreign host.
[- The test -]

As you can see, /var/www/400.txt isn't used for the response.

If I change the config to

[- The new config -]
www:~# grep 'ErrorDocument 400' /etc/apache/httpd.conf
ErrorDocument 400 "400 - Bad Request
[- The new config -]

the "400 - Bad Request"-text is used, which seems to indicate that
"ErrorDocument 400 ..." only works for plain text directly in the config,
but not for local (or external) redirects.

Am I missing something here or is it supposed to work (or rather not work)
like that?

-- 
Povl Ole Haarlev Olsen



--- End Message ---
--- Begin Message ---
Version: 1.3.34-4.1+rm

You filled the bug http://bugs.debian.org/366945 in Debian BTS
against the package apache. I'm closing it at *unstable*, but it will
remain open for older distributions.

For more information about this package's removal, read
http://bugs.debian.org/418266. That bug might give the reasons why
this package was removed and suggestions of possible replacements.

Don't hesitate to reply to this mail if you have any question.

Thank you for your contribution to Debian.

--
Marco Rodrigues


--- End Message ---

Reply to: