Subject: | thttpd HTTP_HOST does not include a port |
tftpd sets CGI variables like this:
SERVER_PORT=8181
HTTP_HOST=localhost
The virtual_port method assumes that if there's a HTTP_HOST, any port is
included in it (like "localhost:8181"). When there's no port, it assumes
80 (or 443). That works with Apache, but this variable does not seem to
be part of the spec for CGI, and tftpd has other ideas.
I think that CGI.pm should support tftpd, which could be done by looking
at SERVER_PORT when HTTP_HOST has no port.
Example breakage due to this bug, also includes a patch to fix thttpd:
http://ikiwiki.info/bugs/Running_on_an_alternative_port_fails/
version: CGI.pm 3.52 from perl 5.14.2