127.0.0.1:8080/http
That's a real address. My own browser landed there. It shouldn't exist. Not as a page, not as a route, nothing.
Last weekend I had spent 72 hours writing a reverse proxy from scratch for a zero-dependency hackathon. No hyper, no tokio, not a single crate. Every byte of HTTP/1.1 parsing, hand-rolled against the Rust standard library.
The bug took four characters to explain. My header parser split every line on : and kept only the second piece. Fine for Host: example.com, but broken for Location: http://www.google.com/ which has two colons. My code kept http, threw the rest away, and handed my browser a redirect to nowhere. The browser did the only sane thing with garbage input: treated it as a relative path and bolted it onto the current URL.
Every test I had written passed. None of them happened to send a header value with a colon in it. It took pointing the proxy at a real site, one that redirects plain HTTP to HTTPS, to find what hyper users never have to think about. This is because hyper already survived this exact failure, years ago, against traffic none of us will ever see.
That's the whole hackathon, honestly: build the thing you always cargo add, and you rediscover every hard-won lesson the library authors already paid for. One broken redirect at a time.
By the end: a longest-prefix router with nginx-style path stripping, active health checks with automatic failover, keep-alive, chunked transfer-encoding, an RFC 1123 date formatter checked against a real leap day, and 59 tests — several written directly against bugs exactly like this one.
Built for Zero Dependency 2026, Track C — Web & Network.
Github: Zeroxy
What's a piece of infrastructure you've always taken for granted until you tried building even a rough version of it yourself?
Top comments (0)