| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-12-16 | 3.8 kB | |
| v1.6.0 source code.tar.gz | 2025-12-16 | 427.4 kB | |
| v1.6.0 source code.zip | 2025-12-16 | 610.4 kB | |
| Totals: 3 Items | 1.0 MB | 3 | |
This update brings significant improvements to HTTP engine architecture, a new file server system, and framework enhancements.
HTTP File Server
Introduced the new HttpFileServer system for serving static files efficiently and flexibly:
- Optimized streaming with
Rangeheader support for audio and video - Customizable converters through
HttpFileServerFileConverter - Configurable directory listing
-
Automatic content negotiation based on MIME types
:::csharp var route = HttpFileServer.CreateServingRoute("/static", "./public"); router += route;
// Or with custom configuration var handler = new HttpFileServerHandler("./public") { AllowDirectoryListing = true, // Add custom converters }; var route = HttpFileServer.CreateServingRoute("/files", handler);
The new FileContent class allows returning files with automatic streaming and range request support:
:::csharp
router.SetRoute(RouteMethod.Get, "/download", request => {
return new FileContent("./video.mp4");
});
The HttpFileAudioConverter and HttpFileVideoConverter converters provide automatic support for range requests in media files, enabling seeking in audio/video players.
HTTP Engine Improvements
Significant improvements to HTTP engine abstraction:
- Nova interface
HttpServerEngineContext: Abstração completa do ciclo de vida de requisições HTTP HttpServerEngineWebSocket: Interface abstrata para WebSocket em diferentes engines- Mecanismos de event loop: Suporte através de
HttpServerEngineContextEventLoopMecanism -
Melhor integração SSL: Classe
ListeningHostSslOptionspara configuração SSL por listening host:::csharp var host = new ListeningHost("https://localhost:5000") { SslOptions = new ListeningHostSslOptions { Certificate = myCertificate } };
Logging Improvements
RotatingLogPolicyCompressor: Interface for automatic compression of rotated logsGZipRotatingLogPolicyCompressor: Built-in implementation with GZip compression-
PrefixedLogStream: Improvements to prefixed log stream:::csharp var rotatingPolicy = new RotatingLogPolicy { Compressor = new GZipRotatingLogPolicyCompressor() };
HTTP Server Handler Improvements
- Handler execution ordering: Added
Priorityproperty toHttpServerHandlerto control execution order HttpServerHandlerSortingComparer: New comparer for sorting handlers by priority (lower values execute first)HttpServerHandlerRepository: Changed internal storage fromList<T>toSortedSet<T>for automatic priority-based ordering
WebSocket Improvements
- Fix: Corrections to WebSocket connection management
- Improvements to
HttpWebSocketConnectionCollection - Better handling of closed connections
Other Changes
HttpRequestEventSource: Improvements to Server-Sent Events systemCertificateHelper: New helper class for SSL certificate managementHttpRequest.DisconnectToken: Improvements to disconnection detectionHttpServerExecutionResult: New fields for better execution tracking
Breaking Changes
ListeningHost: SSL properties moved toListeningHostSslOptionsHttpServerEngine: New interface with additional abstract methods- Some method signatures in engines have been changed to support the new contexts
Bug Fixes
- Fixed: Simplified connection closed check in HTTP request parsing
- Fixed: HTTP body drainage corrected
- Fixed: Issues with chunked encoding in requests
- Fixed: Better abort handling in HTTP components
- Fixed: Optimized HTTP header parsing and handling