Repository navigation
Conversation
5e1b32f to
35f6b09
Compare
|
Some notes for the review. We are primarily focusing on the code in the new The changes in Serverpod's webserver (within the For parts of the review, it may be good to use |
f4e9bf0 to
eda5d4e
Compare
vlidholt
left a comment
There was a problem hiding this comment.
Great work on this one! Lot's of great updates. I did a quick pass, but I think we'll need a second pair of eyes on this one.
There are some things that need to be fixed throughout the PR:
- There still may be code in here that is no longer used.
- A lot of the documentation is outdated. It need to be brought up to par with all the changes that have been made.
- There is a lot of missing documentation. I suggest that we do a second PR for this, once this one has been merged, where we move to the Serverpod linting rules (which also requires docs for everything).
There are also changes that will need to be made to the Serverpod side of things in this PR, but it may be better to do a review of that when we implement the improved routing.
hampuslavin
left a comment
There was a problem hiding this comment.
Left some initial comments, will have to do a second pass to dig into some more details 👍
d7e34ba to
604984d
Compare
604cf43 to
c3664d1
Compare
…st/Response approach, add Body class to Messages.
SandPod
left a comment
There was a problem hiding this comment.
Still a couple of things to fix. There where a couple of comments from the review that where resolved that where not fixed in the PR.
Please read through the comments carefully to ensure that the feedback corresponds to the fix.
SandPod
left a comment
There was a problem hiding this comment.
Still a couple of comments and suggestions.
…own header values
SandPod
left a comment
There was a problem hiding this comment.
Minor comments but I think we are getting there.
Let's have a call for the last fixes.
… and 'set_cookie_header.dar' and also put the name and value validation functions in a separete file called 'cookie_util.dart' under 'util' folder
…d_header_interface.dart'
|
This PR was merged as an initial commit to a standalone git repository containing only the Relic web server. |
This PR introduces Relic, a lightweight and strictly typed HTTP server designed to work seamlessly with [Serverpod](https://serverpod.dev). Inspired by Shelf, Relic focuses on type safety, performance, and modularity while maintaining extensibility.
Key Features
Core Library (
lib/)relic.dart:lib/src/:This directory organizes the core logic into specialized modules to ensure clarity, scalability, and maintainability.
Core Server Files:
relic_server.dart: Implements the primary server functionality backed by Dart'sHttpServer, handling connections, routing, and core features.relic_server_serve.dart: Provides functionality for serving HTTP requests, with support for advanced features like request hijacking.Modules:
handler/: Implements mechanisms for flexible request routing, delegation, and pipelines for chaining handlers.middleware/: Contains utilities to integrate middleware, including extensions and logging functionality for monitoring requests and responses.logger/: Provides structured logging for better observability and debugging.util/: Shared utility functions for common operations within the library.body/: Handles parsing, validation, and type-checking of request/response bodies.message/: Manages HTTP message formatting, includingrequest.dartandresponse.dartfor processing requests and responses.headers/:The headers module is a central component of the Relic library, offering robust functionality for handling HTTP headers:
headers.dart: Provides the main abstraction for managing HTTP headers, integrating with various submodules.extension/: Adds utility methods for working with headers represented as strings, enabling ease of use and flexibility.parser/: Includesheaders_parser.dartandcommon_types_parser.dartto convert raw headers into structured, validated formats.typed/: Offers predefined and user-defined typed headers, improving reliability and ensuring correctness.custom/: Allows for the definition and management of application-specific headers.exception/: Defines error types for invalid or improperly formatted headers, ensuring reliability.static/: Implements the logic for serving static files, including custom directory listings and optimizations for asset handling.hijack/: Provides request hijacking for advanced use cases requiring low-level control.method/: Manages and validates HTTP methods, ensuring adherence to standard protocols.Test Suite (
test/)The
test/directory includes a comprehensive set of unit and integration tests that validate Relic's features and reliability.Core Test Files:
relic_server_test.dart: Tests the primary server's functionality, including routing and connection handling.relic_server_serve_test.dart: Focuses on validating the server'sservelogic and advanced features like request hijacking.Subdirectories:
handler/: Verifies the routing, delegation, and pipeline mechanisms.middleware/: Tests middleware integration, extensions, and logging functionality.util/: Tests utility functions for correctness and performance.message/: Focuses on request and response message formatting and parsing.headers/:headers/module, including:static/: Ensures proper handling of static file serving and directory listings.hijack/: Tests advanced request hijacking logic for robustness.Related: #2008
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.If you need help, consider asking for advice on the discussion board.
Breaking changes
If you have done any breaking changes, make sure to outline them here, so that they can be included in the notes for the next release.