🤖 AI Summary
A developer used Claude to quickly build and publish a minimal static web server written in COBOL (GnuCOBOL). The repo compiles with make (cobc) on POSIX systems (Linux, macOS, BSD) and runs a single-threaded server on port 8080 by default. Features include automatic MIME-type detection for common filetypes, clean request logging with full HTTP headers, default index.html handling, basic HTTP status support (200, 403, 404), path traversal prevention (blocks “..”), and directory restrictions to the current directory and its subfolders. Build and run: install GnuCOBOL, clone the project, make, then ./webserver; change SERVER-PORT in config.cpy and recompile to use a different port.
Technically this is a demonstration rather than a production server: it’s single-threaded, has no SSL/TLS, lacks caching/compression and range-request support, and limits served file size to 64 KB. The codebase is modular (socket, HTTP/file structs, path utilities, MIME types, handlers), making it a useful reference for implementing HTTP basics and safe file handling in an unexpected language. The project highlights COBOL’s viability for modern systems programming and educational retro-tech experimentation, while also signaling the practical limits (performance, security, and feature gaps) that would need addressing for real-world deployment.
Loading comments...
login to comment
loading comments...
no comments yet