Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix an incorrect comment in the CGI handler. When parsing the CGI control file, check for "debug:" last, as it is the most infrequent option. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
20dc0099099effe24d2e7bf848603eba |
| User & Date: | drh 2019-12-11 11:59:37.729 |
Context
|
2019-12-11
| ||
| 12:43 | Rename the CGI control file variable "debug:" to "cgi-debug:" and enhance it so that it shows the complete CGI environment at the start of each request. Also add documentation. check-in: 4a7760e368 user: drh tags: trunk | |
| 11:59 | Fix an incorrect comment in the CGI handler. When parsing the CGI control file, check for "debug:" last, as it is the most infrequent option. check-in: 20dc009909 user: drh tags: trunk | |
|
2019-12-10
| ||
| 14:01 | Don't let the new --relayhost option for test-smtp-send become an undocumented feature. check-in: edcde1fdae user: andybradford tags: trunk | |
Changes
Changes to src/main.c.
| ︙ | ︙ | |||
2040 2041 2042 2043 2044 2045 2046 | /* Initialize the CGI environment. */ g.httpOut = stdout; g.httpIn = stdin; fossil_binary_mode(g.httpOut); fossil_binary_mode(g.httpIn); g.cgiOutput = 1; fossil_set_timeout(FOSSIL_DEFAULT_TIMEOUT); | | | 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 |
/* Initialize the CGI environment. */
g.httpOut = stdout;
g.httpIn = stdin;
fossil_binary_mode(g.httpOut);
fossil_binary_mode(g.httpIn);
g.cgiOutput = 1;
fossil_set_timeout(FOSSIL_DEFAULT_TIMEOUT);
/* Find the name of the CGI control file */
if( g.argc==3 && fossil_strcmp(g.argv[1],"cgi")==0 ){
zFile = g.argv[2];
}else if( g.argc>=2 ){
zFile = g.argv[1];
}else{
cgi_panic("No CGI control file specified");
}
|
| ︙ | ︙ | |||
2145 2146 2147 2148 2149 2150 2151 |
*/
blob_token(&line,&value2);
fossil_setenv(blob_str(&value), blob_str(&value2));
blob_reset(&value);
blob_reset(&value2);
continue;
}
| < < < < < < < < < < | 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 |
*/
blob_token(&line,&value2);
fossil_setenv(blob_str(&value), blob_str(&value2));
blob_reset(&value);
blob_reset(&value2);
continue;
}
if( blob_eq(&key, "errorlog:") && blob_token(&line, &value) ){
/* errorlog: FILENAME
**
** Causes messages from warnings, errors, and panics to be appended
** to FILENAME.
*/
g.zErrlog = mprintf("%s", blob_str(&value));
|
| ︙ | ︙ | |||
2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 |
** name of the subdirectory under the skins/ directory that holds
** the elements of the built-in skin. If LABEL does not match,
** this directive is a silent no-op.
*/
skin_use_alternative(blob_str(&value));
blob_reset(&value);
continue;
}
}
blob_reset(&config);
if( g.db==0 && g.zRepositoryName==0 && nRedirect==0 ){
cgi_panic("Unable to find or open the project repository");
}
cgi_init();
| > > > > > > > > > > | 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 |
** name of the subdirectory under the skins/ directory that holds
** the elements of the built-in skin. If LABEL does not match,
** this directive is a silent no-op.
*/
skin_use_alternative(blob_str(&value));
blob_reset(&value);
continue;
}
if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
/* debug: FILENAME
**
** Causes output from cgi_debug() and CGIDEBUG(()) calls to go
** into FILENAME.
*/
g.fDebug = fossil_fopen(blob_str(&value), "ab");
blob_reset(&value);
continue;
}
}
blob_reset(&config);
if( g.db==0 && g.zRepositoryName==0 && nRedirect==0 ){
cgi_panic("Unable to find or open the project repository");
}
cgi_init();
|
| ︙ | ︙ |