Class: Yast::IndexServlet
- Inherits:
-
WEBrick::HTTPServlet::AbstractServlet
- Object
- WEBrick::HTTPServlet::AbstractServlet
- Yast::IndexServlet
- Defined in:
- lib/yast/index_servlet.rb
Overview
a webrick servlet which returns a basic HTML info about the server, just to avoid that nasty 404 error page when someone opens the server URL in a web browser
Constant Summary collapse
- INDEX_FILE =
File.("../../data/index.html", __dir__)
Instance Method Summary collapse
Instance Method Details
#do_GET(_request, response) ⇒ Object
30 31 32 33 34 |
# File 'lib/yast/index_servlet.rb', line 30 def do_GET(_request, response) response.status = 200 response.content_type = "text/html" response.body = File.read(INDEX_FILE) end |