Fossil SCM
Fix the repolist function for CGI server invocations, apparently broken by check-in [ec56c69fe98d26d9]
Commit
534b060007692cc87a8c3e14d7d048b51c1b098e16c5127dc6d68b53aec2b44d
Parent
f4f9c1090b84383…
2 files changed
+1
-1
+2
-2
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1580,11 +1580,11 @@ | ||
| 1580 | 1580 | ** repository to be used, or else no repository could be found an |
| 1581 | 1581 | ** some kind of error response is required. |
| 1582 | 1582 | */ |
| 1583 | 1583 | if( szFile<1024 ){ |
| 1584 | 1584 | set_base_url(0); |
| 1585 | - if( strcmp(zPathInfo,"/")==0 | |
| 1585 | + if( (zPathInfo[0]==0 || strcmp(zPathInfo,"/")==0) | |
| 1586 | 1586 | && allowRepoList |
| 1587 | 1587 | && repo_list_page() ){ |
| 1588 | 1588 | /* Will return a list of repositories */ |
| 1589 | 1589 | }else if( zNotFound ){ |
| 1590 | 1590 | cgi_redirect(zNotFound); |
| 1591 | 1591 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1580,11 +1580,11 @@ | |
| 1580 | ** repository to be used, or else no repository could be found an |
| 1581 | ** some kind of error response is required. |
| 1582 | */ |
| 1583 | if( szFile<1024 ){ |
| 1584 | set_base_url(0); |
| 1585 | if( strcmp(zPathInfo,"/")==0 |
| 1586 | && allowRepoList |
| 1587 | && repo_list_page() ){ |
| 1588 | /* Will return a list of repositories */ |
| 1589 | }else if( zNotFound ){ |
| 1590 | cgi_redirect(zNotFound); |
| 1591 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1580,11 +1580,11 @@ | |
| 1580 | ** repository to be used, or else no repository could be found an |
| 1581 | ** some kind of error response is required. |
| 1582 | */ |
| 1583 | if( szFile<1024 ){ |
| 1584 | set_base_url(0); |
| 1585 | if( (zPathInfo[0]==0 || strcmp(zPathInfo,"/")==0) |
| 1586 | && allowRepoList |
| 1587 | && repo_list_page() ){ |
| 1588 | /* Will return a list of repositories */ |
| 1589 | }else if( zNotFound ){ |
| 1590 | cgi_redirect(zNotFound); |
| 1591 |
+2
-2
| --- src/repolist.c | ||
| +++ src/repolist.c | ||
| @@ -206,15 +206,15 @@ | ||
| 206 | 206 | } else if( sqlite3_strglob("*/.*", zName)==0 ){ |
| 207 | 207 | /* Do not show hyperlinks for hidden repos */ |
| 208 | 208 | blob_append_sql(&html, "%h (hidden)", zName); |
| 209 | 209 | } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){ |
| 210 | 210 | blob_append_sql(&html, |
| 211 | - "<a href='/%T/home' target='_blank'>/%h</a>\n", | |
| 211 | + "<a href='%R/%T/home' target='_blank'>/%h</a>\n", | |
| 212 | 212 | zUrl, zName); |
| 213 | 213 | }else{ |
| 214 | 214 | blob_append_sql(&html, |
| 215 | - "<a href='/%T/home' target='_blank'>%h</a>\n", | |
| 215 | + "<a href='%R/%T/home' target='_blank'>%h</a>\n", | |
| 216 | 216 | zUrl, zName); |
| 217 | 217 | } |
| 218 | 218 | if( x.zProjName ){ |
| 219 | 219 | blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName); |
| 220 | 220 | fossil_free(x.zProjName); |
| 221 | 221 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -206,15 +206,15 @@ | |
| 206 | } else if( sqlite3_strglob("*/.*", zName)==0 ){ |
| 207 | /* Do not show hyperlinks for hidden repos */ |
| 208 | blob_append_sql(&html, "%h (hidden)", zName); |
| 209 | } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){ |
| 210 | blob_append_sql(&html, |
| 211 | "<a href='/%T/home' target='_blank'>/%h</a>\n", |
| 212 | zUrl, zName); |
| 213 | }else{ |
| 214 | blob_append_sql(&html, |
| 215 | "<a href='/%T/home' target='_blank'>%h</a>\n", |
| 216 | zUrl, zName); |
| 217 | } |
| 218 | if( x.zProjName ){ |
| 219 | blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName); |
| 220 | fossil_free(x.zProjName); |
| 221 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -206,15 +206,15 @@ | |
| 206 | } else if( sqlite3_strglob("*/.*", zName)==0 ){ |
| 207 | /* Do not show hyperlinks for hidden repos */ |
| 208 | blob_append_sql(&html, "%h (hidden)", zName); |
| 209 | } else if( allRepo && sqlite3_strglob("[a-zA-Z]:/?*", zName)!=0 ){ |
| 210 | blob_append_sql(&html, |
| 211 | "<a href='%R/%T/home' target='_blank'>/%h</a>\n", |
| 212 | zUrl, zName); |
| 213 | }else{ |
| 214 | blob_append_sql(&html, |
| 215 | "<a href='%R/%T/home' target='_blank'>%h</a>\n", |
| 216 | zUrl, zName); |
| 217 | } |
| 218 | if( x.zProjName ){ |
| 219 | blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName); |
| 220 | fossil_free(x.zProjName); |
| 221 |