allow non-reverse mappings if reverseonly is not enabled
This commit is contained in:
parent
0aedb9ba19
commit
3b6e6d4b41
12
src/reqs.c
12
src/reqs.c
@ -369,14 +369,14 @@ BAD_REQUEST_ERROR:
|
|||||||
|
|
||||||
reverse_url = reverse_rewrite_url (connptr, hashofheaders, url);
|
reverse_url = reverse_rewrite_url (connptr, hashofheaders, url);
|
||||||
|
|
||||||
if (!reverse_url && config.reverseonly) {
|
if (reverse_url != NULL) {
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if not reverse only and a mapping was found.. */
|
|
||||||
if(reverse_url) {
|
|
||||||
safefree (url);
|
safefree (url);
|
||||||
url = reverse_url;
|
url = reverse_url;
|
||||||
|
} else if (config.reverseonly) {
|
||||||
|
indicate_http_error (connptr, 400, "Bad Request",
|
||||||
|
"detail", "No mapping found for requested url",
|
||||||
|
"url", url, NULL);
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user