From 713994fd2c7a6da9e69222695e7d7a1e963312f8 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 24 Oct 2023 14:12:19 +0000 Subject: Deglobal index-file Signed-off-by: Laurent Bercot --- doc/quickstart.html | 37 +++++++++++++++++++++++++++++++++++++ doc/tipidee.conf.html | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 63 insertions(+), 16 deletions(-) (limited to 'doc') 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. containing service files to run tipidee under various service managers.

+
+

Caveats

+
+ +

Host support in HTTP/1.0

+ +

+ A strict reading of the +HTTP/1.0 specification +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 change what +resource is served. +

+ +

+ This goes directly against the use of the Host header to identify +the host of a resource and that is used in HTTP/1.1. +

+ +

+ A lot of HTTP servers out there don't really care about that, and have +historically used Host to perform virtual hosting even in HTTP/1.0, +even though it goes against the specification. Consequently, clients have +adapted, and +even the popular +curl client sends a Host header in HTTP/1.0. +

+ +

+ Since the point of the Web is interoperability, tipidee aligns with +the common practice, and will read a client-provided Host 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". +

+

Frequently asked questions

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!
-

Global directives

+

Simple global settings

Global directives control global aspects of tipideed — values that apply to the server itself, no matter what domain it is -serving. The directive name is global, and it takes two arguments: the -name and the value of a setting. +serving. + +

+ 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 global directive. +global takes two arguments: the name of a setting and its value.

@@ -270,20 +276,25 @@ output data. And this is "private dirty" memory, i.e. memory that that setting — and with the CGI scripts you choose to run. -
-

index_file

+
+

The index-file directive

- global index_file file1 file2 ... + index-file file1 file2 ... +

+ +

+ index-file is a global directive, the first one in this +list that is introduced by its own keyword and does not use global.

    -
  • The global index_file directive has a variable number of +
  • The index-file directive has a variable number of arguments. file1, file2, 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.
  • -
  • For instance: global index_file index.cgi index.html index.htm +
  • For instance: index-file index.cgi index.html index.htm means that when tipideed is asked to serve http://example.com, it will first try to serve as if the request had been http://example.com/index.cgi, then @@ -295,7 +306,7 @@ resources exist, tipideed responds 404 (Not Found). http://example.com/foo/index.cgi, then (if not found) http://example.com/foo/index.html, then (if not found) http://example.com/foo/index.htm.
  • -
  • The default is global index_file index.html, meaning that +
  • The default is index-file index.html, meaning that only the index.html file will be looked up when a resource resolves to a directory.
@@ -305,9 +316,8 @@ to a directory.

- log is also a global directive, but is introduced by the -keyword log, without prepending global. It allows -the user to control what will appear in + log is a global directive, introduced by the +keyword log. It allows the user to control what will appear in tipideed's log output.

@@ -409,8 +419,8 @@ This keyword has no effect when given without the answer keyword.

- content-type is also a global directive, but is introduced by the -keyword content-type, without prepending global. It allows + content-type is a global directive, introduced by the +keyword content-type. It allows the user to define mappings from a document's extension to a standard Content-Type.

@@ -435,8 +445,8 @@ serving files with uncommon extensions or have specific needs.

- custom-header is also a global directive, but is introduced by the -keyword custom-header, without prepending global. It allows + custom-header is global directive, introduced by the +keyword custom-header. It allows the user to define custom headers that are to be added to every response.

-- cgit v1.3.1