Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Use the SCRIPT_NAME environment variable rather than REQUEST_URI to find the base name of the CGI script. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
c23469468bc6a8a47bb33bb94e61dcaa |
| User & Date: | drh 2008-05-13 00:19:15.000 |
Context
|
2008-05-13
| ||
| 13:20 | Make attempts to add _FOSSIL_, manifest, and manifest.uuid warnings, not fatal errors. This allows users to say things like "fossil add *" when initially populating a new project repository. ... (check-in: 844718abbf user: drh tags: trunk) | |
| 00:19 | Use the SCRIPT_NAME environment variable rather than REQUEST_URI to find the base name of the CGI script. ... (check-in: c23469468b user: drh tags: trunk) | |
|
2008-05-10
| ||
| 18:19 | Add the -nosync option to the "open" command. We might consider making -nosync the default for "open". ... (check-in: ec82a32b80 user: drh tags: trunk) | |
Changes
Changes to src/main.c.
| ︙ | ︙ | |||
425 426 427 428 429 430 431 |
** the fossil tree. Set g.zHomeURL to g.zBaseURL without the
** leading "http://" and the host and port.
*/
void set_base_url(void){
int i;
const char *zHost = PD("HTTP_HOST","");
const char *zMode = PD("HTTPS","off");
| | < < < < < < < | | < < < < | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
** the fossil tree. Set g.zHomeURL to g.zBaseURL without the
** leading "http://" and the host and port.
*/
void set_base_url(void){
int i;
const char *zHost = PD("HTTP_HOST","");
const char *zMode = PD("HTTPS","off");
const char *zCur = PD("SCRIPT_NAME","/");
i = strlen(zCur);
while( i>0 && zCur[i-1]=='/' ) i--;
if( strcmp(zMode,"on")==0 ){
g.zBaseURL = mprintf("https://%s%.*s", zHost, i, zCur);
g.zTop = &g.zBaseURL[8+strlen(zHost)];
}else{
g.zBaseURL = mprintf("http://%s%.*s", zHost, i, zCur);
g.zTop = &g.zBaseURL[7+strlen(zHost)];
}
|
| ︙ | ︙ |