Преглед на файлове

* HttpRequest.cs: Add property for determining if the request is
local or not.

svn path=/trunk/mcs/; revision=21950

Jackson Harper преди 22 години
родител
ревизия
dc3dfd5448
променени са 2 файла, в които са добавени 13 реда и са изтрити 2 реда
  1. 5 0
      mcs/class/System.Web/System.Web/ChangeLog
  2. 8 2
      mcs/class/System.Web/System.Web/HttpRequest.cs

+ 5 - 0
mcs/class/System.Web/System.Web/ChangeLog

@@ -1,3 +1,8 @@
+2004-01-11  Jackson Harper <[email protected]>
+
+	* HttpRequest.cs: Add property for determining if the request is
+	local or not.
+	
 2004-01-10  Jackson Harper <[email protected]>
 
 	* TraceContext.cs: Handle tracing when it is enabled in the config

+ 8 - 2
mcs/class/System.Web/System.Web/HttpRequest.cs

@@ -1015,8 +1015,14 @@ namespace System.Web {
 
 				return baseVirtualDir;
 			}
-		}
-		
+		}
+
+                internal bool IsLocal {
+                        get {
+                                return _WorkerRequest.GetLocalAddress () == "127.0.0.1";
+                        }
+                }
+                
 		public byte [] BinaryRead(int count) {
 			int iSize = TotalBytes;
 			if (iSize == 0) {