Hasty Briefsbeta

Webbol: A minimal static web server written in COBOL

4 hours ago
  • #WebServer
  • #COBOL
  • #StaticFiles
  • Minimal static web server written in COBOL using GnuCOBOL.
  • Serves static files from the current directory with automatic MIME type detection.
  • Supports HTTP status codes: 200, 403, 404.
  • Prevents path traversal attacks and logs clean HTTP headers.
  • Defaults to serving 'index.html' for root path requests.
  • Requires GnuCOBOL (cobc) compiler, POSIX-compatible OS, and make.
  • Installation instructions provided for macOS, Ubuntu/Debian, and Fedora/RHEL.
  • Compile with 'make' and run './webserver' to start on port 8080.
  • Test with 'curl http://localhost:8080/'.
  • Change server port by editing 'config.cpy' and recompiling.
  • Supports common MIME types for HTML, CSS, JS, images, etc.
  • Security features include path validation and directory access restriction.
  • Limitations: No SSL/TLS, max file size 64KB, no caching or compression.
  • Troubleshooting tips for port conflicts, permissions, and file not found errors.
  • Released into the public domain, demonstrating COBOL's modern use.