repo: gemini-spec
action: commit
revision: 
path_from: 
revision_from: 968dfb40664c31fac3ed97202338b68fa09655e4:
path_to: 
revision_to: 
git.thebackupbox.net
gemini-spec
git clone git://git.thebackupbox.net/gemini-spec
commit 968dfb40664c31fac3ed97202338b68fa09655e4
Author: Sean Conner 
Date:   Tue Mar 2 18:06:27 2021 -0500

    Format changes for editing

    I've reflowed the documents to make it easier for me to edit, and to make
    diffs easier to read as I make changes to these documents.  Once everything
    is finalized, they'll be reformatted back to a more Gemini friendly version,
    so don't worry.

diff --git a/best-practices.gmi b/best-practices.gmi
index 6dbe582cb858e3871f2b344505b96282639fdfc6..
index ..3ff30c3d288fead544aabe18d9dae025c7787f2b 100644
--- a/best-practices.gmi
+++ b/best-practices.gmi
@@ -2,61 +2,131 @@

 ## Introduction

-This document describes various conventions and snippets of advice for implementing and using the Gemini protocol which, while not mandated by the protocol specification, are generally considered a good idea.  If you're writing Gemini software or building a Gemini site, you should generally follow the advice given here unless you have good reasons not to.
+This document describes various conventions and snippets of advice for
+implementing and using the Gemini protocol which, while not mandated by the
+protocol specification, are generally considered a good idea.  If you're
+writing Gemini software or building a Gemini site, you should generally
+follow the advice given here unless you have good reasons not to.

 ## Filenames

-Gemini servers need to inform clients of the MIME type of the files they are serving.  The most convenient way for servers to figure out the MIME type of files is via the extension of the filename.  These mappings are mostly well-standardised (and unix systems often have an /etc/mime.types file full of them), but the question remains as to how servers should recognise files to be served with the text/gemini type defined by Gemini.
+Gemini servers need to inform clients of the MIME type of the files they are
+serving.  The most convenient way for servers to figure out the MIME type of
+files is via the extension of the filename.  These mappings are mostly
+well-standardised (and unix systems often have an /etc/mime.types file full
+of them), but the question remains as to how servers should recognise files
+to be served with the text/gemini type defined by Gemini.

-Current Gemini servers seem to use .gmi or .gemini extensions for this purpose, and new servers are strongly encouraged to support one or both of these options instead of adding a new one to the mix.
+Current Gemini servers seem to use .gmi or .gemini extensions for this
+purpose, and new servers are strongly encouraged to support one or both of
+these options instead of adding a new one to the mix.

-Following the convention for webservers, if a request is received for a path which maps to a directory in the server's filesystem and a file named index.gmi or index.gemini exists in that directory, it is served up for that
+Following the convention for webservers, if a request is received for a path
+which maps to a directory in the server's filesystem and a file named
+index.gmi or index.gemini exists in that directory, it is served up for that
 path.

 ## File size

-Gemini servers do not inform clients of the size of files they are serving, which can make it difficult to detect if a connection is closed prematurely due to a server fault.  This risk of this happening increases with file size.
+Gemini servers do not inform clients of the size of files they are serving,
+which can make it difficult to detect if a connection is closed prematurely
+due to a server fault.  This risk of this happening increases with file
+size.

-Gemini also has no support for compression of large files, or support for checksums to enable detection of file corruption, the risk of which also increases with file size.
+Gemini also has no support for compression of large files, or support for
+checksums to enable detection of file corruption, the risk of which also
+increases with file size.

-For all of these reasons, Gemini is not well suited to the transfer of "very large" files.  Exactly what counts as "very large" depends to some extent on the speed and reliability of the internet connections involved, and the patience of the users.  As a rule of thumb, files larger than 100MiB might be thought of as best served some other way.
+For all of these reasons, Gemini is not well suited to the transfer of "very
+large" files.  Exactly what counts as "very large" depends to some extent on
+the speed and reliability of the internet connections involved, and the
+patience of the users.  As a rule of thumb, files larger than 100MiB might
+be thought of as best served some other way.

