]> git.cameronkatri.com Git - cgit.git/blobdiff - cgit.c
Merge branch 'plain-etag'
[cgit.git] / cgit.c
diff --git a/cgit.c b/cgit.c
index dc1c2e453de7ecb880df9d89a125196a66ad58eb..ae2025709a05b4f888e9fc090005c5a1a9ed10be 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -286,6 +286,8 @@ static int prepare_repo_cmd(struct cgit_context *ctx)
        if (get_sha1(ctx->qry.head, sha1)) {
                tmp = xstrdup(ctx->qry.head);
                ctx->qry.head = ctx->repo->defbranch;
+               ctx->page.status = 404;
+               ctx->page.statusmsg = "not found";
                cgit_print_http_headers(ctx);
                cgit_print_docstart(ctx);
                cgit_print_pageheader(ctx);