Fossil SCM
Improved documentation for the "fossil cgi" command.
Commit
66d003805153abdc0104a66d7c86f5044c4a1395
Parent
b78a32f43d5d043…
1 file changed
+56
-9
+56
-9
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2023,24 +2023,71 @@ | ||
| 2023 | 2023 | } |
| 2024 | 2024 | |
| 2025 | 2025 | /* |
| 2026 | 2026 | ** COMMAND: cgi* |
| 2027 | 2027 | ** |
| 2028 | -** Usage: %fossil ?cgi? SCRIPT | |
| 2028 | +** Usage: %fossil ?cgi? FILE | |
| 2029 | +** | |
| 2030 | +** This command causes Fossil to generate reply to a CGI request. | |
| 2029 | 2031 | ** |
| 2030 | -** The SCRIPT argument is the name of a file that is the CGI script | |
| 2031 | -** that is being run. The command name, "cgi", may be omitted if | |
| 2032 | -** the GATEWAY_INTERFACE environment variable is set to "CGI" (which | |
| 2033 | -** should always be the case for CGI scripts run by a webserver.) The | |
| 2034 | -** SCRIPT file should look something like this: | |
| 2032 | +** The FILE argument is the name of a control file that provides Fossil | |
| 2033 | +** with important information such as where to find its repository. In | |
| 2034 | +** a typical CGI deployment, FILE is the name of the CGI script and will | |
| 2035 | +** typically look something like this: | |
| 2035 | 2036 | ** |
| 2036 | 2037 | ** #!/usr/bin/fossil |
| 2037 | 2038 | ** repository: /home/somebody/project.db |
| 2038 | 2039 | ** |
| 2039 | -** The second line defines the name of the repository. After locating | |
| 2040 | -** the repository, fossil will generate a webpage on stdout based on | |
| 2041 | -** the values of standard CGI environment variables. | |
| 2040 | +** The command name, "cgi", may be omitted if the GATEWAY_INTERFACE | |
| 2041 | +** environment variable is set to "CGI", which should always be the | |
| 2042 | +** case for CGI scripts run by a webserver. Fossil ignores any lines | |
| 2043 | +** that begin with "#". | |
| 2044 | +** | |
| 2045 | +** The following control lines are recognized: | |
| 2046 | +** | |
| 2047 | +** repository: PATH Name of the Fossil repository | |
| 2048 | +** | |
| 2049 | +** directory: PATH Name of a directory containing many Fossil | |
| 2050 | +** repositories whose names all end with ".fossil". | |
| 2051 | +** There should only be one of "repository:" | |
| 2052 | +** or "directory:" | |
| 2053 | +** | |
| 2054 | +** notfound: URL When in "directory:" mode, redirect to | |
| 2055 | +** URL if no suitable repository is found. | |
| 2056 | +** | |
| 2057 | +** localauth Grant administrator privileges to connections | |
| 2058 | +** from 127.0.0.1 or ::1. | |
| 2059 | +** | |
| 2060 | +** skin: LABEL Use the built-in skin called LABEL rather than | |
| 2061 | +** the default. If there are no skins called LABEL | |
| 2062 | +** then this line is a no-op. | |
| 2063 | +** | |
| 2064 | +** files: GLOBLIST GLOBLIST is a comma-separated list of GLOB | |
| 2065 | +** patterns that specify files that can be | |
| 2066 | +** returned verbatim. This feature allows Fossil | |
| 2067 | +** to act as a web server returning static | |
| 2068 | +** content. | |
| 2069 | +** | |
| 2070 | +** setenv: NAME VALUE Set environment variable NAME to VALUE. Or | |
| 2071 | +** if VALUE is omitted, unset NAME. | |
| 2072 | +** | |
| 2073 | +** HOME: PATH Shorthand for "setenv: HOME PATH" | |
| 2074 | +** | |
| 2075 | +** debug: FILE Causing debugging information to be written | |
| 2076 | +** into FILE. | |
| 2077 | +** | |
| 2078 | +** errorlog: FILE Warnings, errors, and panics written to FILE. | |
| 2079 | +** | |
| 2080 | +** redirect: REPO URL Extract the "name" query parameter and search | |
| 2081 | +** REPO for a check-in or ticket that matches the | |
| 2082 | +** value of "name", then redirect to URL. There | |
| 2083 | +** can be multiple "redirect:" lines that are | |
| 2084 | +** processed in order. If the REPO is "*", then | |
| 2085 | +** an unconditional redirect to URL is taken. | |
| 2086 | +** | |
| 2087 | +** Most CGI files contain only a "repository:" line. It is uncommon to | |
| 2088 | +** use any other option. | |
| 2042 | 2089 | ** |
| 2043 | 2090 | ** See also: http, server, winsrv |
| 2044 | 2091 | */ |
| 2045 | 2092 | void cmd_cgi(void){ |
| 2046 | 2093 | const char *zFile; |
| 2047 | 2094 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2023,24 +2023,71 @@ | |
| 2023 | } |
| 2024 | |
| 2025 | /* |
| 2026 | ** COMMAND: cgi* |
| 2027 | ** |
| 2028 | ** Usage: %fossil ?cgi? SCRIPT |
| 2029 | ** |
| 2030 | ** The SCRIPT argument is the name of a file that is the CGI script |
| 2031 | ** that is being run. The command name, "cgi", may be omitted if |
| 2032 | ** the GATEWAY_INTERFACE environment variable is set to "CGI" (which |
| 2033 | ** should always be the case for CGI scripts run by a webserver.) The |
| 2034 | ** SCRIPT file should look something like this: |
| 2035 | ** |
| 2036 | ** #!/usr/bin/fossil |
| 2037 | ** repository: /home/somebody/project.db |
| 2038 | ** |
| 2039 | ** The second line defines the name of the repository. After locating |
| 2040 | ** the repository, fossil will generate a webpage on stdout based on |
| 2041 | ** the values of standard CGI environment variables. |
| 2042 | ** |
| 2043 | ** See also: http, server, winsrv |
| 2044 | */ |
| 2045 | void cmd_cgi(void){ |
| 2046 | const char *zFile; |
| 2047 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2023,24 +2023,71 @@ | |
| 2023 | } |
| 2024 | |
| 2025 | /* |
| 2026 | ** COMMAND: cgi* |
| 2027 | ** |
| 2028 | ** Usage: %fossil ?cgi? FILE |
| 2029 | ** |
| 2030 | ** This command causes Fossil to generate reply to a CGI request. |
| 2031 | ** |
| 2032 | ** The FILE argument is the name of a control file that provides Fossil |
| 2033 | ** with important information such as where to find its repository. In |
| 2034 | ** a typical CGI deployment, FILE is the name of the CGI script and will |
| 2035 | ** typically look something like this: |
| 2036 | ** |
| 2037 | ** #!/usr/bin/fossil |
| 2038 | ** repository: /home/somebody/project.db |
| 2039 | ** |
| 2040 | ** The command name, "cgi", may be omitted if the GATEWAY_INTERFACE |
| 2041 | ** environment variable is set to "CGI", which should always be the |
| 2042 | ** case for CGI scripts run by a webserver. Fossil ignores any lines |
| 2043 | ** that begin with "#". |
| 2044 | ** |
| 2045 | ** The following control lines are recognized: |
| 2046 | ** |
| 2047 | ** repository: PATH Name of the Fossil repository |
| 2048 | ** |
| 2049 | ** directory: PATH Name of a directory containing many Fossil |
| 2050 | ** repositories whose names all end with ".fossil". |
| 2051 | ** There should only be one of "repository:" |
| 2052 | ** or "directory:" |
| 2053 | ** |
| 2054 | ** notfound: URL When in "directory:" mode, redirect to |
| 2055 | ** URL if no suitable repository is found. |
| 2056 | ** |
| 2057 | ** localauth Grant administrator privileges to connections |
| 2058 | ** from 127.0.0.1 or ::1. |
| 2059 | ** |
| 2060 | ** skin: LABEL Use the built-in skin called LABEL rather than |
| 2061 | ** the default. If there are no skins called LABEL |
| 2062 | ** then this line is a no-op. |
| 2063 | ** |
| 2064 | ** files: GLOBLIST GLOBLIST is a comma-separated list of GLOB |
| 2065 | ** patterns that specify files that can be |
| 2066 | ** returned verbatim. This feature allows Fossil |
| 2067 | ** to act as a web server returning static |
| 2068 | ** content. |
| 2069 | ** |
| 2070 | ** setenv: NAME VALUE Set environment variable NAME to VALUE. Or |
| 2071 | ** if VALUE is omitted, unset NAME. |
| 2072 | ** |
| 2073 | ** HOME: PATH Shorthand for "setenv: HOME PATH" |
| 2074 | ** |
| 2075 | ** debug: FILE Causing debugging information to be written |
| 2076 | ** into FILE. |
| 2077 | ** |
| 2078 | ** errorlog: FILE Warnings, errors, and panics written to FILE. |
| 2079 | ** |
| 2080 | ** redirect: REPO URL Extract the "name" query parameter and search |
| 2081 | ** REPO for a check-in or ticket that matches the |
| 2082 | ** value of "name", then redirect to URL. There |
| 2083 | ** can be multiple "redirect:" lines that are |
| 2084 | ** processed in order. If the REPO is "*", then |
| 2085 | ** an unconditional redirect to URL is taken. |
| 2086 | ** |
| 2087 | ** Most CGI files contain only a "repository:" line. It is uncommon to |
| 2088 | ** use any other option. |
| 2089 | ** |
| 2090 | ** See also: http, server, winsrv |
| 2091 | */ |
| 2092 | void cmd_cgi(void){ |
| 2093 | const char *zFile; |
| 2094 |