summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorLars Hjemli <hjemli@gmail.com>2009-06-07 18:43:08 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-06-07 18:43:08 (UTC)
commite429fb0cca1e8c78da0ec38fe578bafdeec65534 (patch) (unidiff)
tree58c172f939509879045192fb8f1ba1d79160e67f /cgit.h
parent45e7fcecc1117440e6274ce3c6ab7d893c4986ee (diff)
downloadcgit-e429fb0cca1e8c78da0ec38fe578bafdeec65534.zip
cgit-e429fb0cca1e8c78da0ec38fe578bafdeec65534.tar.gz
cgit-e429fb0cca1e8c78da0ec38fe578bafdeec65534.tar.bz2
Return http statuscode 404 on unknown branch
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 5f7af51..00aca4c 100644
--- a/cgit.h
+++ b/cgit.h
@@ -136,96 +136,98 @@ struct cgit_config {
136 char *css; 136 char *css;
137 char *favicon; 137 char *favicon;
138 char *footer; 138 char *footer;
139 char *header; 139 char *header;
140 char *index_header; 140 char *index_header;
141 char *index_info; 141 char *index_info;
142 char *logo; 142 char *logo;
143 char *logo_link; 143 char *logo_link;
144 char *module_link; 144 char *module_link;
145 char *repo_group; 145 char *repo_group;
146 char *robots; 146 char *robots;
147 char *root_title; 147 char *root_title;
148 char *root_desc; 148 char *root_desc;
149 char *root_readme; 149 char *root_readme;
150 char *script_name; 150 char *script_name;
151 char *virtual_root; 151 char *virtual_root;
152 int cache_size; 152 int cache_size;
153 int cache_dynamic_ttl; 153 int cache_dynamic_ttl;
154 int cache_max_create_time; 154 int cache_max_create_time;
155 int cache_repo_ttl; 155 int cache_repo_ttl;
156 int cache_root_ttl; 156 int cache_root_ttl;
157 int cache_static_ttl; 157 int cache_static_ttl;
158 int enable_index_links; 158 int enable_index_links;
159 int enable_log_filecount; 159 int enable_log_filecount;
160 int enable_log_linecount; 160 int enable_log_linecount;
161 int local_time; 161 int local_time;
162 int max_repo_count; 162 int max_repo_count;
163 int max_commit_count; 163 int max_commit_count;
164 int max_lock_attempts; 164 int max_lock_attempts;
165 int max_msg_len; 165 int max_msg_len;
166 int max_repodesc_len; 166 int max_repodesc_len;
167 int max_stats; 167 int max_stats;
168 int nocache; 168 int nocache;
169 int renamelimit; 169 int renamelimit;
170 int snapshots; 170 int snapshots;
171 int summary_branches; 171 int summary_branches;
172 int summary_log; 172 int summary_log;
173 int summary_tags; 173 int summary_tags;
174}; 174};
175 175
176struct cgit_page { 176struct cgit_page {
177 time_t modified; 177 time_t modified;
178 time_t expires; 178 time_t expires;
179 size_t size; 179 size_t size;
180 char *mimetype; 180 char *mimetype;
181 char *charset; 181 char *charset;
182 char *filename; 182 char *filename;
183 char *title; 183 char *title;
184 int status;
185 char *statusmsg;
184}; 186};
185 187
186struct cgit_context { 188struct cgit_context {
187 struct cgit_query qry; 189 struct cgit_query qry;
188 struct cgit_config cfg; 190 struct cgit_config cfg;
189 struct cgit_repo *repo; 191 struct cgit_repo *repo;
190 struct cgit_page page; 192 struct cgit_page page;
191}; 193};
192 194
193struct cgit_snapshot_format { 195struct cgit_snapshot_format {
194 const char *suffix; 196 const char *suffix;
195 const char *mimetype; 197 const char *mimetype;
196 write_archive_fn_t write_func; 198 write_archive_fn_t write_func;
197 int bit; 199 int bit;
198}; 200};
199 201
200extern const char *cgit_version; 202extern const char *cgit_version;
201 203
202extern struct cgit_repolist cgit_repolist; 204extern struct cgit_repolist cgit_repolist;
203extern struct cgit_context ctx; 205extern struct cgit_context ctx;
204extern const struct cgit_snapshot_format cgit_snapshot_formats[]; 206extern const struct cgit_snapshot_format cgit_snapshot_formats[];
205 207
206extern struct cgit_repo *cgit_add_repo(const char *url); 208extern struct cgit_repo *cgit_add_repo(const char *url);
207extern struct cgit_repo *cgit_get_repoinfo(const char *url); 209extern struct cgit_repo *cgit_get_repoinfo(const char *url);
208extern void cgit_repo_config_cb(const char *name, const char *value); 210extern void cgit_repo_config_cb(const char *name, const char *value);
209 211
210extern int chk_zero(int result, char *msg); 212extern int chk_zero(int result, char *msg);
211extern int chk_positive(int result, char *msg); 213extern int chk_positive(int result, char *msg);
212extern int chk_non_negative(int result, char *msg); 214extern int chk_non_negative(int result, char *msg);
213 215
214extern char *trim_end(const char *str, char c); 216extern char *trim_end(const char *str, char c);
215extern char *strlpart(char *txt, int maxlen); 217extern char *strlpart(char *txt, int maxlen);
216extern char *strrpart(char *txt, int maxlen); 218extern char *strrpart(char *txt, int maxlen);
217 219
218extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); 220extern void cgit_add_ref(struct reflist *list, struct refinfo *ref);
219extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, 221extern int cgit_refs_cb(const char *refname, const unsigned char *sha1,
220 int flags, void *cb_data); 222 int flags, void *cb_data);
221 223
222extern void *cgit_free_commitinfo(struct commitinfo *info); 224extern void *cgit_free_commitinfo(struct commitinfo *info);
223 225
224extern int cgit_diff_files(const unsigned char *old_sha1, 226extern int cgit_diff_files(const unsigned char *old_sha1,
225 const unsigned char *new_sha1, 227 const unsigned char *new_sha1,
226 unsigned long *old_size, unsigned long *new_size, 228 unsigned long *old_size, unsigned long *new_size,
227 int *binary, linediff_fn fn); 229 int *binary, linediff_fn fn);
228 230
229extern void cgit_diff_tree(const unsigned char *old_sha1, 231extern void cgit_diff_tree(const unsigned char *old_sha1,
230 const unsigned char *new_sha1, 232 const unsigned char *new_sha1,
231 filepair_fn fn, const char *prefix); 233 filepair_fn fn, const char *prefix);