RFC-compliant Content-Length handling for 1xx, 204 and 205 responses and CONNECT requests
retendo opened this issue · comments
Giraffe should make sure to not send non-RFC-compliant Content-Length headers.
Related Kestrel issue:
dotnet/aspnetcore#42956
Related Kestrel PR:
dotnet/aspnetcore#43103
Context:
Since .NET 7, Kestrel throws an exception if Giraffe tries to send a wrong Content-Length header. See PR above.
My server receives quite a few CONNECT requests that now always return 500.
We should probably fix it here in Line 345:
Giraffe/src/Giraffe/HttpContextExtensions.fs
Lines 342 to 349 in e206cd7
Thanks for the issue and PR!
Once we get the release process issues ironed out I'll be releasing this.