title: When using UseStatusCodePagesWithReExecute, statuscode is not sent to browser
body: <p>I have a simple .NET Core 2.0 project. Here is the Configure method:</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment environment)
  {
    app.UseStatusCodePagesWithReExecute("/error/{0}.html");
  
    app.UseStaticFiles();
  
    app.UseMvc(routes =&gt;
    {
      routes.MapRoute(
        name: "default",
        template: "{controller}/{action?}/{id?}",
        defaults: new { controller = "Home", action = "Index" });
      });
    }
  </code></pre>
  
  <p>When I enter an invalid url, /error/404.html is displayed as expected, but the browser gets a 200 status code, instead of the expected 404 status.</p>
  
  <p>What am I doing wrong? Can I not use a static html file as error page?</p>