| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-08-17 | 5.2 kB | |
| v1.5 source code.tar.gz | 2025-08-17 | 340.3 kB | |
| v1.5 source code.zip | 2025-08-17 | 491.6 kB | |
| Totals: 3 Items | 837.2 kB | 0 | |
Contributions
- ResolveEndpoint optimized so that if an IP address is explicitly specified, that IP address is used by @Sascha-L in https://github.com/sisk-http/core/pull/23
HTTP engine abstraction
The Sisk Framework is now independent of HttpListener.
In this update, all HttpListener-dependent mechanisms have been abstracted into what are called HTTP Engines, which control the abstraction level between the framework and the incoming HTTP components.
With this change, Sisk will be able to use other HTTP processors, such as Cadente Project, Kestrel, or other servers.
Each server can bring features not previously supported natively in Sisk, such as SSL, Quic, pipelining, etc.
Currently, Sisk continues to use .NET's HttpListener as it remains the most stable. Follow and contribute to the development of the Cadente engine for Sisk here.
CORS Improvements
In this update, two global constants have been introduced:
CrossOriginResourceSharingHeaders.AutoFromRequestMethodCrossOriginResourceSharingHeaders.AutoFromRequestHeaders
The behavior is similar to CrossOriginResourceSharingHeaders.AutoAllowOrigin: the server responds with CORS headers according to the request:
:::csharp
using var host = HttpServer.CreateBuilder()
.UseCors(new CrossOriginResourceSharingHeaders(
allowOrigin: CrossOriginResourceSharingHeaders.AutoAllowOrigin,
allowMethods: [CrossOriginResourceSharingHeaders.AutoFromRequestMethod],
allowHeaders: [CrossOriginResourceSharingHeaders.AutoFromRequestHeaders],
exposeHeaders: [HttpKnownHeaderNames.ContentType, "X-Authenticated-Account-Id"],
allowCredentials: true))
...
Web socket API breaking changes
The entire API for the HttpWebSocket class was changed. The motivation for this change was to reduce async/await errors, since the internal WebSocket object doesn't provide a synchronous API. This API rewrite fixes memory leak issues, error handling in asynchronous events, and message pooling.
- No more synchronous methods or events.
- All
Send()methods were removed. UseSendAsync()overloads instead. - No more
WaitForExit()methods. UseReceiveMessageAsync()with a cancellation token or timeout instead. - No more
Close(). UseCloseAsync()instead.
Read the updated docs for more info.
Bug fixes and other changes
- Entirely refactored the
LogStreamcode:- General improvements and fixes in concurrent writing.
- Improvements in asynchronous and synchronous processing.
- Improvements in the shared
LogStreamsingleton. - Fixes for
FlushandFlushAsyncdischarge. - Fixed a bug that caused the circular buffer to come in reverse.
- Implemented
IAsyncDisposable.
- General fixes and improvements in
CircularBuffer<T>. - Added
HttpRequest.DisconnectToken. Note: this feature may not be compatible with all HTTP engines. - Added the
LogModeproperty for theHttpContextclass. With this property, you can decide which log modes are enabled for the current context, which will override the current route log mode. - Added the
HttpContext.GetCurrentContext()method, which returns the currentHttpContextif the current thread is running on a HTTP request context. - Added the
HttpResponse.GetHeaderValue()helper method, which attempts to get an header value from both definedHttpResponse.Content.Headersproperty orHttpResponse.Headers. - Added the
HttpServerConfiguration.DefaultAccessLogFormatconstant. - Added the
TypedValueDictionary.GetValueandTypedValueDictionary.SetValuehelper methods. - Added the
MimeHelper.IsPlainTextMimeTypehelper method. - Added the
{:header}constant literal for the log-formatting options. - Improved exception-handling for forwarding resolvers.
- Fixed an issue where the
ForwardingResolvermethods could throw an exception before the initialization of theHttpRequestobject, which caused theHttpServerExecutionResult.HttpRequestto have an nullHttpRequestobject. - Fixed an possible stack overflow issue when using
InitializationParameterCollection.ContainsKey. - Fixed an issue where the HTTP server were compressing already compressed contents through the
EnableAutomaticResponseCompressionoption. - Fixed an issue where the HTTP server were trying to send responses generated by the
Router.CallbackErrorHandler,Router.NotFoundErrorHandler,Router.MethodNotAllowedErrorHandlerto contexts where was streaming content. - Fixed issues where some HTTP headers could be set after sending content on the
HttpResponseStreamManagerclass. - Fixed issues in the access log formatter.
- Fixed an issue where the HTTP server was not enabling error-logging for user-handled errors.
Full Changelog: https://github.com/sisk-http/core/compare/1.4.3...1.5.0