Brought over the core of Frame's HTTP server.