- Introduced AConfig class to handle common configuration functionalities. - Added GlobalConfig class to manage multiple ServerConfig instances. - Updated ServerConfig to utilize the new AConfig base class. - Refactored directive parsing logic to improve clarity and maintainability. - Enhanced utility functions for removing comments and empty lines from configuration blocks. - Updated directive classes to use consistent naming for value retrieval methods. - Improved logging for better traceability during configuration parsing. - Removed unused includes and cleaned up code for better readability. |
||
|---|---|---|
| .devcontainer | ||
| .vscode | ||
| config | ||
| docs | ||
| webserv | ||
| .clang-format | ||
| .clang-tidy | ||
| .gitignore | ||
| .iwyu.imp | ||
| check_iwyu.sh | ||
| CMakeLists.txt | ||
| compile_flags.txt | ||
| fix_iwyu_auto.sh | ||
| format.sh | ||
| Makefile | ||
| Makefile.old | ||
| setup.sh | ||
webserv
Date Flow Overview
src/
├─ main.cpp # starts server
├─ Server.cpp/.hpp # listens & manages event loop
├─ Connection.cpp/.hpp # represents a single client
├─ RequestParser.cpp/.hpp
├─ Router.cpp/.hpp
├─ Response.cpp/.hpp
├─ CGIHandler.cpp/.hpp
├─ Config.cpp/.hpp # parses config file
└─ Utils.cpp/.hpp
[Client TCP packet]
│
▼
┌───────────────┐
│ Event Loop │ (poll/select/epoll)
└──────┬────────┘
│
▼
┌───────────────┐
│ RequestParser │ (builds Request struct)
└──────┬────────┘
│
▼
┌───────────────┐
│ Router │ (selects location, checks methods)
└──────┬────────┘
│
▼
┌───────────────┐
│ Handler │ (static file, CGI, error)
└──────┬────────┘
│
▼
┌───────────────┐
│ ResponseBuilder│ (status line + headers + body)
└──────┬────────┘
│
▼
[Send response back to client]