]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-clone.c
Return proper HTTP response when accessing info/
[ps-cgit] / ui-clone.c
index a4ffd6e06bfe1f371cec2221813e1d0b7b5be084..50569d6075f6ef94a3c4ebbd465ff648fb5b7486 100644 (file)
@@ -71,8 +71,10 @@ static void send_file(char *path)
 
 void cgit_clone_info(void)
 {
-       if (!ctx.qry.path || strcmp(ctx.qry.path, "refs"))
+       if (!ctx.qry.path || strcmp(ctx.qry.path, "refs")) {
+               html_status(400, "Bad request", 0);
                return;
+       }
 
        ctx.page.mimetype = "text/plain";
        ctx.page.filename = "info/refs";