summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-01-23 09:22:00 +0100
committerVincent Douillet <vincent@vdouillet.fr>2024-02-08 09:27:54 +0100
commit42f538cc66546997a166dbe67e489c9afabbb908 (patch)
tree718bb6b7161892c4b964499c1818c6d7bf0bd6a6 /main.c
parent760031b4a74d70bdeaab4ce9aedfe772acd05bd3 (diff)
download files
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 8f2e541..7a203c8 100644
--- a/main.c
+++ b/main.c
@@ -78,13 +78,13 @@ main(void)
*/
if (r.method != KMETHOD_GET && r.method != KMETHOD_POST)
http_exit(&r, KHTTP_405, NULL);
- if (r.mime != KMIME_TEXT_HTML)
- http_exit(&r, KHTTP_406, NULL); /* Not Acceptable */
if (r.page == PAGE__MAX)
http_exit(&r, KHTTP_404, NULL);
switch (r.page) {
case PAGE_BROWSE:
+ if (r.mime != KMIME_TEXT_HTML)
+ http_exit(&r, KHTTP_406, NULL); /* Not Acceptable */
browse(&r);
break;
case PAGE_DOWNLOAD: