Integrating app.UseAbpStudioLink() in the HostModule of an ASP.NET Core application causes a conflict with HTTP response handling. Specifically, when making requests that require event streaming (such as text/event-stream), the application throws an exception related to the 204 status code. This prevents the endpoint from sending data in the response body when Transfer-Encoding is set.
Environment:
Framework: ASP.NET Core Middleware: UseAbpStudioLink in ABP Server: Kestrel/IIS Project Configuration: Uses event streaming (text/event-stream) to send real-time data to clients. Steps to Reproduce:
Current Behavior:
The application throws the following exception when attempting to send data through the response stream:
System.InvalidOperationException: Setting the header Transfer-Encoding is not allowed on responses with status code 204.
Additionally, warnings are generated indicating that the Transfer-Encoding header is not allowed with the 204 status code. Removing app.UseAbpStudioLink() from the HostModule resolves the issue, and the endpoint can send data without interruption.