Show HN: unsafehttp – tiny web server from scratch in C, running on an orange pi

10 GSGBen 8 8/16/2025, 8:46:15 PM unsafehttp.benren.au ↗
Hey HN, I wanted to get more familiar with C programming, *nix socket programming and C compilation, so I wrote this "web" ""server"". It's running on a tiny SBC in my office, and there's as little as possible between you and it.

Happy for you to try and break it, hopefully with something more interesting than a DoS though :) Please let me know if you find any issues.

Comments (8)

MelvinButtsESQ · 2m ago
Consider it broke. You are getting hugged to death by HN. Throw Cloudlfare in front.
p0w3n3d · 5m ago
I would expect GitHub page. The server seems down
201984 · 4m ago
It had a link to the GitHub page while it was still up.

https://github.com/GSGBen/unsafehttp

joncfoo · 24m ago
Doesn't seem to be up =\
GSGBen · 37s ago
Found the issue - a use after free in send_response() if I close the session early due to an error. Was continuing to the next bit. Put a temp fix in place, will push a proper one later.
GSGBen · 15m ago
Whoops, should be back up now. I'll have to check logs later to see why it went down.
eyjafjallajokul · 8m ago
You're going to need a bigger host to support HN traffic :)
201984 · 1m ago
What is it about HN that overwhelms small servers like this? It was a small static page so I wouldn't think it'd be that much load on the server itself, even for an OrangePi like this one.

Too many simultaneous connections for his router maybe? Or too much bandwidth for his internet connection?