Build - #14
Merged
Merged
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix parser
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR represents a major build milestone for the Pginx HTTP server project, delivering a comprehensive web server implementation in C++98. The changes include a complete rewrite/refactoring of the codebase with new HTTP request handling, configuration parsing, and network I/O management.
Key changes:
- Complete HTTP server implementation with GET, POST, and DELETE method support
- NGINX-style configuration file parser with lexer/tokenizer
- Non-blocking I/O using epoll for event-driven architecture
- Polymorphic request handling with dedicated classes for each HTTP method
- Comprehensive documentation suite (7 markdown files totaling ~8000 lines)
- Test infrastructure with multiple test suites
- Custom error pages and upload form interface
Reviewed Changes
Copilot reviewed 82 out of 87 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| www/upload_form.html | Interactive HTML form for testing POST requests with multiple content types |
| www/index.html | Welcome page with styled branding for the web server |
| www/error_pages/*.html | Custom error pages (400, 403, 404, 413, 431) with consistent styling |
| src/main.cpp | Entry point orchestrating configuration parsing and server initialization |
| src/models/srcs/SocketManager.cpp | Core network I/O manager with epoll-based event loop (~668 lines) |
| src/models/srcs/HttpRequest.cpp | HTTP request handlers for GET/POST/DELETE methods (~457 lines) |
| src/models/srcs/HttpResponse.cpp | HTTP response builder with error page support |
| src/models/srcs/HttpParser.cpp | HTTP request parser converting raw text to request objects |
| src/models/srcs/parser.cpp | Configuration file parser (~443 lines) |
| src/models/srcs/lexer.cpp | Tokenizer for configuration files (~144 lines) |
| src/models/srcs/Server.cpp | Server configuration management |
| src/models/srcs/LocationConfig.cpp | Location block configuration |
| src/models/srcs/BaseBlock.cpp | Base configuration class with common directives |
| src/utils.cpp | Utility functions including MIME type detection and string operations |
| config/*.conf | Multiple configuration files for testing various scenarios |
| docs/*.md | Comprehensive documentation including architecture, development guides, and project status |
| test.cpp | Removed old test file |
| src/parser.cpp | Removed old parser implementation |
| models/* | Removed old model implementations (replaced with src/models/*) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.