Fossil SCM

Enable the extroot: setting in CGI.

drh 2019-07-25 20:20 extension-cgi
Commit c116a9996b8bce11dabed57696742dbcdf74275fb2913430c40b2d2c7ca645de
1 file changed +9
+9
--- src/main.c
+++ src/main.c
@@ -2094,10 +2094,19 @@
20942094
** to FILENAME.
20952095
*/
20962096
g.zErrlog = mprintf("%s", blob_str(&value));
20972097
blob_reset(&value);
20982098
continue;
2099
+ }
2100
+ if( blob_eq(&key, "extroot:") && blob_token(&line, &value) ){
2101
+ /* extroot: DIRECTORY
2102
+ **
2103
+ ** Enables the /ext webpage to use sub-cgi rooted at DIRECTORY
2104
+ */
2105
+ g.zExtRoot = mprintf("%s", blob_str(&value));
2106
+ blob_reset(&value);
2107
+ continue;
20992108
}
21002109
if( blob_eq(&key, "HOME:") && blob_token(&line, &value) ){
21012110
/* HOME: VALUE
21022111
**
21032112
** Set CGI parameter "HOME" to VALUE. This is legacy. Use
21042113
--- src/main.c
+++ src/main.c
@@ -2094,10 +2094,19 @@
2094 ** to FILENAME.
2095 */
2096 g.zErrlog = mprintf("%s", blob_str(&value));
2097 blob_reset(&value);
2098 continue;
 
 
 
 
 
 
 
 
 
2099 }
2100 if( blob_eq(&key, "HOME:") && blob_token(&line, &value) ){
2101 /* HOME: VALUE
2102 **
2103 ** Set CGI parameter "HOME" to VALUE. This is legacy. Use
2104
--- src/main.c
+++ src/main.c
@@ -2094,10 +2094,19 @@
2094 ** to FILENAME.
2095 */
2096 g.zErrlog = mprintf("%s", blob_str(&value));
2097 blob_reset(&value);
2098 continue;
2099 }
2100 if( blob_eq(&key, "extroot:") && blob_token(&line, &value) ){
2101 /* extroot: DIRECTORY
2102 **
2103 ** Enables the /ext webpage to use sub-cgi rooted at DIRECTORY
2104 */
2105 g.zExtRoot = mprintf("%s", blob_str(&value));
2106 blob_reset(&value);
2107 continue;
2108 }
2109 if( blob_eq(&key, "HOME:") && blob_token(&line, &value) ){
2110 /* HOME: VALUE
2111 **
2112 ** Set CGI parameter "HOME" to VALUE. This is legacy. Use
2113

Keyboard Shortcuts

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