Project

General

Profile

Actions

Bug #2638

closed

1.4.35_5 = access-deny + error-handler-404

Added by montr777 about 9 years ago. Updated about 8 years ago.

Status:
Wontfix
Priority:
Normal
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hi All,

I am using:
1. FreeBSD 10.1 / i386 / 32 bit
2. lighttpd-1.4.35_5 ( original / compiled from ports )

To blocking stolen pictures with lines like:
$HTTP["referer"] =~ "^(http://badurl1\.com|http://badurl2\.com)" {
url.access-deny = ( ".jpg", ".bmp", ".png" )
}

It is working well by rejecting with code 403 in correct way.

But in case if I am using extra line in config like
server.error-handler-404 = "/error404.cgi"
then error404.cgi become to handle also 403 error.
I am expecting it to process just missed 404 pages.

So I am looking on this situation like on BUG.

I am expecting that each error will be handled by separate
handler with separate config line like:
server.error-handler-403 = "/error403.cgi"
server.error-handler-404 = "/error404.cgi"

But at current situation 403 and 404 errors are mixed
and pass as single stream into server.error-handler-404

Is it possible to solve this ?

Thanks in advance

Montr777

Actions #1

Updated by stbuehler about 9 years ago

  • Status changed from New to Wontfix

See #2633 - server.error-handler-404 handles both 403 and 404, and I don't want to change it, and there are better ways.

Actions #2

Updated by gstrauss about 8 years ago

As stbuehler noted in https://redmine.lighttpd.net/issues/2633

server.error-handler-404 has very "strange" semantics, and I'd rather not touch it. How is the handler supposed to know what triggered the 403 or 404 (it actually handles both)?

There are better ways to handle not existing files (see url.rewrite-if-not-file).
Actions

Also available in: Atom