summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-10-24 14:12:19 +0000
committerLaurent Bercot <ska@appnovation.com>2023-10-24 14:12:19 +0000
commit713994fd2c7a6da9e69222695e7d7a1e963312f8 (patch)
tree296d3df0b1b3c403df7377a3c7ca795bc8fa7648 /doc
parent4bd3cae342a3c29adef0c46a205d7e3b9bca7214 (diff)
downloadtipidee-713994fd2c7a6da9e69222695e7d7a1e963312f8.tar.xz
Deglobal index-file
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/quickstart.html37
-rw-r--r--doc/tipidee.conf.html42
2 files changed, 63 insertions, 16 deletions
diff --git a/doc/quickstart.html b/doc/quickstart.html
index f9627f5..312b87f 100644
--- a/doc/quickstart.html
+++ b/doc/quickstart.html
@@ -103,6 +103,43 @@ your service manager scripts. </li>
containing service files to run tipidee under various service managers.
</p>
+<div id="caveats">
+<h2> Caveats </h2>
+</div>
+
+<h3> <tt>Host</tt> support in HTTP/1.0 </h3>
+
+<p>
+ A strict reading of the
+<a href="https://datatracker.ietf.org/doc/html/rfc1945">HTTP/1.0 specification</a>
+says that the Request-Line is the only piece of client-provided data that can
+be used to identify a resource, and that extension headers can modify the
+interpretation and processing of that resource but not <em>change</em> what
+resource is served.
+</p>
+
+<p>
+ This goes directly against the use of the <tt>Host</tt> header to identify
+the host of a resource and that is used in HTTP/1.1.
+</p>
+
+<p>
+ A lot of HTTP servers out there don't really care about that, and have
+historically used <tt>Host</tt> to perform virtual hosting even in HTTP/1.0,
+even though it goes against the specification. Consequently, clients have
+adapted, and
+<a href="https://github.com/curl/curl/issues/5976">even the popular
+<tt>curl</tt> client</a> sends a <tt>Host</tt> header in HTTP/1.0.
+</p>
+
+<p>
+ Since the point of the Web is interoperability, tipidee aligns with
+the common practice, and will read a client-provided <tt>Host</tt> header,
+if any, to determine what domain the request is directed to, even in
+HTTP/1.0 though it is contrary to the specification. I refer to this
+practice as "HTTP/1.05".
+</p>
+
<div id="faq">
<h2> Frequently asked questions </h2>
</div>
diff --git a/doc/tipidee.conf.html b/doc/tipidee.conf.html
index 10de524..7ead60f 100644
--- a/doc/tipidee.conf.html
+++ b/doc/tipidee.conf.html
@@ -139,14 +139,20 @@ directive! </li>
</ul>
<div id="global">
-<h3> Global directives </h3>
+<h3> Simple global settings </h3>
</div>
<p>
Global directives control global aspects of <a href="tipideed.html">tipideed</a>
&mdash; values that apply to the server itself, no matter what domain it is
-serving. The directive name is <tt>global</tt>, and it takes two arguments: the
-name and the value of a setting.
+serving.
+
+<p>
+ Some global directives are introduced by their own keywords, see below.
+Others are simple configuration values that would clutter up the
+directive namespace, so we put them together under a unique umbrella,
+the <tt>global</tt> directive.
+<tt>global</tt> takes two arguments: the name of a setting and its value.
</p>
<div id="read_timeout">
@@ -270,20 +276,25 @@ output data. And this is "private dirty" memory, i.e. memory that
that setting &mdash; and with the CGI scripts you choose to run. </li>
</ul>
-<div id="index_file">
-<h4> <tt>index_file</tt> </h4>
+<div id="index-file">
+<h3> The <tt>index-file</tt> directive </h3>
</div>
<p>
- <code> global index_file <em>file1</em> <em>file2</em> ... </code>
+ <code> index-file <em>file1</em> <em>file2</em> ... </code>
+</p>
+
+<p>
+ <tt>index-file</tt> is a global directive, the first one in this
+list that is introduced by its own keyword and does not use <tt>global</tt>.
</p>
<ul>
- <li> The <tt>global index_file</tt> directive has a variable number of
+ <li> The <tt>index-file</tt> directive has a variable number of
arguments. <em>file1</em>, <em>file2</em>, and so on are the names of the
files that should be used to try and complete the URI when a client request
resolves to a directory. </li>
- <li> For instance: <tt>global index_file index.cgi index.html index.htm</tt>
+ <li> For instance: <tt>index-file index.cgi index.html index.htm</tt>
means that when <a href="tipideed.html">tipideed</a> is asked to serve
<tt>http://example.com</tt>, it will first try to serve as if the request
had been <tt>http://example.com/index.cgi</tt>, then
@@ -295,7 +306,7 @@ resources exist, <a href="tipideed.html">tipideed</a> responds 404 (Not Found).
<tt>http://example.com/foo/index.cgi</tt>, then (if not found)
<tt>http://example.com/foo/index.html</tt>, then (if not found)
<tt>http://example.com/foo/index.htm</tt>. </li>
- <li> The default is <tt>global index_file index.html</tt>, meaning that
+ <li> The default is <tt>index-file index.html</tt>, meaning that
only the <tt>index.html</tt> file will be looked up when a resource resolves
to a directory. </li>
</ul>
@@ -305,9 +316,8 @@ to a directory. </li>
</div>
<p>
- <tt>log</tt> is also a global directive, but is introduced by the
-keyword <tt>log</tt>, without prepending <tt>global</tt>. It allows
-the user to control what will appear in
+ <tt>log</tt> is a global directive, introduced by the
+keyword <tt>log</tt>. It allows the user to control what will appear in
<a href="tipideed.html">tipideed</a>'s log output.
</p>
@@ -409,8 +419,8 @@ This keyword has no effect when given without the <tt>answer</tt> keyword. </dd>
</div>
<p>
- <tt>content-type</tt> is also a global directive, but is introduced by the
-keyword <tt>content-type</tt>, without prepending <tt>global</tt>. It allows
+ <tt>content-type</tt> is a global directive, introduced by the
+keyword <tt>content-type</tt>. It allows
the user to define mappings from a document's extension to a standard Content-Type.
</p>
@@ -435,8 +445,8 @@ serving files with uncommon extensions or have specific needs. </li>
</div>
<p>
- <tt>custom-header</tt> is also a global directive, but is introduced by the
-keyword <tt>custom-header</tt>, without prepending <tt>global</tt>. It allows
+ <tt>custom-header</tt> is global directive, introduced by the
+keyword <tt>custom-header</tt>. It allows
the user to define custom headers that are to be added to every response.
</p>