summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-13 11:50:50 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-13 11:50:50 +0100
commit857bf0231d89d3a2bbccfef27af53ce3baaa2403 (patch)
tree30f97641fe6d9e3c67fe88d72e066a8cfa759ce3 /file.c
parent0590256080feb5e8f8742938efa539f2aec90601 (diff)
fix redirect status
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index 1238ebd..22bdfb8 100644
--- a/file.c
+++ b/file.c
@@ -686,10 +686,12 @@ static bool __handle_file_request(struct client *cl, char *url)
void uh_handle_request(struct client *cl)
{
+ struct http_request *req = &cl->request;
struct dispatch_handler *d;
char *url = blobmsg_data(blob_data(cl->hdr.head));;
char *error_handler;
+ req->redirect_status = 200;
d = dispatch_find(url, NULL);
if (d) {
d->handle_request(cl, url, NULL);
@@ -699,6 +701,7 @@ void uh_handle_request(struct client *cl)
if (__handle_file_request(cl, url))
return;
+ req->redirect_status = 404;
if (conf.error_handler) {
error_handler = alloca(strlen(conf.error_handler) + 1);
strcpy(error_handler, conf.error_handler);