Browse Source

the missing part of [757]

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@766 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.6
Xuefer 16 years ago
parent
commit
4b7f5b1a3f
  1. 6
      src/configfile-glue.c
  2. 3
      tests/core-condition.t

6
src/configfile-glue.c

@ -312,7 +312,7 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Referer"))) {
l = ds->value;
} else {
l = NULL;
l = srv->empty_string;
}
break;
}
@ -321,7 +321,7 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Cookie"))) {
l = ds->value;
} else {
l = NULL;
l = srv->empty_string;
}
break;
}
@ -330,7 +330,7 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "User-Agent"))) {
l = ds->value;
} else {
l = NULL;
l = srv->empty_string;
}
break;
}

3
tests/core-condition.t

@ -109,8 +109,6 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 }, { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 } ];
ok($tf->handle_http($t) == 0, 'remote ip cache (#255)');
TODO: {
local $TODO = "This should have been fixed with the latest commit";
$t->{REQUEST} = ( <<EOF
GET /empty-ref.noref HTTP/1.0
Cookie: empty-ref
@ -127,7 +125,6 @@ EOF
);
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer is empty');
}
$t->{REQUEST} = ( <<EOF
GET /empty-ref.noref HTTP/1.0

Loading…
Cancel
Save