WEBrick::HTTPServlet::DefaultFileHandler < WEBrick::HTTPServlet::AbstractServlet
(from /home/chedong/.local/share/rdoc)
| Use Case | Command | Description |
|---|---|---|
| 📄 Serve a single file | server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler, '/path/to/my_page.txt') |
Serve a specific file at a given URL path |
| 🔄 Handle conditional requests | Automatically supports If-Modified-Since and Range headers |
|
Servlet for serving a single file. You probably want to use the FileHandler servlet instead as it handles directories and fancy indexes.
Example:
server.mount('/my_page.txt', WEBrick::HTTPServlet::DefaultFileHandler,
'/path/to/my_page.txt')
This servlet handles If-Modified-Since and Range requests.
new — Creates a new instance of the servletGenerated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-28 20:31 @216.73.217.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format