aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/Running_on_an_alternative_port_fails.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-11-23 16:54:39 -0400
committerJoey Hess <joey@kitenet.net>2011-11-23 16:54:39 -0400
commit239e609bcf4e4c85fa505775e16ef4cb07655759 (patch)
treecb5464a14582a8d7472725403764099dda12819b /doc/bugs/Running_on_an_alternative_port_fails.mdwn
parent79a3148eba767ff903b103372c652ee41484693e (diff)
downloadikiwiki-239e609bcf4e4c85fa505775e16ef4cb07655759.tar
ikiwiki-239e609bcf4e4c85fa505775e16ef4cb07655759.tar.gz
analysis
Diffstat (limited to 'doc/bugs/Running_on_an_alternative_port_fails.mdwn')
-rw-r--r--doc/bugs/Running_on_an_alternative_port_fails.mdwn16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/bugs/Running_on_an_alternative_port_fails.mdwn b/doc/bugs/Running_on_an_alternative_port_fails.mdwn
index 7db0db386..b97f64383 100644
--- a/doc/bugs/Running_on_an_alternative_port_fails.mdwn
+++ b/doc/bugs/Running_on_an_alternative_port_fails.mdwn
@@ -24,6 +24,22 @@ right.
>>> SERVER_PORT=8181
>>> HTTP_HOST=zippy0.ie0.cobbled.net
+
+>>>> In apache, `HTTP_HOST` includes the port. This is not part of the CGI
+>>>> spec it seems, but perl's `CGI` module seems to rely on it,
+>>>> in `virtual_port`:
+
+<pre>
+ my $vh = $self->http('x_forwarded_host') || $self->http('host');
+ my $protocol = $self->protocol;
+ if ($vh) {
+ return ($vh =~ /:(\d+)$/)[0] || ($protocol eq 'https' ? 443 : 80);
+</pre>
+
+>>>> The `CGI` module only looks at `SERVER_PORT` when there's no
+>>>> `HTTP_HOST`. So this is either a bug in perl's CGI or thttpd.
+>>>> --[[Joey]]
+
>>> HTTP_ACCEPT_LANGUAGE=en-ie, en
>>> PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin
>>> SCRIPT_NAME=/cgi-bin/printenv.sh