about summary refs log tree commit diff stats
path: root/doc/protocols.md
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-08-03 01:14:41 +0200
committerbptato <nincsnevem662@gmail.com>2024-08-03 01:54:35 +0200
commit4c64687290c908cd791a058dede9bd4f2a1c7757 (patch)
tree4e72720aa016320a02d19b4a051b9b9916b714f9 /doc/protocols.md
parent270cf870eb84e80f2de1f2be64b682849ca55585 (diff)
downloadchawan-4c64687290c908cd791a058dede9bd4f2a1c7757.tar.gz
loader: move back data URL handling
data URIs can get megabytes long; however, you can only stuff so many
bytes into the envp. (This was thwarting my efforts to view pandoc-
generated standalone HTML in Chawan.) So put `data:' back into the
loader process.
Diffstat (limited to 'doc/protocols.md')
-rw-r--r--doc/protocols.md22
1 files changed, 12 insertions, 10 deletions
diff --git a/doc/protocols.md b/doc/protocols.md
index 2d591bc2..f0f01b65 100644
--- a/doc/protocols.md
+++ b/doc/protocols.md
@@ -18,8 +18,8 @@ this document.
 * [Gemini](#gemini)
 * [Finger](#finger)
 * [Spartan](#spartan)
-* [Local schemes: file:, about:, man:, data:](#local-schemes-file-about-man-data)
-* [Internal schemes: cgi-bin:, stream:, cache:](#internal-schemes-cgi-bin-stream-cache)
+* [Local schemes: file:, about:, man:](#local-schemes-file-about-man-data)
+* [Internal schemes: cgi-bin:, stream:, cache:, data:](#internal-schemes-cgi-bin-stream-cache-data)
 * [Custom protocols](#custom-protocols)
 
 <!-- MANON -->
@@ -110,7 +110,7 @@ protocol-specific line type. This is sort of supported through a sed filter
 for gemtext outputs in the CGI script (in other words, no modification to
 gmi2html was done to support this).
 
-## Local schemes: file:, about:, man:, data:
+## Local schemes: file:, about:, man:
 
 While these are not necessarily *protocols*, they are implemented similarly
 to the protocols listed above (and thus can also be replaced, if the user
@@ -129,14 +129,12 @@ references into links. A wrapper command `mancha` also exists; this has an
 interface similar to `man`. Note: this used to be based on w3mman2html.cgi, but
 it has been rewritten in Nim (and therefore no longer depends on Perl either).
 
-`data:` decodes a data URL as defined in RFC 2397.
+## Internal schemes: cgi-bin:, stream:, cache:, data:
 
-## Internal schemes: cgi-bin:, stream:, cache:
-
-Three internal protocols exist: `cgi-bin:`, `stream:` and `cache:`. These are
-the basic building blocks for the implementation of every protocol mentioned
-above; for this reason, these can *not* be replaced, and are implemented in
-the main browser binary.
+Four internal protocols exist: `cgi-bin:`, `stream:`, `cache:` and `data:`.
+These are the basic building blocks for the implementation of every protocol
+mentioned above; for this reason, these can *not* be replaced, and are
+implemented in the main browser binary.
 
 `cgi-bin:` executes a local CGI script. This scheme is used for the actual
 implementation of the non-internal protocols mentioned above. Local CGI scripts
@@ -160,6 +158,10 @@ real cache; files are deterministically loaded from the "cache" upon certain
 actions, and from the network upon others, but neither is used as a fallback
 to the other.
 
+`data:` decodes a data URL as defined in RFC 2397. This used to be a CGI module,
+but has been moved back into the loader process because these URLs can get
+so long that they no longer fit into the environment.
+
 ## Custom protocols
 
 Chawan is protocol-agnostic. This means that the `cha` binary itself does not