title: Ruby Webrick HTTP Authentication
body: <p>How can I do the same authentication stuff in <a href="http://microjet.ath.cx/webrickguide/html/HTTP_Authentication.html" rel="nofollow noreferrer">this page</a> using a subclass like this:</p>
  
  <pre><code>        class Configuration &lt; HTTPServlet::AbstractServlet
          def do_GET (request, response)
              SOMETHING....
          end
          end
  
      server = HTTPServer.new(:Port =&gt; 666)
      server.mount "/conf", Configuration
      trap "INT" do server.shutdown end
      server.start
  </code></pre>