feat(site-3): create index.php for site-3 with a greeting message refactor(client): change setCgiSocket to accept unique_ptr for better memory management fix(AConfig): adjust getCGIPath to correctly prepend dot to extension refactor(CgiProcess): update CGI process handling to use unique_ptr for CgiSocket refactor(URI): enhance logging for CGI checks and improve condition checks refactor(Router): clean up commented code and add debug logging for CGI process fix(Server): improve error logging for epoll_ctl failures |
||
|---|---|---|
| .devcontainer | ||
| .vscode | ||
| config | ||
| docs | ||
| htdocs | ||
| logs | ||
| scripts | ||
| tests | ||
| webserv | ||
| .clang-format | ||
| .clang-tidy | ||
| .gitignore | ||
| CMakeLists.txt | ||
| compile_flags.txt | ||
| Makefile | ||
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]