Fossil SCM

Avoid duplicate "/" in the redirect from the /home webpage.

drh 2010-09-29 16:58 trunk
Commit cabf810b0b45ef9c0e38162d0499c27084f34189
1 file changed +1
+1
--- src/wiki.c
+++ src/wiki.c
@@ -89,10 +89,11 @@
8989
if( zIndexPage ){
9090
const char *zPathInfo = P("PATH_INFO");
9191
if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
9292
}
9393
if( zIndexPage ){
94
+ while( zIndexPage[0]=='/' ) zIndexPage++;
9495
cgi_redirectf("%s/%s", g.zBaseURL, zIndexPage);
9596
}
9697
if( zPageName ){
9798
login_check_credentials();
9899
g.zExtra = zPageName;
99100
--- src/wiki.c
+++ src/wiki.c
@@ -89,10 +89,11 @@
89 if( zIndexPage ){
90 const char *zPathInfo = P("PATH_INFO");
91 if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
92 }
93 if( zIndexPage ){
 
94 cgi_redirectf("%s/%s", g.zBaseURL, zIndexPage);
95 }
96 if( zPageName ){
97 login_check_credentials();
98 g.zExtra = zPageName;
99
--- src/wiki.c
+++ src/wiki.c
@@ -89,10 +89,11 @@
89 if( zIndexPage ){
90 const char *zPathInfo = P("PATH_INFO");
91 if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
92 }
93 if( zIndexPage ){
94 while( zIndexPage[0]=='/' ) zIndexPage++;
95 cgi_redirectf("%s/%s", g.zBaseURL, zIndexPage);
96 }
97 if( zPageName ){
98 login_check_credentials();
99 g.zExtra = zPageName;
100

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button