Fossil SCM
Additional documentation on CGI configuration options. Updates to the change log. New hyperlinks interconnecting the various documents.
Commit
fbc3b2f72e340f3340e5b4bd2d3d5af2ecfd199d2b69da70283ea478cf953215
Parent
1d7afcdff65e55a…
9 files changed
+12
+56
+7
+1
+1
+4
+1
-1
+8
-4
+26
-7
+12
| --- www/aboutcgi.wiki | ||
| +++ www/aboutcgi.wiki | ||
| @@ -180,10 +180,18 @@ | ||
| 180 | 180 | a repository. The PATH_INFO is shortened by removing |
| 181 | 181 | "subdir/three/" leaving it at just "timeline". |
| 182 | 182 | <li> Fossil looks at the rest of PATH_INFO to see that the webpage |
| 183 | 183 | requested is "timeline". |
| 184 | 184 | </ol> |
| 185 | +</blockquote> | |
| 186 | +<h2>Additional CGI Script Options</h2> | |
| 187 | +<blockquote> | |
| 188 | +<p> | |
| 189 | +The CGI script can have additional options used to fine-tune | |
| 190 | +Fossil's behavior. See the [./cgi.wiki|CGI script documentation] | |
| 191 | +for details. | |
| 192 | +</p> | |
| 185 | 193 | </blockquote> |
| 186 | 194 | <h2>Additional Observations</h2> |
| 187 | 195 | <blockquote><ol type="I"> |
| 188 | 196 | <li><p> |
| 189 | 197 | Fossil does not distinguish between the various HTTP methods (GET, PUT, |
| @@ -208,7 +216,11 @@ | ||
| 208 | 216 | <p> |
| 209 | 217 | SCGI is processed using the same built-in web server, just modified |
| 210 | 218 | to parse SCGI requests instead of HTTP requests. Each SCGI request is |
| 211 | 219 | converted into CGI, then Fossil creates a separate child Fossil |
| 212 | 220 | process to handle each CGI request. |
| 221 | +<li><p> | |
| 222 | +Fossil is itself often launched using CGI. But Fossil can also then | |
| 223 | +turn around and launch [./serverext.wiki|sub-CGI scripts to implement | |
| 224 | +extensions]. | |
| 213 | 225 | </ol> |
| 214 | 226 | </blockquote> |
| 215 | 227 | |
| 216 | 228 | ADDED www/cgi.wiki |
| --- www/aboutcgi.wiki | |
| +++ www/aboutcgi.wiki | |
| @@ -180,10 +180,18 @@ | |
| 180 | a repository. The PATH_INFO is shortened by removing |
| 181 | "subdir/three/" leaving it at just "timeline". |
| 182 | <li> Fossil looks at the rest of PATH_INFO to see that the webpage |
| 183 | requested is "timeline". |
| 184 | </ol> |
| 185 | </blockquote> |
| 186 | <h2>Additional Observations</h2> |
| 187 | <blockquote><ol type="I"> |
| 188 | <li><p> |
| 189 | Fossil does not distinguish between the various HTTP methods (GET, PUT, |
| @@ -208,7 +216,11 @@ | |
| 208 | <p> |
| 209 | SCGI is processed using the same built-in web server, just modified |
| 210 | to parse SCGI requests instead of HTTP requests. Each SCGI request is |
| 211 | converted into CGI, then Fossil creates a separate child Fossil |
| 212 | process to handle each CGI request. |
| 213 | </ol> |
| 214 | </blockquote> |
| 215 | |
| 216 | DDED www/cgi.wiki |
| --- www/aboutcgi.wiki | |
| +++ www/aboutcgi.wiki | |
| @@ -180,10 +180,18 @@ | |
| 180 | a repository. The PATH_INFO is shortened by removing |
| 181 | "subdir/three/" leaving it at just "timeline". |
| 182 | <li> Fossil looks at the rest of PATH_INFO to see that the webpage |
| 183 | requested is "timeline". |
| 184 | </ol> |
| 185 | </blockquote> |
| 186 | <h2>Additional CGI Script Options</h2> |
| 187 | <blockquote> |
| 188 | <p> |
| 189 | The CGI script can have additional options used to fine-tune |
| 190 | Fossil's behavior. See the [./cgi.wiki|CGI script documentation] |
| 191 | for details. |
| 192 | </p> |
| 193 | </blockquote> |
| 194 | <h2>Additional Observations</h2> |
| 195 | <blockquote><ol type="I"> |
| 196 | <li><p> |
| 197 | Fossil does not distinguish between the various HTTP methods (GET, PUT, |
| @@ -208,7 +216,11 @@ | |
| 216 | <p> |
| 217 | SCGI is processed using the same built-in web server, just modified |
| 218 | to parse SCGI requests instead of HTTP requests. Each SCGI request is |
| 219 | converted into CGI, then Fossil creates a separate child Fossil |
| 220 | process to handle each CGI request. |
| 221 | <li><p> |
| 222 | Fossil is itself often launched using CGI. But Fossil can also then |
| 223 | turn around and launch [./serverext.wiki|sub-CGI scripts to implement |
| 224 | extensions]. |
| 225 | </ol> |
| 226 | </blockquote> |
| 227 | |
| 228 | DDED www/cgi.wiki |
+56
| --- a/www/cgi.wiki | ||
| +++ b/www/cgi.wiki | ||
| @@ -0,0 +1,56 @@ | ||
| 1 | +<title>CGI Script Configuration Options</title> | |
| 2 | + | |
| 3 | +<h1>Summary</h1> | |
| 4 | + | |
| 5 | +It is not necessary to have a central server in order to use Fossil. | |
| 6 | +But a central server can help a project run more smoothly by giving developers | |
| 7 | +a common point of rendezvous for syncing, and by providing a web-based | |
| 8 | +portal where developers and non-developers alike can learn about the | |
| 9 | +project and its current state. | |
| 10 | + | |
| 11 | +Setting up a server using .wikiossil is easy. | |
| 12 | +A [./server/|sepafourtalks about all of the. One of those methods, and perhaps the most | |
| 13 | +popular is [./server.wiki#cgi|CGI]. CGI is the technique that the three | |
| 14 | +[./selfhost.wiki|self-hosting Fossil repositories] all use. | |
| 15 | + | |
| 16 | +Setting up a Fossil server using CGI is mostly about writing a short | |
| 17 | +script (usually just 2 lines line) in the cgi-bin folder of an ordinary | |
| 18 | +web-browser. But there are a lot of extra options that can be added | |
| 19 | +to this script, to customize the configuration. This article descripb<title>CGI Script Configuration Opt<title>CGI Script Configuration Options</title> | |
| 20 | + | |
| 21 | +<h1>Summary</h1> | |
| 22 | + | |
| 23 | +It is not necessary to have a central server in order to use Fossil. | |
| 24 | +But a central server can help a project run more smoothly by giving developers | |
| 25 | +a common point of rendezvous for syncing, and by providing a web-based | |
| 26 | +portal where developers and non-developers alike can learn about the | |
| 27 | +project and its current state. | |
| 28 | + | |
| 29 | +Setting up a server using Fossil is easy. | |
| 30 | +A [./server/|separate document] talks about all of the many different methods for | |
| 31 | +setting up a Fossil server, one of which is [./server/any/cgi.md | as a CGI | |
| 32 | +script]. CGI is the technique that the three | |
| 33 | +[./selfhost.wiki|self-hosting Fossil repositories] all use. | |
| 34 | + | |
| 35 | +Setting up a Fossil server using CGI is mostly about writing a short | |
| 36 | +script (usually just 2 lines line) in the cgi-bin folder of an ordinary | |
| 37 | +web-browser. But there are a lot of extra options that can be added | |
| 38 | +to this script, to customize the configuration. This article descripts | |
| 39 | +those options. | |
| 40 | + | |
| 41 | +<h1>CGI Script Options</h1> | |
| 42 | + | |
| 43 | +The CGI script used to launch a Fossil server will usually look something | |
| 44 | +like this: | |
| 45 | + | |
| 46 | +<blockquote><verbatim> | |
| 47 | +#!/usr/bin/fossil | |
| 48 | +repository: /home/www/fossils/myproje?cmd=t.fossil | |
| 49 | +</erbat</blockquotemyproje?cmd=t.fossil | |
| 50 | +</erbatim> | |
| 51 | + | |
| 52 | +Of course, pathnames will likely (the "shebangirst lb<title>CGI Script Configuration Opt<title>CGI Script Configurationlike this: | |
| 53 | + | |
| 54 | +<blockquote><verbatim> | |
| 55 | +#!/usr/bin/fossil | |
| 56 | +repository: /home/www/ |
| --- a/www/cgi.wiki | |
| +++ b/www/cgi.wiki | |
| @@ -0,0 +1,56 @@ | |
| --- a/www/cgi.wiki | |
| +++ b/www/cgi.wiki | |
| @@ -0,0 +1,56 @@ | |
| 1 | <title>CGI Script Configuration Options</title> |
| 2 | |
| 3 | <h1>Summary</h1> |
| 4 | |
| 5 | It is not necessary to have a central server in order to use Fossil. |
| 6 | But a central server can help a project run more smoothly by giving developers |
| 7 | a common point of rendezvous for syncing, and by providing a web-based |
| 8 | portal where developers and non-developers alike can learn about the |
| 9 | project and its current state. |
| 10 | |
| 11 | Setting up a server using .wikiossil is easy. |
| 12 | A [./server/|sepafourtalks about all of the. One of those methods, and perhaps the most |
| 13 | popular is [./server.wiki#cgi|CGI]. CGI is the technique that the three |
| 14 | [./selfhost.wiki|self-hosting Fossil repositories] all use. |
| 15 | |
| 16 | Setting up a Fossil server using CGI is mostly about writing a short |
| 17 | script (usually just 2 lines line) in the cgi-bin folder of an ordinary |
| 18 | web-browser. But there are a lot of extra options that can be added |
| 19 | to this script, to customize the configuration. This article descripb<title>CGI Script Configuration Opt<title>CGI Script Configuration Options</title> |
| 20 | |
| 21 | <h1>Summary</h1> |
| 22 | |
| 23 | It is not necessary to have a central server in order to use Fossil. |
| 24 | But a central server can help a project run more smoothly by giving developers |
| 25 | a common point of rendezvous for syncing, and by providing a web-based |
| 26 | portal where developers and non-developers alike can learn about the |
| 27 | project and its current state. |
| 28 | |
| 29 | Setting up a server using Fossil is easy. |
| 30 | A [./server/|separate document] talks about all of the many different methods for |
| 31 | setting up a Fossil server, one of which is [./server/any/cgi.md | as a CGI |
| 32 | script]. CGI is the technique that the three |
| 33 | [./selfhost.wiki|self-hosting Fossil repositories] all use. |
| 34 | |
| 35 | Setting up a Fossil server using CGI is mostly about writing a short |
| 36 | script (usually just 2 lines line) in the cgi-bin folder of an ordinary |
| 37 | web-browser. But there are a lot of extra options that can be added |
| 38 | to this script, to customize the configuration. This article descripts |
| 39 | those options. |
| 40 | |
| 41 | <h1>CGI Script Options</h1> |
| 42 | |
| 43 | The CGI script used to launch a Fossil server will usually look something |
| 44 | like this: |
| 45 | |
| 46 | <blockquote><verbatim> |
| 47 | #!/usr/bin/fossil |
| 48 | repository: /home/www/fossils/myproje?cmd=t.fossil |
| 49 | </erbat</blockquotemyproje?cmd=t.fossil |
| 50 | </erbatim> |
| 51 | |
| 52 | Of course, pathnames will likely (the "shebangirst lb<title>CGI Script Configuration Opt<title>CGI Script Configurationlike this: |
| 53 | |
| 54 | <blockquote><verbatim> |
| 55 | #!/usr/bin/fossil |
| 56 | repository: /home/www/ |
+7
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -8,11 +8,18 @@ | ||
| 8 | 8 | add style to repository list pages. |
| 9 | 9 | * Enhance the hierarchical display of Forum threads to do less |
| 10 | 10 | indentation and to provide links back to the previous message |
| 11 | 11 | in the thread. Provide sequential numbers for all messages in |
| 12 | 12 | a forum thread. |
| 13 | + * Add support for fenced code blocks and improved hyperlink | |
| 14 | + processing to the [/md_rules|markdown formatter]. | |
| 15 | + * Enhance the [/help?cmd=/stat|/stat] page so that it gives the | |
| 16 | + option to show a breakdown of forum posts. | |
| 13 | 17 | * Change the default [./hashpolicy.wiki|hash policy] to SHA3. |
| 18 | + * Timeout [./server.wiki#cgi|CGI requests] after 300 seconds, or | |
| 19 | + some other value set by the | |
| 20 | + [./cgi.wiki#timeout|"timeout:" property] in the CGI script. | |
| 14 | 21 | * Documentation improvements |
| 15 | 22 | |
| 16 | 23 | <a name='v2_9'></a> |
| 17 | 24 | <h2>Changes for Version 2.9 (2019-07-13)</h2> |
| 18 | 25 | |
| 19 | 26 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -8,11 +8,18 @@ | |
| 8 | add style to repository list pages. |
| 9 | * Enhance the hierarchical display of Forum threads to do less |
| 10 | indentation and to provide links back to the previous message |
| 11 | in the thread. Provide sequential numbers for all messages in |
| 12 | a forum thread. |
| 13 | * Change the default [./hashpolicy.wiki|hash policy] to SHA3. |
| 14 | * Documentation improvements |
| 15 | |
| 16 | <a name='v2_9'></a> |
| 17 | <h2>Changes for Version 2.9 (2019-07-13)</h2> |
| 18 | |
| 19 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -8,11 +8,18 @@ | |
| 8 | add style to repository list pages. |
| 9 | * Enhance the hierarchical display of Forum threads to do less |
| 10 | indentation and to provide links back to the previous message |
| 11 | in the thread. Provide sequential numbers for all messages in |
| 12 | a forum thread. |
| 13 | * Add support for fenced code blocks and improved hyperlink |
| 14 | processing to the [/md_rules|markdown formatter]. |
| 15 | * Enhance the [/help?cmd=/stat|/stat] page so that it gives the |
| 16 | option to show a breakdown of forum posts. |
| 17 | * Change the default [./hashpolicy.wiki|hash policy] to SHA3. |
| 18 | * Timeout [./server.wiki#cgi|CGI requests] after 300 seconds, or |
| 19 | some other value set by the |
| 20 | [./cgi.wiki#timeout|"timeout:" property] in the CGI script. |
| 21 | * Documentation improvements |
| 22 | |
| 23 | <a name='v2_9'></a> |
| 24 | <h2>Changes for Version 2.9 (2019-07-13)</h2> |
| 25 | |
| 26 |
| --- www/mirrortogithub.md | ||
| +++ www/mirrortogithub.md | ||
| @@ -116,10 +116,11 @@ | ||
| 116 | 116 | on tag and branch names in Git. If any of your Fossil tag or branch names |
| 117 | 117 | violate these rules, then the names are translated prior to being exported |
| 118 | 118 | to Git. The translation usually involves converting the offending characters |
| 119 | 119 | into underscores. |
| 120 | 120 | |
| 121 | +<a name='ex1'></a> | |
| 121 | 122 | ## Example GitHub Mirrors |
| 122 | 123 | |
| 123 | 124 | As of this writing (2019-03-16) Fossil’s own repository is mirrored |
| 124 | 125 | on GitHub at: |
| 125 | 126 | |
| 126 | 127 |
| --- www/mirrortogithub.md | |
| +++ www/mirrortogithub.md | |
| @@ -116,10 +116,11 @@ | |
| 116 | on tag and branch names in Git. If any of your Fossil tag or branch names |
| 117 | violate these rules, then the names are translated prior to being exported |
| 118 | to Git. The translation usually involves converting the offending characters |
| 119 | into underscores. |
| 120 | |
| 121 | ## Example GitHub Mirrors |
| 122 | |
| 123 | As of this writing (2019-03-16) Fossil’s own repository is mirrored |
| 124 | on GitHub at: |
| 125 | |
| 126 |
| --- www/mirrortogithub.md | |
| +++ www/mirrortogithub.md | |
| @@ -116,10 +116,11 @@ | |
| 116 | on tag and branch names in Git. If any of your Fossil tag or branch names |
| 117 | violate these rules, then the names are translated prior to being exported |
| 118 | to Git. The translation usually involves converting the offending characters |
| 119 | into underscores. |
| 120 | |
| 121 | <a name='ex1'></a> |
| 122 | ## Example GitHub Mirrors |
| 123 | |
| 124 | As of this writing (2019-03-16) Fossil’s own repository is mirrored |
| 125 | on GitHub at: |
| 126 | |
| 127 |
+1
| --- www/mkindex.tcl | ||
| +++ www/mkindex.tcl | ||
| @@ -18,10 +18,11 @@ | ||
| 18 | 18 | blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
| 19 | 19 | blockchain.md {Fossil As Blockchain} |
| 20 | 20 | branching.wiki {Branching, Forking, Merging, and Tagging} |
| 21 | 21 | bugtheory.wiki {Bug Tracking In Fossil} |
| 22 | 22 | build.wiki {Compiling and Installing Fossil} |
| 23 | + cgi.wiki {CGI Script Configuration Options} | |
| 23 | 24 | changes.wiki {Fossil Changelog} |
| 24 | 25 | checkin_names.wiki {Check-in And Version Names} |
| 25 | 26 | checkin.wiki {Check-in Checklist} |
| 26 | 27 | childprojects.wiki {Child Projects} |
| 27 | 28 | copyright-release.html {Contributor License Agreement} |
| 28 | 29 |
| --- www/mkindex.tcl | |
| +++ www/mkindex.tcl | |
| @@ -18,10 +18,11 @@ | |
| 18 | blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
| 19 | blockchain.md {Fossil As Blockchain} |
| 20 | branching.wiki {Branching, Forking, Merging, and Tagging} |
| 21 | bugtheory.wiki {Bug Tracking In Fossil} |
| 22 | build.wiki {Compiling and Installing Fossil} |
| 23 | changes.wiki {Fossil Changelog} |
| 24 | checkin_names.wiki {Check-in And Version Names} |
| 25 | checkin.wiki {Check-in Checklist} |
| 26 | childprojects.wiki {Child Projects} |
| 27 | copyright-release.html {Contributor License Agreement} |
| 28 |
| --- www/mkindex.tcl | |
| +++ www/mkindex.tcl | |
| @@ -18,10 +18,11 @@ | |
| 18 | blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
| 19 | blockchain.md {Fossil As Blockchain} |
| 20 | branching.wiki {Branching, Forking, Merging, and Tagging} |
| 21 | bugtheory.wiki {Bug Tracking In Fossil} |
| 22 | build.wiki {Compiling and Installing Fossil} |
| 23 | cgi.wiki {CGI Script Configuration Options} |
| 24 | changes.wiki {Fossil Changelog} |
| 25 | checkin_names.wiki {Check-in And Version Names} |
| 26 | checkin.wiki {Check-in Checklist} |
| 27 | childprojects.wiki {Child Projects} |
| 28 | copyright-release.html {Contributor License Agreement} |
| 29 |
| --- www/permutedindex.html | ||
| +++ www/permutedindex.html | ||
| @@ -44,10 +44,11 @@ | ||
| 44 | 44 | <li><a href="private.wiki">Branches — Creating, Syncing, and Deleting Private</a></li> |
| 45 | 45 | <li><a href="branching.wiki"><b>Branching, Forking, Merging, and Tagging</b></a></li> |
| 46 | 46 | <li><a href="bugtheory.wiki"><b>Bug Tracking In Fossil</b></a></li> |
| 47 | 47 | <li><a href="makefile.wiki">Build Process — The Fossil</a></li> |
| 48 | 48 | <li><a href="admin-v-setup.md">Capabilities — The Differences Between the Setup and Admin User</a></li> |
| 49 | +<li><a href="cgi.wiki"><b>CGI Script Configuration Options</b></a></li> | |
| 49 | 50 | <li><a href="serverext.wiki">CGI Scripts — Adding Extensions To A Fossil Server Using</a></li> |
| 50 | 51 | <li><a href="serverext.wiki"><b>CGI Server Extensions</b></a></li> |
| 51 | 52 | <li><a href="aboutcgi.wiki">CGI Works In Fossil — How</a></li> |
| 52 | 53 | <li><a href="changes.wiki">Changelog — Fossil</a></li> |
| 53 | 54 | <li><a href="checkin_names.wiki"><b>Check-in And Version Names</b></a></li> |
| @@ -61,10 +62,11 @@ | ||
| 61 | 62 | <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> |
| 62 | 63 | <li><a href="style.wiki">Code Style Guidelines — Source</a></li> |
| 63 | 64 | <li><a href="../../../help">Commands and Webpages — Lists of</a></li> |
| 64 | 65 | <li><a href="build.wiki"><b>Compiling and Installing Fossil</b></a></li> |
| 65 | 66 | <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> |
| 67 | +<li><a href="cgi.wiki">Configuration Options — CGI Script</a></li> | |
| 66 | 68 | <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> |
| 67 | 69 | <li><a href="shunning.wiki">Content From Fossil — Shunning: Deleting</a></li> |
| 68 | 70 | <li><a href="contribute.wiki"><b>Contributing Code or Documentation To The Fossil Project</b></a></li> |
| 69 | 71 | <li><a href="copyright-release.html"><b>Contributor License Agreement</b></a></li> |
| 70 | 72 | <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> |
| @@ -183,10 +185,11 @@ | ||
| 183 | 185 | <li><a href="newrepo.wiki">New Fossil Repository — How To Create A</a></li> |
| 184 | 186 | <li><a href="tls-nginx.md">nginx — Proxying Fossil via HTTPS with</a></li> |
| 185 | 187 | <li><a href="alerts.md">Notifications — Email Alerts And</a></li> |
| 186 | 188 | <li><a href="foss-cklist.wiki">Open-Source Projects — Checklist For Successful</a></li> |
| 187 | 189 | <li><a href="pop.wiki">Operation — Principles Of</a></li> |
| 190 | +<li><a href="cgi.wiki">Options — CGI Script Configuration</a></li> | |
| 188 | 191 | <li><a href="env-opts.md">Options — Environment Variables and Global</a></li> |
| 189 | 192 | <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil — A Technical</a></li> |
| 190 | 193 | <li><a href="index.wiki">Page — Home</a></li> |
| 191 | 194 | <li><a href="aboutdownload.wiki">Page Works — How The Download</a></li> |
| 192 | 195 | <li><a href="customskin.md">Pages — Theming: Customizing The Appearance of Web</a></li> |
| @@ -220,10 +223,11 @@ | ||
| 220 | 223 | <li><a href="reviews.wiki"><b>Reviews</b></a></li> |
| 221 | 224 | <li><a href="../../../md_rules">Rules — Markdown Formatting</a></li> |
| 222 | 225 | <li><a href="../../../wiki_rules">Rules — Wiki Formatting</a></li> |
| 223 | 226 | <li><a href="fiveminutes.wiki">Running in 5 Minutes as a Single User — Up and</a></li> |
| 224 | 227 | <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General — Quotes: What People Are</a></li> |
| 228 | +<li><a href="cgi.wiki">Script Configuration Options — CGI</a></li> | |
| 225 | 229 | <li><a href="th1.md">Scripting Language — The TH1</a></li> |
| 226 | 230 | <li><a href="serverext.wiki">Scripts — Adding Extensions To A Fossil Server Using CGI</a></li> |
| 227 | 231 | <li><a href="selfcheck.wiki">Self Checks — Fossil Repository Integrity</a></li> |
| 228 | 232 | <li><a href="selfhost.wiki">Self Hosting Repositories — Fossil</a></li> |
| 229 | 233 | <li><a href="server.wiki">Server — How To Configure A Fossil</a></li> |
| 230 | 234 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -44,10 +44,11 @@ | |
| 44 | <li><a href="private.wiki">Branches — Creating, Syncing, and Deleting Private</a></li> |
| 45 | <li><a href="branching.wiki"><b>Branching, Forking, Merging, and Tagging</b></a></li> |
| 46 | <li><a href="bugtheory.wiki"><b>Bug Tracking In Fossil</b></a></li> |
| 47 | <li><a href="makefile.wiki">Build Process — The Fossil</a></li> |
| 48 | <li><a href="admin-v-setup.md">Capabilities — The Differences Between the Setup and Admin User</a></li> |
| 49 | <li><a href="serverext.wiki">CGI Scripts — Adding Extensions To A Fossil Server Using</a></li> |
| 50 | <li><a href="serverext.wiki"><b>CGI Server Extensions</b></a></li> |
| 51 | <li><a href="aboutcgi.wiki">CGI Works In Fossil — How</a></li> |
| 52 | <li><a href="changes.wiki">Changelog — Fossil</a></li> |
| 53 | <li><a href="checkin_names.wiki"><b>Check-in And Version Names</b></a></li> |
| @@ -61,10 +62,11 @@ | |
| 61 | <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> |
| 62 | <li><a href="style.wiki">Code Style Guidelines — Source</a></li> |
| 63 | <li><a href="../../../help">Commands and Webpages — Lists of</a></li> |
| 64 | <li><a href="build.wiki"><b>Compiling and Installing Fossil</b></a></li> |
| 65 | <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> |
| 66 | <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> |
| 67 | <li><a href="shunning.wiki">Content From Fossil — Shunning: Deleting</a></li> |
| 68 | <li><a href="contribute.wiki"><b>Contributing Code or Documentation To The Fossil Project</b></a></li> |
| 69 | <li><a href="copyright-release.html"><b>Contributor License Agreement</b></a></li> |
| 70 | <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> |
| @@ -183,10 +185,11 @@ | |
| 183 | <li><a href="newrepo.wiki">New Fossil Repository — How To Create A</a></li> |
| 184 | <li><a href="tls-nginx.md">nginx — Proxying Fossil via HTTPS with</a></li> |
| 185 | <li><a href="alerts.md">Notifications — Email Alerts And</a></li> |
| 186 | <li><a href="foss-cklist.wiki">Open-Source Projects — Checklist For Successful</a></li> |
| 187 | <li><a href="pop.wiki">Operation — Principles Of</a></li> |
| 188 | <li><a href="env-opts.md">Options — Environment Variables and Global</a></li> |
| 189 | <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil — A Technical</a></li> |
| 190 | <li><a href="index.wiki">Page — Home</a></li> |
| 191 | <li><a href="aboutdownload.wiki">Page Works — How The Download</a></li> |
| 192 | <li><a href="customskin.md">Pages — Theming: Customizing The Appearance of Web</a></li> |
| @@ -220,10 +223,11 @@ | |
| 220 | <li><a href="reviews.wiki"><b>Reviews</b></a></li> |
| 221 | <li><a href="../../../md_rules">Rules — Markdown Formatting</a></li> |
| 222 | <li><a href="../../../wiki_rules">Rules — Wiki Formatting</a></li> |
| 223 | <li><a href="fiveminutes.wiki">Running in 5 Minutes as a Single User — Up and</a></li> |
| 224 | <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General — Quotes: What People Are</a></li> |
| 225 | <li><a href="th1.md">Scripting Language — The TH1</a></li> |
| 226 | <li><a href="serverext.wiki">Scripts — Adding Extensions To A Fossil Server Using CGI</a></li> |
| 227 | <li><a href="selfcheck.wiki">Self Checks — Fossil Repository Integrity</a></li> |
| 228 | <li><a href="selfhost.wiki">Self Hosting Repositories — Fossil</a></li> |
| 229 | <li><a href="server.wiki">Server — How To Configure A Fossil</a></li> |
| 230 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -44,10 +44,11 @@ | |
| 44 | <li><a href="private.wiki">Branches — Creating, Syncing, and Deleting Private</a></li> |
| 45 | <li><a href="branching.wiki"><b>Branching, Forking, Merging, and Tagging</b></a></li> |
| 46 | <li><a href="bugtheory.wiki"><b>Bug Tracking In Fossil</b></a></li> |
| 47 | <li><a href="makefile.wiki">Build Process — The Fossil</a></li> |
| 48 | <li><a href="admin-v-setup.md">Capabilities — The Differences Between the Setup and Admin User</a></li> |
| 49 | <li><a href="cgi.wiki"><b>CGI Script Configuration Options</b></a></li> |
| 50 | <li><a href="serverext.wiki">CGI Scripts — Adding Extensions To A Fossil Server Using</a></li> |
| 51 | <li><a href="serverext.wiki"><b>CGI Server Extensions</b></a></li> |
| 52 | <li><a href="aboutcgi.wiki">CGI Works In Fossil — How</a></li> |
| 53 | <li><a href="changes.wiki">Changelog — Fossil</a></li> |
| 54 | <li><a href="checkin_names.wiki"><b>Check-in And Version Names</b></a></li> |
| @@ -61,10 +62,11 @@ | |
| 62 | <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> |
| 63 | <li><a href="style.wiki">Code Style Guidelines — Source</a></li> |
| 64 | <li><a href="../../../help">Commands and Webpages — Lists of</a></li> |
| 65 | <li><a href="build.wiki"><b>Compiling and Installing Fossil</b></a></li> |
| 66 | <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> |
| 67 | <li><a href="cgi.wiki">Configuration Options — CGI Script</a></li> |
| 68 | <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> |
| 69 | <li><a href="shunning.wiki">Content From Fossil — Shunning: Deleting</a></li> |
| 70 | <li><a href="contribute.wiki"><b>Contributing Code or Documentation To The Fossil Project</b></a></li> |
| 71 | <li><a href="copyright-release.html"><b>Contributor License Agreement</b></a></li> |
| 72 | <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> |
| @@ -183,10 +185,11 @@ | |
| 185 | <li><a href="newrepo.wiki">New Fossil Repository — How To Create A</a></li> |
| 186 | <li><a href="tls-nginx.md">nginx — Proxying Fossil via HTTPS with</a></li> |
| 187 | <li><a href="alerts.md">Notifications — Email Alerts And</a></li> |
| 188 | <li><a href="foss-cklist.wiki">Open-Source Projects — Checklist For Successful</a></li> |
| 189 | <li><a href="pop.wiki">Operation — Principles Of</a></li> |
| 190 | <li><a href="cgi.wiki">Options — CGI Script Configuration</a></li> |
| 191 | <li><a href="env-opts.md">Options — Environment Variables and Global</a></li> |
| 192 | <li><a href="tech_overview.wiki">Overview Of The Design And Implementation Of Fossil — A Technical</a></li> |
| 193 | <li><a href="index.wiki">Page — Home</a></li> |
| 194 | <li><a href="aboutdownload.wiki">Page Works — How The Download</a></li> |
| 195 | <li><a href="customskin.md">Pages — Theming: Customizing The Appearance of Web</a></li> |
| @@ -220,10 +223,11 @@ | |
| 223 | <li><a href="reviews.wiki"><b>Reviews</b></a></li> |
| 224 | <li><a href="../../../md_rules">Rules — Markdown Formatting</a></li> |
| 225 | <li><a href="../../../wiki_rules">Rules — Wiki Formatting</a></li> |
| 226 | <li><a href="fiveminutes.wiki">Running in 5 Minutes as a Single User — Up and</a></li> |
| 227 | <li><a href="quotes.wiki">Saying About Fossil, Git, and DVCSes in General — Quotes: What People Are</a></li> |
| 228 | <li><a href="cgi.wiki">Script Configuration Options — CGI</a></li> |
| 229 | <li><a href="th1.md">Scripting Language — The TH1</a></li> |
| 230 | <li><a href="serverext.wiki">Scripts — Adding Extensions To A Fossil Server Using CGI</a></li> |
| 231 | <li><a href="selfcheck.wiki">Self Checks — Fossil Repository Integrity</a></li> |
| 232 | <li><a href="selfhost.wiki">Self Hosting Repositories — Fossil</a></li> |
| 233 | <li><a href="server.wiki">Server — How To Configure A Fossil</a></li> |
| 234 |
+1
-1
| --- www/selfhost.wiki | ||
| +++ www/selfhost.wiki | ||
| @@ -72,6 +72,6 @@ | ||
| 72 | 72 | Server (2) is a |
| 73 | 73 | <a href="http://www.linode.com/">Linode 4096</a> located in Newark, NJ |
| 74 | 74 | and set up just like the canonical server (1) with the addition of a |
| 75 | 75 | cron job for synchronization. The same cron job also runs the |
| 76 | 76 | [/help?cmd=git|fossil git export] command after each sync in order to |
| 77 | -[./mirrortogithub.md|mirror all changes to GitHub]. | |
| 77 | +[./mirrortogithub.md#ex1|mirror all changes to GitHub]. | |
| 78 | 78 |
| --- www/selfhost.wiki | |
| +++ www/selfhost.wiki | |
| @@ -72,6 +72,6 @@ | |
| 72 | Server (2) is a |
| 73 | <a href="http://www.linode.com/">Linode 4096</a> located in Newark, NJ |
| 74 | and set up just like the canonical server (1) with the addition of a |
| 75 | cron job for synchronization. The same cron job also runs the |
| 76 | [/help?cmd=git|fossil git export] command after each sync in order to |
| 77 | [./mirrortogithub.md|mirror all changes to GitHub]. |
| 78 |
| --- www/selfhost.wiki | |
| +++ www/selfhost.wiki | |
| @@ -72,6 +72,6 @@ | |
| 72 | Server (2) is a |
| 73 | <a href="http://www.linode.com/">Linode 4096</a> located in Newark, NJ |
| 74 | and set up just like the canonical server (1) with the addition of a |
| 75 | cron job for synchronization. The same cron job also runs the |
| 76 | [/help?cmd=git|fossil git export] command after each sync in order to |
| 77 | [./mirrortogithub.md#ex1|mirror all changes to GitHub]. |
| 78 |
+8
-4
| --- www/server.wiki | ||
| +++ www/server.wiki | ||
| @@ -245,14 +245,18 @@ | ||
| 245 | 245 | </pre></blockquote> |
| 246 | 246 | |
| 247 | 247 | Once deployed, a URL like: <b>http://mydomain.org/cgi-bin/repo/XYZ</b> |
| 248 | 248 | will serve up the repository "/home/fossil/repos/XYZ.fossil" (if it exists). |
| 249 | 249 | |
| 250 | -Additional options available to the CGI script are documented in the | |
| 251 | -source code. As of 2019-07-26, the available options are described at | |
| 252 | -[/artifact/183cf5e5ad2ae111?ln=1912-1959|main.c lines 1912 through 1959]. | |
| 253 | -</blockquote> | |
| 250 | +Additional options available to the CGI script are | |
| 251 | +[./cgi.wiki|documented separately]. | |
| 252 | + | |
| 253 | +Note that Fossil itself can be launched as CGI, as described here. But | |
| 254 | +Fossil can also launch [./serverext.wiki|sub-CGIs to implement server extensions]. | |
| 255 | +Do not confuse these two concepts. Note also that the | |
| 256 | +[./serverext.wiki|sub-CGI mechanism] works regardless of how the main | |
| 257 | +Fossil server is launched. | |
| 254 | 258 | |
| 255 | 259 | <h2 id="scgi">Fossil as SCGI</h2> |
| 256 | 260 | <blockquote> |
| 257 | 261 | |
| 258 | 262 | The [/help/server|fossil server] command, described above as a way of |
| 259 | 263 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -245,14 +245,18 @@ | |
| 245 | </pre></blockquote> |
| 246 | |
| 247 | Once deployed, a URL like: <b>http://mydomain.org/cgi-bin/repo/XYZ</b> |
| 248 | will serve up the repository "/home/fossil/repos/XYZ.fossil" (if it exists). |
| 249 | |
| 250 | Additional options available to the CGI script are documented in the |
| 251 | source code. As of 2019-07-26, the available options are described at |
| 252 | [/artifact/183cf5e5ad2ae111?ln=1912-1959|main.c lines 1912 through 1959]. |
| 253 | </blockquote> |
| 254 | |
| 255 | <h2 id="scgi">Fossil as SCGI</h2> |
| 256 | <blockquote> |
| 257 | |
| 258 | The [/help/server|fossil server] command, described above as a way of |
| 259 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -245,14 +245,18 @@ | |
| 245 | </pre></blockquote> |
| 246 | |
| 247 | Once deployed, a URL like: <b>http://mydomain.org/cgi-bin/repo/XYZ</b> |
| 248 | will serve up the repository "/home/fossil/repos/XYZ.fossil" (if it exists). |
| 249 | |
| 250 | Additional options available to the CGI script are |
| 251 | [./cgi.wiki|documented separately]. |
| 252 | |
| 253 | Note that Fossil itself can be launched as CGI, as described here. But |
| 254 | Fossil can also launch [./serverext.wiki|sub-CGIs to implement server extensions]. |
| 255 | Do not confuse these two concepts. Note also that the |
| 256 | [./serverext.wiki|sub-CGI mechanism] works regardless of how the main |
| 257 | Fossil server is launched. |
| 258 | |
| 259 | <h2 id="scgi">Fossil as SCGI</h2> |
| 260 | <blockquote> |
| 261 | |
| 262 | The [/help/server|fossil server] command, described above as a way of |
| 263 |
+26
-7
| --- www/serverext.wiki | ||
| +++ www/serverext.wiki | ||
| @@ -26,19 +26,22 @@ | ||
| 26 | 26 | <h2>2.0 How It Works</h2> |
| 27 | 27 | |
| 28 | 28 | CGI Extensions are disabled by default. |
| 29 | 29 | An administrator activates the CGI extension mechanism by specifying |
| 30 | 30 | an "Extension Root Directory" or "extroot" as part of the server setup. |
| 31 | -If the Fossil server is itself run as CGI, then add a line to the CGI | |
| 32 | -script file that says: | |
| 31 | +If the Fossil server is itself run as | |
| 32 | +[./server.wiki#cgi|CGI], then add a line to the | |
| 33 | +[./cgi.wiki#extroot|CGI script file] that says: | |
| 33 | 34 | |
| 34 | 35 | <blockquote><pre> |
| 35 | 36 | extroot: <i>DIRECTORY</i> |
| 36 | 37 | </pre></blockquote> |
| 37 | 38 | |
| 38 | -Or, if the Fossil server is begin run as using the "fossil server" or | |
| 39 | -"fossil ui" or "fossil http" commands, then add an extra | |
| 39 | +Or, if the Fossil server is begin run as using the | |
| 40 | +"[./server.wiki#standalone|fossil server]" or | |
| 41 | +"[./server.wiki#standalone|fossil ui]" or | |
| 42 | +"[./server.wiki#inetd|fossil http]" commands, then add an extra | |
| 40 | 43 | "--extroot <i>DIRECTORY</i>" option to that command. |
| 41 | 44 | |
| 42 | 45 | The <i>DIRECTORY</i> is the DOCUMENT_ROOT for the CGI. |
| 43 | 46 | Files in the DOCUMENT_ROOT are accessed via URLs like this: |
| 44 | 47 | |
| @@ -106,11 +109,11 @@ | ||
| 106 | 109 | extroot: /fossil-extroot |
| 107 | 110 | </verbatim></blockquote> |
| 108 | 111 | |
| 109 | 112 | The extroot for this Fossil server is /fossil-extroot and in that directory |
| 110 | 113 | is an executable file named "fileup1" - another [https://wapp.tcl.tk|Wapp] |
| 111 | -script. (The extension mechanism does not have to use Wapp. You can use | |
| 114 | +script. (The extension mechanism is not required to use Wapp. You can use | |
| 112 | 115 | any kind of program you like. But the creator of SQLite and Fossil is fond |
| 113 | 116 | of [https://www.tcl.tk|Tcl/Tk] and so he tends to gravitate toward Tcl-based |
| 114 | 117 | technologies like Wapp.) The fileup1 script is a demo program that lets |
| 115 | 118 | the user upload a file using a form, and then displays that file in the reply. |
| 116 | 119 | There is a link on the page that causes the fileup1 script to return a copy |
| @@ -155,16 +158,17 @@ | ||
| 155 | 158 | they are used. |
| 156 | 159 | Live listings of the values of some or all of these environment variables |
| 157 | 160 | can be found at links like these: |
| 158 | 161 | |
| 159 | 162 | * [https://fossil-scm.org/home/test_env] |
| 160 | - * [https://sqlite.org/src/ext/checklist/env] | |
| 163 | + * [https://sqlite.org/src/ext/checklist/top/env] | |
| 161 | 164 | |
| 162 | 165 | In addition to the standard CGI environment variables listed above, |
| 163 | 166 | Fossil adds the following: |
| 164 | 167 | |
| 165 | 168 | * FOSSIL_CAPABILITIES |
| 169 | + * FOSSIL_NONCE | |
| 166 | 170 | * FOSSIL_REPOSITORY |
| 167 | 171 | * FOSSIL_URI |
| 168 | 172 | * FOSSIL_USER |
| 169 | 173 | |
| 170 | 174 | The FOSSIL_USER string is the name of the logged-in user. This variable |
| @@ -182,12 +186,27 @@ | ||
| 182 | 186 | the FOSSIL_CAPABILITIES variable to determine if the user is allowed to |
| 183 | 187 | mark off changes to the checklist. Only users with check-in permission |
| 184 | 188 | to the Fossil repository are allowed to mark off checklist items. That |
| 185 | 189 | means that the FOSSIL_CAPABILITIES string must contain the letter "i". |
| 186 | 190 | Search for "FOSSIL_CAPABILITIES" in the |
| 187 | -[https://sqlite.org/src/ext/checklist/self|source listing] to see how | |
| 191 | +[https://sqlite.org/src/ext/checklist/top/self|source listing] to see how | |
| 188 | 192 | this happens. |
| 193 | + | |
| 194 | +If the CGI output is one of the forms for which Fossil inserts its own | |
| 195 | +header and footer, then the inserted header will include a | |
| 196 | +Content Security Policy (CSP) restriction on the use of javascript within | |
| 197 | +the webpage. Any <script>...</script> elements within the | |
| 198 | +CGI output must include a nonce or else they will be suppressed by the | |
| 199 | +web browser. The FOSSIL_NONCE variable contains the value of that nonce. | |
| 200 | +So, in other words, to get javascript to work, it must be enclosed in: | |
| 201 | + | |
| 202 | +<blockquote><verbatim> | |
| 203 | +<script nonce='$FOSSIL_NONCE'>...</script> | |
| 204 | +</verbatim></blockquote> | |
| 205 | + | |
| 206 | +Except, of course, the $FOSSIL_NONCE is replace by the value of the | |
| 207 | +FOSSIL_NONCE environment variable. | |
| 189 | 208 | |
| 190 | 209 | If the HTTP request includes content (for example if this is a POST request) |
| 191 | 210 | then the CONTENT_LENGTH value will be positive and the data for the content |
| 192 | 211 | will be readable on standard input. |
| 193 | 212 | |
| 194 | 213 |
| --- www/serverext.wiki | |
| +++ www/serverext.wiki | |
| @@ -26,19 +26,22 @@ | |
| 26 | <h2>2.0 How It Works</h2> |
| 27 | |
| 28 | CGI Extensions are disabled by default. |
| 29 | An administrator activates the CGI extension mechanism by specifying |
| 30 | an "Extension Root Directory" or "extroot" as part of the server setup. |
| 31 | If the Fossil server is itself run as CGI, then add a line to the CGI |
| 32 | script file that says: |
| 33 | |
| 34 | <blockquote><pre> |
| 35 | extroot: <i>DIRECTORY</i> |
| 36 | </pre></blockquote> |
| 37 | |
| 38 | Or, if the Fossil server is begin run as using the "fossil server" or |
| 39 | "fossil ui" or "fossil http" commands, then add an extra |
| 40 | "--extroot <i>DIRECTORY</i>" option to that command. |
| 41 | |
| 42 | The <i>DIRECTORY</i> is the DOCUMENT_ROOT for the CGI. |
| 43 | Files in the DOCUMENT_ROOT are accessed via URLs like this: |
| 44 | |
| @@ -106,11 +109,11 @@ | |
| 106 | extroot: /fossil-extroot |
| 107 | </verbatim></blockquote> |
| 108 | |
| 109 | The extroot for this Fossil server is /fossil-extroot and in that directory |
| 110 | is an executable file named "fileup1" - another [https://wapp.tcl.tk|Wapp] |
| 111 | script. (The extension mechanism does not have to use Wapp. You can use |
| 112 | any kind of program you like. But the creator of SQLite and Fossil is fond |
| 113 | of [https://www.tcl.tk|Tcl/Tk] and so he tends to gravitate toward Tcl-based |
| 114 | technologies like Wapp.) The fileup1 script is a demo program that lets |
| 115 | the user upload a file using a form, and then displays that file in the reply. |
| 116 | There is a link on the page that causes the fileup1 script to return a copy |
| @@ -155,16 +158,17 @@ | |
| 155 | they are used. |
| 156 | Live listings of the values of some or all of these environment variables |
| 157 | can be found at links like these: |
| 158 | |
| 159 | * [https://fossil-scm.org/home/test_env] |
| 160 | * [https://sqlite.org/src/ext/checklist/env] |
| 161 | |
| 162 | In addition to the standard CGI environment variables listed above, |
| 163 | Fossil adds the following: |
| 164 | |
| 165 | * FOSSIL_CAPABILITIES |
| 166 | * FOSSIL_REPOSITORY |
| 167 | * FOSSIL_URI |
| 168 | * FOSSIL_USER |
| 169 | |
| 170 | The FOSSIL_USER string is the name of the logged-in user. This variable |
| @@ -182,12 +186,27 @@ | |
| 182 | the FOSSIL_CAPABILITIES variable to determine if the user is allowed to |
| 183 | mark off changes to the checklist. Only users with check-in permission |
| 184 | to the Fossil repository are allowed to mark off checklist items. That |
| 185 | means that the FOSSIL_CAPABILITIES string must contain the letter "i". |
| 186 | Search for "FOSSIL_CAPABILITIES" in the |
| 187 | [https://sqlite.org/src/ext/checklist/self|source listing] to see how |
| 188 | this happens. |
| 189 | |
| 190 | If the HTTP request includes content (for example if this is a POST request) |
| 191 | then the CONTENT_LENGTH value will be positive and the data for the content |
| 192 | will be readable on standard input. |
| 193 | |
| 194 |
| --- www/serverext.wiki | |
| +++ www/serverext.wiki | |
| @@ -26,19 +26,22 @@ | |
| 26 | <h2>2.0 How It Works</h2> |
| 27 | |
| 28 | CGI Extensions are disabled by default. |
| 29 | An administrator activates the CGI extension mechanism by specifying |
| 30 | an "Extension Root Directory" or "extroot" as part of the server setup. |
| 31 | If the Fossil server is itself run as |
| 32 | [./server.wiki#cgi|CGI], then add a line to the |
| 33 | [./cgi.wiki#extroot|CGI script file] that says: |
| 34 | |
| 35 | <blockquote><pre> |
| 36 | extroot: <i>DIRECTORY</i> |
| 37 | </pre></blockquote> |
| 38 | |
| 39 | Or, if the Fossil server is begin run as using the |
| 40 | "[./server.wiki#standalone|fossil server]" or |
| 41 | "[./server.wiki#standalone|fossil ui]" or |
| 42 | "[./server.wiki#inetd|fossil http]" commands, then add an extra |
| 43 | "--extroot <i>DIRECTORY</i>" option to that command. |
| 44 | |
| 45 | The <i>DIRECTORY</i> is the DOCUMENT_ROOT for the CGI. |
| 46 | Files in the DOCUMENT_ROOT are accessed via URLs like this: |
| 47 | |
| @@ -106,11 +109,11 @@ | |
| 109 | extroot: /fossil-extroot |
| 110 | </verbatim></blockquote> |
| 111 | |
| 112 | The extroot for this Fossil server is /fossil-extroot and in that directory |
| 113 | is an executable file named "fileup1" - another [https://wapp.tcl.tk|Wapp] |
| 114 | script. (The extension mechanism is not required to use Wapp. You can use |
| 115 | any kind of program you like. But the creator of SQLite and Fossil is fond |
| 116 | of [https://www.tcl.tk|Tcl/Tk] and so he tends to gravitate toward Tcl-based |
| 117 | technologies like Wapp.) The fileup1 script is a demo program that lets |
| 118 | the user upload a file using a form, and then displays that file in the reply. |
| 119 | There is a link on the page that causes the fileup1 script to return a copy |
| @@ -155,16 +158,17 @@ | |
| 158 | they are used. |
| 159 | Live listings of the values of some or all of these environment variables |
| 160 | can be found at links like these: |
| 161 | |
| 162 | * [https://fossil-scm.org/home/test_env] |
| 163 | * [https://sqlite.org/src/ext/checklist/top/env] |
| 164 | |
| 165 | In addition to the standard CGI environment variables listed above, |
| 166 | Fossil adds the following: |
| 167 | |
| 168 | * FOSSIL_CAPABILITIES |
| 169 | * FOSSIL_NONCE |
| 170 | * FOSSIL_REPOSITORY |
| 171 | * FOSSIL_URI |
| 172 | * FOSSIL_USER |
| 173 | |
| 174 | The FOSSIL_USER string is the name of the logged-in user. This variable |
| @@ -182,12 +186,27 @@ | |
| 186 | the FOSSIL_CAPABILITIES variable to determine if the user is allowed to |
| 187 | mark off changes to the checklist. Only users with check-in permission |
| 188 | to the Fossil repository are allowed to mark off checklist items. That |
| 189 | means that the FOSSIL_CAPABILITIES string must contain the letter "i". |
| 190 | Search for "FOSSIL_CAPABILITIES" in the |
| 191 | [https://sqlite.org/src/ext/checklist/top/self|source listing] to see how |
| 192 | this happens. |
| 193 | |
| 194 | If the CGI output is one of the forms for which Fossil inserts its own |
| 195 | header and footer, then the inserted header will include a |
| 196 | Content Security Policy (CSP) restriction on the use of javascript within |
| 197 | the webpage. Any <script>...</script> elements within the |
| 198 | CGI output must include a nonce or else they will be suppressed by the |
| 199 | web browser. The FOSSIL_NONCE variable contains the value of that nonce. |
| 200 | So, in other words, to get javascript to work, it must be enclosed in: |
| 201 | |
| 202 | <blockquote><verbatim> |
| 203 | <script nonce='$FOSSIL_NONCE'>...</script> |
| 204 | </verbatim></blockquote> |
| 205 | |
| 206 | Except, of course, the $FOSSIL_NONCE is replace by the value of the |
| 207 | FOSSIL_NONCE environment variable. |
| 208 | |
| 209 | If the HTTP request includes content (for example if this is a POST request) |
| 210 | then the CONTENT_LENGTH value will be positive and the data for the content |
| 211 | will be readable on standard input. |
| 212 | |
| 213 |