-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content-Length not set on outbound response #14
Comments
Thanks for the input @cgatian I tried to change the code and set the content length after copying the stream but I got an exception that Then I am not sure that this is the problem. Because I turned off the webpack middleware and in the response there is no Content-Length header too. Could you provide an example that demonstrates the problem? |
All you need to do is set response.Headers.content length = stream.length |
How are you sure that this is the problem? I am just asking as I see that Kestel by default doesn't set this header. Maybe I am mistaken but if this was the problem then the server by default would have set this header for all html requests. |
That makes sense. |
Ok I will implement that change then and push a new version in nuget as soon as possible then. Thanks for catching that. |
I just pushed version 1.2.4 |
When WebpackMiddleware.cs modifies the response stream content to inject a script tag the content length is not set to the new length of the response. This causes the HTTP response to get cutoff prematurely.
Content length should be updated to memStream.length the when copying to the new stream.
The text was updated successfully, but these errors were encountered: