Merge 3b6e6d4b41
into 186bbc3efb
This commit is contained in:
commit
52d92bab3f
11
src/reqs.c
11
src/reqs.c
@ -369,12 +369,15 @@ BAD_REQUEST_ERROR:
|
|||||||
|
|
||||||
reverse_url = reverse_rewrite_url (connptr, hashofheaders, url);
|
reverse_url = reverse_rewrite_url (connptr, hashofheaders, url);
|
||||||
|
|
||||||
if (!reverse_url) {
|
if (reverse_url != NULL) {
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -166,7 +166,8 @@ char *reverse_rewrite_url (struct conn_s *connptr, hashmap_t hashofheaders,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_message (LOG_CONN, "Rewriting URL: %s -> %s", url, rewrite_url);
|
log_message (LOG_CONN, "Rewriting URL: %s -> %s", url,
|
||||||
|
rewrite_url ? rewrite_url : "No mapping found");
|
||||||
|
|
||||||
/* Store reverse path so that the magical tracking cookie can be set */
|
/* Store reverse path so that the magical tracking cookie can be set */
|
||||||
if (config.reversemagic && reverse)
|
if (config.reversemagic && reverse)
|
||||||
|
Loading…
Reference in New Issue
Block a user