-Of course, because Gemini supports linking to other online content via any protocol with a URL scheme, it's still possible to link from a Gemini document to a large file served via HTTPS, BitTorrent, IPFS or whatever else tickles your fancy.
+Of course, because Gemini supports linking to other online content via any
+protocol with a URL scheme, it's still possible to link from a Gemini
+document to a large file served via HTTPS, BitTorrent, IPFS or whatever else
+tickles your fancy.

 ## Text encoding

-Gemini supports any text encoding you like via the "charset" parameter of text/* MIME types.  This allows serving "legacy" text content in obscure regional encoding schemes.
+Gemini supports any text encoding you like via the "charset" parameter of
+text/* MIME types.  This allows serving "legacy" text content in obscure
+regional encoding schemes.

-For new content, please, please, please just use UTF-8.  The Gemini specification mandates that clients be able to handle UTF-8 text.  Support for any other encoding is up to the client and is not guaranteed.  Serving your content as UTF-8 maximises its accessibility and maximises the utility of simple clients which support only UTF-8.
+For new content, please, please, please just use UTF-8.  The Gemini
+specification mandates that clients be able to handle UTF-8 text.  Support
+for any other encoding is up to the client and is not guaranteed.  Serving
+your content as UTF-8 maximises its accessibility and maximises the utility
+of simple clients which support only UTF-8.

 ## Redirects

 ### General remarks

-Redirects were included in Gemini primarily to permit the restructuring of sites or the migration of sites between servers without breaking existing links.  A large, interconnected space of documents without such a facility inevitably becomes "brittle".
+Redirects were included in Gemini primarily to permit the restructuring of
+sites or the migration of sites between servers without breaking existing
+links.  A large, interconnected space of documents without such a facility
+inevitably becomes "brittle".

-However, redirects are, generally speaking, nasty things.  They reduce the transparency of a protocol and make it harder for people to make informed choices about which links to follow, and they can leak information about people's online activity to third parties.  They are not as bad in Gemini as in HTTP (owing to the lack of cookies, referer headers, etc.), but they remain at best a necessary evil.
+However, redirects are, generally speaking, nasty things.  They reduce the
+transparency of a protocol and make it harder for people to make informed
+choices about which links to follow, and they can leak information about
+people's online activity to third parties.  They are not as bad in Gemini as
+in HTTP (owing to the lack of cookies, referer headers, etc.), but they
+remain at best a necessary evil.

-As such, please refrain from using redirects frivolously!  Things like URL-shorteners are almost totally without merit.  In general, think long and hard about using redirects to do anything other than avoid link breakage.
+As such, please refrain from using redirects frivolously!  Things like
+URL-shorteners are almost totally without merit.  In general, think long and
+hard about using redirects to do anything other than avoid link breakage.

 ### Redirect limits

-Clients may prompt their users for decisions as to whether or not to follow a redirect, or they may follow redirects automatically.  If you write a client which follows redirects automatically, you should keep the following issues in mind.
+Clients may prompt their users for decisions as to whether or not to follow
+a redirect, or they may follow redirects automatically.  If you write a
+client which follows redirects automatically, you should keep the following
+issues in mind.

-Misconfigured or malicious Gemini servers may serve redirects in such a way that a client which follows them blindly gets trapped in an infinite loop of redirects, or otherwise has to complete a very long chain of redirects.  Robust clients will need to be smart enough to detect these conditions and act accordingly.  The simplest implementation is to refuse to follow more than N consecutive redirects.  It is recommended that N be set no higher than 5.  This is inline with the original recommenation for HTTP (see RFC-2068).
+Misconfigured or malicious Gemini servers may serve redirects in such a way
+that a client which follows them blindly gets trapped in an infinite loop of
+redirects, or otherwise has to complete a very long chain of redirects. 
+Robust clients will need to be smart enough to detect these conditions and
+act accordingly.  The simplest implementation is to refuse to follow more
+than N consecutive redirects.  It is recommended that N be set no higher
+than 5.  This is inline with the original recommenation for HTTP (see
+RFC-2068).

 ### Cross-protocol redirects

-Cross-protocol redirects (i.e. redirects from Gemini to something else, like Gopher) are possible within Gemini, but are very heavily discouraged.  However, misconfigured or malicious servers will always be able to serve such redirects, so well-written clients should be ready to detect them and respond accordingly.
+Cross-protocol redirects (i.e.  redirects from Gemini to something else,
+like Gopher) are possible within Gemini, but are very heavily discouraged. 
+However, misconfigured or malicious servers will always be able to serve
+such redirects, so well-written clients should be ready to detect them and
+respond accordingly.

-It is strongly recommended that even clients which generally follow redirects automatically alert the user and ask for explicit confirmation when served a redirect to a non-TLS-secured protocols like HTTP or Gopher, assuming the client implements support for these protocols.  This avoids unintentional plaintext transfers.
+It is strongly recommended that even clients which generally follow
+redirects automatically alert the user and ask for explicit confirmation
+when served a redirect to a non-TLS-secured protocols like HTTP or Gopher,
+assuming the client implements support for these protocols.  This avoids
+unintentional plaintext transfers.

 ### TLS Cipher suites

-TLS 1.2 is reluctantly permitted in Gemini despite TLS 1.3 being drastically simpler and removing many insecure cryptographic primitives.  This is because only OpenSSL seems to currently have good support for TLS 1.3 and so requiring TLS 1.3 or higher would discourage the use of libraries like LibreSSL or BearSSL, which otherwise have much to recommend them over OpenSSL.
+TLS 1.2 is reluctantly permitted in Gemini despite TLS 1.3 being drastically
+simpler and removing many insecure cryptographic primitives.  This is
+because only OpenSSL seems to currently have good support for TLS 1.3 and so
+requiring TLS 1.3 or higher would discourage the use of libraries like
+LibreSSL or BearSSL, which otherwise have much to recommend them over
+OpenSSL.

-Client and server authors who choose to support TLS 1.2 should ideally only permit the use of ciphersuites which offer similar security to TLS 1.3.  In particular, such software should:
+Client and server authors who choose to support TLS 1.2 should ideally only
+permit the use of ciphersuites which offer similar security to TLS 1.3.  In
+particular, such software should:
+
+* Use only Ephemeral Diffie-Hellman (DHE) Ephermeral Eliptic Curve
+  Diffie-Hellman (ECDHE) for key agreement, in order to provide forward
+  secrecy.

-* Use only Ephemeral Diffie-Hellman (DHE) Ephermeral Eliptic Curve Diffie-Hellman (ECDHE) for key agreement, in order to provide forward secrecy.
 * Use AES or ChaCha20 as bulk ciphers
+
 * Use SHA2 or SHA3 family hash functions for message authentication.
diff --git a/faq.gmi b/faq.gmi
index 1f0d5a0a3f79e03f0ba7646e5e21db1d3fb8fb28..
index ..b94fc89ea991a3b38a1101ce051c48b1ddf656ba 100644
--- a/faq.gmi
+++ b/faq.gmi
@@ -6,60 +6,138 @@ Last updated: 2021-02-21

 ### 1.1 What is Gemini?

-Gemini is a new application-level internet protocol for the distribution of arbitrary files, with some special consideration for serving a lightweight hypertext format which facilitates linking between files.  You may think of Gemini as "the web, stripped right back to its essence" or as "Gopher, souped up and modernised just a little", depending upon your perspective (the latter view is probably more accurate).  Gemini may be of interest to people who are:
+Gemini is a new application-level internet protocol for the distribution of
+arbitrary files, with some special consideration for serving a lightweight
+hypertext format which facilitates linking between files.  You may think of
+Gemini as "the web, stripped right back to its essence" or as "Gopher,
+souped up and modernised just a little", depending upon your perspective
+(the latter view is probably more accurate).  Gemini may be of interest to
+people who are:

 * Opposed to the web's ubiquitous tracking of users
-* Tired of nagging pop-ups, obnoxious adverts, autoplaying videos and other misfeatures of the modern web
-* Interested in low-power computing and/or low-speed networks, either by choice or necessity

-Gemini is intended to be simple, but not necessarily as simple as possible.  Instead, the design strives to maximise its "power to weight ratio", while keeping its weight within acceptable limits.  Gemini is also intended to be very privacy conscious, to be difficult to extend in the future (so that it will *stay* simple and privacy conscious), and to be compatible with a "do it yourself" computing ethos.  For this last reason, Gemini is technically very familiar and conservative: it's a protocol in the traditional client-server request-response paradigm, and is built on mature, standardised technology like URIs, MIME media types, and TLS.
+* Tired of nagging pop-ups, obnoxious adverts, autoplaying videos and other
+  misfeatures of the modern web
+
+* Interested in low-power computing and/or low-speed networks, either by
+  choice or necessity
+
+Gemini is intended to be simple, but not necessarily as simple as possible. 
+Instead, the design strives to maximise its "power to weight ratio", while
+keeping its weight within acceptable limits.  Gemini is also intended to be
+very privacy conscious, to be difficult to extend in the future (so that it
+will *stay* simple and privacy conscious), and to be compatible with a "do
+it yourself" computing ethos.  For this last reason, Gemini is technically
+very familiar and conservative: it's a protocol in the traditional
+client-server request-response paradigm, and is built on mature,
+standardised technology like URIs, MIME media types, and TLS.

 ### 1.2 How old is Gemini?

-Project Gemini started in June 2019.  While the protocol itself is largely finalised, the available software, resources and community are still in a relatively early (though thriving!) state of development.
+Project Gemini started in June 2019.  While the protocol itself is largely
+finalised, the available software, resources and community are still in a
+relatively early (though thriving!) state of development.

 ### 1.3 Who is in charge of Gemini?

-Project Gemini was originally started by Solderpunk , who remains the "Benevolent Dictator" of the project.  However, the protocol has been designed in collaboration with a loose and informal community of many interested parties via emails, posts in Gopher's "phlogosphere" and toots in the Fediverse.  Many people have shaped significant parts of the protocol, so despite having a single leader, Gemini should not be thought of as the work of a single person.
+Project Gemini was originally started by Solderpunk , who remains the "Benevolent Dictator" of the project.  However,
+the protocol has been designed in collaboration with a loose and informal
+community of many interested parties via emails, posts in Gopher's
+"phlogosphere" and toots in the Fediverse.  Many people have shaped
+significant parts of the protocol, so despite having a single leader, Gemini
+should not be thought of as the work of a single person.

-In February 2021, long time Gemini contributor Sean Conner was granted some decision making authority to help finalise the Gemini specification during a time when Solderpunk was unable to dedicate the necessary time and energy to the project.
+In February 2021, long time Gemini contributor Sean Conner was granted some
+decision making authority to help finalise the Gemini specification during a
+time when Solderpunk was unable to dedicate the necessary time and energy to
+the project.

 ### 1.4 How large is "Geminispace"?

-It's difficult to know exactly.  Counting unique hostnames of Gemini servers is likely to exaggerate the size of the space, since some multi-user sites give each user their own subdomain.  On the other hand, counting unique IP addresses is likely to underestimate the size, as Gemini allows multiple different domains to be served from the same IP.  At any rate, as of early 2021 there were about 200,000 known Gemini URLs, spread across about 750 "capsules" (the Gemini community's term for "sites"), 500 domains and 600 IP addresses.  The space is growing rapidly, though.  You can find the latest statistics as the link below.
+It's difficult to know exactly.  Counting unique hostnames of Gemini servers
+is likely to exaggerate the size of the space, since some multi-user sites
+give each user their own subdomain.  On the other hand, counting unique IP
+addresses is likely to underestimate the size, as Gemini allows multiple
+different domains to be served from the same IP.  At any rate, as of early
+2021 there were about 200,000 known Gemini URLs, spread across about 750
+"capsules" (the Gemini community's term for "sites"), 500 domains and 600 IP
+addresses.  The space is growing rapidly, though.  You can find the latest
+statistics as the link below.

 => gemini://gemini.bortzmeyer.org/software/lupa/stats.gmi Geminispace statistics provided by Stéphane Bortzmeyer's "Lupa" crawler

 ### 1.5 What stage of its lifecycle is the project in?

-The current (informal) specification of the protocol is largely frozen, modulo small changes to remove ambiguity and address edge cases.  Suggestions for new features will not be considered, as the protocol is considered feature complete.  Going forward, the main focus of the project now is on growing the community around the protocol, as well as working on translating the existing specification into a more precise and formal version which might be considered for submission to internet standards bodies such as IETF and IANA.
+The current (informal) specification of the protocol is largely frozen,
+modulo small changes to remove ambiguity and address edge cases. 
+Suggestions for new features will not be considered, as the protocol is
+considered feature complete.  Going forward, the main focus of the project
+now is on growing the community around the protocol, as well as working on
+translating the existing specification into a more precise and formal
+version which might be considered for submission to internet standards
+bodies such as IETF and IANA.

 ### 1.6 Do you really think you can replace the web?

-Not for a minute!  Nor does anybody involved with Gemini want to destroy Gopherspace.  Gemini is not intended to replace either Gopher or the web, but to co-exist peacefully alongside them as one more option which people can freely choose to use if it suits them.  In the same way that some people currently serve the same content via gopher and the web, people will be able to "bihost" or "trihost" content on whichever combination of protocols they think offer the best match to their technical, philosophical and aesthetic requirements and those of their intended audience.
+Not for a minute!  Nor does anybody involved with Gemini want to destroy
+Gopherspace.  Gemini is not intended to replace either Gopher or the web,
+but to co-exist peacefully alongside them as one more option which people
+can freely choose to use if it suits them.  In the same way that some people
+currently serve the same content via gopher and the web, people will be able
+to "bihost" or "trihost" content on whichever combination of protocols they
+think offer the best match to their technical, philosophical and aesthetic
+requirements and those of their intended audience.

 ### 1.7 What's with the name?

-It's a reference to the pre-shuttle era of US manned spaceflight, which consisted of three projects.  The first was Project Mercury, which was a fairly minimalist "proof of concept" and part of the race to put a human in space soonest (which the Soviet Union won with their Vostok project).  Mercury was a one-man capsule with no ability to adjust to its own orbit after launch and only one Mercury flight lasted longer than a single day.  The last was Project Apollo, which was large, heavy, complicated and expensive but could, of course, fly three men to the moon and back.
-
-Less well known to the modern public, Project Gemini was the "middle child": a two person capsule which could rendezvous and dock with other craft in orbit, could be depressurised and repressurised in orbit to facilitate spacewalks, and whose longest flight was almost two weeks - longer than any Apollo mission!  In terms of size, weight and cost Gemini was much closer to Mercury than to Apollo, but in terms of capabilities it was the other way around - there were even plans (which never eventuated) to do circumlunar Gemini flights!
-
-Hopefully the analogy is obvious: Gopher is akin to Mercury, and the web is akin to Apollo.  Gemini hopes to sit between the two, doing more with less.
-
-Gemini very deliberately didn't receive a name which had *anything* to do with gophers, or other rodents, or even other animals.  During the earliest phlog-based discussions which eventually grew into Project Gemini, a lack of careful writing meant it was sometimes unclear whether people were talking about replacing Gopher outright, or adding unofficial, compatibility-breaking upgrades into existing Gopher clients and servers.  When idle discussion turned into an actual project, it seemed wise to send a clearer message.
+It's a reference to the pre-shuttle era of US manned spaceflight, which
+consisted of three projects.  The first was Project Mercury, which was a
+fairly minimalist "proof of concept" and part of the race to put a human in
+space soonest (which the Soviet Union won with their Vostok project). 
+Mercury was a one-man capsule with no ability to adjust to its own orbit
+after launch and only one Mercury flight lasted longer than a single day. 
+The last was Project Apollo, which was large, heavy, complicated and
+expensive but could, of course, fly three men to the moon and back.
+
+Less well known to the modern public, Project Gemini was the "middle child":
+a two person capsule which could rendezvous and dock with other craft in
+orbit, could be depressurised and repressurised in orbit to facilitate
+spacewalks, and whose longest flight was almost two weeks - longer than any
+Apollo mission!  In terms of size, weight and cost Gemini was much closer to
+Mercury than to Apollo, but in terms of capabilities it was the other way
+around - there were even plans (which never eventuated) to do circumlunar
+Gemini flights!
+
+Hopefully the analogy is obvious: Gopher is akin to Mercury, and the web is
+akin to Apollo.  Gemini hopes to sit between the two, doing more with less.
+
+Gemini very deliberately didn't receive a name which had *anything* to do
+with gophers, or other rodents, or even other animals.  During the earliest
+phlog-based discussions which eventually grew into Project Gemini, a lack of
+careful writing meant it was sometimes unclear whether people were talking
+about replacing Gopher outright, or adding unofficial,
+compatibility-breaking upgrades into existing Gopher clients and servers. 
+When idle discussion turned into an actual project, it seemed wise to send a
+clearer message.

 ### 1.8 Where can I learn more?

-The official home of Project Gemini is the gemini.circumlunar.space server.  It serves the latest version of this FAQ document, as well the protocol specification, recommended best practices and other official documentation via Gemini, Gopher and HTTPS, on IPv4 and IPv6.
+The official home of Project Gemini is the gemini.circumlunar.space server. 
+It serves the latest version of this FAQ document, as well the protocol
+specification, recommended best practices and other official documentation
+via Gemini, Gopher and HTTPS, on IPv4 and IPv6.

 Official discussion regarding Gemini happens on a mailing list:

 => https://lists.orbitalfox.eu/listinfo/gemini		Subscribe to the list and view archives via the web
 => gemini://rawtext.club:1965/~sloum/geminilist/	View list archives via Gemini

-Anybody who is running a Gemini server or implementing a Gemini client or server software is strongly encouraged to subscribe to the list.
+Anybody who is running a Gemini server or implementing a Gemini client or
+server software is strongly encouraged to subscribe to the list.

-Casual discussion regarding Gemini also happens in the #gemini channel on the tilde.chat IRC server:
+Casual discussion regarding Gemini also happens in the #gemini channel on
+the tilde.chat IRC server:

 => gemini://makeworld.gq/cgi-bin/gemini-irc		View IRC logs via Gemini

@@ -67,151 +145,416 @@ Casual discussion regarding Gemini also happens in the #gemini channel on the ti

 ## 2.1 What are the design criteria for Gemini?

-The following criteria were informally put in place at the beginning of the project.  It's debatable how closely some of these goals have been met, but in general Gemini is still quite close to this target.
+The following criteria were informally put in place at the beginning of the
+project.  It's debatable how closely some of these goals have been met, but
+in general Gemini is still quite close to this target.

 ### 2.1.1 Simplicity

-In particular, Gemini strives for simplicity of client implementation.  Modern web browsers are so complicated that they can only be developed by very large and expensive projects.  This naturally leads to a very small number of near-monopoly browsers, which stifles innovation and diversity and allows the developers of these browsers to dictate the direction in which the web evolves.
-
-Gemini aims to be simple, but not *too* simple.  Gopher is simpler at a protocol level, but as a consequence the client is eternally uncertain: what character encoding is this text in?  Is this text the intended content or an error message from the server?  What kind of file is this binary data?  Because of this, a robust Gopher client is made *less* simple by needing to infer or guess missing information.
-
-Early Gemini discussion included three clear goals with regard to simplicity:
-
-* It should be possible for somebody who had no part in designing the protocol to accurately hold the entire protocol spec in their head after reading a well-written description of it once or twice.
-* A basic but usable (not ultra-spartan) client should fit comfortably within 50 or so lines of code in a modern high-level language.  Certainly not more than 100.
-* A client comfortable for daily use which implements every single protocol feature should be a feasible weekend programming project for a single developer.
-
-It's debatable to what extent these goals have been met.  Experiments suggest that a very basic interactive client takes more like a minimum of 100 lines of code, and a comfortable fit and moderate feature completeness need more like 200 lines.  But Gemini still seems to be in the ballpark of these goals.
+In particular, Gemini strives for simplicity of client implementation. 
+Modern web browsers are so complicated that they can only be developed by
+very large and expensive projects.  This naturally leads to a very small
+number of near-monopoly browsers, which stifles innovation and diversity and
+allows the developers of these browsers to dictate the direction in which
+the web evolves.
+
+Gemini aims to be simple, but not *too* simple.  Gopher is simpler at a
+protocol level, but as a consequence the client is eternally uncertain: what
+character encoding is this text in?  Is this text the intended content or an
+error message from the server?  What kind of file is this binary data? 
+Because of this, a robust Gopher client is made *less* simple by needing to
+infer or guess missing information.
+
+Early Gemini discussion included three clear goals with regard to
+simplicity:
+
+* It should be possible for somebody who had no part in designing the
+  protocol to accurately hold the entire protocol spec in their head after
+  reading a well-written description of it once or twice.
+
+* A basic but usable (not ultra-spartan) client should fit comfortably
+  within 50 or so lines of code in a modern high-level language.  Certainly
+  not more than 100.
+
+* A client comfortable for daily use which implements every single protocol
+  feature should be a feasible weekend programming project for a single
+  developer.
+
+It's debatable to what extent these goals have been met.  Experiments
+suggest that a very basic interactive client takes more like a minimum of
+100 lines of code, and a comfortable fit and moderate feature completeness
+need more like 200 lines.  But Gemini still seems to be in the ballpark of
+these goals.

 ### 2.1.2 Privacy

-Gemini is designed with an acute awareness that the modern web is a privacy disaster, and that the internet is not a safe place for plaintext.  Things like browser fingerprinting and Etag-based "supercookies" are an important cautionary tale: user tracking can and will be snuck in via the backdoor using protocol features which were not designed to facilitate it.  Thus, protocol designers must not only avoid designing in tracking features (which is easy), but also assume active malicious intent and avoid designing anything which could be subverted to provide effective tracking.  This concern manifests as a deliberate non-extensibility in many parts of the Gemini protocol.
+Gemini is designed with an acute awareness that the modern web is a privacy
+disaster, and that the internet is not a safe place for plaintext.  Things
+like browser fingerprinting and Etag-based "supercookies" are an important
+cautionary tale: user tracking can and will be snuck in via the backdoor
+using protocol features which were not designed to facilitate it.  Thus,
+protocol designers must not only avoid designing in tracking features (which
+is easy), but also assume active malicious intent and avoid designing
+anything which could be subverted to provide effective tracking.  This
+concern manifests as a deliberate non-extensibility in many parts of the
+Gemini protocol.

 ### 2.1.3 Generality

-The "first class" application of Gemini is human consumption of predominantly written material - to facilitate something like gopherspace, or like "reasonable webspace" (e.g. something which is comfortably usable in Lynx or Dillo).  But, just like HTTP can be, and is, used for much, much more than serving HTML, Gemini should be able to be used for as many other purposes as possible without compromising the simplicity and privacy criteria above.  This means taking into account possible applications built around non-text files and non-human clients.
+The "first class" application of Gemini is human consumption of
+predominantly written material - to facilitate something like gopherspace,
+or like "reasonable webspace" (e.g.  something which is comfortably usable
+in Lynx or Dillo).  But, just like HTTP can be, and is, used for much, much
+more than serving HTML, Gemini should be able to be used for as many other
+purposes as possible without compromising the simplicity and privacy
+criteria above.  This means taking into account possible applications built
+around non-text files and non-human clients.

 ## 2.2 Which shortcomings of Gopher does Gemini overcome?

 Gemini allows for:

 * Unambiguous use of arbitrary non-ASCII character sets.
-* Identifying binary content using MIME types instead of a small set of badly outdated item types.
+
+* Identifying binary content using MIME types instead of a small set of
+  badly outdated item types.
+
 * Clearly distinguishing successful transactions from failed ones.
-* Linking to resources served over other protocols via simple URLs, without ugly hacks.
+
+* Linking to resources served over other protocols via simple URLs, without
+  ugly hacks.
+
 * Redirects to prevent broken links when content moves or is rearranged.
+
 * Domain-based virtual hosting.

-Text in Gemini documents is wrapped by the client to fit the device's viewport, rather than being "hard wrapped" at ~80 characters with newline characters.  This means content displays equally well on phones, tablets, laptops and desktops.
+Text in Gemini documents is wrapped by the client to fit the device's
+viewport, rather than being "hard wrapped" at ~80 characters with newline
+characters.  This means content displays equally well on phones, tablets,
+laptops and desktops.

-Gemini does away with Gopher's strict directory / text dichotomy and lets you insert links in prose.
+Gemini does away with Gopher's strict directory / text dichotomy and lets
+you insert links in prose.

 Gemini mandates the use of TLS encryption.

 ## 2.3 Is Gopher's directory / text dichotomy *really* a shortcoming?

-Modern usage habits in the phlogosphere would seem to suggest that many people think it is.  An increasing number of users are serving content which is almost entirely text as item type 1, so that they can insert a relatively small number of "in line" links to other gopher content, providing some semblance of HTML's hyperlinking - a perfectly reasonable and inoffensive thing to want to do.  Without taking this approach, the best Gopher content authors can do is to paste a list of URLs at the bottom of their document, for their readers to manually copy and paste into their client.  This is not exactly a pleasant user experience.  But forcing hyperlinks into Gopher this way isn't just an abuse of the semantics of the Gopher protocol, it's also a surprisingly inefficient way to serve text, because every single line has to have an item type of i and a phony selector, hostname and port transmitted along with it to make a valid Gopher menu.  Any and all claims to simplicity and beauty which Gopher might have are destroyed by this.  Gemini takes the simple approach of letting people insert as many or as few links as they like into their text content, with extremely low overhead, but retains the one-link-per-line limitation of Gopher which results in clean, list-like organisation of content.  It's hard to see this as anything other than an improvement.
-
-Of course, if you really like the Gopher way, nothing in Gemini stops you from duplicating it.  You can serve item type 0 content with a MIME type of text/plain, and you can write text/gemini documents where every single line is a link line, replicating the look and feel of a RFC1436-fearing Gopher menu without that pesky non-standard i item type.
+Modern usage habits in the phlogosphere would seem to suggest that many
+people think it is.  An increasing number of users are serving content which
+is almost entirely text as item type 1, so that they can insert a relatively
+small number of "in line" links to other gopher content, providing some
+semblance of HTML's hyperlinking - a perfectly reasonable and inoffensive
+thing to want to do.  Without taking this approach, the best Gopher content
+authors can do is to paste a list of URLs at the bottom of their document,
+for their readers to manually copy and paste into their client.  This is not
+exactly a pleasant user experience.  But forcing hyperlinks into Gopher this
+way isn't just an abuse of the semantics of the Gopher protocol, it's also a
+surprisingly inefficient way to serve text, because every single line has to
+have an item type of i and a phony selector, hostname and port transmitted
+along with it to make a valid Gopher menu.  Any and all claims to simplicity
+and beauty which Gopher might have are destroyed by this.  Gemini takes the
+simple approach of letting people insert as many or as few links as they
+like into their text content, with extremely low overhead, but retains the
+one-link-per-line limitation of Gopher which results in clean, list-like
+organisation of content.  It's hard to see this as anything other than an
+improvement.
+
+Of course, if you really like the Gopher way, nothing in Gemini stops you
+from duplicating it.  You can serve item type 0 content with a MIME type of
+text/plain, and you can write text/gemini documents where every single line
+is a link line, replicating the look and feel of a RFC1436-fearing Gopher
+menu without that pesky non-standard i item type.

 ## 2.4 Which shortcomings of the web does Gemini overcome?

-Gemini contains no equivalent of User-Agent or Referer headers, and the request format is not extensible so that these cannot be shoehorned in later.  In fact, Gemini requests contain nothing other than the URL of the resource being requested.  This goes a very long way to preventing user tracking.
+Gemini contains no equivalent of User-Agent or Referer headers, and the
+request format is not extensible so that these cannot be shoehorned in
+later.  In fact, Gemini requests contain nothing other than the URL of the
+resource being requested.  This goes a very long way to preventing user
+tracking.

-The "native content type" of Gemini (analogous to HTML for HTTP(S) or plain text for Gopher) never requires additional network transactions (there are no in-line images, external stylesheets, fonts or scripts, no iframes, etc.).  This allows for quick browsing even on slow connections and for full awareness of and control over which hosts connections are made to.
+The "native content type" of Gemini (analogous to HTML for HTTP(S) or plain
+text for Gopher) never requires additional network transactions (there are
+no in-line images, external stylesheets, fonts or scripts, no iframes,
+etc.).  This allows for quick browsing even on slow connections and for full
+awareness of and control over which hosts connections are made to.

-The native content type of Gemini is strictly a document, with no facility for scripting, allowing for easy browsing even on old computers with limited processor speed or memory.
+The native content type of Gemini is strictly a document, with no facility
+for scripting, allowing for easy browsing even on old computers with limited
+processor speed or memory.

 ## 2.5 Why not just use a subset of HTTP and HTML?

-Many people are confused as to why it's worth creating a new protocol to address perceived problems with optional, non-essential features of the web.  Just because websites *can* track users and run CPU-hogging Javsacript and pull in useless multi-megabyte header images or even larger autoplaying videos, doesn't mean they *have* to.  Why not just build non-evil websites using the existing technology?
-
-Of course, this is possible.  "The Gemini experience" is roughly equivalent to HTTP where the only request header is "Host" and the only response header is "Content-type" and HTML where the only tags are 

,

, , 

through

,