Commit Graph

14 Commits

Author SHA1 Message Date
1c3c31a7b8 Add Dockerfile and docker-compose.yml for containerized setup; create .dockerignore (#6) 2025-11-03 14:32:17 +01:00
2c74ed2b0c Update Makefile to create bin directory and adjust object file paths; add initial Dockerfile 2025-11-03 11:38:35 +01:00
c588d560d7 fix: Add critical memory safety and error handling improvements
- 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.
2025-11-02 13:11:07 +01:00
01874b0e5a Enhance error handling for HTTP/2 file size, validate mmap cache entries, improve WebSocket connection handling, enforce maximum URI length, and limit WebSocket payload size. 2025-11-02 12:22:12 +01:00
636b221d62 Test verified commit" 2025-11-01 23:47:05 +01:00
301d408647 tst 2025-11-01 23:38:17 +01:00
7c555b5cb9 tst 2025-11-01 23:31:15 +01:00
2fc7edf37d Validate input parameters and enhance error handling in configuration loading, task queue management, SSL initialization, and WebSocket handshake processes. 2025-11-01 23:20:01 +01:00
72df6a73fc Enhance server ssl configuration
- Added SSL certificate and key paths to ServerConfig structure.
- Updated init_config function to initialize new SSL paths.
- Formated code for better readability.
2025-10-05 17:35:00 +00:00
46b653efe0 Enhance server configuration and performance optimizations
- 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
2025-10-03 22:08:55 +00:00
b5a30a5268 Add www_path configuration option and update related parsing logic 2025-10-03 21:10:16 +00:00
e93e65f882 Refactor config parsing to use a switch statement for improved readability and maintainability 2025-10-03 08:56:32 +00:00
a2c4617493 Implement HTTP/2 and WebSocket support; remove legacy JavaScript and CSS files
- 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.
2025-10-02 21:14:23 +00:00
c9ac352bb4 Refactor server configuration management
- 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.
2025-10-02 18:57:05 +00:00