HttpApplication: set StatusCode = 500 when we send an exception to the client
authorEtienne CHAMPETIER <etienne.champetier@fiducial.net>
Thu, 23 Oct 2014 15:44:36 +0000 (17:44 +0200)
committerEtienne CHAMPETIER <etienne.champetier@fiducial.net>
Fri, 24 Oct 2014 14:16:47 +0000 (16:16 +0200)
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
mcs/class/System.Web/System.Web/HttpApplication.cs

index efa4432011abe6d4b43e9702e5ac531b10d944b3..4d7ce11e28333f02a1825e88a4b7fb6cb1795ee4 100644 (file)
@@ -1549,6 +1549,7 @@ namespace System.Web
                        if (initialization_exception != null) {
                                Exception e = initialization_exception;
                                HttpException exc = HttpException.NewWithCode (String.Empty, e, WebEventCodes.RuntimeErrorRequestAbort);
+                               context.Response.StatusCode = 500;
                                FinalErrorWrite (context.Response, exc.GetHtmlErrorMessage ());
                                PipelineDone ();
                                return;