nginx: Warn about not workable 'proxy'

Proxy is not yet ready for nginx. Instead of give a generic error, this patch
adds a clean message explains that such functionality is not available on the
nginx port. This patch also modifies the test cases to reflect this changes.
This commit is contained in:
Felipe Zimmerle
2014-01-09 11:12:28 -08:00
parent 7478faa5ce
commit 795d6a64d2
2 changed files with 51 additions and 10 deletions

View File

@@ -195,6 +195,7 @@ int perform_interception(modsec_rec *msr) {
break;
case ACTION_PROXY :
#if !(defined(VERSION_IIS)) && !(defined(VERSION_NGINX)) && !(defined(VERSION_STANDALONE))
if (msr->phase < 3) {
if (ap_find_linked_module("mod_proxy.c") == NULL) {
log_level = 1;
@@ -219,6 +220,15 @@ int perform_interception(modsec_rec *msr) {
"(Configuration Error: Proxy action requested but it does not work in output phases).",
phase_text);
}
#else
log_level = 1;
status = HTTP_INTERNAL_SERVER_ERROR;
message = apr_psprintf(msr->mp, "Access denied with code 500%s "
"(Configuration Error: Proxy action to %s requested but "
"proxy is only available in Apache version).",
phase_text,
log_escape_nq(msr->mp, actionset->intercept_uri));
#endif
break;
case ACTION_DROP :