Hi all: (I didn't see this show up in the list archives, so I am resending this. Sorry if it's a duplicate.)
If I run: fossil server -P 8081 -files '*.html' --repolist \ --notfound index.html ~/fossil_repos/ and I try to access http://host:8081/ I get a redirect to index.html rather than getting a list of repositories. The following patch checks to see if the url is / before trying to redirect to the url specified by notfound and is just an inversion of the two existing checks. The attached patch was tested with: server: fossil server -P 8081 -files '*.html' --repolist \ --notfound index.html ~/fossil_repos/ urls: http://host:8081/ returns with repolist http://host:8081/foo (non-existent) redirects to index.html server: fossil server -P 8081 -files '*.html' \ --notfound index.html ~/fossil_repos/ url: http://host:8081/ redirects to index.html Given how trivial this patch is, I release this patch into the public domain to be used as needed. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions.
Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -1563,16 +1563,16 @@ zRepo[j] = '.'; } if( szFile<1024 ){ set_base_url(0); - if( zNotFound ){ - cgi_redirect(zNotFound); - }else if( strcmp(zPathInfo,"/")==0 + if( strcmp(zPathInfo,"/")==0 && allowRepoList && repo_list_page() ){ /* Will return a list of repositories */ + }else if( zNotFound ){ + cgi_redirect(zNotFound); }else{ #ifdef FOSSIL_ENABLE_JSON if(g.json.isJsonMode){ json_err(FSL_JSON_E_RESOURCE_NOT_FOUND,NULL,1); return;
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users