Skip to content

Commit f6b4d65

Browse files
authored
[Diagnostics] Fix Diagnostics middleware errors (#4271)
Removes setting two forbidden headers.
1 parent 8ebca19 commit f6b4d65

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

eng/PatchConfig.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Microsoft.AspNetCore.Server.IISIntegration;
1010
Microsoft.AspNetCore.Server.IntegrationTesting.IIS;
1111
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets;
12+
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore;
1213
</PackagesInPatch>
1314
</PropertyGroup>
1415

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# How to regenerate the error page
2+
* Go to the Razor Generator project
3+
* dotnet build
4+
* run `dotnet .\bin\Debug\netcoreapp2.1\dotnet-razorpagegenerator.dll "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views" "<<PathToAspNetCore>>\src\Middleware\Diagnostics.EntityFrameworkCore\src\"`

src/Middleware/Diagnostics.EntityFrameworkCore/src/Views/DatabaseErrorPage.Designer.cs

Lines changed: 16 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Middleware/Diagnostics.EntityFrameworkCore/src/Views/DatabaseErrorPage.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@
9797
var formBody = "context=@JavaScriptEncode(UrlEncode(Model.ContextType.AssemblyQualifiedName))";
9898
req.open("POST", "@JavaScriptEncode(Model.Options.MigrationsEndPointPath.Value)", true);
9999
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
100-
req.setRequestHeader("Content-length", formBody.length);
101-
req.setRequestHeader("Connection", "close");
102100
req.send(formBody);
103101
}
104102

0 commit comments

Comments
 (0)