Fossil SCM

Do not assume that the PATH_INFO environment variable is set by CGI. Give it a default value to avoid segfaults (on Solaris).

drh 2011-02-21 13:17 trunk
Commit 88383d8d4ac1dd71f953f1305f3d395c8c9583da
1 file changed +1 -1
+1 -1
--- src/main.c
+++ src/main.c
@@ -883,11 +883,11 @@
883883
int i;
884884
885885
/* If the repository has not been opened already, then find the
886886
** repository based on the first element of PATH_INFO and open it.
887887
*/
888
- zPathInfo = P("PATH_INFO");
888
+ zPathInfo = PD("PATH_INFO","");
889889
if( !g.repositoryOpen ){
890890
char *zRepo;
891891
const char *zOldScript = PD("SCRIPT_NAME", "");
892892
char *zNewScript;
893893
int j, k;
894894
--- src/main.c
+++ src/main.c
@@ -883,11 +883,11 @@
883 int i;
884
885 /* If the repository has not been opened already, then find the
886 ** repository based on the first element of PATH_INFO and open it.
887 */
888 zPathInfo = P("PATH_INFO");
889 if( !g.repositoryOpen ){
890 char *zRepo;
891 const char *zOldScript = PD("SCRIPT_NAME", "");
892 char *zNewScript;
893 int j, k;
894
--- src/main.c
+++ src/main.c
@@ -883,11 +883,11 @@
883 int i;
884
885 /* If the repository has not been opened already, then find the
886 ** repository based on the first element of PATH_INFO and open it.
887 */
888 zPathInfo = PD("PATH_INFO","");
889 if( !g.repositoryOpen ){
890 char *zRepo;
891 const char *zOldScript = PD("SCRIPT_NAME", "");
892 char *zNewScript;
893 int j, k;
894

Keyboard Shortcuts

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