diff options
context:
space:
mode:
-rw-r--r--source/cgit.c10
-rw-r--r--source/cmd.c4
-rw-r--r--source/ui-blame.c14
-rw-r--r--source/ui-blob.c12
-rw-r--r--source/ui-clone.c8
-rw-r--r--source/ui-commit.c4
-rw-r--r--source/ui-diff.c8
-rw-r--r--source/ui-log.c2
-rw-r--r--source/ui-patch.c8
-rw-r--r--source/ui-plain.c12
-rw-r--r--source/ui-repolist.c2
-rw-r--r--source/ui-shared.c2
-rw-r--r--source/ui-snapshot.c14
-rw-r--r--source/ui-stats.c4
-rw-r--r--source/ui-tag.c6
-rw-r--r--source/ui-tree.c14
16 files changed, 62 insertions, 62 deletions
diff --git a/source/cgit.c b/source/cgit.c
index 90ee702..72e36c8 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -84,7 +84,7 @@ static NORETURN void die_routine(const char *msg, va_list params)
{
// The error page abandons any cache fill in progress, so the message
// reaches the visitor rather than the cache file stdout points at.
- cgit_vprint_error_page(400, "Bad request", msg, params);
+ cgit_vprint_error_page(400, "Bad Request", msg, params);
exit(0);
}
@@ -1095,7 +1095,7 @@ static int prepare_repo_cmd(int nongit)
if (repo_get_oid(the_repository, ctx.qry.head, &oid)) {
char *old_head = ctx.qry.head;
ctx.qry.head = xstrdup(ctx.repo->defbranch);
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Invalid branch: %s", old_head);
free(old_head);
return 1;
@@ -1130,18 +1130,18 @@ static void process_request(void)
cmd = cgit_get_cmd();
if (!cmd) {
ctx.page.title = "cgit error";
- cgit_print_error_page(404, "Not found", "Invalid request");
+ cgit_print_error_page(404, "Not Found", "Invalid request");
return;
}
if (!ctx.cfg.enable_http_clone && cmd->is_clone) {
ctx.page.title = "cgit error";
- cgit_print_error_page(404, "Not found", "Invalid request");
+ cgit_print_error_page(404, "Not Found", "Invalid request");
return;
}
if (cmd->want_repo && !ctx.repo) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"No repository selected");
return;
}
diff --git a/source/cmd.c b/source/cmd.c
index 27f9db5..68c395a 100644
--- a/source/cmd.c
+++ b/source/cmd.c
@@ -111,7 +111,7 @@ static void ls_cache_fn(void)
// The listing names the cache path and the URLs other visitors asked
// for, so it stays off until an administrator opts in.
if (!ctx.cfg.enable_cache_list) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return;
}
ctx.page.mimetype = "text/plain";
@@ -165,7 +165,7 @@ static void stats_fn(void)
if (ctx.repo->enable_stats)
cgit_show_stats();
else
- cgit_print_error_page(404, "Not found", "Stats are disabled");
+ cgit_print_error_page(404, "Not Found", "Stats are disabled");
}
static void summary_fn(void)
diff --git a/source/ui-blame.c b/source/ui-blame.c
index a7010d0..c25c2b3 100644
--- a/source/ui-blame.c
+++ b/source/ui-blame.c
@@ -278,12 +278,12 @@ static void print_blame_page(const struct object_id *oid, const char *path,
type = odb_read_object_info(the_repository->objects, oid, &size);
if (type == OBJ_BAD) {
- cgit_print_error_page(404, "Not found", "Bad object name: %s",
+ cgit_print_error_page(404, "Not Found", "Bad object name: %s",
oid_to_hex(oid));
return;
}
if (ctx.cfg.max_blob_size && size / 1024 > (unsigned long)ctx.cfg.max_blob_size) {
- cgit_print_error_page(413, "Too large",
+ cgit_print_error_page(413, "Content Too Large",
"blob size (%luKB) exceeds display size limit (%dKB)",
size / 1024, ctx.cfg.max_blob_size);
return;
@@ -291,7 +291,7 @@ static void print_blame_page(const struct object_id *oid, const char *path,
buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf) {
- cgit_print_error_page(500, "Internal server error",
+ cgit_print_error_page(500, "Internal Server Error",
"Error reading object %s", oid_to_hex(oid));
return;
}
@@ -420,13 +420,13 @@ void cgit_print_blame(void)
rev = ctx.qry.head;
if (repo_get_oid(the_repository, rev, &oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Invalid revision name: %s", rev);
return;
}
commit = lookup_commit_reference(the_repository, &oid);
if (!commit || repo_parse_commit(the_repository, commit)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Invalid commit reference: %s", rev);
return;
}
@@ -438,9 +438,9 @@ void cgit_print_blame(void)
read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
&paths, walk_tree, &walk);
if (walk.found == TARGET_MISSING)
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
else if (walk.found == TARGET_FOLDER)
- cgit_print_error_page(404, "No blame for folders",
+ cgit_print_error_page(404, "Not Found",
"Blame is not available for folders.");
free(walk.rev);
diff --git a/source/ui-blob.c b/source/ui-blob.c
index 1088679..efe1596 100644
--- a/source/ui-blob.c
+++ b/source/ui-blob.c
@@ -156,13 +156,13 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
if (hex) {
if (get_oid_hex(hex, &oid)) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"Bad hex value: %s", hex);
return;
}
} else {
if (repo_get_oid(the_repository, head, &oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad ref: %s", head);
return;
}
@@ -172,7 +172,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
if (!hex && type == OBJ_COMMIT && path) {
if (!find_path_oid(&oid, path, file_only)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Path not found: %s", path);
return;
}
@@ -180,13 +180,13 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
}
if (type == OBJ_BAD) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object name: %s", hex ? hex : path);
return;
}
if (over_size_limit(size)) {
- cgit_print_error_page(413, "Too large",
+ cgit_print_error_page(413, "Content Too Large",
"Object size (%luKB) exceeds limit (%dKB)",
size / 1024, ctx.cfg.max_blob_size);
return;
@@ -194,7 +194,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
buf = odb_read_object(the_repository->objects, &oid, &type, &size);
if (!buf) {
- cgit_print_error_page(500, "Internal server error",
+ cgit_print_error_page(500, "Internal Server Error",
"Error reading object %s", hex ? hex : path);
return;
}
diff --git a/source/ui-clone.c b/source/ui-clone.c
index 70e4446..75e5f95 100644
--- a/source/ui-clone.c
+++ b/source/ui-clone.c
@@ -105,13 +105,13 @@ static void send_file(const char *path)
if (stat(path, &st)) {
switch (errno) {
case ENOENT:
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
break;
case EACCES:
cgit_print_error_page(403, "Forbidden", "Forbidden");
break;
default:
- cgit_print_error_page(400, "Bad request", "Bad request");
+ cgit_print_error_page(400, "Bad Request", "Bad request");
}
return;
}
@@ -128,7 +128,7 @@ static void send_file(const char *path)
void cgit_clone_info(void)
{
if (!ctx.qry.path || strcmp(ctx.qry.path, "refs")) {
- cgit_print_error_page(400, "Bad request", "Bad request");
+ cgit_print_error_page(400, "Bad Request", "Bad request");
return;
}
@@ -160,7 +160,7 @@ void cgit_clone_objects(void)
return;
err:
- cgit_print_error_page(400, "Bad request", "Bad request");
+ cgit_print_error_page(400, "Bad Request", "Bad request");
}
void cgit_clone_head(void)
diff --git a/source/ui-commit.c b/source/ui-commit.c
index 5f010fd..8a31010 100644
--- a/source/ui-commit.c
+++ b/source/ui-commit.c
@@ -95,13 +95,13 @@ void cgit_print_commit(char *hex, const char *prefix)
hex = ctx.qry.head;
if (repo_get_oid(the_repository, hex, &oid)) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"Bad object id: %s", hex);
return;
}
commit = lookup_commit_reference(the_repository, &oid);
if (!commit) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad commit reference: %s", hex);
return;
}
diff --git a/source/ui-diff.c b/source/ui-diff.c
index d6232a3..d783cb4 100644
--- a/source/ui-diff.c
+++ b/source/ui-diff.c
@@ -635,13 +635,13 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
if (!new_rev)
new_rev = ctx.qry.head;
if (repo_get_oid(the_repository, new_rev, new_rev_oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object name: %s", new_rev);
return;
}
new_commit = lookup_commit_reference(the_repository, new_rev_oid);
if (!new_commit || repo_parse_commit(the_repository, new_commit)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad commit: %s", oid_to_hex(new_rev_oid));
return;
}
@@ -649,7 +649,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
if (old_rev) {
if (repo_get_oid(the_repository, old_rev, old_rev_oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object name: %s", old_rev);
return;
}
@@ -664,7 +664,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
old_rev_oid);
if (!old_commit ||
repo_parse_commit(the_repository, old_commit)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad commit: %s", oid_to_hex(old_rev_oid));
return;
}
diff --git a/source/ui-log.c b/source/ui-log.c
index 7b7808c..bbfeb67 100644
--- a/source/ui-log.c
+++ b/source/ui-log.c
@@ -467,7 +467,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep,
// would be handled by git as a request to write an arbitrary
// file. No valid ref or object name begins with a dash, so
// refuse it.
- cgit_print_error_page(400, "Bad request", "Invalid revision");
+ cgit_print_error_page(400, "Bad Request", "Invalid revision");
if (must_free_tip)
free((char *)tip);
strvec_clear(&rev_argv);
diff --git a/source/ui-patch.c b/source/ui-patch.c
index 6f75b6a..e8ec313 100644
--- a/source/ui-patch.c
+++ b/source/ui-patch.c
@@ -32,25 +32,25 @@ static int resolve_range(const char *new_rev, const char *old_rev,
struct commit *commit;
if (repo_get_oid(the_repository, new_rev, new_oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object id: %s", new_rev);
return -1;
}
commit = lookup_commit_reference(the_repository, new_oid);
if (!commit) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad commit reference: %s", new_rev);
return -1;
}
if (old_rev) {
if (repo_get_oid(the_repository, old_rev, old_oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object id: %s", old_rev);
return -1;
}
if (!lookup_commit_reference(the_repository, old_oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad commit reference: %s", old_rev);
return -1;
}
diff --git a/source/ui-plain.c b/source/ui-plain.c
index 7e30694..b63b9c6 100644
--- a/source/ui-plain.c
+++ b/source/ui-plain.c
@@ -56,7 +56,7 @@ static int print_object(const struct object_id *oid, const char *path)
type = odb_read_object_info(the_repository->objects, oid, &size);
if (type == OBJ_BAD) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return 1;
}
@@ -64,7 +64,7 @@ static int print_object(const struct object_id *oid, const char *path)
// blob is kept out of memory rather than noticed once it is there.
if (ctx.cfg.max_blob_size &&
size / 1024 > (unsigned long)ctx.cfg.max_blob_size) {
- cgit_print_error_page(413, "Too large",
+ cgit_print_error_page(413, "Content Too Large",
"Object size (%luKB) exceeds limit (%dKB)",
size / 1024, ctx.cfg.max_blob_size);
return 1;
@@ -72,7 +72,7 @@ static int print_object(const struct object_id *oid, const char *path)
buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return 1;
}
@@ -238,12 +238,12 @@ void cgit_print_plain(void)
rev = ctx.qry.head;
if (repo_get_oid(the_repository, rev, &oid)) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return;
}
commit = lookup_commit_reference(the_repository, &oid);
if (!commit || repo_parse_commit(the_repository, commit)) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return;
}
if (!path_items.match) {
@@ -259,7 +259,7 @@ void cgit_print_plain(void)
read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
&paths, walk_tree, &walk);
if (walk.response == RESPONSE_NONE)
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
else if (walk.response == RESPONSE_LISTING)
print_dir_tail();
}
diff --git a/source/ui-repolist.c b/source/ui-repolist.c
index c81d822..39978ae 100644
--- a/source/ui-repolist.c
+++ b/source/ui-repolist.c
@@ -404,7 +404,7 @@ void cgit_print_repolist(void)
int i;
if (!any_repos_visible()) {
- cgit_print_error_page(404, "Not found", "No repositories found");
+ cgit_print_error_page(404, "Not Found", "No repositories found");
return;
}
diff --git a/source/ui-shared.c b/source/ui-shared.c
index 60dc3f8..e8eaf4f 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -1420,7 +1420,7 @@ void cgit_print_http_headers(void)
void cgit_redirect(const char *url, bool permanent)
{
- htmlf("Status: %d %s\n", permanent ? 301 : 302, permanent ? "Moved" : "Found");
+ htmlf("Status: %d %s\n", permanent ? 301 : 302, permanent ? "Moved Permanently" : "Found");
html("Location: ");
html_url_path(url);
html("\n\n");
diff --git a/source/ui-snapshot.c b/source/ui-snapshot.c
index c3cb27a..7da7252 100644
--- a/source/ui-snapshot.c
+++ b/source/ui-snapshot.c
@@ -197,12 +197,12 @@ static int send_snapshot(const struct cgit_snapshot_format *format,
struct object_id oid;
if (repo_get_oid(the_repository, hex, &oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object id: %s", hex);
return 1;
}
if (!lookup_commit_reference(the_repository, &oid)) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"Not a commit reference: %s", hex);
return 1;
}
@@ -224,14 +224,14 @@ static int send_sig(const struct cgit_snapshot_format *format,
char *buf;
if (!note) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"No signature for %s", archive_name);
return 0;
}
buf = odb_read_object(the_repository->objects, note, &type, &size);
if (!buf) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return 0;
}
@@ -316,7 +316,7 @@ void cgit_print_snapshot(const char *head, const char *hex,
char *prefix = NULL;
if (!filename) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"No snapshot name specified");
return;
}
@@ -331,7 +331,7 @@ void cgit_print_snapshot(const char *head, const char *hex,
f = find_format(filename);
if (!f || (!sig_filename &&
!(ctx.repo->snapshots & cgit_snapshot_format_bit(f)))) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"Unsupported snapshot format: %s", filename);
return;
}
@@ -339,7 +339,7 @@ void cgit_print_snapshot(const char *head, const char *hex,
if (!hex && dwim) {
hex = ref_from_filename(ctx.repo, filename, f);
if (!hex) {
- cgit_print_error_page(404, "Not found", "Not found");
+ cgit_print_error_page(404, "Not Found", "Not found");
return;
}
prefix = xstrdup(filename);
diff --git a/source/ui-stats.c b/source/ui-stats.c
index 182cc06..0ce5ef7 100644
--- a/source/ui-stats.c
+++ b/source/ui-stats.c
@@ -608,12 +608,12 @@ void cgit_show_stats(void)
period_index = cgit_find_stats_period(code, &period);
if (!period_index) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Unknown statistics type: %c", code[0]);
return;
}
if (ctx.repo->max_stats && period_index > ctx.repo->max_stats) {
- cgit_print_error_page(400, "Bad request",
+ cgit_print_error_page(400, "Bad Request",
"Statistics type disabled: %s", period->name);
return;
}
diff --git a/source/ui-tag.c b/source/ui-tag.c
index 8bfbd8e..45ec156 100644
--- a/source/ui-tag.c
+++ b/source/ui-tag.c
@@ -64,7 +64,7 @@ static void print_annotated_tag(const char *revname,
tag = lookup_tag(the_repository, oid);
if (!tag || parse_tag(the_repository, tag) ||
!(info = cgit_parse_tag(tag))) {
- cgit_print_error_page(500, "Internal server error",
+ cgit_print_error_page(500, "Internal Server Error",
"Bad tag object: %s", revname);
return;
}
@@ -132,13 +132,13 @@ void cgit_print_tag(char *revname)
strbuf_addf(&fullref, "refs/tags/%s", revname);
if (repo_get_oid(the_repository, fullref.buf, &oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad tag reference: %s", revname);
goto cleanup;
}
obj = parse_object(the_repository, &oid);
if (!obj) {
- cgit_print_error_page(500, "Internal server error",
+ cgit_print_error_page(500, "Internal Server Error",
"Bad object id: %s", oid_to_hex(&oid));
goto cleanup;
}
diff --git a/source/ui-tree.c b/source/ui-tree.c
index ce57f92..b742b64 100644
--- a/source/ui-tree.c
+++ b/source/ui-tree.c
@@ -173,13 +173,13 @@ static bool print_object(const struct object_id *oid, const char *path,
type = odb_read_object_info(the_repository->objects, oid, &size);
if (type == OBJ_BAD) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Bad object name: %s", oid_to_hex(oid));
return false;
}
if (ctx.cfg.max_blob_size && size / 1024 > (unsigned long)ctx.cfg.max_blob_size) {
- cgit_print_error_page(413, "Too large",
+ cgit_print_error_page(413, "Content Too Large",
"blob size (%luKB) exceeds display size limit (%dKB)",
size / 1024, ctx.cfg.max_blob_size);
return false;
@@ -187,7 +187,7 @@ static bool print_object(const struct object_id *oid, const char *path,
buf = odb_read_object(the_repository->objects, oid, &type, &size);
if (!buf) {
- cgit_print_error_page(500, "Internal server error",
+ cgit_print_error_page(500, "Internal Server Error",
"Error reading object %s", oid_to_hex(oid));
return false;
}
@@ -434,7 +434,7 @@ static void ls_tree(const struct object_id *oid, const char *path,
tree = parse_tree_indirect(oid);
if (!tree) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Not a tree object: %s", oid_to_hex(oid));
return;
}
@@ -504,13 +504,13 @@ void cgit_print_tree(const char *rev, char *path)
rev = ctx.qry.head;
if (repo_get_oid(the_repository, rev, &oid)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Invalid revision name: %s", rev);
return;
}
commit = lookup_commit_reference(the_repository, &oid);
if (!commit || repo_parse_commit(the_repository, commit)) {
- cgit_print_error_page(404, "Not found",
+ cgit_print_error_page(404, "Not Found",
"Invalid commit reference: %s", rev);
return;
}
@@ -530,7 +530,7 @@ void cgit_print_tree(const char *rev, char *path)
} else if (walk.state == WALK_BLOB_SHOWN)
cgit_print_layout_end();
else if (walk.state == WALK_LOOKING)
- cgit_print_error_page(404, "Not found", "Path not found");
+ cgit_print_error_page(404, "Not Found", "Path not found");
// WALK_ERROR_SHOWN is left alone, since the error page print_object
// put out is already complete.