Changeset 313
- Timestamp:
- 04/28/2005 01:30:31 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
doc/configuration.txt (modified) (1 diff)
-
src/configfile.c (modified) (3 diffs)
-
src/configparser.y (modified) (1 diff)
-
tests/condition.conf (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/configuration.txt
r308 r313 75 75 } 76 76 } 77 |<field> <operator> <value> {78 ... else if77 else <field> <operator> <value> { 78 ... the "else if" block 79 79 } 80 80 -
trunk/src/configfile.c
r309 r313 596 596 break; 597 597 598 case '|':599 t->offset++;600 tid = TK_OR;601 buffer_copy_string(token, "|");602 break;603 604 598 case '{': 605 599 t->offset++; … … 696 690 tid = TK_INCLUDE; 697 691 } 692 else if (strcmp(token->ptr, "else") == 0) { 693 tid = TK_ELSE; 694 } 698 695 else { 699 696 tid = TK_LKEY; … … 718 715 *token_id = tid; 719 716 #if 0 720 log_error_write(srv, __FILE__, __LINE__, "sbsdsdb ",717 log_error_write(srv, __FILE__, __LINE__, "sbsdsdbdd", 721 718 "file:", t->file, 722 "line:", t->line, "pos:", t->line_pos, token); 719 "line:", t->line, "pos:", t->line_pos, 720 token, token->used - 1, tid); 723 721 #endif 724 722 -
trunk/src/configparser.y
r307 r313 263 263 eols ::= . 264 264 265 condlines(A) ::= condlines(B) eols ORcondline(C). {265 condlines(A) ::= condlines(B) eols ELSE condline(C). { 266 266 assert(B->context_ndx < C->context_ndx); 267 267 C->prev = B; -
trunk/tests/condition.conf
r307 r313 35 35 url.redirect = ("^" => "/match_1") 36 36 } 37 |$HTTP["host"] == "test1.example.org" {37 else $HTTP["host"] == "test1.example.org" { 38 38 server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/" 39 39 server.name = "test1.example.org" … … 41 41 } 42 42 # comments 43 |$HTTP["host"] == "test2.example.org" {43 else $HTTP["host"] == "test2.example.org" { 44 44 server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/" 45 45 server.name = "test2.example.org" … … 49 49 # comments 50 50 51 |$HTTP["host"] == "test3.example.org" {51 else $HTTP["host"] == "test3.example.org" { 52 52 server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/" 53 53 server.name = "test3.example.org"

