Re:Sherver: Bash lightweight web server
by hericium on Wednesday December 22, 2021 @12:07PM
(#29652078)
Browser expects to see some HTTP headers before the content.
Adding HTTP version with response code, content type declaration and empty line dividing headers and content should do the trick:
HTTP/1.1 200
Content-Type: text/plan;
1st line of content
Why does firefox shows the "chose an application to open this link" when you access the http://localhost link, but shows the content correctly when you access the 127.0.0.1/0.0.0.0 ip-based version?