Added a check that SecServerSignature actually worked (Apache changed some of this code as of 2.2.4 and could potentially change it again and break this).

Cleaned up some configure code.
Cleaned up some extraneous cache logging.
Cleaned up the output from the test script.
This commit is contained in:
brectanus
2008-01-14 22:32:53 +00:00
parent fabeaf5059
commit 99c41afc3d
5 changed files with 21 additions and 9 deletions

View File

@@ -392,6 +392,18 @@ static apr_status_t change_server_signature(server_rec *s) {
return -1;
}
/* Check that it really changed. This assumes that what we got was
* not a copy and this could change in future versions of Apache.
*/
server_version = (char *)apache_get_server_version();
if ((server_version == NULL) || (strcmp(server_version, new_server_signature) != 0)) {
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, s, "SecServerSignature: Failed to change server signature to \"%s\".", new_server_signature);
return 0;
}
else {
ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, s, "SecServerSignature: Changed server signature to \"%s\".", server_version);
}
return 1;
}