diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-10-06 15:16:20 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-10-06 15:16:21 +0200 |
commit | c0b5444b533e7177394ceaa247de4495307f72d6 (patch) | |
tree | f90d32145a1c9f7ba9f9d3cf1b10296d06b35322 | |
parent | 59e0c739634f46a164d939e54416287b91ff8a9b (diff) |
file: re-run json handler script after file fallback redirect
This allows the request handler to add extra headers to the response
even in the redirect case.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | file.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -879,9 +879,14 @@ void uh_handle_request(struct client *cl) if (__handle_file_request(cl, url)) return; - if (uh_handler_run(cl, &url, true) && - (!url || __handle_file_request(cl, url))) - return; + if (uh_handler_run(cl, &url, true)) { + if (!url) + return; + + uh_handler_run(cl, &url, false); + if (__handle_file_request(cl, url)) + return; + } req->redirect_status = 404; if (conf.error_handler) { |