summaryrefslogtreecommitdiffhomepage
path: root/src/reqs.c
diff options
context:
space:
mode:
authorStephan Leemburg <stephan@it-functions.nl>2016-09-10 19:22:45 +0200
committerMichael Adam <obnox@samba.org>2016-09-10 19:22:45 +0200
commitc5da1cc934d5c75b109e2cc81398cb6cb4b37d92 (patch)
treef9ba747b06694a1d4c1ddd2aa134c2195136ad06 /src/reqs.c
parent186bbc3efb4b47caac0b5e14465c97918c99e442 (diff)
Continue with forward proxy if ReverseOnly is not true and no mapping available (#35)
allow non-reverse mappings if reverseonly is not enabled
Diffstat (limited to 'src/reqs.c')
-rw-r--r--src/reqs.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/reqs.c b/src/reqs.c
index d0f296f..990152a 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -369,12 +369,18 @@ BAD_REQUEST_ERROR:
reverse_url = reverse_rewrite_url (connptr, hashofheaders, url);
- if (!reverse_url) {
+ if (reverse_url != NULL) {
+ safefree (url);
+ url = reverse_url;
+ } else if (config.reverseonly) {
+ log_message (LOG_ERR,
+ "Bad request, no mapping for '%s' found",
+ url);
+ indicate_http_error (connptr, 400, "Bad Request",
+ "detail", "No mapping found for "
+ "requested url", "url", url, NULL);
goto fail;
}
-
- safefree (url);
- url = reverse_url;
}
#endif