Fossil

Check-in [72df287c]
Login

Check-in [72df287c]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:For the "setenv:" line of CGI scripts, if the VALUE field is omitted, unset the variable.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 72df287cf3556a04a8321e578485184ad75964cf
User & Date: drh 2016-06-11 20:13:22
Context
2016-06-13
08:29
Fix handling of byte sequence \xF4\x00 in utf-8 validation. Now all tests pass again. Thanks to Scott Robison for discovering this! ... (check-in: 5684672a user: jan.nijtmans tags: trunk)
2016-06-11
20:13
For the "setenv:" line of CGI scripts, if the VALUE field is omitted, unset the variable. ... (check-in: 72df287c user: drh tags: trunk)
10:58
Fix harmless typo in a comment. ... (check-in: 0e9a144b user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

2139
2140
2141
2142
2143
2144
2145
2146
2147
2148

2149
2150

2151

2152
2153
2154
2155
2156
2157
2158
      ** found it is returned verbatim.  This feature allows "fossil server"
      ** to function as a primitive web-server delivering arbitrary content.
      */
      pFileGlob = glob_create(blob_str(&value));
      blob_reset(&value);
      continue;
    }
    if( blob_eq(&key, "setenv:") && blob_token(&line, &value)
            && blob_token(&line, &value2) ){
      /* setenv: NAME VALUE

      **
      ** Sets environment variable NAME to VALUE

      */

      fossil_setenv(blob_str(&value), blob_str(&value2));
      blob_reset(&value);
      blob_reset(&value2);
      continue;
    }
    if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
      /* debug: FILENAME







|
<

>

|
>

>







2139
2140
2141
2142
2143
2144
2145
2146

2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
      ** found it is returned verbatim.  This feature allows "fossil server"
      ** to function as a primitive web-server delivering arbitrary content.
      */
      pFileGlob = glob_create(blob_str(&value));
      blob_reset(&value);
      continue;
    }
    if( blob_eq(&key, "setenv:") && blob_token(&line, &value) ){

      /* setenv: NAME VALUE
      ** setenv: NAME
      **
      ** Sets environment variable NAME to VALUE.  If VALUE is omitted, then
      ** the environment variable is unset.
      */
      blob_token(&line,&value2);
      fossil_setenv(blob_str(&value), blob_str(&value2));
      blob_reset(&value);
      blob_reset(&value2);
      continue;
    }
    if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
      /* debug: FILENAME