Project

General

Profile

Bug #1532

Lighttpd fails to start when using the same $HTTP["host"] match in an IF/ELSE form

Added by Anonymous over 11 years ago. Updated about 10 years ago.

Status:
Wontfix
Priority:
Low
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

While adjusting a vhost i have, i encountered that Lighttpd wouldn't start anymore giving an odd error. The reason was quite clear:


$HTTP["host"] =~ "^www\.(mydomain\.co\.uk)(:[0-9]+)?$" {
# Do bla
}

else $HTTP["host"] =~ "^www\.(mydomain\.co\.uk)(:[0-9]+)?$" {
# Do bla
}

else $HTTP["host"] =~ "^(.+\.)?(mydomain\.co\.uk)(:[0-9]+)?$" {
# Redirect the rest
        url.redirect = ( ".*" => "http://www.%2/" )
}

When restarting Lighttpd i get the following error:
lighttpd: ./configparser.y:349: yy_reduce: Assertion `yymsp[-3].minor.yy78->context_ndx < yymspr0.minor.yy78->context_ndx' failed.

Reason is quite simple, i'm using the same IF and ELSE case, however it shouldn't really matter that I do so (even if it makes no sense).

-- calimonk

History

#1

Updated by stbuehler about 11 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix

This is a configparser design problem - we won't fix it in 1.4.x as it is not needed if your config makes sense.

#2

Updated by stbuehler almost 11 years ago

  • Status changed from Fixed to Wontfix
#3

Updated by spflanze about 10 years ago

I have come across the same bug. I need this to work.

#4

Updated by icy about 10 years ago

Why do you need this to work? It doesn't make any semantically sense.

if (a) { ... } else if (a) { ... } else if (b) { ... }

Just merge the two (a) conditions.

#5

Updated by darix about 10 years ago

the error message could be a bit less cryptic, but otherwise i agree this shouldnt lead to an successful start.

Also available in: Atom