- Add NULL checks after malloc() calls in HTTP/HTTPS thread creation
- Add error checking for fcntl() calls to prevent silent failures
- Add integer overflow protection in WebSocket frame handling
- Improve socket option error handling with proper validation
- Add SIZE_MAX check in ws_send_frame to prevent overflow
These fixes address potential crashes and security issues in high-load
scenarios and improve overall robustness of the server.
- Added SSL certificate and key paths to ServerConfig structure.
- Updated init_config function to initialize new SSL paths.
- Formated code for better readability.
- Added max_connections option to server configuration
- Updated Makefile to include performance.c and related headers
- Implemented memory-mapped file caching and buffer pooling for improved performance
- Refactored config parser to handle new configuration options
- Increased maximum request size and optimized file handling
- Added HTTP/2 support in src/http2.c and src/http2.h, including session management, frame handling, and response sending.
- Introduced WebSocket functionality in src/websocket.c and src/websocket.h, covering handshake, frame parsing, and message sending.
- Created a WebSocket test page (www/websocket-test.html) for client-side interaction.
- Removed outdated JavaScript (www/script.js) and CSS (www/style.css) files.
- Removed old server configuration files (server.json, server.log, server_config.c, server_config.h).
- Introduced a new configuration file (server.conf) with a more structured format.
- Implemented a configuration parser (config_parser.c) to read and apply settings from server.conf.
- Updated server logic to utilize the new configuration structure.
- Enhanced logging functionality and added rate limiting features.
- Improved error handling and security measures in request processing.
- Added 'log/*' and 'server' to .gitignore to exclude log files and server binary.
- Enhanced README.md with improved structure and additional features.
- Updated server configuration to provide a warning for default server_name and changed default to '127.0.0.1'.
feat: Major server enhancements and build system
- Implemented file caching system with LRU eviction
- Added thread pool for connection handling
- Improved MIME type detection and security headers
- Added rate limiting per IP address
- Enhanced logging system with rotation
- Added proper signal handling and graceful shutdown
- Implemented SSL/TLS support with modern cipher suites
- Added license (MIT) and disclaimer
- Fixed CSS/JS MIME type issues
- Optimized socket configuration
- Added sendfile() optimization
- Improved error handling and memory management
Technical changes:
- Set TCP_NODELAY and optimized socket buffers
- Implemented epoll-based async I/O
- Added file cache with 1MB max file size
- Set 100MB max log file size with rotation
- Added thread pool with 32 max threads
- Implemented rate limiting (100 requests/60s)
- Added proper MIME type detection
- Fixed CSP headers for external resources
- Added comprehensive input sanitization
- Improved SSL context configuration
- Added proper resource cleanup