Strangest error when defaulting to port 80
(1) By Stephan Beal (stephan) on 2022-02-01 04:58:14 [link] [source]
This is truly odd...
This works fine for me:
$ sudo ./althttpd -port 80 -root $PWD -logfile /dev/stderr -user stephan
^C
But this ostensible equivalent fails (the only difference is the lack of -port 80):
$ sudo ./althttpd -root $PWD -logfile /dev/stderr -user stephan
400 Bad Request
Connection: close
Date: Tue, 01 Feb 2022 04:50:43 GMT
Content-type: text/plain; charset=utf-8
This server does not understand the requested protocol
That message shows up as soon as i tap ENTER in the console (after the ENTER to run the command). Before that point, the browser cannot connect, as if port 80 is simply not in use.
(2) By anonymous on 2022-03-15 22:21:25 in reply to 1 [link] [source]
Interesting...
$ ~/bin/althttpd -port 8080 -root ~/www
`
The shell (bash) looks like it kills althttpd, but the process is still running. I don't know what would make it look like the process isn't running anymore.
(3) By Stephan Beal (stephan) on 2022-03-15 22:25:51 in reply to 2 [source]
The shell (bash) looks like it kills althttpd, but the process is still running. I don't know what would make it look like the process isn't running anymore.
The trick is to use the -debug 1
flag, which disables althttpd's use of timers internally.