summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormOo <moo.lighttpd@gmail.com>2005-09-30 11:06:43 +0000
committermOo <moo.lighttpd@gmail.com>2005-09-30 11:06:43 +0000
commit4b7f5b1a3f4ffe49183bff878751762385cbd7b5 (patch)
treee2b3de24ccf8f9443569b6fc8fd12126ffcb6137
parent4ab20e5bef69dcebbb6045bd920c331f012bc061 (diff)
downloadlighttpd-git-4b7f5b1a3f4ffe49183bff878751762385cbd7b5.tar.gz
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
-rw-r--r--src/configfile-glue.c6
-rwxr-xr-xtests/core-condition.t3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/configfile-glue.c b/src/configfile-glue.c
index b717b46d..5c3c68ba 100644
--- a/src/configfile-glue.c
+++ b/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;
}
diff --git a/tests/core-condition.t b/tests/core-condition.t
index 3bcf4db1..96b05d87 100755
--- a/tests/core-condition.t
+++ b/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