projects
/
project
/
uhttpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59e0c73
)
file: re-run json handler script after file fallback redirect
author
Felix Fietkau
<nbd@nbd.name>
Thu, 6 Oct 2016 13:16:20 +0000
(15:16 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Thu, 6 Oct 2016 13:16:21 +0000
(15:16 +0200)
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>
file.c
patch
|
blob
|
history
diff --git
a/file.c
b/file.c
index 2a948186932e49fada921a5c2b7f0de1f801c513..047b4daccb879a331b0b627ef04dd9ed47f5da3a 100644
(file)
--- a/
file.c
+++ b/
file.c
@@
-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) {