author | Lars Hjemli <hjemli@gmail.com> | 2008-08-09 19:11:41 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-09-15 21:00:30 (UTC) |
commit | e154edd8078020d6eba41b448afade0a68617f35 (patch) (unidiff) | |
tree | 9fdde0c3944e327ed2694464a4c6808373ee09b7 /cgit.h | |
parent | a30453a5d3f6db4d6e055da2112343e054e7e7d5 (diff) | |
download | cgit-e154edd8078020d6eba41b448afade0a68617f35.zip cgit-e154edd8078020d6eba41b448afade0a68617f35.tar.gz cgit-e154edd8078020d6eba41b448afade0a68617f35.tar.bz2 |
Teach cgit how to use PATH_INFO
This commit makes cgit use the cgi variables SCRIPT_NAME and PATH_INFO
when virtual-root is unspecified in cgitrc and no url-parameter is
specified on the querystring. This has two nice effects:
* Virtual urls works out of the box, no more need for rewrite-rules in httpd.
* Virtual urls with special querystring characters are handled correctly.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -97,48 +97,49 @@ struct refinfo { | |||
97 | struct commitinfo *commit; | 97 | struct commitinfo *commit; |
98 | }; | 98 | }; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | struct reflist { | 101 | struct reflist { |
102 | struct refinfo **refs; | 102 | struct refinfo **refs; |
103 | int alloc; | 103 | int alloc; |
104 | int count; | 104 | int count; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | struct cgit_query { | 107 | struct cgit_query { |
108 | int has_symref; | 108 | int has_symref; |
109 | int has_sha1; | 109 | int has_sha1; |
110 | char *raw; | 110 | char *raw; |
111 | char *repo; | 111 | char *repo; |
112 | char *page; | 112 | char *page; |
113 | char *search; | 113 | char *search; |
114 | char *grep; | 114 | char *grep; |
115 | char *head; | 115 | char *head; |
116 | char *sha1; | 116 | char *sha1; |
117 | char *sha2; | 117 | char *sha2; |
118 | char *path; | 118 | char *path; |
119 | char *name; | 119 | char *name; |
120 | char *mimetype; | 120 | char *mimetype; |
121 | char *url; | ||
121 | int ofs; | 122 | int ofs; |
122 | }; | 123 | }; |
123 | 124 | ||
124 | struct cgit_config { | 125 | struct cgit_config { |
125 | char *agefile; | 126 | char *agefile; |
126 | char *cache_root; | 127 | char *cache_root; |
127 | char *clone_prefix; | 128 | char *clone_prefix; |
128 | char *css; | 129 | char *css; |
129 | char *favicon; | 130 | char *favicon; |
130 | char *footer; | 131 | char *footer; |
131 | char *index_header; | 132 | char *index_header; |
132 | char *index_info; | 133 | char *index_info; |
133 | char *logo; | 134 | char *logo; |
134 | char *logo_link; | 135 | char *logo_link; |
135 | char *module_link; | 136 | char *module_link; |
136 | char *repo_group; | 137 | char *repo_group; |
137 | char *robots; | 138 | char *robots; |
138 | char *root_title; | 139 | char *root_title; |
139 | char *root_desc; | 140 | char *root_desc; |
140 | char *root_readme; | 141 | char *root_readme; |
141 | char *script_name; | 142 | char *script_name; |
142 | char *virtual_root; | 143 | char *virtual_root; |
143 | int cache_size; | 144 | int cache_size; |
144 | int cache_dynamic_ttl; | 145 | int cache_dynamic_ttl; |