At 06:07 PM 6/17/2010, Richard Hipp wrote:
I think this is a case of thttpd not setting up the HTTP_HOST environment variable correctly.... I'm guessing thttpd omits the port number.
Yes, it does, from the HTTP_HOST variable at least.
That would be a mistake on the part of thttpd, if I'm not badly mistaken.
I'm having trouble finding a definitive answer to that question. The various copies of "CGI 1.1" documentation I've found are either silent about variables named HTTP_*, or suggest that they are derived from the HTTP request header in an underspecified way. I'd tend to agree that whatever Apache does is probably the "most correct" however.
Fossil expects to find the TCP port number on the end of the HTTP_HOST environment variable and if it doesn't find it there, it assumes port 80.
There are also SERVER_NAME and SERVER_PORT. Thttpd does supply those, and they are named explicitly in every CGI document a quick search turned up just now. Perhaps the host name should be assembled from those two, omitting the port if it is 80 of course.
One of the backup webservers for Fossil is Hurricane Electric - a virtual host running apache, but on port 80 instead of 8080...
And that test_env agrees with my internal server running Apache on port 80, which has worked happily for months now.
If you want a simple webserver for your DNS-323, consider running althttpd - the HTTP server used by <http://www.fossil-scm.org>www.fossil-scm.org and <http://www.sqlite.org>www.sqlite.org. The source code is a single file of C located here:
I'll look at that again, but last time I checked it was assuming inetd was available, and the DNS-323 doesn't have an inetd running. The idea is attractive because I have only a limited amount of free space in its RAM disk, and the fossil executable is too large to fit making it unattractive to just use fossil server. (It would hold a file descriptor open on the RAID, making it more difficult to run fsck and the like occasionally.) That was what drove me to look for alternatives.
Thanks for the quick response and any further thoughts... Ross Berteig [email protected] Cheshire Engineering Corp. http://www.CheshireEng.com/
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

