diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-01 17:44:48 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-01 18:06:26 +0200 |
commit | 136d8d9e5c9a2a0414e4934cc928bca23bfe944b (patch) | |
tree | a35f3e30bc9839b612d7382a017c460fb335fd5b /doc | |
parent | 478db794b90ebd205a6a191369581adbd440fd4e (diff) | |
download | chawan-136d8d9e5c9a2a0414e4934cc928bca23bfe944b.tar.gz |
Add w3m-cgi-compat option
Diffstat (limited to 'doc')
-rw-r--r-- | doc/config.md | 23 | ||||
-rw-r--r-- | doc/localcgi.md | 19 |
2 files changed, 36 insertions, 6 deletions
diff --git a/doc/config.md b/doc/config.md index 7af5d5db..a82712c1 100644 --- a/doc/config.md +++ b/doc/config.md @@ -220,6 +220,21 @@ MANOFF --> </td> </tr> +<tr> +<td>w3m-cgi-compat</td> +<td>boolean</td> +<td>Enable local CGI compatibility with w3m. In short, it redirects +`file:///cgi-bin/*` and `file:///$LIB/cgi-bin/*` to `cgi-bin:*`. For further +details, see +<!-- MANOFF --> +[localcgi.md](localcgi.md). +<!-- MANON --> +<!-- MANON +**cha-localcgi**(5). +MANOFF --> +</td> +</tr> + </table> ## Input @@ -1123,10 +1138,10 @@ with a caret (^) sign or end with an unescaped dollar ($) sign. In other words, the following transformations occur: ``` -^abcd -> ^abcd -efgh$ -> efgh$ -^ijkl$ -> ^ijkl$ -mnop -> ^mnop$ +^abcd -> ^abcd (no change) +efgh$ -> efgh$ (no change) +^ijkl$ -> ^ijkl$ (no change) +mnop -> ^mnop$ (changed to exact match) ``` <!-- MANON diff --git a/doc/localcgi.md b/doc/localcgi.md index ba7d5232..b9b3e5f5 100644 --- a/doc/localcgi.md +++ b/doc/localcgi.md @@ -19,14 +19,23 @@ Further notes on processing CGI paths: * The URL must be opaque, so you must not add a double slash after the scheme. e.g. `cgi-bin://script-name` will NOT work, only `cgi-bin:script-name`. +* Paths beginning with `/cgi-bin/` or `/$LIB/` are stripped of this segment + automatically. So e.g. `file:///cgi-bin/script-name` becomes + `cgi-bin:script-name`. +* If `extern.w3m-cgi-compat` is true, file: URLs are converted to cgi-bin: URLs + if the path name starts with `/cgi-bin/`, `/$LIB/`, or the path of a local + CGI script. * Absolute paths are accepted as e.g. `cgi-bin:/path/to/cgi/dir/script-name`. Note however, that this only works if `/path/to/cgi/dir` has already been specified as a CGI directory in `external.cgi-dir`. Note that this is different from w3m's cgi-bin functionality, in that we use a custom scheme for local CGI instead of interpreting all requests to -a designated path as a CGI request. Also, for now Chawan has no equivalent -to the W3m-control headers (but this may change in the future). +a designated path as a CGI request. (This incompatibility is bridged over when +`external.cgi-dir` is true.) + +Also, for now Chawan has no equivalent to the W3m-control headers (but this +may change in the future). ## Environment variables @@ -109,3 +118,9 @@ script's executable bit is set, i.e. run `chmod +x /path/to/cgi/script`. This means that either `pipe` or `fork` failed. Something strange is going on with your system; we recommend exorcism. (Maybe you are running out of memory?) + +<!-- MANON +## See also + +**cha**(1) +MANOFF --> |