From: Joey Hess Date: Wed, 23 Nov 2011 20:55:20 +0000 (-0400) Subject: Merge branch 'master' of ssh://git.ikiwiki.info X-Git-Tag: 3.20111107~50 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/4580662795788b83107d20943c77c7d4a6136a0a?hp=-c Merge branch 'master' of ssh://git.ikiwiki.info --- 4580662795788b83107d20943c77c7d4a6136a0a diff --combined doc/bugs/Running_on_an_alternative_port_fails.mdwn index b97f64383,2dea7a8dc..d091bf1fc --- a/doc/bugs/Running_on_an_alternative_port_fails.mdwn +++ b/doc/bugs/Running_on_an_alternative_port_fails.mdwn @@@ -24,22 -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`: + +
 +    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);
 +
+ +>>>> 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 @@@ -60,7 -44,7 +60,7 @@@ >>> ikiwiki-3.20110905 - >> which I'd guess is from Apr last year. Will look for updates and post back if still + >> which I'd guess is from Sep. Will look for updates and post back if still wrong. >> Cheers