[Mono-devel-list] System.Web.HttpContext - small fix

Mike Morano mmorano at mikeandwan.us
Sat Jul 23 09:37:02 EDT 2005


Hello,

When using RemoteOnly for the custom error mode, the current behavior is
backwards (local request would get the default error page, and remote
requests would get the stack trace).  The patch just changes the last
conditional from == to !=.


Here is the patch to address this:


Index: HttpContext.cs
===================================================================
--- HttpContext.cs      (revision 47587)
+++ HttpContext.cs      (working copy)
@@ -211,7 +211,7 @@
                                        return true;

                                return (mode ==
CustomErrorMode.RemoteOnly &&
-                                       _oRequest.ServerVariables
["LOCAL_ADDR"] == _oRequest.UserHostAddress);
+                                       _oRequest.ServerVariables
["LOCAL_ADDR"] != _oRequest.UserHostAddress);
                        }
                }


Thanks,
Mike




More information about the Mono-devel-list mailing list