Implementing a minimal HTTP server in Ruby