aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.cgi.8
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-21 15:45:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-21 15:45:17 +0000
commit8abda0bf9851e11dece9e760efd941edd920eee5 (patch)
tree753f03c5135c47bd19baf30e36b7b040204b8cae /man.cgi.8
parentae6641bfafe5f6d5cefa0d535c66b5cfd989f218 (diff)
downloadmandoc-8abda0bf9851e11dece9e760efd941edd920eee5.tar.gz
mandoc-8abda0bf9851e11dece9e760efd941edd920eee5.tar.zst
mandoc-8abda0bf9851e11dece9e760efd941edd920eee5.zip
Kristaps points out that the current HTTP/1.1 draft standard (RFC
2616) requires the Location: response-header field to be an absolute URI (14.30), and only the most recent proposed standard (RFC 7231), which is barely a month old, allows a relative Location: (7.1.2). While most modern browsers appear to support relative Location: headers, some may not, and it's maybe a bit early to rely on relative Location: headers. I'm not going back to the HTTP_HOST or SERVER_NAME CGI variables, though. While some CGI programs certainly require those, in which case both the CGI programmer and the web server admin have to be very careful to keep the system secure and reliable, man.cgi(8) does not really need them. We always know at compile time which domain we are running for, and for man.cgi(8), security and reliability are definitely much more important than flexibility. So make HTTP_HOST a compile-time definition for now.
Diffstat (limited to 'man.cgi.8')
-rw-r--r--man.cgi.89
1 files changed, 7 insertions, 2 deletions
diff --git a/man.cgi.8 b/man.cgi.8
index 25fe9f2b..74ab525a 100644
--- a/man.cgi.8
+++ b/man.cgi.8
@@ -1,4 +1,4 @@
-.\" $Id: man.cgi.8,v 1.7 2014/07/18 19:03:39 schwarze Exp $
+.\" $Id: man.cgi.8,v 1.8 2014/07/21 15:45:17 schwarze Exp $
.\"
.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 18 2014 $
+.Dd $Mdocdate: July 21 2014 $
.Dt MAN.CGI 8
.Os
.Sh NAME
@@ -189,6 +189,11 @@ element.
An ASCII string to be used for the HTML
.Aq TITLE
element.
+.It Ev HTTP_HOST
+The FQDN of the (possibly virtual) host the HTTP server is running on.
+This is used for
+.Ic Location:
+headers in HTTP 303 responses.
.It Ev MAN_DIR
A path to the
.Nm