Skip to content

Response Content-Length mismatch after HTML_PARSING_ERROR #178

@AaronLayton

Description

@AaronLayton

Using the following code

<a test=me=hello class="valid-class">
  My Link
</a>

and a standard setup in .NET 8

services.AddWebMarkupMin(options =>
{
    options.AllowMinificationInDevelopmentEnvironment = true;
    options.AllowCompressionInDevelopmentEnvironment = true;
})
    .AddHtmlMinification()
    .AddXmlMinification()
    .AddHttpCompression();

we get the following error message and then no further requests are processed until we restart the app

fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HNDEJGPHCN93", Request id "0HNDEJGPHCN93:0000004D": An unhandled exception was thrown by the application.
      System.InvalidOperationException: Response Content-Length mismatch: too few bytes written (53508 of 318097).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions