News for hackers. Stuff that matters.
Re:Sherver: Bash lightweight web server by dormento on Wednesday December 22, 2021 @09:36AM (#29649872)
Whoa, nifty.

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?

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